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
jiffe has quit [Ping timeout: 260 seconds]
jiffe has joined #pypy
tumbleweed has joined #pypy
infernix has quit [Ping timeout: 240 seconds]
infernix has joined #pypy
jcea has quit [Ping timeout: 264 seconds]
_whitelogger has joined #pypy
<simpson> What are the bounds of what I can do while the GIL is released in multi-threaded RPython? Basically nothing, right?
<mattip> is there a way to tell the gc to ignore globals() from imported modules?
<mattip> there is a mmap class in numpy that uses __del__ to release a memoryview of the mmap rather than have a close() method,
<mattip> since there may be other consumers of the mmap, so the memoryview may not be the only one holding a reference to it
<mattip> the test takes over 15 minutes on my machine since, on pypy, the "del obj" call must be followed by a gc.collect() to actually work
<mattip> and the process is called in a loop ~150 times
<mattip> each time calling gc.collect multiple times
oberstet has joined #pypy
<mattip> there are millions of objects to trace, many of them globals() of modules (docstrings, classes, ...)
<mattip> it would be nice to be able to ignore the things that are imortal
<fijal> they're not outright immortal, you can remove them from the modules
<fijal> but also, the problem is that you have to mark everything alive
<fijal> so stuff that can be referenced by those modules
todda7 has quit [Read error: Connection reset by peer]
<fijal> the problem here is that you want to call __del__, so you need to collect the entire heap, you can't use the incremental nature of the GC
todda7 has joined #pypy
<mattip> hmm. I guess I could try to run the test in a subprocess so the gc has less work to do
<mattip> annoying
<mattip> ok, I seem to have a work-around
<LarstiQ> how?
<mattip> the numpy class has a flush method, which is effective on linux but not windows
<mattip> since windows needs the memmap to actually be closed for the test to succeed
<mattip> but this particular test is skipped on windows
<cfbolz> marky1991: did you find the problem in the end?
<mattip> I guess the bottom line is you really want to avoid gc.collect in tests, since they end up importing the whole world
<LarstiQ> right
lritter has joined #pypy
todda7 has quit [Ping timeout: 272 seconds]
todda7 has joined #pypy
todda7 has quit [Client Quit]
jcea has joined #pypy
oberstet has quit [Read error: Connection reset by peer]
oberstet has joined #pypy
Mortir has joined #pypy
<mattip> locally, this fails two tests on default
<mattip> /tmp/cpython2/bin/python pytest.py rpython/rlib/test/test_rfile.py
<mattip> where cpython2 is cpython2.7.18
YannickJadoul has joined #pypy
<bbot2> Started: http://buildbot.pypy.org/builders/rpython-linux-x86-64/builds/391 [mattip: force build, rpython3]
<mattip> but the buildbot passes
dddddd has quit [Ping timeout: 240 seconds]
bogner has quit [Ping timeout: 256 seconds]
YannickJadoul has quit [Quit: Leaving]
<bbot2> Failure: http://buildbot.pypy.org/builders/rpython-linux-x86-64/builds/391 [mattip: force build, rpython3]
jacob22 has quit [Read error: Connection reset by peer]
jacob22 has joined #pypy
Smigwell has joined #pypy
Mortir has quit [Ping timeout: 256 seconds]
<ronan> mattip: it looks like porting the doc generation files and lightly refactoring pypy and rpython configuration systems should be enough
dddddd has joined #pypy
mattip has quit [Ping timeout: 256 seconds]
mattip has joined #pypy
marky1991 has joined #pypy
<marky1991> cfbolz not yet, no
<cfbolz> marky1991: is there a difference between the jit being on or off?
<marky1991> let me try translatig without the jit
<marky1991> i haven't tried
<cfbolz> marky1991: do you expose the --jit runtime option?
<cfbolz> (then you don't need to retranslate to turn it off)
<marky1991> i didn't know there was one
<marky1991> probably not in other words
<marky1991> translating only takes a few minutes for my interpreter anyway, not as big a deal as in pypy
<marky1991> interesting, i'll add that
<cfbolz> marky1991: then you can run the interpreter with "--jit off"
<marky1991> ok, even with the jit off, it's still segfaulting
<marky1991> i'm assuming that the jit defaults to off anyway
<marky1991> trying to find explicit docs for the options
<marky1991> i stopped passing --jit explicitly in other words
<marky1991> --opt=jit rather
<marky1991> let me try opt=0
<cfbolz> marky1991: sorry, confusion. --opt=jit is an option that goes to translation with rpython
<cfbolz> marky1991: the --jit option is one that you pass *after* translation
<marky1991> yes, i was testing by just translating again without the jit.
<cfbolz> right
<marky1991> i haven't implemented --jit yet
<cfbolz> ok, anyway, that's *good*
<cfbolz> because a JIT problem is even more annoying ;-)
<cfbolz> so now translate with rpython --lldebug
<marky1991> yeah, i thought the same : )
<cfbolz> (and jit off)
<marky1991> i think my last translation was that, checking
<marky1991> no, it wasn't. Trying that now
<marky1991> translating without the jit is so nice
<marky1991> only 2 minutes that way
<cfbolz> :-)
<marky1991> ok, what should i do now?
<marky1991> launch gdb on the core file?
<cfbolz> nope, just run it
<cfbolz> ideally it will give you a better error message than just "segmentation fault"
<cfbolz> (gdb is the last resort)
<marky1991> same error message
<marky1991> maybe i did something wrong?
<cfbolz> unlikely ;-)
<cfbolz> maybe I should try it
<marky1991> when i do a bare ./kiss, i do get some log about mallocs left
<marky1991> so i think i did it right
<cfbolz> cool
<cfbolz> can you paste me again what I can do to reproduce?
<marky1991> yes, one sec
<marky1991> clone from https://hg.sr.ht/~marky1991/kiss , then run ./translate.sh, then run ./kiss ../examples/generators.ks
<cfbolz> on it
<marky1991> thanks for all the help so far
<marky1991> the checked-in translate.sh is still building with jit on and no lldebug though
<cfbolz> yes yes, I just ignored that :-P
<marky1991> cool : )
<cfbolz> ok, gdb
<cfbolz> it's in Transformer._plussed
<marky1991> yes, i saw that as well, but i odn't see what's wrong with it
<marky1991> what's wrong with ._plussed?
<cfbolz> this code isn't really rpython enough:
<cfbolz> except (AttributeError, IndexError):
<cfbolz> you can't catch AttributeErrors
<cfbolz> and I think that's what's happening
<marky1991> hm, interesting
<cfbolz> you have a plus node that has a null pointer as .children
<marky1991> i' don;t remember why i implemented it that way in the first place
<marky1991> i'll try getting rid of it and see fi that resolves it
<marky1991> thanks!
<cfbolz> I suspect because you don't control the Node class that rlib.parsing gives you?
<marky1991> cating indexerror is fine, right?
<cfbolz> yes
<marky1991> hm, yes
<cfbolz> ah, I see
<marky1991> hmm
<cfbolz> you need to check with isinstance whether it's a rlib.parsing.tree.Nonterminal (then it has children) or not
<marky1991> ok
<cfbolz> let me know how it goes!
<cfbolz> (wow, I don't remember how rlib.parsing works *at all*)
<marky1991> i probably need to move away from it or enhance it at some point
<marky1991> e.g. it doesn't support non-ascii i think
<marky1991> but it was very convenient
<cfbolz> it's super old, and I suspect it should be killed
<marky1991> i forgot how pypy itself does it
<marky1991> need to look at some point
<cfbolz> it has its own handwritten ll(1) parsing engine
<cfbolz> (but it's going to have to change soonish, since CPython changed)
<simpson> CPython uses PEG now, right? Do they depend heavily on semantic actions? Are you going to use their grammar verbatim, or is that not workable?
<marky1991> yay, no more segfault
<cfbolz> simpson: it's all semantic actions
<cfbolz> very annoygin
<marky1991> thanks a lot cfbolz
<marky1991> hm, isn't there a page describing ''What's NOT rpython"?
<marky1991> the general rule of course is 'whatever translates
<marky1991> but that rule didn't work here
<simpson> cfbolz: Indeed, yeah. I wish I had good ideas for how to improve that; there's gotta be some way to prevent the grammar from diverging too much.
<marky1991> aha, found the page i was looking for, https://rpython.readthedocs.io/en/latest/rpython.html
<marky1991> it would be nice to document 'no attributeerror'in https://rpython.readthedocs.io/en/latest/rpython.html#exception-rules
<marky1991> oh, one more question if possible
<marky1991> how did you figure out that the problem was the attributeerror?
<marky1991> i was looking at the stacktrace in gdb but couldn't figure it out from that
<cfbolz> marky1991: in gdb I saw that it was a null pointer, coming from a .children attribue
<cfbolz> so I grepped for ".children" in that function
<marky1991> hm, i'll put the error back and try to find it again
<marky1991> i need to get better at gdb
<cfbolz> simpson: yes, you almost want a custom merge tool that ignores the semantic actions
<cfbolz> marky1991: it's not so much gdb
<cfbolz> more that I am pretty used to reading the C code generated by rptyhon
Mortir has joined #pypy
marky1991 has quit [Remote host closed the connection]
<mattip> ronan: about rpython3 - I also wanted to see how far I can get without breaking python2/python3 compatibility
Mortir has quit [Quit: leaving]
<mattip> I think I reached a real blocker in the lltypesystem/rffi.py make_string_mappings(), since it needs to distinguish between str and unicode
<mattip> in other news, the data api consortium has published the draft array api standard
<mattip> so now we can reimplement numpypy according to a spec
dddddd has quit [*.net *.split]
mattip has quit [*.net *.split]
swills has quit [*.net *.split]
raekye has quit [*.net *.split]
the_rat has quit [*.net *.split]
Hodgestar has quit [*.net *.split]
dddddd has joined #pypy
the_rat has joined #pypy
swills has joined #pypy
raekye has joined #pypy
mattip has joined #pypy
Hodgestar has joined #pypy
swills has quit [Max SendQ exceeded]
swills has joined #pypy
kipras has quit [*.net *.split]
xcm has quit [*.net *.split]
_aegis_ has quit [*.net *.split]
mwhudson has quit [*.net *.split]
pulkit25_ has quit [*.net *.split]
astrojl_matrix has quit [*.net *.split]
JStoker has quit [*.net *.split]
jneen has quit [*.net *.split]
mjacob has quit [*.net *.split]
phlebas has quit [*.net *.split]
altendky has quit [*.net *.split]
fijal has quit [*.net *.split]
jaraco has quit [*.net *.split]
pmp-p has quit [*.net *.split]
[Arfrever] has quit [*.net *.split]
commandoline has quit [*.net *.split]
Kronuz has quit [*.net *.split]
ulope has quit [*.net *.split]
shodan45 has quit [*.net *.split]
mwhudson has joined #pypy
pulkit25_ has joined #pypy
astrojl_matrix has joined #pypy
jneen has joined #pypy
JStoker has joined #pypy
pmp-p has joined #pypy
[Arfrever] has joined #pypy
shodan45 has joined #pypy
mjacob has joined #pypy
ulope has joined #pypy
phlebas has joined #pypy
altendky has joined #pypy
commandoline has joined #pypy
jaraco has joined #pypy
Kronuz has joined #pypy
fijal has joined #pypy
JStoker has quit [Max SendQ exceeded]
JStoker has joined #pypy
altendky has quit [Max SendQ exceeded]
swills has quit [*.net *.split]
glyph has quit [*.net *.split]
camelCaser has quit [*.net *.split]
marvin has quit [*.net *.split]
dnshane has quit [*.net *.split]
xcm has joined #pypy
_aegis_ has joined #pypy
kipras has joined #pypy
luizirber has quit [*.net *.split]
Smigwell has quit [*.net *.split]
lritter has quit [*.net *.split]
danchr_ has quit [*.net *.split]
kipras`away has quit [*.net *.split]
JStoker has quit [*.net *.split]
Orimendix has quit [*.net *.split]
dstufft has quit [*.net *.split]
kipras`away has joined #pypy
Smigwell has joined #pypy
lritter has joined #pypy
danchr_ has joined #pypy
swills has joined #pypy
luizirber has joined #pypy
dnshane has joined #pypy
camelCaser has joined #pypy
glyph has joined #pypy
marvin has joined #pypy
swills has quit [Max SendQ exceeded]
camelCaser has quit [Max SendQ exceeded]
dstufft has joined #pypy
Orimendix has joined #pypy
JStoker has joined #pypy
omasanori[m] has quit [Ping timeout: 246 seconds]
astrojl_matrix has quit [Ping timeout: 260 seconds]
toad_polo has quit [Ping timeout: 268 seconds]
Orimendix has quit [Ping timeout: 240 seconds]
pulkit25_ has quit [Ping timeout: 260 seconds]
the_drow[m] has quit [Ping timeout: 246 seconds]
swills has joined #pypy
oberstet has quit [*.net *.split]
cfbolz has quit [*.net *.split]
DRMacIver has quit [*.net *.split]
epsilonKNOT has quit [*.net *.split]
pjenvey has quit [*.net *.split]
marmoute has quit [*.net *.split]
atomizer has quit [*.net *.split]
iko_ has quit [*.net *.split]
lastmikoi has quit [*.net *.split]
danilonc has quit [*.net *.split]
runciter has quit [*.net *.split]
rjarry has quit [*.net *.split]
Dejan has quit [*.net *.split]
tazle has quit [*.net *.split]
LarstiQ has quit [*.net *.split]
jerith has quit [*.net *.split]
Ashleee has quit [*.net *.split]
oberstet has joined #pypy
cfbolz has joined #pypy
lastmikoi has joined #pypy
DRMacIver has joined #pypy
iko_ has joined #pypy
runciter has joined #pypy
danilonc has joined #pypy
atomizer has joined #pypy
epsilonKNOT has joined #pypy
pjenvey has joined #pypy
marmoute has joined #pypy
epsilonKNOT has quit [Max SendQ exceeded]
pulkit25_ has joined #pypy
Dejan has joined #pypy
Dejan has joined #pypy
EWDurbin has quit [*.net *.split]
graingert has quit [*.net *.split]
michelp has quit [*.net *.split]
Alex_Gaynor has quit [*.net *.split]
agronholm has quit [*.net *.split]
idnar has quit [*.net *.split]
krono has quit [*.net *.split]
rubdos has quit [*.net *.split]
ronan has quit [*.net *.split]
Civil has quit [*.net *.split]
simpson has quit [*.net *.split]
altendky has joined #pypy
rjarry has joined #pypy
tazle has joined #pypy
LarstiQ has joined #pypy
Ashleee has joined #pypy
jerith has joined #pypy
EWDurbin has joined #pypy
graingert has joined #pypy
michelp has joined #pypy
Alex_Gaynor has joined #pypy
agronholm has joined #pypy
idnar has joined #pypy
krono has joined #pypy
rubdos has joined #pypy
ronan has joined #pypy
Civil has joined #pypy
simpson has joined #pypy
epsilonKNOT has joined #pypy
Cheery has quit [*.net *.split]
antocuni has quit [*.net *.split]
nopf has quit [*.net *.split]
gutworth has quit [*.net *.split]
gsnedders has quit [*.net *.split]
_habnabit has quit [*.net *.split]
sknebel has quit [*.net *.split]
energizer has quit [*.net *.split]
trfl has quit [*.net *.split]
jiffe has quit [*.net *.split]
whitewolf has quit [*.net *.split]
mgorny has quit [*.net *.split]
oberstet has quit [Quit: Leaving]
whitewolf has joined #pypy
jiffe has joined #pypy
mgorny has joined #pypy
gsnedders has joined #pypy
Cheery has joined #pypy
_habnabit has joined #pypy
sknebel has joined #pypy
energizer has joined #pypy
trfl has joined #pypy
nopf has joined #pypy
gutworth has joined #pypy
antocuni has joined #pypy
graingert has quit [Ping timeout: 248 seconds]
lazka has quit [*.net *.split]
Techcable has quit [*.net *.split]
dansan has quit [*.net *.split]
dustinm has quit [*.net *.split]
Ninpo has quit [*.net *.split]
WGH has quit [*.net *.split]
kbtr has quit [*.net *.split]
catern has quit [*.net *.split]
riddle has quit [*.net *.split]
ammar2 has quit [*.net *.split]
alcarithemad has quit [*.net *.split]
tos9 has quit [*.net *.split]
samth has quit [*.net *.split]
wallet42__ has quit [*.net *.split]
string has quit [*.net *.split]
jeroud has quit [*.net *.split]
ctismer has quit [*.net *.split]
igitoor has quit [*.net *.split]
astronav- has quit [*.net *.split]
tbodt has quit [*.net *.split]
LordKalma has quit [*.net *.split]
kirma has quit [*.net *.split]
nimaje has quit [*.net *.split]
arigato has quit [*.net *.split]
lazka has joined #pypy
dustinm has joined #pypy
dansan has joined #pypy
Techcable has joined #pypy
Ninpo has joined #pypy
WGH has joined #pypy
kbtr has joined #pypy
ammar2 has joined #pypy
catern has joined #pypy
riddle has joined #pypy
alcarithemad has joined #pypy
infernix has quit [*.net *.split]
wilbowma has quit [*.net *.split]
bbot2 has quit [*.net *.split]
mgedmin has quit [*.net *.split]
holdsworth_ has quit [*.net *.split]
exarkun has quit [*.net *.split]
string has joined #pypy
tos9 has joined #pypy
LordKalma has joined #pypy
wallet42__ has joined #pypy
samth has joined #pypy
ctismer has joined #pypy
arigato has joined #pypy
jeroud has joined #pypy
igitoor has joined #pypy
kirma has joined #pypy
tbodt has joined #pypy
nimaje has joined #pypy
astronav- has joined #pypy
infernix has joined #pypy
exarkun has joined #pypy
holdsworth_ has joined #pypy
wilbowma has joined #pypy
bbot2 has joined #pypy
mgedmin has joined #pypy
mgedmin has quit [Max SendQ exceeded]
infernix has quit [Max SendQ exceeded]
graingert has joined #pypy
mgedmin has joined #pypy
string has quit [Ping timeout: 260 seconds]
string has joined #pypy
altendky has quit [Ping timeout: 244 seconds]
altendky has joined #pypy
wleslie has joined #pypy
infernix has joined #pypy
toad_polo has joined #pypy
astrojl_matrix has joined #pypy
omasanori[m] has joined #pypy
Orimendix has joined #pypy
the_drow[m] has joined #pypy
seberg has joined #pypy
seberg has quit [Quit: Leaving]
lritter has quit [Ping timeout: 260 seconds]
Smigwell has left #pypy [#pypy]