cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | "the modern world where network packets and compiler optimizations are effectively hostile"
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
asmeurer_ has joined #pypy
jcea has quit [Ping timeout: 255 seconds]
kipras is now known as kipras`away
kipras`away is now known as kipras
<mattip> in cpython, an object array of nan's will contain copies of the same nan object,
<mattip> in pypy they will all be different
<mattip> np.array(np.array([np.nan, np.nan, np.nan], dtype=object).data, dtype='uint8').view('uint64')
<mattip> so then doing PyObject_RichCompareBool(a[0], a[1]) fails in the shortcut for "a[0] is a[1]"
<mattip> where a is that array containing nan objects
jcea has joined #pypy
marr has quit [Ping timeout: 240 seconds]
kipras is now known as kipras`away
<njs> mattip: is there some numpy test that relies on this silly behavior? seems like we could just change the test... it is a bit odd if '(np.nan is np.nan) == False', but I find it hard to imagine a situation where anyone would care.
<njs> mattip: (also sorry I haven't looked at that PR, will try to get to it soon)
<mattip> the difference in behaviour came up in a pandas test, and it is useful for masking
<mattip> (and thanks, it is already suffering from bitrot)
<mattip> also, it seems to be more non-optimal list strategy nonsense
<mattip> but maybe not, still writing a test
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 255 seconds]
<njs> honestly I think it's a bug that np.nan in <whatever> can ever return True, though unfortunately python-dev doesn't care
<mattip> I have no particular opinion, whatever is easiest
<mattip> Either fix space.newfloat() to cache NAN and return the same object, or convince pandas/numpy to change the useage
<mattip> reminds me that we do not cache small ints either, it might be a performance boost to cache frequently used objects?
<mattip> gnite
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
yuyichao_ has quit [Quit: Konversation terminated!]
yuyichao has joined #pypy
ArneBab has joined #pypy
ArneBab_ has quit [Ping timeout: 255 seconds]
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
tbodt has joined #pypy
pilne has quit [Quit: Quitting!]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rokujyouhitoma has joined #pypy
tbodt has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gclawes_ has quit [Ping timeout: 246 seconds]
tbodt has joined #pypy
gclawes has joined #pypy
<njs> oh heh, exarkun's ctypes bug actually totally breaks pip on current pypy3 nightly: https://travis-ci.org/python-trio/trio/jobs/266668451
jamesaxl has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
rokujyouhitoma has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Cheery> I wonder would it be bad if every interface had a finalizer?
<Cheery> every class*
<Cheery> because that feels like the best way to ensure that the multimethods clean up afterwards.
<Cheery> Also I get the benefit that the class can describe which multimethods it has subscribed to.
rokujyouhitoma has quit [Ping timeout: 255 seconds]
<cfbolz> mattip (logs): we don't cache small ints because that would actually be worse for the jit :(
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
<Cheery> is it ok to make a weakref to a list in RPython?
lritter has joined #pypy
<Cheery> TypeError: cannot create weak reference to 'list' object
<Cheery> wohoo
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 248 seconds]
<arigato> mattip: about NaN is not NaN, we already looked and decided something at some point
<arigato> on CPython, you get "often" that NaN is not NaN but not always
<arigato> for example, x = float("nan"); assert x in [x]
<arigato> but of course "assert float('nan') not in [x]"
<arigato> PyPy simply gives some consistent behaviour based on that
<arigato> x != x and x is x
<arigato> independently of where x was created
<arigato> it's actually documented in cpython_differences.rst
<arigato> now if we're talking about cpyext, then this notion of "is" might not be reproduced exactly
<arigato> it is possible to have two different PyObject *x, *y that PyPy thinks are "is"-identical
<arigato> maybe we should apply an extra layer of carefulness there
<Cheery> fancy
<Cheery> arigato: is this because of the negative NaN?
marr has joined #pypy
<Cheery> funny thing.. I consider doing green thread aware multimethods
<arigato> Cheery: no?
<arigato> it's because "x == x" is false in C
<arigato> but in Python they are really objects, and "x is x" is always true for any object
<Cheery> ok.
<Cheery> I got an another question: Is there benefit in doing weakref.ref only once, versus doing it twice?
rokujyouhitoma has joined #pypy
Remi_M has joined #pypy
rokujyouhitoma has quit [Ping timeout: 248 seconds]
lritter has quit [Remote host closed the connection]
oberstet has joined #pypy
asmeurer_ has quit [Quit: asmeurer_]
hvariant has joined #pypy
<Cheery> Is there a way to trigger the GC in RPython?
<mattip> arigato: yes , this is a cpyext issue where in Py_RichCompareBool(a, b) where a,b are
<mattip> different W_FloatObject(nan) the comparison fails
Yardanico has joined #pypy
<mattip> for Py_EQ, on CPython it succeeds since there is only one float('nan')
rubdos has quit [Quit: WeeChat 1.9]
<Cheery> Is there a way to explore the GC state in PyPy?
<Cheery> I'm trying to figure out why a finalizer does not trigger
rubdos has joined #pypy
raynold has quit [Quit: Connection closed for inactivity]
<mattip> ahh, space.is_w() solves my problem
<mattip> Cheery: the gc module has the same interface as CPython,
<mattip> I have had some limited luck with gc.get_referrers
jamescampbell has joined #pypy
jamescampbell has quit [Client Quit]
<Cheery> mattip: I just checked into that and it seems that will help.
<Cheery> I need to make an utility for retrieving the GC details, but after that a simple path search should reveal why the reference sticks around.
rokujyouhitoma has joined #pypy
<Cheery> wow.. I figured out what it was.
<Cheery> if I intend to use that approach, I have to improve how the scope behaves.
rokujyouhitoma has quit [Ping timeout: 240 seconds]
<Cheery> but the resulting behavior is so surprising that I have to reconsider how I 'collect' multimethods.
<Cheery> an idea.. came
hvariant has quit [Quit: Leaving]
jamesaxl has quit [Ping timeout: 240 seconds]
<mattip> heh, when calling cPickle.dump(obj, file, 200) the error message is very different from pickle.dump(obj, f, 200)
<mattip> on PyPy we of course use the pure python pickle.py, so the error message is the pickle one, even though we call ourselves cPickle
rokujyouhitoma has joined #pypy
<mattip> .. but I can add a check to lib_pypy/cPickle.py
<exarkun> someone cares about the error text that comes out of cPickle specifically?
<mattip> pandas tests
<exarkun> (not really surprising _but_ ...)
rokujyouhitoma has quit [Ping timeout: 240 seconds]
<exarkun> cPickle isn't a thing anymore on Python 3 right? pandas should probably be fixed.
<mattip> the test is skipped on python > 3.4
* exarkun reminds himself he doesn't care about pandas
* exarkun tries reproducing ctypes/dbm failures locally
<mattip> :)
<mattip> exarkun: you might find "hg log lib_pypy/_ctypes" helpful to see what changed in that directory and when
<mattip> or for those who like a graph view "thg log lib_pypy/_ctypes"
<kenaan> mattip default 0f254609cb4f /pypy/module/cpyext/stubs.py: delete implemented function from unused stubs.py
<kenaan> mattip default 52ae4608d26f /lib_pypy/cPickle.py: make error message compliant with cPickle, low hanging fruit
<kenaan> mattip default 3e2341208fe6 /pypy/module/cpyext/: test, fix for Py_RichCompareBool(float('nan'), float('nan'))
<kenaan> mattip pypy.org[extradoc] df872ae704e1 /: remove outdated mention of pypy/numpy, regenerate
<mattip> arigato: you modified pypy.org/downloads but did not regenerate, I assume it was unintentional/too trivial?
<kenaan> tobweber stmgc[c8-efficient-serial-execution-master] 4a71ee20626e /c8/: Merge timing events enum so that all branches share the same interface with ...
<kenaan> tobweber stmgc[c8-efficient-serial-execution-master] d56fd821ed46 /c8/: Merge TCP style optimization
<kenaan> tobweber stmgc[c8-efficient-serial-execution-master] cadbddf81079 /c8/stm/: Fix trx length update depends on instrumentation for thread local reference ...
<cfbolz> mattip: ah, good catch with the just using space.is_w
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 255 seconds]
<Cheery> If I define a variable in a structure, but nothing in that structure is using the variable, is it optimized away by rpython?
<cfbolz> Cheery: is there rpython code that writes to that field?
<Cheery> cfbolz: yes.
<cfbolz> then no
<Cheery> I just got some crashing when introducing few weakrefs and was just analysing the problem.. I found the more likely reason to be the null reference in weakref.
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
rokujyouhitoma has joined #pypy
Garen has quit [Read error: Connection reset by peer]
rokujyouhitoma has quit [Ping timeout: 240 seconds]
Garen has joined #pypy
lritter has joined #pypy
bgola has joined #pypy
jkbbwr has joined #pypy
<jkbbwr> Do you think python could ever become any sort of "true" immutable
<LarstiQ> jkbbwr: with python-dev keeping making small changes? No ;)
<jkbbwr> LarstiQ: I don't think they ever would
<simpson> jkbbwr: You mean, could they cap the language definition at a certain point? Probably, but why? Only dead languages don't change.
<LarstiQ> or did jkbbwr mean it in a sense of functional languages
<exarkun> simpson: fortran hasn't changed much recently
<exarkun> simpson: nor cobol
<exarkun> simpson: by some measures, still two of the languages of the most widely used software
<exarkun> imagine taking a modern language and spending 25 years building good tooling for it instead of randomly tweaking it
<exarkun> (sadly fortran has actually changed _some_ recently though)
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
<kenaan> cfbolz regalloc-playground dfada6cd5c1a /rpython/jit/backend/llsupport/: tweak: pick the longest-living useless variable
<simpson> exarkun: Right, COBOL is dead and Fortran isn't.
<exarkun> If you define "dead" merely as "not changing" anymore, yes. :)
<simpson> Well, yeah. Just like Latin is a dead language, right?
<exarkun> Treating natural languages and programming languages the same way might just confuse the matter.
<nimaje> afaik Latin is a dead language, because it is not used for normal confersation, but only technical terms (and reading old documents)
<exarkun> put another way, for natural languages, "dead language" means "there are no native speakers"
<exarkun> there are no native speakers of any programming languages, so "dead language" could only be a metaphor when applied to programming languages
<simpson> That's fair.
<exarkun> but at best I think it's a vague, emotional metaphor that doesn't convey a precise idea
<exarkun> There is definitely something different between cobol and python
<exarkun> Maybe even a few things
<exarkun> I guess some collection of those things combined are what make "dead language" an appealing description for cobol
<simpson> They both run on computers and have lots of English words, but I think that that's about it.
<exarkun> heh heh
<exarkun> It's probably mostly _extrinsic_ properties of cobol that makes it "dead" though right?
<exarkun> Although it could be intrinsic properties that contributed to those extrinsic properties.
<simpson> Yeah, "dead" is external.
<Cheery> why does pypy have a LifeLine -class in weakref?
<Cheery> nope.. not very clear blame
yuyichao has quit [Ping timeout: 240 seconds]
<mattip> Cheery: AFAICT that is actually in the very first commit, you can see the history here
<Cheery> is there a requirement that the weak reference must outlive the item it refers to?
<cfbolz> no
<Cheery> cfbolz: Then why the WeakrefLifeline is required?
<cfbolz> because python weakrefs have a lot more features than rpython weakrefs
rokujyouhitoma has joined #pypy
yuyichao has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
tbodt has joined #pypy
ronan has joined #pypy
<Cheery> how does the light finalizers and weak references compare?
<Cheery> if I have a light finalizer, can I assume that it triggers before any of the weakrefs clean up?
<cfbolz> I don't think we garantuee an ordering
<cfbolz> but I am forgetting details, I bet
<ronan> hrm, the own-linux-x86-64 run on py3.5 has been broken for a while
<ronan> its repo still has the py3.5 bookmark that shadows the branch
<exarkun> sorry :(
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mattip> ronan: it seems someone would need to go to home/buildslave/buildslave/own-linux-x86-64/build on bencher4 and mess with it,
<mattip> but I don't have a logon
<ronan> mattip: yes, it seems it's the only way, but I can't do it either
<mattip> cfbolz: ^^^ ?
<exarkun> I have a bencher4 login but I don't think I have write access to the buildslave
<exarkun> Probably should be fixed by changing some code in the buildbot configuration for that slave, then updating the deployment with ... helm? terraform? puppet?
<cfbolz> seems I don't have access there either
<cfbolz> (I have a login, but not root)
<exarkun> linux 3.2.0, probably has 5 or 6 local priv escalation vulnerabilities
rokujyouhitoma has joined #pypy
<mattip> exarkun: we use buildbot, which is running on buildbot.pypy.org, it issues commands to the buildslaves
<mattip> the repo is bitbucket pypy/buildbot
<exarkun> anyone around who can update the master deployment?
tbodt has joined #pypy
<exarkun> cloning the buildbot repo now
* mattip used to
tbodt has quit [Client Quit]
* exarkun finds `Own` build factory that configures slave behavior
* exarkun finds `update_hg` function that controls hg update behavior
rokujyouhitoma has quit [Ping timeout: 248 seconds]
<exarkun> hm no parameters that would obviously fix a bookmark problem
<exarkun> what do the hg experts say the right way to use hg would be to fix this problem / avoid running into it again?
<exarkun> like, is there an `hg update` flag that cleans up bookmarks in the expected way?
<mattip> nope, can't login anymore to buildbot.pypy.org
<mattip> we actually do not use bookmarks at all, the file .hg/bookmarks could be removed with no harm done
raynold has joined #pypy
<exarkun> I could add a build step right after the `hg update` that deletes that file.
<exarkun> but eclipse-oclock, cya
tbodt has joined #pypy
tbodt has quit [Client Quit]
tbodt has joined #pypy
tbodt has quit [Client Quit]
tbodt has joined #pypy
tbodt has quit [Ping timeout: 248 seconds]
asmeurer_ has joined #pypy
rokujyouhitoma has joined #pypy
asmeurer_ has quit [Quit: asmeurer_]
rokujyouhitoma has quit [Ping timeout: 240 seconds]
ronan has quit [Ping timeout: 255 seconds]
ronan has joined #pypy
tbodt has joined #pypy
tbodt has quit [Ping timeout: 240 seconds]
asmeurer_ has joined #pypy
oberstet has quit [Ping timeout: 240 seconds]
lritter has quit [Ping timeout: 255 seconds]
asmeurer_ has quit [Quit: asmeurer_]
bgola has quit [Quit: leaving]
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
tbodt has joined #pypy
oberstet has joined #pypy
lritter has joined #pypy
<mattip> strange, getattr(mod, name) is failing for mod=pandas, name= '_libs.sparse.IntIndex' where libs is a module, sparse is a c-extension, and IntIndex is a type in the cextension
<mattip> on pypy2.7
marky1991 has quit [Ping timeout: 255 seconds]
rokujyouhitoma has joined #pypy
<ronan> mattip: that can't work, you'd need getattr(getattr(getattr(mod, '_libs'), 'sparse'), 'IntIndex')
<mattip> ronan: it's from lib-python/2.7/pickle.py line 796
<mattip> so "can't work" is a bug?
rokujyouhitoma has quit [Ping timeout: 240 seconds]
<mattip> or a feature to be worked around
<ronan> maybe the __reduce__ is wrong?
<mattip> here is the traceback from the panda's test https://paste.pound-python.org/show/h9KxU9QHOReI8iaPKxB1/
<ronan> mattip: something must be going wrong in Pickler.save(), try to find out what CPython does there
<mattip> ronan: right, cpython uses cPickle so I am modifying it to use pickle instead
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<kenaan> cfbolz regalloc-playground a163b0deca41 /rpython/jit/backend/llsupport/regalloc.py: refactoring: compute Lifetime objects directly
<kenaan> cfbolz regalloc-playground eeca1d43c304 /rpython/jit/backend/llsupport/: move this case to the tests, where it belongs
<kenaan> cfbolz regalloc-playground a961fe5b9c4a /rpython/jit/backend/llsupport/: implement the most common spilling heuristic used in linear scan implementations: spill the variable ...
yuyichao has quit [Read error: Connection reset by peer]
nimaje1 has joined #pypy
nimaje is now known as Guest5252
nimaje1 is now known as nimaje
Guest5252 has quit [Ping timeout: 240 seconds]
yuyichao has joined #pypy
tbodt has joined #pypy
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Read error: Connection reset by peer]
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 240 seconds]
<mattip> the difference is in cpython, if obj is <type 'pandas._libs.sparse.IntIndex'>, getattr(obj, "__module__") returns 'pandas._libs.sparse', but on pypy returns 'pandas'
<mattip> gnite
ronan has quit [Ping timeout: 246 seconds]
marky1991 has joined #pypy
<njs> apparently cobol 2014 added IEEE 754, method overloading, and other features
<ndash> i'm ready to switch
<ndash> want to be ready for amazon's cloud cobol offering
asmeurer_ has joined #pypy
lritter has quit [Ping timeout: 240 seconds]
<glyph> ndash: I think the real leader in the cloud COBOL space is https://www.microfocus.com/campaign/step-into-the-cloud/
* ndash trying not to read "small step" and "big return" as subtle jokes about language implementation details
rokujyouhitoma has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rokujyouhitoma has quit [Ping timeout: 255 seconds]
tbodt has joined #pypy
kipras`away is now known as kipras
jamesaxl has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
asmeurer_ has quit [Quit: asmeurer_]
tbodt has joined #pypy
tbodt has quit [Read error: Connection reset by peer]
tbodt has joined #pypy
asmeurer_ has joined #pypy
Yardanico has quit [Remote host closed the connection]
kipras is now known as kipras`away
kipras`away is now known as kipras
Yardanico has joined #pypy
Yardanico has quit [Client Quit]
Yardanico has joined #pypy
rokujyouhitoma has joined #pypy
raynold has quit [Quit: Connection closed for inactivity]
rokujyouhitoma has quit [Ping timeout: 248 seconds]
asmeurer_ has quit [Quit: asmeurer_]
jamesaxl has quit [Quit: WeeChat 1.8]
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 248 seconds]
<Cheery> Can the id() of a weakref change in pypy/rpython?
_main_ has joined #pypy
Yardanico has quit [Read error: Connection reset by peer]
_main_ has quit [Read error: Connection reset by peer]
_main_ has joined #pypy
_main_ has quit [Read error: Connection reset by peer]
__main__ has quit [Ping timeout: 240 seconds]
_main_ has joined #pypy
chris|_ is now known as chris|
_main_ is now known as __main__
rokujyouhitoma has joined #pypy
rokujyouhitoma has quit [Ping timeout: 248 seconds]
q4 has joined #pypy
kipras is now known as kipras`away
yuyichao has quit [Ping timeout: 240 seconds]