arigato 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 | mac OS and Fedora are not Windows
ebarrett has quit [Ping timeout: 246 seconds]
ebarrett has joined #pypy
lritter has quit [Quit: Leaving]
danieljabailey is now known as sdhand_
sdhand_ is now known as danieljabailey
Garen has joined #pypy
Garen_ has quit [Ping timeout: 268 seconds]
antocuni has quit [Ping timeout: 268 seconds]
[Arfrever] has quit [Quit: leaving]
[Arfrever] has joined #pypy
dddddd has quit [Remote host closed the connection]
mattip has quit [Ping timeout: 268 seconds]
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
jcea has quit [Remote host closed the connection]
mattip has joined #pypy
mattip has quit [Ping timeout: 268 seconds]
mattip has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
forgottenone has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
ast-ral has joined #pypy
<arigato> cfbolz: progress
<arigato> I managed to identify a loop that compiles to nonsense, and manually copy it in test_optimizeopt
<cfbolz> arigato: nice!
<arigato> it may be some aliasing problem, of the kind: p1 and p2 are different at the start of the loop, but become equal at the end, and the optimized 2nd version of the loop uses that fact
<arigato> we later attach a bridge directly to the 2nd version, but without checking that p1 and p2 are indeed equal
<arigato> does it sound like it could occur?
<arigato> I think the 2nd version of the loop uses equality like this: it optimizes i3=getfield(p1) by replacing it with the value of computed long ago for getfield(p2)
<arigato> ah, or rather, the arguments of the 2nd version of the loop contain i3, which is equal to getfield(p1) or getfield(p2), doesn't matter which one
<cfbolz> arigato: I thought that virtual state checks for aliasing
<cfbolz> But it's not impossible indeed
<arigato> ...still confused, looking more...
<cfbolz> did you notice just how weird the loop in the python example is? It passes the inner while header *three* times, not two
<arigato> "passes the inner while header"?
<cfbolz> arigato: I'll paste you something when I'm back at the laptop
<cfbolz> Just look at how many pop_jump_ifs bytecodes there are
<arigato> I think that's explainable
<arigato> the first is #45 POP_JUMP_IF_FALSE
<arigato> the second is #24 POP_JUMP_IF_FALSE, that's the outer loop
<arigato> the third one is also #45 POP_JUMP_IF_FALSE but always passes
<arigato> because we know more or less statically at this point that height > 0
<cfbolz> So it prevents the merge at this one because one is always true, the other always false?
<arigato> I think the third one is not recorded as interesting at all, it's a guard on what is known to be true
<arigato> and I think we force merge points only on JUMP_ABSOLUTE, i.e. at the end of loops, not at the beginning
<cfbolz> Right
<cfbolz> Ah, I see
<arigato> that's happy nonsense but only a little bit
krono has joined #pypy
<cfbolz> arigato: yes, because the first guard in the loop body will always fail
<arigato> yes
<arigato> it would make sense if we were calling f(1), at least
<cfbolz> arigato: yes, but we aren't
<cfbolz> So it's just silly
<arigato> agreed, but "too bad", such cases occur---as long as they don't also cause bugs :-)
<cfbolz> Yes :-)
<arigato> so basically, the loop goes from the inner while, "h <= 0", down the bottom, up the outer loop again, "h = height which is > 0", inside the inner loop, and back at the start of the inner while
<arigato> unrolling figures out that if we run this loop two times in a row, then it must mean that "h = (height - 1) <= 0"
<arigato> so the optimized 2nd iteration of the loop should have as condition "height == 1" somehow
<arigato> or "h == height - 1"
<cfbolz> Yes
<cfbolz> But I think it figures this out very implicitly
<arigato> ...and now I understood why the end of the 2nd iteration passes a constant 0: that's because at that point we know that h = height - 1 == 0
<cfbolz> arigato: but note that coming from the preamble we can never actually reach the jump
<arigato> unless we call f(1)
<cfbolz> So things become wrong only through making a bridge jump to the loop
<arigato> it's more complicated than "this code is fully unreachable"
<cfbolz> arigato: aaaah, right
antocuni has joined #pypy
ast-ral has quit [Quit: Page closed]
antocuni has quit [Ping timeout: 250 seconds]
antocuni has joined #pypy
antocuni has quit [Ping timeout: 250 seconds]
<krono> Contgrats for the ARMv8 thing :D
marky1991 has joined #pypy
marky1991 has quit [Client Quit]
<fijal> krono: thanks
<krono> Good to see such things happening
dddddd has joined #pypy
<krono> vmprof is cool :D (btw: vmprof.com 502…)
kanaka has quit [Ping timeout: 250 seconds]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
kanaka has joined #pypy
adamholmberg has joined #pypy
lritter has joined #pypy
abrown has joined #pypy
xcm is now known as Guest75838
Guest75838 has quit [Killed (asimov.freenode.net (Nickname regained by services))]
xcm has joined #pypy
<abrown> cfbolz: are you online?
<cfbolz> yep
<abrown> are you still interested in taking a look at that abstract model?
<abrown> I took a look at your thesis and this may be a different approach
<cfbolz> sure
<abrown> ok, let me know if you can access this: https://drive.google.com/drive/folders/1rCtpKz3sYhwCyYL8VYM-hy5VjX11ZVx2
<abrown> fijal: would love your feedback too if you're online
<abrown> anyone really...
<abrown> :)
<cfbolz> abrown: would you be up to sharing the whole document? I'd like some context when reading
<abrown> ha... well it is still in-progress
<abrown> I will share it once I'm done; sometime next week?
<cfbolz> ok
<abrown> a lot of rough edges
* arigato froztbyte if you're around and don't feel like working, you can join me for a beer at Mojito's bar
jacob22__ has quit [Remote host closed the connection]
jacob22__ has joined #pypy
Rhy0lite has joined #pypy
mattip has quit [Ping timeout: 245 seconds]
kanaka has quit [Changing host]
kanaka has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
Zaab1t has joined #pypy
danielboston26 has joined #pypy
antocuni has joined #pypy
<danielboston26> is there a debian binary for pypy3?
abrown has quit [Remote host closed the connection]
<danielboston26> so portable pypy is for debian stable im currently running testing so im guessing testing will break things in pypy?
mattip has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
<ronan> danielboston26: portable pypy should work on a more recent debian
<_aegis_> could dataclass be pulled into pypy 3.6 like f-strings were pulled into 3.5?
<_aegis_> I'd love to use them but I assume 3.7 is a ways out
<_aegis_> I think they mostly just depend on variable typing which is already in 3.6
<ronan> _aegis_: I'd recommend using attrs instead
danielboston26 has quit [Ping timeout: 250 seconds]
danielboston26 has joined #pypy
forgottenone has quit [Ping timeout: 240 seconds]
nunatak has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
<_aegis_> I know about attrs, I have reasons to prefer dataclass
<_aegis_> is the only req that I have the package and it's in builtins?
sthalik has joined #pypy
<sthalik> hey
<cfbolz> _aegis_: you can install it with pip on py3.6
<sthalik> can arrays be efficient as hash table keys?
<sthalik> in particular, arrays of small integers
<_aegis_> more efficient
<_aegis_> unless they're linked lists
<_aegis_> or you mean the single byte form used by pypy?
<sthalik> I can use either arrays of integers, made-up strings, or made-up bignums
<cfbolz> sthalik: lists of ints are quite fast on pypy
<sthalik> cfbolz, thanks
<cfbolz> but the real answer is: "measure to find out"
<glyph> lists of ints can't be hash table keys because list.__hash__ raises an exception
<glyph> so you'll have to be very specific about what you mean by "arrays" :)
danielboston26 has quit [Changing host]
danielboston26 has joined #pypy
<danielboston26> is portable pypy compatible with debian testing?
<cfbolz> danielboston26: try it, no other way to find out
<danielboston26> the default build doesn't support debian?
<danielboston26> it only lists ubuntu but since ubuntu is based on debian testing shouldnt that work?
<cfbolz> try it
danielboston26 has quit [Quit: Leaving]
antocuni has quit [Ping timeout: 246 seconds]
mattip has quit [Ping timeout: 252 seconds]
abrown has joined #pypy
mattip has joined #pypy
Zaab1t has quit [Quit: bye bye friends]
Rhy0lite has quit [Quit: Leaving]
dddddd has quit [Ping timeout: 268 seconds]
dddddd has joined #pypy
abrown has quit [Ping timeout: 246 seconds]
user24 has joined #pypy
nunatak has quit [Quit: Leaving]
jamesaxl has quit [Quit: WeeChat 2.2]
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
sthalik has quit [Quit: leaving]
xcm has quit [Read error: Connection reset by peer]
xcm has joined #pypy
abrown has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 250 seconds]
lritter has quit [Remote host closed the connection]
jacob22__ has quit [Quit: Konversation terminated!]
jacob22__ has joined #pypy