cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | the secret reason for us trying to get PyPy users: to test the JIT well enough that we're somewhat confident about it
danieljabailey has quit [Quit: ZNC 1.6.5+deb2build2 - http://znc.in]
Remi_M has quit [Read error: Connection reset by peer]
jdb_ has quit [Ping timeout: 246 seconds]
mattip has joined #pypy
jdb_ has joined #pypy
jamesaxl has quit [Ping timeout: 240 seconds]
illume has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tuwxbhi has joined #pypy
tuwxbhi has quit [Client Quit]
asmeurer has quit [Quit: asmeurer]
amaury has quit [Quit: Konversation terminated!]
illume has joined #pypy
kirma has joined #pypy
bgola has quit [Remote host closed the connection]
<kenaan>
ariava rpython-sprint 5f1376bbe863 /rpython/: Spellchecking and cleanup. - Fix spellchecking nits in few comments and in translation.rst - Fix TypeError...
<cfbolz>
Remi_M: I never looked at the results on all benchmarks, that would be interesting to do
<cfbolz>
Coding wise, one thing that I won't be able to do is support the other backends. So if you feel like porting eg to x86-32 that would be amazing
<Remi_M>
ok, so basically what is there should work and I can try to figure out where it helps and where it fails
<cfbolz>
Remi_M: yep
<cfbolz>
Basically the problem is that the number of Traces should always be less than in a normal pypy, but that doesn't seem to be true for real programs
inhahe has quit []
inhahe has joined #pypy
inhahe_ has joined #pypy
inhahe_ has quit [Client Quit]
inhahe has quit [Ping timeout: 264 seconds]
inhahe has joined #pypy
jdb_ has quit [Ping timeout: 256 seconds]
illume_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dash>
"[translation:ERROR] TypeError: can only cast pointers to other pointers"
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
<dash>
i'm trying to use rerased to store some functions in a list of pairs. My suspicion at this point is that I'm getting this error because I'm trying to store an erased reference to a function that doesn't get code emitted for it, or something like that
<arigato>
I'm not sure you can erase function pointers, because they are not GC-managed
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
<cfbolz>
That can be solved with an indirection, right?
<cfbolz>
dash: represent the function pointers as singletons with a method
<dash>
heh OK
<cfbolz>
RPython function pointers are quite limited and fiddly
<dash>
I've been trying to implement composable structures for async IO, currently trying a futures-like approach. rerased seemed like my best shot at it so far
<cfbolz>
dash: why is rerased needed, can't you just give things a common rpython base class?
adamholmberg has joined #pypy
<dash>
cfbolz: hmm, I tried some of that but it was trying to unify types more than I wanted, got upset when methods didn't have the same return type
<cfbolz>
OK, but rerased is a pretty big hammer to apply to that problem
<dash>
knowing that function pointers should be avoided helps, I'll rework it and see how far I get.
<cfbolz>
Ok
<dash>
avoiding rerased would be preferable, for sure :)
<cfbolz>
dash: I'd be happy to take a look if you run into problems
han-solo has joined #pypy
<han-solo>
how much memory does running targetpypystandalone.py would take?
<dash>
cfbolz: Thanks!
marky1991 has quit [Ping timeout: 240 seconds]
<cfbolz>
arigato: thanks for asking questions, while answering I finally figured out how to re-enable the last disabled featured in the map implementation (tracking immutable fields)
ariava has quit [Ping timeout: 260 seconds]
<han-solo>
i'd like to know more about how to use pypy, and the readthedocs isn't that good, can you guys share any link?
<cfbolz>
han-solo: what exactly are you planning to do with it?
<dash>
han-solo: pypy is a replacement for cpython (the python implementation from python.org). it's faster at many things
<dash>
han-solo: there are a few modules that aren't compatible with pypy, but almost everything should just work
<dash>
han-solo: what OS are you using? installing pypy should be simple
jdb_ has joined #pypy
<mattip>
han-solo: you might want to start here http://pypy.org . You should not be using targetpypystandalone.py unless you have a particular need to rebuild the interpreter
<mattip>
rebuilding requires about an hour and over 5GB memory on a 64 bit OS
<cfbolz>
dash: so the problem is the second tuple argument to "do"?
<dash>
cfbolz: even though they all have distinct callsites, because i'm using a single list to store them
<cfbolz>
right, so you need some kind of type assert before the "do" calls
<cfbolz>
and maybe rename the methods to do_int or do_str
<dash>
cfbolz: mmh
<cfbolz>
dash: pick semantically sensible names, of course ;-)
<cfbolz>
there apparently is some difference between the different kinds of do
<dash>
I could. the info is there
<dash>
it complicates my plans because I want to do code generation to get all the callback stuff i've got split out into do() methods in files.py
<dash>
but only a little, I guess.
<dash>
so part of the problem is that these callback objects all have to be stored in a global list so that they're accessible from callbacks invoked by libuv
<cfbolz>
ok, but the callsites really fall into two classes, those that pass int and those that pass str?
<cfbolz>
I still don't get why it's nice to call these different methods all "do"
<dash>
this was a small prototype that I hoped to extend to all of the IO events we need in the runtime
<dash>
so I think this will have to grow more hair if I'm going to distinguish by type like that
<cfbolz>
(or why they get tuples as arguments, and not just arguments)
<dash>
cfbolz: the tuple was intended to be like an Either type: (status, okValue, errValue)
<dash>
possibly not something that makes sense at this stage of the design
<dash>
My intent was to develop a generic way to pipeline events/callbacks together; I started with something like JS promises but that had much worse problems with type unification. :)
<cfbolz>
dash: yes, probably better to think of java more ;-)
<simpson>
If only. Java's NIO would be nice to have here.
<kenaan>
ariava rpython-sprint 0c4b7c3e09fa /rpython/doc/rpython.rst: Fix formatting of code blocks from previous commit.
<dash>
in Java you can cast to Object and hope for the best :)
<dash>
anyway, I think this is salvageable
<dash>
the event sources will need annotation with which method they will invoke on the callback objects they receive, so that the proper method names can be generated
<cfbolz>
dash: well, no
<cfbolz>
if you cast to object, the equivalent thing would be to make okValue and errValue be wrapped objets
<cfbolz>
and then all these problems go away
<dash>
or, hm, i could try rerased again now that these are all gc managed.
<cfbolz>
that's definitely a valid approach
<dash>
yeah, our current IO stuff definitely uses wrapped objects for a lot
<dash>
Maybe not, but I'm feeling stubborn at this point ;) After I see how much pain and sorrow my current approach yields I'll see about switching everything back to wrapped objects
<cfbolz>
Suit yourself ;-)
<dash>
if I didn't enjoy this at some level, would I really be writing a new language implementation
<dash>
hm, maybe there's a third way.
<kenaan>
Raemi stmgc[c8-reshare-pages] ed6411636c6f /c8/stm/core.c: do not check for safepoint in the become_inev(DONT_WAIT) case there is a deadlock if stm_next_to_f...
<kenaan>
mjacob py3.6 c386ba74c681 /pypy/module/_socket/: Change socket.close() to raise OSError if closing the underlying socket fails and remove app-level test checking the...
dddddd has quit [Ping timeout: 240 seconds]
dddddd has joined #pypy
lritter has joined #pypy
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
tayfun26 has quit [Quit: tayfun26]
<kenaan>
mjacob default f65cb735be28 /rpython/rlib/rstruct/: Add 'e' (half-float) struct format to native format table. Copy CPython's behavior of using short's size and alig...
<illume>
These are the 8 missing ctypes.pythonapi functions we use to test arrays and buffers in pygame. https://github.com/pygame/pygame/issues/425 Mostly to inspect array structures for things like (shape,stride,itemsize, ...) I've added a bunch of skip tests when running on pypy. However, I'm interested if anyone has an idea of pypy-happy alternatives?
ronan has quit [Ping timeout: 246 seconds]
han-solo has quit [Quit: Lost terminal]
marky1991 has quit [Ping timeout: 256 seconds]
asmeurer has joined #pypy
asmeurer has quit [Quit: asmeurer]
marky1991 has joined #pypy
ronan has joined #pypy
jdb_ has quit [Ping timeout: 256 seconds]
<mattip>
illume: memoryview(obj) might be a way to get strides, ndim, itemsize, ...
S5L4LNJikan has joined #pypy
S5L4LNJikan has quit [Client Quit]
<kenaan>
Floris Bruynooghe py3tests eea5b6bc977d /pypy/: First step, collecting and running apptest_*.py works
<kenaan>
Floris Bruynooghe py3tests 6fdcb46e0b2f /: Make untranslated app tests work on a very basic level This can collect a module and run test functio...
amaury has joined #pypy
<kenaan>
Raemi stmgc[c8-reshare-pages] 322ad09f62f0 /c8/stm/: fix warnings that let tests fail
illume has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
antocuni has quit [Ping timeout: 252 seconds]
<nanonyme>
arigato, thanks, the stringification of the enum works just awesome!
jdb_ has quit [Ping timeout: 256 seconds]
<nanonyme>
I've been really confused hitting some of the items in enumeration since they don't really make much sense but at least test results are now more readable
asmeurer has joined #pypy
drolando has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
forgottenone has quit [Quit: Konversation terminated!]
drolando has joined #pypy
asmeurer has quit [Quit: asmeurer]
Guest5993 has quit [Remote host closed the connection]
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
antocuni has joined #pypy
jdb_ has joined #pypy
Manis has joined #pypy
illume has joined #pypy
<Manis>
Hi. I could compile pypy3 on my Gentoo armhf machine successfully, but when I try to "import lib2to3.patcomp" I get a bus error. Does anyone have an idea what could be the issue here?
<Manis>
pypy3 5.10.1, btw.
tbodt has quit [Ping timeout: 240 seconds]
antocuni has quit [Ping timeout: 246 seconds]
tbodt has joined #pypy
<arigato>
tos9: apparently you can't #include "db.h" in a file that also includes these standard c++ headers
<arigato>
Manis: sorry, can't reproduce here. you need gdb to make sense of it
<Manis>
arigato: Do you have a hint where to look? I checked the backtrace but it appears the stack is corrupt.
<arigato>
sorry, no clue
<arigato>
does it work with "pypy3-c --jit=off"?
<arigato>
if it crashes in the same way, then the problem is likely outside pypy, e.g. some bogus C compiler with that combination of flags
<Manis>
arigato: Is pypy3-c != pypy?
<Manis>
With strace I could figure out that the real error is "BUS_ADRALN - Invalid address alignment error". So I fear that that's been it.
<Manis>
Oh. '--jit off' works, with the equals sign it doesn't. But without jit it does work :-/
<Rotonen>
you have 3 things off the beaten path in your scenario: pypy3, armhf (details vary), a rolling release distro (and that being gentoo, variability of details is even higher) - kudos for getting to a good start on debugging, though