cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end ) | use cffi for calling C | if a pep adds a mere 25-30 [C-API] functions or so, it's a drop in the ocean (cough) - Armin
Gustavo6046 has quit [Ping timeout: 240 seconds]
jcea has quit [Ping timeout: 250 seconds]
<fijal> that should probably not be called NO TITLE
<cfbolz> fijal: the original post had no title though ;-)
<cfbolz> fijal: just fix it? https://github.com/pypy/pypy.org/
otisolsen70 has joined #pypy
oberstet has joined #pypy
<arigato> cfbolz: https://foss.heptapod.net/pypy/pypy/-/issues/3440 is caused (I think) by daa88942f8b9
<arigato> normally, mylist[:] = stuff computes stuff completely first, and then does the assignment. that's also what cpython does
<cfbolz> Right, fair :-(
<arigato> ah no, that's older
<cfbolz> Ah, indeed, they say 7.3.3, not 7.3.4
<arigato> sorry, I misread the diff
<cfbolz> arigato: are you looking into it? Or should I try?
<arigato> 33b4dd03c9a6 then? but that's like the previous checkin
<arigato> please go ahead, there are reasons for this optimization that I don't know yet
<cfbolz> arigato: if it's in 7.3.3 the bug was there since "forever" probably
<arigato> no, I think the title says "it used to work in CPython 3.7 and in PyPy3.6-7.3.3, but it no longer does"
<cfbolz> aaah
<cfbolz> ok
<cfbolz> sorry, reading too quickly
<arigato> well, I'm not sure :-) that's one interpretation
<cfbolz> arigato: the optimization is "just" that I didn't want to us the really general code path in AbstractUnwrappedStrategy.setslice
<cfbolz> that carefully moves items around start=0 and stop=length
<arigato> also, it optimizes the case where l[:]=l2 and l has got a general strategy but l2 a specific one
<cfbolz> yes
<cfbolz> arigato: but it seems we need the code that comes just after the fast path
<cfbolz> this, I mean:
<arigato> ah, yes
<arigato> I thought that the fast-path could only work if l2 was a W_ListObject, but your approach might be better(?)
<cfbolz> I think so
<arigato> right, the creation of the W_ListObject will cost more in terms of checking the types and unwrapping them all, but that's a strategy-preserving bonus
<cfbolz> that's the hope, at least
<cfbolz> arigato: also, note that we would be doing it in the general setslice case anyway
<arigato> yes
<arigato> so in the end if you ensure that w_any is a W_ListObject you can use copy_into() again
<cfbolz> hm, I see
<cfbolz> ok, trying
<cfbolz> arigato: did I tell you about my idea of implementing an unresizable variant of all list strategies, to remove one level of indirections?
<arigato> ouch
<cfbolz> not completely clear where to create them
<arigato> :-)
<cfbolz> on slicing, I suppose
<cfbolz> and maybe list comprehensions? definitely literals
<arigato> or on extend() from the empty strategy
<cfbolz> hah
<cfbolz> arigato: and if we have that, we could even think about "immutable" list strategies, for fixed sized lists that are stored in globals or on classes
<arigato> look at all usages of copy_into() and check if it would make sense to make the copy a unresizable variant instead?
<arigato> ah, I see
<arigato> advanced
<cfbolz> maybe, it feels like work ;-)
<arigato> ...and [None] * 1234 makes an unresizable variant, and the well-known hack of writing "lst *= 1" makes it unresizable...
<cfbolz> haha
<cfbolz> arigato: I am mainly annoyed that we have this level of indirection, and cpython doesn't ;-)
<arigato> yes, too bad that we're more compact in many cases but not the most general case
<cfbolz> yeah :-)
<arigato> note that we could shave off one level of indirection in most cases
<cfbolz> arigato: yeah, well, we could stop using resizable lists in listobject.py
<arigato> by having an unresizable rpython list and doing the overallocation ourselves again
<cfbolz> yeah
<cfbolz> but then stuff like space.viewlist is annoying
<arigato> long ago we played with the idea of GC support, I think?
<cfbolz> how would that work?
<arigato> have a GC array but with two lengths in it, and the smaller one is the number of really used items
<arigato> which can grow up to the larger length
<cfbolz> right
<cfbolz> arigato: or I wonder about the following hack: when we call viewlist, we return the unresizable list but wrapped in a resizable struct
<cfbolz> you are anyway not supposed to mutate the result
<arigato> ouch, right
<arigato> like an rpython way to say "resizable = fixed[:] but don't bother making a full copy"
<cfbolz> yeah
<cfbolz> more like fixed[:len]
<cfbolz> but yes
<arigato> there is an annotation for "SomeList which is never modified" right?
<arigato> if so, that may be a safe enough idea
<cfbolz> to make sure that the caller *cannot* do anything?
<cfbolz> arigato: I suspect we can 'can never be modified', but that also means 'is fixed sized'
<arigato> ah yes, so it doesn't work
<cfbolz> arigato: or needs to be added
tos9__ has joined #pypy
tos9 has quit [Ping timeout: 252 seconds]
tos9_ has quit [Ping timeout: 240 seconds]
ulope has quit [Ping timeout: 248 seconds]
ulope has joined #pypy
vstinner has quit [Quit: leaving]
infernixx has quit [Ping timeout: 260 seconds]
Dejan_ has joined #pypy
Dejan has quit [Ping timeout: 252 seconds]
Dejan has joined #pypy
Dejan has joined #pypy
Dejan__ has joined #pypy
Dejan_ has quit [Ping timeout: 268 seconds]
Dejan has quit [Ping timeout: 240 seconds]
lritter has joined #pypy
Dejan__ has quit [Ping timeout: 240 seconds]
Dejan has joined #pypy
Dejan has quit [Changing host]
Dejan has joined #pypy
Dejan has quit [Ping timeout: 268 seconds]
Dejan has joined #pypy
infernix has joined #pypy
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-32/builds/6337 [Carl Friedrich Bolz-Tereick: force build, jit-heapcache-interiorfields]
<bbot2> Started: http://buildbot.pypy.org/builders/rpython-linux-x86-64/builds/447 [Carl Friedrich Bolz-Tereick: force build, jit-heapcache-interiorfields]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/7617 [Carl Friedrich Bolz-Tereick: force build, jit-heapcache-interiorfields]
<bbot2> Started: http://buildbot.pypy.org/builders/rpython-linux-x86-32/builds/419 [Carl Friedrich Bolz-Tereick: force build, jit-heapcache-interiorfields]
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-32/builds/6337 [Carl Friedrich Bolz-Tereick: force build, jit-heapcache-interiorfields]
<bbot2> Failure: http://buildbot.pypy.org/builders/rpython-linux-x86-32/builds/419 [Carl Friedrich Bolz-Tereick: force build, jit-heapcache-interiorfields]
<bbot2> Failure: http://buildbot.pypy.org/builders/rpython-linux-x86-64/builds/447 [Carl Friedrich Bolz-Tereick: force build, jit-heapcache-interiorfields]
<cfbolz> this branch is crused
<cfbolz> cursed
<cfbolz> loooots of problem, but they all have nothing to do with the actual feature
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/7617 [Carl Friedrich Bolz-Tereick: force build, jit-heapcache-interiorfields]
<fijal> I would love github to have this feature
<fijal> "it looks like this branch is cursed, would you like to just wipe it out of earth surface?"
<cfbolz> fijal: in this case there's this one assert, which was always there but accidentally disabled (in the JIT). while doing kind of unrelated stuff, I noticed and enabled, and it seems broken :-/
<fijal> heh
<cfbolz> only on 32bit of course
<cfbolz> so I can't easily debug locally
jcea has joined #pypy
lritter has quit [Ping timeout: 246 seconds]
Dejan has quit [Read error: Connection reset by peer]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-32/builds/6338 [Carl Friedrich Bolz-Tereick : force build, jit-heapcache-interiorfields]
<bbot2> Started: http://buildbot.pypy.org/builders/rpython-linux-x86-64/builds/448 [Carl Friedrich Bolz-Tereick : force build, jit-heapcache-interiorfields]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/7618 [Carl Friedrich Bolz-Tereick : force build, jit-heapcache-interiorfields]
<bbot2> Started: http://buildbot.pypy.org/builders/rpython-linux-x86-32/builds/420 [Carl Friedrich Bolz-Tereick : force build, jit-heapcache-interiorfields]
otisolsen70_ has joined #pypy
otisolsen70_ has quit [Remote host closed the connection]
otisolsen70 has quit [Ping timeout: 240 seconds]
tsaka__ has joined #pypy
todda7 has quit [Ping timeout: 252 seconds]
oberstet has quit [Quit: Leaving]
tsaka__ has quit [Quit: Konversation terminated!]
<bbot2> Failure: http://buildbot.pypy.org/builders/rpython-linux-x86-32/builds/420 [Carl Friedrich Bolz-Tereick : force build, jit-heapcache-interiorfields]
<bbot2> Failure: http://buildbot.pypy.org/builders/rpython-linux-x86-64/builds/448 [Carl Friedrich Bolz-Tereick : force build, jit-heapcache-interiorfields]
<bbot2> Success: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-32/builds/6338 [Carl Friedrich Bolz-Tereick : force build, jit-heapcache-interiorfields]
<bbot2> Success: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/7618 [Carl Friedrich Bolz-Tereick : force build, jit-heapcache-interiorfields]
tos9__ is now known as tos9
jcea has quit [Ping timeout: 258 seconds]
Gustavo6046 has joined #pypy