antocuni changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | "PyPy: the Gradual Reduction of Magic (tm)"
asmeurer__ has quit [Quit: asmeurer__]
asmeurer has joined #pypy
tbodt has joined #pypy
marky1991 has quit [Read error: Connection reset by peer]
marr has quit [Ping timeout: 248 seconds]
oberstet has quit [Ping timeout: 248 seconds]
asmeurer has quit [Quit: asmeurer]
asmeurer__ has joined #pypy
yuyichao_ has quit [Ping timeout: 258 seconds]
asmeurer__ has quit [Quit: asmeurer__]
asmeurer_ has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yuyichao_ has joined #pypy
asmeurer_ has quit [Quit: asmeurer_]
tbodt has joined #pypy
asmeurer_ has joined #pypy
traverseda has quit [Ping timeout: 240 seconds]
traverseda has joined #pypy
traverseda has quit [Ping timeout: 240 seconds]
traverseda has joined #pypy
asmeurer_ has quit [Quit: asmeurer_]
marky1991 has joined #pypy
<kenaan_> rlamy py3.5 3e868c28555c /: hg merge default
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oberstet has joined #pypy
asmeurer has joined #pypy
tos9_ has joined #pypy
oberstet has quit [Ping timeout: 248 seconds]
tos9 has quit [Ping timeout: 248 seconds]
tos9_ is now known as tos9
jcea has quit [Quit: jcea]
pilne has quit [Quit: Quitting!]
exarkun has quit [Read error: Connection reset by peer]
ArneBab has joined #pypy
exarkun has joined #pypy
ArneBab_ has quit [Ping timeout: 260 seconds]
jamesaxl has joined #pypy
_whitelogger has joined #pypy
marky1991_2 has joined #pypy
marky1991 has quit [Ping timeout: 240 seconds]
<kenaan_> rlamy py3.5 ecfbd8f62994 /pypy/module/cpyext/: Do not use PyUnicode_Check in PyUnicode_AS_UNICODE, ever This macro may be used to fill in an uninitialised, unreali...
zmt00 has quit [Quit: Leaving]
<ronan> ^^^ "pfffffff......"
marky1991_2 has quit [Read error: Connection reset by peer]
xorAxAx has quit [Remote host closed the connection]
<LarstiQ> ronan: fun to debug?
lazy1 has joined #pypy
yuyichao_ has quit [Quit: Konversation terminated!]
yuyichao has joined #pypy
tbodt has joined #pypy
OOPMan has joined #pypy
tbodt has quit [Ping timeout: 248 seconds]
xorAxAx has joined #pypy
<fijal> ronan: what timezone are you in?
kenaan_ has quit [Read error: No route to host]
kolko has joined #pypy
lukasa_ has joined #pypy
asmeurer has quit [Quit: asmeurer]
lukasa has quit [Ping timeout: 252 seconds]
lukasa_ is now known as lukasa
<lazy1> fijal: Should have been ffi.new('char[]', val.encode('utf-8'))
<fijal> lazy1: yes
<lazy1> Also timeit of ffi.new('char[]', val.encode('utf-8')) vs C.strdup(val.encode('utf-8')) gives 165ns vs 136ns
<fijal> timeit lies
<lazy1> :)
<lazy1> Everybody lies
<fijal> but! they might be very similar :)
<arigato> you have to count C.free() too, for C.strdup()
<lazy1> arigato: I don't understand
<arigato> ah, you never call C.free()
<arigato> then you have a leak
<arigato> better use ffi.new() which isn't prone to leaks
<fijal> lazy1: did you get any profiling data btw?
<arigato> (see "man strdup": you need to call free())
<lazy1> If I do ffi.new I don't need to call free?
<arigato> no
<fijal> zzpickle_and_slow
<arigato> I'm just saying, comparing ffi.new() and C.strdup() like that isn't fair, because C.strdup() also requires tracking and freeing, while ffi.new() doesn't
<lazy1> Sure, will profile right
<lazy1> fijal: How does timeit lies? caching?
<arigato> it doesn't matter, "timeit" on microbenchmarks is very rough
<fijal> it does a whole bunch of things that are very debatable
<arigato> at least with pypy
kenaan has joined #pypy
<kenaan> fijal unicode-utf8 86548802b11b /pypy/: interpreter fixes
<fijal> starting with having variable number of iterations
<fijal> and assuming certain statistical properties that are just not true for the JIT
<arigato> you can still use timeit to have a rough ballpark idea I suppose, but any difference smaller than "a few times" is not reliable
<lazy1> OK
<arigato> and usually not relevant because you're benchmarking a very tiny subset of your actual program
<lazy1> If course. I'll work on profiling the whole flow. But I always like to know some timing before choosing between two options
Guest95003 has quit [Ping timeout: 248 seconds]
<fijal> right, but 20% is not something that timeit would reliably show
<fijal> because it will have bigger effects on other parts of the program that you cannot predict very well
<fijal> (or at least it might have)
marr has joined #pypy
oberstet has joined #pypy
antocuni has joined #pypy
marvin_ has joined #pypy
OOPMan has quit [Ping timeout: 240 seconds]
OOPMan has joined #pypy
oberstet has quit [Ping timeout: 260 seconds]
slackyy has quit [Ping timeout: 240 seconds]
the_drow has quit [Ping timeout: 255 seconds]
the_drow has joined #pypy
<fijal> arigato: so we have a test that goes backwards in error handler
<fijal> do we care or do we consider it broken?
<arigato> which test is that?
<fijal> test/test_codecs.py::AppTestPartialEvaluation::test_unicode_internal
<arigato> how can it possibly work?
<fijal> by accident, I think
<arigato> it seems to get the error "truncated input"
<arigato> I guess the position returned from the error handler is ignored, and we stop anyway?
antocuni has quit [Ping timeout: 240 seconds]
<arigato> no
<arigato> it really looks accidental
<arigato> on CPython I get an infinite loop if I return 0, or 2, instead of 1
<fijal> yes, it really is accidental
<fijal> so we assume the test is broken?
<arigato> ah no
<arigato> it goes like this
<arigato> first decode char from index [0, 1, 2, 3]
<arigato> then position = 4, but length =5 so "truncated input"
oberstet has joined #pypy
<arigato> then position is reset to 1
<arigato> then we decode char from index [1, 2, 3, 4]
<arigato> and we're done then
<fijal> yes, but it IS an accident
<arigato> I vaguely imagine that some codecs would do that, i.e. reset the position 1 to 3 chars before, as an attempt to resynchronize
<arigato> of course while being very careful
<arigato> I imagine it's easy to support if we want to: call prev_codepoint_pos() a few times
<arigato> at this point, I suppose *shrug* and implement it like CPython because it's easy?
<fijal> well, it's easy, we kill the detection logic
<fijal> arigato: I'm down to 5 failing tests in _codecs
the_drow has quit [Ping timeout: 258 seconds]
the_drow has joined #pypy
<arigato> fijal: no, we must call prev_codepoint_pos()
<fijal> Right, so I vote for "this is broken error handler, let's raise"
<fijal> This is decode, not encode
<arigato> I *think* it's as easy as two lines that call prev_codepoint_pos(), and I fear some obscure code somewhere depends on it
<arigato> so I'm +1 for implementing it
<fijal> Ok
the_drow has quit [Ping timeout: 255 seconds]
raynold has quit [Quit: Connection closed for inactivity]
jcea has joined #pypy
the_drow has joined #pypy
OOPMan has quit [Quit: Konversation terminated!]
<fijal> arigato: I'll add it to TODO
<kenaan> fijal unicode-utf8 c7109cb7f6be /pypy/: fix all the tests in codecs until test_ztranslation
<fijal> xmlcharrefreplace has not a single test
<kenaan> fijal unicode-utf8 df28f6398687 /pypy/: simple fixes in fake objspace
the_drow has quit [Ping timeout: 240 seconds]
the_drow has joined #pypy
exarkun has quit [Ping timeout: 248 seconds]
exarkun has joined #pypy
antocuni has joined #pypy
adamholmberg has joined #pypy
Rhy0lite has joined #pypy
<kenaan> fijal unicode-utf8 fd1b64ce9b80 /pypy/: some improvements for xmlcharrefreplace
yuyichao has quit [Ping timeout: 246 seconds]
yuyichao has joined #pypy
amaury has joined #pypy
adamholmberg has quit [Remote host closed the connection]
amaury has quit [Read error: Connection reset by peer]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
amaury has joined #pypy
<fijal> arigato: I hate RPython
amaury has quit [Ping timeout: 250 seconds]
<kenaan> fijal unicode-utf8 5ffbd0a736d9 /: some rpython fixes
<bbot2> Started: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/6382 [fijal: force build, unicode-utf8]
<arigato> :-/
<fijal> fighting signness
<fijal> but it's all of a kind "this call is fine, but there is a call somewhere that's not fine"
<arigato> not fun
<bbot2> Failure: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/6382 [fijal: force build, unicode-utf8]
<arigato> fijal: I wrote _multibytecodecs in pypy, so feel free to ask me
marky1991_2 has joined #pypy
marky1991_2 has quit [Ping timeout: 248 seconds]
amaury has joined #pypy
<fijal> arigato: seems very obvious
<fijal> arigato: other than rffi.wcharpsize2unicode we need rffi.wcharpsize2utf8
<arigato> right, without it you'd need an intermediate allocation to do it
<fijal> seems easy-ish to write
yuyichao has quit [Ping timeout: 248 seconds]
yuyichao has joined #pypy
<ronan> fijal: geographically or xkcd-wise (https://xkcd.com/448/)? ;-)
<fijal> xkcd-wise :
<fijal> )
<fijal> "'python testrunner/get_info.py' failed"
<fijal> what does that mean?
<kenaan> fijal unicode-utf8 cefc9ed0b4c5 /: general progress
<ronan> fijal: US mountain time, apparently
<ronan> fijal: where did you see that?
<ronan> ah, I guess the branch doesn't have testrunner/get_info.py
<ronan> it's a new-ish step in the buildbot build
<ronan> you just need to merge from default
<ronan> actually, you can also ignore it, it should be harmless for 'own' tests
amaury_ has joined #pypy
amaury has quit [Read error: Connection reset by peer]
exarkun has quit [Ping timeout: 255 seconds]
amaury_ has quit [Ping timeout: 240 seconds]
exarkun has joined #pypy
zmt00 has joined #pypy
lazy1 has quit [Quit: Leaving]
amaury_ has joined #pypy
amaury_ has quit [Client Quit]
amaury_ has joined #pypy
<kenaan> rlamy py3.5 36daba4180a3 /pypy/module/_io/: Advance self.pos also when reading only from self.buffer
raynold has joined #pypy
traverseda has quit [Ping timeout: 248 seconds]
amaury_ has quit [Quit: Konversation terminated!]
amaury_ has joined #pypy
oberstet has quit [Ping timeout: 240 seconds]
<fijal> ronan: what is it used for?
<ronan> it is used to run extra_tests/
amaury_ has quit [Ping timeout: 268 seconds]
traverseda has joined #pypy
<kenaan> fijal unicode-utf8 0021cc161b99 /pypy/module/__builtin__/operation.py: fix checking for unichr range
drolando has joined #pypy
drolando has quit [Client Quit]
drolando has joined #pypy
drolando_ has joined #pypy
oberstet has joined #pypy
drolando has quit [Ping timeout: 248 seconds]
<bbot2> Started: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/6383 [ronan: force build, py3.5]
antocuni has quit [Ping timeout: 240 seconds]
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
<pjenvey> fijal: there's some sort of rffi.wcharpsize2unicode here https://bitbucket.org/pypy/pypy/src/py3.5/pypy/module/_codecs/locale.py
mattip has joined #pypy
traverseda has quit [Ping timeout: 240 seconds]
<bbot2> Failure: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/6383 [ronan: force build, py3.5]
marky1991 has quit [Ping timeout: 248 seconds]
<mattip> translation is failing because of rvmprof on win32, arm, s390x
drolando_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drolando has joined #pypy
<fijal> pjenvey: that's 2unicode not 2utf8
<pjenvey> yes
<fijal> that's different :)
traverseda has joined #pypy
<kenaan> rlamy py3.5 e37a09d8450a /lib-python/3/traceback.py: Fix traceback.print_exception() when exc.offset == 0
<mattip> fijal: hi. Did you have a chance to look at the vmprof pull request (it only silences warnings, will not fix translation)
<pjenvey> sure, sounded like you needed both
<mattip> it seems rvmprof is so tangled with the JIT that it is basically impossible to translate pypy with --witoutmod-_vmprof
<mattip> or at least with a functioning rvmprof rlib module
<mattip> s//without a functioning ...
<fijal> mattip: no, should I?
<fijal> class U(object):
<fijal> u = U()
<fijal> return eval('u'+repr(other).replace(r'\\u', r'\u')
<fijal> def __add__(self, other):
<fijal> .replace(r'\\U', r'\U'))
<fijal> I love 2/3 compatibility mess
<tos9> wat
Rhy0lite has quit [Quit: Leaving]
<mattip> fijal: yes please, you wanted to eat dinner first :)
<kenaan> rlamy py3.5 382fb81ffff8 /lib_pypy/_pypy_testcapi.py: Force recompilation of _testcapimodule.c (due to ecfbd8f62994)
antocuni has joined #pypy
antocuni has quit [Ping timeout: 240 seconds]
<fijal> mattip: done
<fijal> arigato: feel like helping with cffi_backend tests?
<kenaan> fijal unicode-utf8 c6537b6d453f /: whack at cffi
<mattip> fijal: thanks
<fijal> arigato: I might be done for today though, _cffi_backend is a bit challenging
marky1991 has joined #pypy
jacob22__ has joined #pypy
jacob22__ is now known as jacob22
<arigato> fijal: sorry, off for tonight
<arigato> fijal: but yes, I can fix _cffi_backend if you like
<arigato> it's a motivation for me to start reading your changes :-)
slackyy has joined #pypy
marky1991 has quit [Ping timeout: 248 seconds]
jamesaxl has quit [Quit: WeeChat 1.9.1]
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
<kenaan> rlamy py3.5 83b96bb9cf44 /: Adapt idlelib.CallTips for pypy and update some docstrings
gclawes has joined #pypy
Garen has quit [Remote host closed the connection]
antocuni has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 240 seconds]
oberstet has quit [Ping timeout: 268 seconds]
<kenaan> mattip default 2c9ec695ca2c /rpython/rlib/rvmprof/: update vmprof from upstream which cleans up most of the gcc warnings