dustinm has quit [Quit: Leaving]
dustinm has joined #pypy
tilgovi has quit [Remote host closed the connection]
tilgovi has joined #pypy
yuyichao_ has quit [Ping timeout: 260 seconds]
tilgovi has quit [Remote host closed the connection]
Benjamin___ has joined #pypy
nimaje has joined #pypy
marky1991 has joined #pypy
yuyichao_ has joined #pypy
Benjamin___ has quit [Ping timeout: 260 seconds]
marr has quit [Ping timeout: 240 seconds]
tilgovi has joined #pypy
jcea has quit [Quit: jcea]
inhahe_ has quit [Read error: Connection reset by peer]
inhahe_ has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
tilgovi has quit [Ping timeout: 246 seconds]
ArneBab has joined #pypy
ArneBab_ has quit [Ping timeout: 268 seconds]
pilne has quit [Quit: Quitting!]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
marky1991 has quit [Ping timeout: 240 seconds]
black_ant has quit [Ping timeout: 268 seconds]
jamadden has quit [Quit: Leaving.]
marr has joined #pypy
oberstet has joined #pypy
amaury has joined #pypy
inad922 has joined #pypy
jamadden has joined #pypy
jamadden has quit [Client Quit]
_whitelogger has joined #pypy
tilgovi has joined #pypy
oberstet has joined #pypy
amaury has quit [Ping timeout: 240 seconds]
amaury has joined #pypy
jamadden has joined #pypy
jamadden has quit [Client Quit]
<inad922> If I define lib like: "import cffi; ffi = cffi.FFI(); ffi.cdef('void stuff(int a, bool b)'); lib = ffi.dlopen('./somelib.so')". Can I call lib.stuff(12, True). I mean do python integers get casted to C integers and same for booleans or do these get passed down as PyObjects?
amaury has quit [Ping timeout: 246 seconds]
<inad922> Alright I managed to figure out this myself.
jamadden has joined #pypy
realitix has joined #pypy
jamadden has quit [Client Quit]
tilgovi has quit [Remote host closed the connection]
kenaan has quit [Read error: No route to host]
inad922 has quit [Ping timeout: 260 seconds]
antocuni has joined #pypy
cstratak has joined #pypy
jamadden has joined #pypy
ssbr has quit [Ping timeout: 245 seconds]
jamadden has quit [Client Quit]
cstratak has quit [Quit: Leaving]
ssbr has joined #pypy
inad922 has joined #pypy
cstratak has joined #pypy
inhahe_ has quit [Read error: Connection reset by peer]
inhahe_ has joined #pypy
lritter has joined #pypy
jcea has joined #pypy
<tos9> inad922: (Yes they turn into C things)
<inad922> tos9: Thanks.
Tiberium has joined #pypy
irclogs_io_bot has quit [Remote host closed the connection]
antocuni has quit [Ping timeout: 246 seconds]
irclogs_io_bot has joined #pypy
arigato has joined #pypy
oberstet2 has joined #pypy
oberstet has quit [Ping timeout: 240 seconds]
rindolf has joined #pypy
<rindolf> Hi all! This self-contained python 2/3 program is much faster in cpython2.7.x than when run by pypy2-5.7.1 - why? https://github.com/shlomif/project-euler/blob/master/project-euler/603/primes.py
<LarstiQ> rindolf: how long does it run, what does P_1M.txt contain?
<LarstiQ> ran it under vmprof?
<rindolf> LarstiQ: 35 secs vs 10 secs
<rindolf> LarstiQ: P_1M.txt contains the prime numbers concatenated and the string reversed
<rindolf> LarstiQ: what is vmprof?
<rindolf> LarstiQ: thanks
<LarstiQ> and http://vmprof.com/ if if you choose to have the tool upload the data
<LarstiQ> rindolf: giving you views like http://vmprof.com/#/28aef9b8-77cd-4e71-9390-78dfcb951b45
<LarstiQ> to pick a random example
<LarstiQ> rindolf: building up ret can probably be done faster than +=
<rindolf> LarstiQ: i think i can remove the writing of P_1M.txt and it will still happen,
<LarstiQ> the fastest of which is I think __pypy__.builders.StringBuilder. But I'm only guessing at the bottleneck, vmprof will give evidence
<cfbolz> I bet it's the string concatenation
<cfbolz> LarstiQ: in most cases just using a list and ''.join is fine
tormoz has quit [Ping timeout: 260 seconds]
<LarstiQ> cfbolz: yeah
<LarstiQ> also the way to go on older cpythton
<LarstiQ> ah, faq mentions cpython optimization is brittle anyway
inad922 has quit [Ping timeout: 240 seconds]
<arigato> but it's there since a lot time, I doubt you'll still find cpythons old enough not to have it
* LarstiQ is showing his age
jamadden has joined #pypy
<rindolf> cfbolz: yes, changing away from this string concat makes pypy execute it faster
<idnar> does a list comprehension have the same allocation behaviour as repeatedly appending to a list?
<LarstiQ> idnar: it has a better chance to preallocate the proper size
<arigato> yes, I think it tries to preallocate, but it gives a small benefit at best
cstratak has quit [Quit: Leaving]
cstratak has joined #pypy
arigato has quit [Quit: Leaving]
inad922 has joined #pypy
ArneBab_ has joined #pypy
ArneBab_ has joined #pypy
ArneBab_ has quit [Changing host]
ArneBab has quit [Ping timeout: 268 seconds]
ArneBab_ has quit [Ping timeout: 246 seconds]
ArneBab has joined #pypy
inad922 has quit [Ping timeout: 240 seconds]
mattip has joined #pypy
antocuni has joined #pypy
inad922 has joined #pypy
<mattip> cython-with-pypy raises a different exception than cython-with-cpython when converting a string to an int
<LarstiQ> same TypeError vs ValueError problem?
<LarstiQ> right that one
<mattip> yes, I tried to issue a pull request which failed to pass tests, but also got a "The existing behavior is correct" answer
<mattip> so even if I fix the pull request I am not sure it will be accepted
<LarstiQ> " This behavior should not be sensitive to CYTHON_USE_TYPE_SLOTS. "
<mattip> the sad thing is there are cython tests that check not only TypeError, but the specific error message
<LarstiQ> but it is?
<mattip> so we fail many cython tests as well
<LarstiQ> mattip: that "The existing behaviour is correct" answer is at least incomplete if not wrong
<mattip> right. Anyone here know the cython culture, how best to proceed?
<mattip> mailing list, IRC, new pull request?
<fijal> I keep being amazed that you take pypy and run some random python software and it works
jcea has quit [Read error: Connection reset by peer]
<mattip> :)
<fijal> idnar: I got a latest nightly (linux) and can't reproduce your crash
<cfbolz> mattip: I'd say update the pull request and point out that their own tests fail on pypy
<idnar> fijal: hrm
<fijal> ah you have to run it through trial
<idnar> ah, yes
<idnar> I tried it again the other day and it wasn't crashing 100%, but running it in a loop got a crash pretty quickly
* cfbolz mattip: when is CYTHON_USE_TYPE_SLOTS
<cfbolz> sorry
<cfbolz> mattip: when is CYTHON_USE_TYPE_SLOTS used? only on pypy?
<fijal> crash
<mattip> cfbolz: on any non-cpython
<cfbolz> so pypy and?
jcea has joined #pypy
<mattip> pyston :)
<cfbolz> ah, well ;-)
<cfbolz> pity, thought we could get additional arguments from that ;-)
<mattip> maybe I should try to flip that macro and see what crashes
<cfbolz> mattip: you could also flip the macro and run on cpython, in theory it should just be slower, but still correct, right?
<mattip> that would prove the falseness of "This behavior should not be sensitive to CYTHON_USE_TYPE_SLOTS"
<cfbolz> yes
<mattip> since there would be failing tests
<cfbolz> maybe they would accept a patch that runs the flipped CYTHON_USE_TYPE_SLOTS on their travis?
<antocuni> or maybe they'll complain that this patch makes the tests failing :)
jcea has quit [Read error: Connection reset by peer]
<mattip> maybe... but I think the other way (flipping it for pypy and seeing what breaks) might be more efficient
jcea has joined #pypy
<fijal> idnar: ok, gonna try to see what's the actual story
<idnar> fijal: cool
inad922 has quit [Ping timeout: 260 seconds]
marky1991 has joined #pypy
mihaid has joined #pypy
<mihaid> hello, I have a question regarding the ctypes tests in pypy/module/test_lib_pypy/ctypes_tests
<mihaid> they don't seem to call any of the functions in _ctypes (especially in not in function.py) Is there anything I need to configure to run them?
dmalcolm has quit [Read error: Connection reset by peer]
kenaan has joined #pypy
<kenaan> mattip default 6fcd279aca27 /pypy/module/cpyext/: tweak for cython
jcea has quit [Ping timeout: 246 seconds]
<cfbolz> mihaid: hey! how are you running them?
* mattip not sure those are meant to be run untranslated
<mihaid> this is the command: /usr/bin/python2.7 pytest.py pypy/module/test_lib_pypy/ctypes_tests/test_libc.py -v
<cfbolz> mihaid: yes, you need to run them with pypy
<mihaid> I think it uses the interpreter's ctypes library
<cfbolz> just the same command, but with pypy in the front
<cfbolz> yep, it does
<mihaid> so, basically all these are assumed to run after the translation?
<cfbolz> yes
<mihaid> oh, thanks. I've been trying for 3 days to get them to run before the translation, with no succes :)
<cfbolz> ouch. maybe we should add a readme to the directory?
<antocuni> uhm, according to ctypes_test/conftest.py, they should not be even collected, if you run them on CPython
<mihaid> most of them run just fine :)
<mihaid> anyway, thank you very much! this makes the problem a lot easier.
<mattip> antocuni: pytest_ignore_collect from conftest is not called in this case
<antocuni> yeah, I supposed so. Maybe we should write another hook which emits a warning/error in case you run it on CPython, to avoid confusions like mihaid's one
jcea has joined #pypy
<mattip> cppyy uses a "@py.test.mark.tryfirst", that might work?
<antocuni> no idea :)
<mattip> cppyy uses a "@py.test.mark.tryfirst", that might work?
<mattip> sorry
dmalcolm has joined #pypy
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
<mattip> nope,it doesn't
<mattip> arigato: (for the logs) cpyext-recursionlimit works as advertised, could you review?
marr has quit [Ping timeout: 240 seconds]
<kenaan> mattip cpyext-obj-stealing 92c3ef911221 /: merge default into branch
<mattip> also cpext-obj-stealing which adds tests and fixes for refcounting and PyListObjects
* mattip off
mattip has left #pypy ["bye"]
DragonSA has joined #pypy
<kenaan> cfbolz default 157a06a45851 /pypy/module/test_lib_pypy/README.txt: a readme for the applevel tests in this dir
<kenaan> antocuni faster-rstruct-2 0265fea70804 /rpython/rlib/rstruct/test/test_pack.py: ouch, this was plainly wrong, as it overwrote the correct teardown_method just above
<kenaan> antocuni faster-rstruct-2 ce82d5756ddd /rpython/rlib/rstruct/test/test_pack.py: write tests to check that USE_FASTPATH and ALLOW_SLOWPATH actually do what they are supposed to do
<kenaan> antocuni faster-rstruct-2 274be07c41af /rpython/rlib/rstruct/: add a new test flag to disallow fast paths
<kenaan> antocuni faster-rstruct-2 23b951353efe /rpython/rlib/rstruct/test/test_pack.py: add a passing test to check that we don't take the fast path for unaligned access
<kenaan> antocuni faster-rstruct-2 6bed52a9d7c6 /rpython/rlib/rstruct/test/test_pack.py: WIP: add a failing test which show why the current way to detect alignement is buggy
<kenaan> antocuni faster-rstruct-2 7d8f1bbfc0b1 /rpython/rlib/: delegate the alignment check to Buffer.typed_{read,write}, to take in account also the SubBuffer's offs...
yuyichao_ has quit [Ping timeout: 255 seconds]
<kenaan> antocuni faster-rstruct-2 5dbafd0b241b /: hg merge default
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-32/builds/3952 [antocuni: force build, faster-rstruct-2]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/4620 [antocuni: force build, faster-rstruct-2]
<bbot2> Started: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/5943 [antocuni: force build, faster-rstruct-2]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-s390x/builds/544 [antocuni: force build, faster-rstruct-2]
<bbot2> Started: http://buildbot.pypy.org/builders/own-linux-s390x/builds/576 [antocuni: force build, faster-rstruct-2]
tilgovi has joined #pypy
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-linux-armhf-raspbian/builds/1313 [antocuni: force build, faster-rstruct-2]
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-linux-armhf-raspbian/builds/1313 [antocuni: force build, faster-rstruct-2]
<bbot2> Started: http://buildbot.pypy.org/builders/build-pypy-c-jit-linux-armhf-raspbian/builds/1561 [antocuni: force build, faster-rstruct-2]
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-32/builds/3952 [antocuni: force build, faster-rstruct-2]
yuyichao_ has joined #pypy
inad922 has joined #pypy
cstratak has quit [Ping timeout: 260 seconds]
<inad922> When I use "cffi.FFI().cdef('...')" Inside cdef can I refer to stuff that is defined in "Python.h" like PyObject?
<inad922> Or I also need the include statements there?
<bbot2> Failure: http://buildbot.pypy.org/builders/build-pypy-c-jit-linux-armhf-raspbian/builds/1561 [antocuni: force build, faster-rstruct-2]
<cfbolz> inad922: cffi and PyObject don't really work together. the point of cffi is indeed to not need to use the C api
cstratak has joined #pypy
cstratak has quit [Remote host closed the connection]
cstratak has joined #pypy
<inad922> cfbolz: Yeah well. I create a data structure where the key can be any PyObject which supports comparison i.e. has a __cmp__ defined or is a builtin type like that so I can't really get rid of PyObject function. For me cffi is a tool to write C extensions in a cleaner way.
<inad922> PyObject struct instead of function
<cfbolz> inad922: there was a discussion about a similar question here: https://groups.google.com/forum/#!topic/python-cffi/SPND0rRmazA
<inad922> cfbolz: Thanks. I have a read.
<inad922> cfbolz: Ah ok I see the problem. If I use PyObject than I can only use the extension with CPython and not with PyPy. I just don't see how can I get around this. Suppose I want to make something similar to 'dict' in a way that I want to enable all inmutable instances to be keys. How can I do that without using a PyObject? Also I need to compare these objects.
<cfbolz> inad922: I am not fully sure, to be honest. you could try to use new_handle and a callback to python do the actual comparison
<cfbolz> but I think there are lifetime problems then
<cfbolz> (ie, who keeps the python objects alive)
<inad922> new_handle and a callback? I don't get it. Could you give me a link?
<inad922> thanks
<inad922> Ah ok I see what you meant with the lifetime problems.
<inad922> bleh
<inad922> I'm a bit stuck
<inad922> Does pypyjs work btw? Like this one -> https://github.com/pypyjs/pypyjs
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
<cfbolz> inad922: no clue, it's not an official part of pypy
<cfbolz> last commit over a year ago, probably dead
<inad922> Is this post outdated or pypy still uses PyObjects internally? https://morepypy.blogspot.hu/2015/01/faster-more-memory-efficient-and-more.html
<dash> inad922: "simplified view" :)
<dash> inad922: pypy does not use the same PyObject struct as cpython internally.
<inad922> ah alright
<inad922> I get back to this later
<inad922> I have to go now
<inad922> Thanks dash!
jcea has quit [Ping timeout: 272 seconds]
inad922 has quit [Ping timeout: 246 seconds]
marr has joined #pypy
tilgovi has quit [Ping timeout: 272 seconds]
jcea has joined #pypy
cstratak has quit [Quit: Leaving]
tbodt has joined #pypy
realitix has quit [Quit: Leaving]
pilne has joined #pypy
oberstet2 has quit [Ping timeout: 240 seconds]
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-linux-x86-64/builds/4620 [antocuni: force build, faster-rstruct-2]
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-linux-s390x/builds/544 [antocuni: force build, faster-rstruct-2]
<bbot2> Failure: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/5943 [antocuni: force build, faster-rstruct-2]
inhahe_ has quit [Read error: Connection reset by peer]
inhahe_ has joined #pypy
antocuni has quit [Ping timeout: 255 seconds]
oberstet2 has joined #pypy
oberstet2 is now known as oberstet
inhahe_ has quit [Read error: Connection reset by peer]
inhahe_ has joined #pypy
<fijal> cfbolz: we might want to revive that, maybe
<fijal> having a webassembly backend
<fijal> it's not completely clear to me what would we win over cpython
<dash> fijal: hackernews points
<fijal> so maybe it's a completely independent project
<tbodt> you'd get non-kludgy browser compatibility
<fijal> dash: do you want to get kicked for trolling :-)
<tbodt> right?
<dash> fijal: i can't account for all of my unconscious desires
<dash> tbodt: first someone would have to find a non-kludgy browser
<tbodt> oh yeah I forgot we don't have those
<cfbolz> fijal: we would in theory get better performance by emitting more web assembly at runtime
<fijal> cfbolz: but a massive download
<dash> fijal: you could get sponsorship from google fiber
<simpson> It sounds like a good idea.
<simpson> But yeah, the sticking points all revolve around browsers being janky IMO.
<cfbolz> fijal: you put that into the appropriate local storage thingamagic
<cfbolz> But yes
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
yuyichao_ has quit [Ping timeout: 255 seconds]
yuyichao_ has joined #pypy
mattip has joined #pypy
jcea has quit [Read error: Connection reset by peer]
jcea has joined #pypy
Tiberium has quit [Remote host closed the connection]
kipras`away is now known as kipras
DragonSA has quit [Quit: Konversation terminated!]
<bbot2> Failure: http://buildbot.pypy.org/builders/own-linux-s390x/builds/576 [antocuni: force build, faster-rstruct-2]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/3118 [antocuni: force build, faster-rstruct-2]
tav has quit [Quit: tav]
tav has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tav` has joined #pypy
tav has quit [Ping timeout: 240 seconds]
tav` is now known as tav
tav has quit [Ping timeout: 255 seconds]
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/3118 [antocuni: force build, faster-rstruct-2]
tav has joined #pypy
arigato has joined #pypy
james has joined #pypy
james is now known as Guest6935
<arigato> I guess the name "OS/X" we use everywhere is wrong, it is "OS X". it has been renamed recently "macOS" but I'm -1 on renaming it because it's less clear for outside people (i.e. me :-). +1 / -1 ?
lritter has quit [Ping timeout: 268 seconds]
<arigato> I would suggest to remove the "/" and that's it
inad922 has joined #pypy
amaury has joined #pypy
<mattip> +1 for "OS X"
<arigato> thanks
<mattip> I can do the grep change, give me a moment
<arigato> too late :-)
<kenaan> arigo pypy.org[extradoc] f8278c922a6e /: OS/X => OS X
<mattip> :)
<arigato> thanks anyway
<mattip> I am almost off to sleep, but would like a review of two branches - cpyext-obj-stealing and cpyext-recursionlimit
<mattip> the first tries harder to copy the exact refcounting done in cpython PyListObject, including a test
<mattip> the second is a hacky implementation from this week, as we discussed
<arigato> ok, I'll review them
<mattip> cpyext-obj-stealing works with pandas without crashing, where default segfaults
<mattip> thanks
<mattip> gnite
mattip has left #pypy ["bye"]
<arigato> gni--zzzz
arigato has quit [Quit: Leaving]
Guest6935 has quit [Quit: Leaving...]
amaury has quit [Quit: Konversation terminated!]
amaury_ has joined #pypy
amaury_ is now known as amaury
amaury has quit [Client Quit]
amaury_ has joined #pypy
<amaury_> I found a way to help with the win32 port
<amaury_> Since I don't have any Windows machine, I will try to use wine and mingw32 to translate PyPy...
<amaury_> crazy
inad922 has quit [Ping timeout: 246 seconds]
rindolf has quit [Quit: Leaving]
oberstet has quit [Ping timeout: 246 seconds]
jcea has quit [Read error: Connection reset by peer]
jcea has joined #pypy
commandoline has quit [Quit: Bye!]
amaury_ is now known as amaury
jiffe has quit [Quit: WeeChat 1.8]
jiffe has joined #pypy
marr has quit [Ping timeout: 240 seconds]
kipras is now known as kipras`away
yuyichao_ has quit [Ping timeout: 240 seconds]
yuyichao_ has joined #pypy