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)"
kolko_ has joined #pypy
kolko has quit [Ping timeout: 248 seconds]
tbodt has joined #pypy
kolko_ has quit [Quit: ZNC - http://znc.in]
kolko has joined #pypy
kolko has quit [Quit: ZNC - http://znc.in]
kolko has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
yuyichao has quit [Ping timeout: 250 seconds]
adamholmberg has quit [Ping timeout: 255 seconds]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
<kenaan_> antocuni vmprof-enable-kwargs ef1507afe550 /: a branch where to implement the same _vmprof logic as in vmprof's enable-kwargs branch
<kenaan_> antocuni default b7758cca88a3 /pypy/module/_continuation/test/test_stacklet.py: improve the test by also checking the full call-stack at various points. Probably it does not test anything more...
<kenaan_> antocuni continulet-no-frame-loop f7a1a6eb6908 /pypy/module/_continuation/: temporary checkin with some debugging stuff + a new logic to avoid building cycles of frames
<kenaan_> antocuni continulet-no-frame-loop ba1ff85734b9 /pypy/module/_continuation/interp_continuation.py: WIP: add two temporary flags which allow to select: 1) the old switch logic vs the new one and ...
<kenaan_> antocuni continulet-no-frame-loop 3e4c6ca55d1d /pypy/module/_continuation/test/test_stacklet.py: WIP: refactor test_xxx into a proper failing tests, with a decent name and real asserts
<kenaan_> antocuni continulet-no-frame-loop 82b54bb1e271 /pypy/module/_continuation/test/test_stacklet.py: add a passing test to check that we stick the continulet stack at the right position of the f_b...
<kenaan_> antocuni continulet-no-frame-loop d5212118820d /pypy/module/_continuation/: introduce the concept of running/paused continulet, depending on bottomframe.f_backref; fix the...
<kenaan_> antocuni default 821e59360f37 /pypy/module/_continuation/test/test_stacklet.py: merge heads
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
drolando has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oberstet has quit [Ping timeout: 248 seconds]
antocuni has quit [Ping timeout: 248 seconds]
drolando has joined #pypy
tbodt has joined #pypy
tbodt has quit [Client Quit]
adamholmberg has joined #pypy
yuyichao has joined #pypy
adamholmberg has quit [Ping timeout: 248 seconds]
tbodt has joined #pypy
marr has quit [Ping timeout: 248 seconds]
slacky__ has quit [Ping timeout: 246 seconds]
pilne has quit [Quit: Quitting!]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lritter__ has joined #pypy
asmeurer_ has joined #pypy
tbodt has joined #pypy
songww has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
songww has quit [Remote host closed the connection]
songww has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 260 seconds]
AndrewBC has joined #pypy
ArneBab_ has joined #pypy
jcea has quit [Quit: jcea]
ArneBab has quit [Ping timeout: 248 seconds]
lritter_ has joined #pypy
lritter__ has quit [Ping timeout: 248 seconds]
songww_ has joined #pypy
songww has quit [Ping timeout: 248 seconds]
songww_ is now known as songww
kipras is now known as kipras`away
Ulfalizer has quit []
<fijal> so, unsurprisingly, vmprof does not work with -O
zmt00 has quit [Quit: Leaving]
tormoz has quit [Remote host closed the connection]
dw has joined #pypy
dw_ has quit [Ping timeout: 248 seconds]
_infinite_ has quit [Ping timeout: 268 seconds]
infinite has joined #pypy
drolando has quit [Remote host closed the connection]
drolando has joined #pypy
tormoz has joined #pypy
<fijal> UTF8 merge will be a complete nightmare
<fijal> (into py3k)
antocuni has joined #pypy
marr has joined #pypy
_main_ has joined #pypy
__main__ has quit [Ping timeout: 248 seconds]
_main_ is now known as __main__
__main__ has quit [Read error: Connection reset by peer]
__main__ has joined #pypy
<fijal> ronan: ping
asmeurer_ has quit [Quit: asmeurer_]
<fijal> cpython quiz anyone?
<antocuni> yes?
<fijal> antocuni: well, what is it for?
<fijal> why would you ever have code like that?
<antocuni> maybe a leftover of some previous code which could or could not define it earlier?
<fijal> no, it's on purpose
<antocuni> "ah"
<fijal> antocuni: any guesses?
<antocuni> ah, you DO know the answer
<antocuni> let me think
<fijal> yes yes
<antocuni> either 1) some code read()+exec() this file passing a dict
<antocuni> or, more worrying
<antocuni> 2) tests monkey-patch __builtin__.socket_map
<fijal> neither, although 1) is a bit closer to truth
<antocuni> reload!
<fijal> yes!
<antocuni> O_o
* fijal gives antocuni a cookie
<antocuni> I admit I didn't know that reload preserves the module dict
<njs> fijal: it's for reload()
<njs> ah, I see you already gave the solution :-)
<fijal> njs: anto got it first
<fijal> njs: so I'm working right now on RPython improvements, to make it a bit saner language
<antocuni> separate compilation!
* antocuni runs away
<fijal> now I know numpy is not moving to RPython for sure, but I want to give this a bit of a go
<fijal> so I want to show this can be compiled to both CPyext or the JIT
<fijal> and can be used as a starting point, with a different input lang, but the same IR or something
<fijal> antocuni: ^^^
<njs> I suspect keeping python syntax compatibility is going to be tough for the ->cpyext route, given that you're going to want things like FFI calls to be statically visible
<njs> but sure, you're saying you plan to switch the input lang, so whatever :-)
<njs> I'd prefer types like int8, uint16, ..., float32, float64, + intptr_t, uintptr_t, C long
<antocuni> fijal: I am unsure whether it's a good idea to keep the distinction between "basic int types" and "low level int types"
<njs> well, meh, I guess you do probably want some more C types for FFI purposes
<fijal> njs: ok
<fijal> njs: I'm happy to expose the whole C, do you think the ll.<> is the right prefix?
<fijal> or C.foo
<fijal> right now this is just about declaring the input and result types
<fijal> and classes and it's attributes
<njs> I don't really know what the ll.<> thing is about. I don't know rpython :-)
<fijal> njs: the C-level types
<fijal> njs: or ok, no, the ll.XXX is something I don't want you to care about
<njs> I can see why you might want to start with rpython for a POC, but it might be useful to give like a cython translation phrasebook for those of us who are more familiar with it :-)
<fijal> hehe, indeed, but that's what I'm asking about :)
<fijal> "it's nonsense" is an answer
<fijal> let me rework this to be more palatable to someone with cython knowledge
<antocuni> fijal: also, about high-level vs low-level types: I agree that it's nice in theory that a single high-level type can have multiple ll implementations, but I also think it makes things terribly more complicated when you want to interface to C
<antocuni> so, I am thinking of something more similar to e.g. C++ templates
<njs> it is not immediately obvious what you're intending the "Classes:", "PBCs:", and "Examples of a signature:" sections to mean, if that's the question
<fijal> njs: ok, so I'll prepare some more materials for people not intimately familiar with RPython maybe ;-)
<njs> "object spaces" are not a thing that means much to non-pypy folks :-)
<fijal> njs: this is indeed for "internal dissemination, top-secret"
<antocuni> where you say: List(T) is "GcStruct { int length; T* items}"
<fijal> antocuni: it's not T*
<fijal> but I'm not sure what do you want tbh?
<antocuni> to make the relationship between HL vs LL types a core part of the typesystem
<antocuni> instead of as it is now where you need hacks like hlstr and llstr, for example
<fijal> but surely you want to call l.append and do x = [1, 2, 3] no?
<antocuni> yes
<fijal> so....?
<fijal> how do you propose it done differently than array(T)?
<antocuni> right, it might be that my comments are off topic wrt the current discussion
kolko has quit [Ping timeout: 250 seconds]
<antocuni> basically, I'm saying that I'd like a standard/official way to go from array(T) to the ll representation and back
<fijal> I can't tell, because I can't see what are you proposing
<antocuni> but it might not be related to this typesystem thing you are describing
<fijal> yes, ok, maybe, but it's a) not clear how to do it nicely and b) irrelevant to the typing part
<antocuni> yes exactly
<antocuni> sorry
<fijal> ok, so what do you think?
<antocuni> it seems like a reasonable starting point
<antocuni> is the @rpython optional or always needed?
<fijal> I think the plan is to make it always needed
<fijal> (but start optional)
<fijal> the key here being that IF @rpython is present, then the annotations are a bit more serious
<fijal> they would not let you union for example
<antocuni> one possibility is to make it needed only if you want to export a function to other modules
<antocuni> this would be a good step in the direction of separate compilation
<fijal> why not make it always needed?
<antocuni> because it's tedious; also, it would clearly mark the boundary between the public API of a module and its private part
<antocuni> also, regarding the typesystem: we probably want something similar to typedef
<fijal> yes, I wrote it down, no?
<njs> are you talking about the same thing?
<fijal> njs: forget that I showed you anything please :)
<fijal> njs: I'll show you something else once we can have an internal stuff working
<antocuni> fijal: the typedef stuff? I cannot see it
<njs> my guess is that fijal's goal here (though I could be wrong, he didn't say) is to write down some syntax for taking stuff that currently has to be written as C extensions and writing it in... something else
<fijal> njs: yes, among other things
<njs> fijal: heh
<fijal> njs: the SHORT term goal here is to make rpython more palatable
<fijal> njs: I think what I would do, is I would write a subset of what I just did for extension modules
<njs> making rpython more palatable seems like a reasonable goal, but yeah it's not immediately relevant to me :-)
<fijal> antocuni: line 29
<fijal> antocuni: btw, I'm ok with "tedious" as opposed to "fucking magic that works 99% of the time and explodes remaining 1% with assertion errors"
<fijal> it also clearly marks what's rpython whats' not
<antocuni> fijal: line 29 says "Classes::"; no mention of typedefs
<fijal> yes, so this is how you define an instance
<fijal> and its attributes
<fijal> does it have to specifically say "typedef" or are you trying to be difficult?
<fijal> antocuni: ^
<antocuni> well no, it's just something different. I was thinking of C-like typedefs, i.e. you give a short name to an arbitrary type
<fijal> ah
<fijal> like foo = GcStruct(...)
<fijal> that stuff?
<antocuni> yes
<fijal> I would say we keep the current thing, but we have a way to register it as a name in some namespace
<antocuni> yes, exactly
<antocuni> a typedef :)
<fijal> yes ok
<fijal> having ronan around would be good
<njs> maybe you should rewrite everything in rust, I hear it has good types
<fijal> njs: go away
<njs> :sniff:
slacky__ has joined #pypy
<ronan> hi
raynold has quit [Quit: Connection closed for inactivity]
jcea has joined #pypy
songww has quit [Quit: songww]
Rhy0lite has joined #pypy
oberstet has joined #pypy
raynold has joined #pypy
<ronan> fijal: new syntax is a distraction, and a bad idea IMO
<fijal> ronan: how else do you want to do it?
<ronan> we can just use Python
<ronan> as in @rpython(ObjSpace, int, float, returns_=str)
<fijal> that is hard to get working because of circular imports
<antocuni> also, a DSL has good advantages, like the possibility of using things like "bytes?"
<fijal> besides, it's not ObjSpace - it's a special PBC
<ronan> fijal: we can accept strings for those special cases
<antocuni> ronan: compare e.g. rffi way of specifying signatures vs cffi
<fijal> ronan: having a mix is even worse
<ronan> antocuni: cffi didn't invent a language, it just uses C
<ronan> fijal: no, having a parser is worse
<fijal> why?
<ronan> languages are hard and parsers are always buggy
<fijal> we can't have a constructive conversation with just absolute statements ;-)
<antocuni> I'd assume that a group of people who write compilers should be able to write a parser for a small DSL :)
<fijal> or not
<ronan> I wouldn't ;-)
<fijal> that's a bit beyond the point
<fijal> ronan: how would you sort out a) circular imports, b) things like str?
<cfbolz> we all hate writing parsers ;-)
* fijal really does not mind
<ronan> fijal: a) use a string (like typing/mypy does), b) just write str
<fijal> so @rpython("int", "int", returns_="int")
<fijal> ?
<fijal> for example
<fijal> typing recently moved to some parser hacks precisely for those reasons :)
<fijal> FYI
<fijal> I meant specifically "str?" not "str"
<ronan> fijal: no, that would just be '@rpython(int, int, returns_=int)'
<fijal> but sometimes you would put things in "" because of circular imports?
<ronan> yes
<fijal> IMO @rpython("int, int -> int") is far more concise
<ronan> but you need to parse it...
<fijal> yes, that's fine
<antocuni> ronan: really, it's not THAT hard ;)
<fijal> famous last words ;-)
<cfbolz> the int example is boring. I'd be more interested in seeing what a real objspace method looks like with syntax
<fijal> ronan: the attributes become a lot harder btw
<fijal> cfbolz: like @rpython("pypy.space, pypy.W_Root, list(pypy.W_Root)->pypy.W_Root")
<fijal> for example
<cfbolz> yes, in your version
<cfbolz> but in ronan's?
<fijal> or @rpython("space, W_Root, list(W_Root)->W_Root", namespace="pypy")
<fijal> ronan: ?
<antocuni> since we are talking about syntax, I vote for "list[W_Root]" or "list<W_Root>"
<ronan> cfbolz: @rpython('space', w_Root, [W_Root], returns_=W_Root)
<fijal> ronan: and a non-resizable list?
<cfbolz> (aside: returns=W_Root works, the underscore is not needed)
<ronan> List(Foo, resizable=False)
<ronan> cfbolz: yeah, I'm hesitating between returns and return_, hence returns_
<fijal> ronan: so 'space' is something pypy-specific magical?
<ronan> yes
<fijal> I kinda want to have "you know rpython, you understand how types work"
<fijal> so no pypy-specific magic
<cfbolz> fijal: both things are quite magic
<fijal> cfbolz: yes, sure, one is less pypy-specific
<ronan> well, 'space' would just be a one-liner definition somewhere
<fijal> not deep in rpython?
<fijal> ;-)
<fijal> ronan: we've tried this in @enforceargs, why we don't use it more?
<ronan> no, somewhere in pypy
<fijal> cfbolz: question to you too
<antocuni> FWIW, I just managed to hit a "XXX should not happen" assert
<fijal> SomeInstance(can_be_None=False, classdef=py._path.local.LocalPath)
<fijal> sounds fishy ;-)
<ronan> fijal: I guess it's because @enforceargs doesn't work very well
<antocuni> yes, I put an udir inside some rpython code
<fijal> why?
<ronan> fijal: it's basically more like an annotation-time assert than a type declaration, and you can't give useful types like List(int)
<fijal> I *really* dislike from something import List; List(int, resizable=False)
<fijal> also for anything non-trivial you either end up with import hell and circular imports
<fijal> and if we allow both W_Root and 'W_Root' that's a complete mess
<ronan> fijal: we can easily add cute aliases like [int] and {str: (float, int, str)}
<fijal> that all sounds like a nightmare to me
<fijal> Dict<int, float> looks a lot better
<fijal> anyway
<fijal> let's do an example
<fijal> def __init__(self, space, name, bases_w, dict_w,
<fijal> overridetypedef=None, force_new_layout=False,
<fijal> is_heaptype=True):
<fijal> in typeobject.W_TypeObject.__init__
<fijal> @rpython("space, bytes, list[W_Root], dict[bytes, W_Root], TypeDef, bool, bool->")
<fijal> @rpython("space, bytes, list[W_Root], dict[bytes, W_Root], TypeDef, bool, bool->", namespace="pypy")
<fijal> if we care
<fijal> @rpython("space", str, [W_Root], {str: W_Root}, TypeDef, bool, bool) looks very similar
<fijal> but no, because it's all of a sudden List(W_Root, resizable=False) or something
<fijal> and "str(non-null)" or what?
<fijal> I don't like how something like a nullable and non-nullable are dissimilar by a large degree
<ronan> the latter is a feature for me
<ronan> how do you define str(non-null) in your version, though?
<ronan> or a non-resizable list?
<fijal> str?
<fijal> array(foo)
<ronan> I mean a no_nul str
<fijal> str?
<fijal> with "?"
<cfbolz> no, wait
<fijal> ah, no nul
<fijal> maybe str[something-here]
<fijal> then <> is for templates [] is for parameters
<cfbolz> I must say the more syntax you invent the more I believe ronan ;-)
<ronan> indeed, we need something quite complex to define all the types we use, and I'd rather use Python for that than a half-baked DSL
<antocuni> here is where my typedef idea comes handy; "typedef str[no_nul=True] str_no_nul"
<fijal> I must say I'm not a huge fan of DSL either, but noone has provided a reasonable answer to circular imports
<fijal> any thoughts?
<fijal> ronan: ?
<ronan> fijal: my answer is still strings
<cfbolz> sorry, afk
<cfbolz> imo we should make this more concrete by looking at a real recursive import problem in interpreter/ or so
<ronan> if you get one in the signature, you do the lookup at annotation time in the module globals
<fijal> ronan: no
<fijal> which module?
<fijal> you might not have it ever in the module globals
<ronan> but how would it work in that case in your version?
<cfbolz> he wants a new namespace where all the types live
<ronan> but then you need to make sure that everything is defined before using it
<ronan> it's like a circular import problem, except different
<cfbolz> well, you do what you suggested, do the lookup only at annotation time
<cfbolz> but yes
<antocuni> I think we are looking at this problem somewhat from the wrong perspective
<antocuni> if the goal is to make RPython a "saner" a more usable language, we should approach it first from the user point of view
<fijal> IMO having "you write W_Root or 'W_Root' depending on the phase of the moon, but both work" is a bit user unfriendlt
camara has joined #pypy
<antocuni> i.e., to find a way which is ideally: 1) easy to read; 2) easy to write; 3) consistent; 4) easy to implement
<camara> str+ for the no nul case
<camara> taking inspiration from regular expressions
<fijal> camara: what do you find more readable/writable?
<fijal> IMO ronans strategy fails the 3)
<antocuni> also the 2, IMHO
<fijal> mitsuhiko: ping?
<antocuni> about no_nul: I would say that str and str(no_nul=True) should just be two different types (even if they end up being implemented by the same annotation with a different flag)
<antocuni> so, for example: "str" and "str0"
<ronan> I think fijal's solution fails 1, 3 and 4
<fijal> what's inconsistent?
<ronan> 1 and 4 because of the DSL aspect
<ronan> 3 is a general property of RPython
<antocuni> ronan: why is it hard to read, assuming that we design a good DSL?
<antocuni> also, note that your proposal is ALSO a DSL, just baked by python's parser instead of our own
<ronan> antocuni: because it's a new language
<antocuni> I didn't include "easy to learn" :-P
<antocuni> I'm serious: I think it's fine to trade a bit of learning curve (in the form of having to learn a DSL) in exchange for 1 and 2
<ronan> antocuni: and yes, I'm also propsing a DSL, but one that's easier to implement and learn
slacky__ has quit [Read error: Connection reset by peer]
<antocuni> yes, and which is harder to read and write
<antocuni> ronan: e.g., take the example of test_optimizeopt
<antocuni> we used to write things like: oplist=[ResOperation('add', v0, Const(1)), ...]
<fijal> antocuni: no, we didn't write them ;-)
<antocuni> then we decided to switch to a DSL
<cfbolz> actually, that DSL shows most of ronan's points
<antocuni> fijal: I'm quite sure that we did at some point, but well
<antocuni> cfbolz: does it?
<cfbolz> yes
<ronan> antocuni: that's a different case
<cfbolz> eg it's completely bizarre to have to figure out where descrs come from
<fijal> antocuni: well, my point was more "we did not write enough of them"
<fijal> cfbolz: yes, we could have done a better job
<antocuni> ah yes
<ronan> that DSL allows switching from a declarative representation to an imperative one
<antocuni> ronan: I find it very similar to your proposal
<fijal> ronan: I think I'll implement a prototype and can we take discussion from there?
<fijal> more likely, I'll start with a way of fixing annotations so they don't change any more
<fijal> ronan: can we have a 3.5 recap on #pypy-sync though?
<ronan> my issue with the typing DSL is that I'm fairly sure that some things will be impossible to write
<cfbolz> note that we have several such mechanisms around already, and they are all not used much (rlib.signature, enforceargs, etc)
<ronan> fijal: as I said at first, syntax is a distraction, we need to make things work first
<fijal> yeah
<fijal> fair
<fijal> I'll show you my changes, hopefully later today
<camara> Why not use a similar syntax as type hints and get rid of the decorator. That way the typing is near the argument names. Maybe even change def to rdef to distingish rpython defs and aid the parser.
adamholmberg has joined #pypy
<fijal> camara: because we don't preprocess rpython
<antocuni> we could modify our pypy27 to accept type annotations, and use those :)
<antocuni> then, we write a module which hijacks the parser to support them also on cpython 2.7
<antocuni> and we call it "python28", so that people can do "pip install python28" :)
<arigato> # -*- coding: python-with-hack -*-
<ronan> antocuni: yuck! I'd rather port rpython to Python 3
<camara> why would preprossing be necessary. You just change the language.
<antocuni> arigato: this looks like an excellent idea!
<fijal> camara: because our language starts from bytecode-level
<fijal> so once it's imported
<fijal> arigato: do you want to have opinions?
<arigato> not really
<arigato> I am honestly of the opinion that RPython is a bit hopeless for end users
<fijal> there is a chance of that :)
<fijal> but I meant more for "more interpreter authors"
yuyichao has quit [Ping timeout: 248 seconds]
<Rotonen> ronan: the zope/plone stack is actually going for rpython to python3 porting, be welcome to help there
<fijal> Rotonen: it's a different rpython right?
<arigato> yes, unrelated
<Rotonen> fijal: that's where my superficial understanding falls apart
<Rotonen> kk
adamholm_ has joined #pypy
<kenaan_> antocuni fix-vmprof-stacklet-switch 3e4e9ff62be1 /rpython/rlib/: make sure that vmprof don't sample the stack in the middle of stacklet switching, else it rea...
<kenaan_> antocuni fix-vmprof-stacklet-switch 1b1bdd6c7f39 /rpython/rlib/test/test_rstacklet.py: fix typo
<kenaan_> antocuni fix-vmprof-stacklet-switch 52a6650ba479 /pypy/module/_continuation/test/test_translated.py: add a test which is failing (i.e., segfaulting) on default, and that it seems to be fixed on ...
<kenaan_> antocuni fix-vmprof-stacklet-switch 46ee55287ed4 /: remove the space param from rvmprof.{start,stop}_sampling: it is not used and also it does no...
<kenaan_> antocuni fix-vmprof-stacklet-switch 2c8aa32187c0 /: close merged branch
<kenaan_> antocuni default 927cc69f4d52 /: merge the fix-vmprof-stacklet-switch: make sure that vmprof does not segfault in presence of continuation.switch...
adamholmberg has quit [Ping timeout: 255 seconds]
yuyichao has joined #pypy
<camara> fijal, for a crazy idea. I'm sure a hack could be done to import a module called rpython or rdef which does nothing under pypy and under CPython it preprocesses the module converting type annotations to a decorator. That way the user could use the cleaner type annotation format.
<fijal> I'm not sure if I want such hacks ;-)
infinite has quit [Ping timeout: 260 seconds]
<camara> Well the hack would only be under CPython.
<kenaan_> rlamy py3.5 dfff7758834e /pypy/module/posix/: Merged in thisch/pypy/py3.5 (pull request #584) Change return type of os.times to posix.times_result
<kenaan_> thisch py3.5 852c26ea2a1c /pypy/module/posix/: Change return type of os.times to posix.times_result The return type was changed in CPython3.3. Related: #2375
<kenaan_> thisch py3.5 898194d1902c /pypy/module/posix/test/test_posix2.py: Improve test for posix.times() Test that posix.times() returns a times_result object.
infinite has joined #pypy
<antocuni> arigato: when you feel like, please have a look at my continulet-no-frame-loop branch. It seems to work and the tests pass, but since the logic is subtle, I'd like some opinions/reviews about it
<arigato> ok
<antocuni> thanks
<antocuni> basically, the general idea is to remember also the topframe of the continulet, and to set the bottomframe.f_back to None when it's not running
camara has quit [Remote host closed the connection]
<kenaan_> rlamy py3.5 12f1fb4860ac /lib-python/3/test/test_inspect.py: Fix test to work on PyPy
<fijal> that was a long day
<kenaan_> fijal unicode-utf8 1d6d78e72d50 /: general progress towards moving more of the infrastructure from runicode towards unicodehelper, which helps us...
adamholm_ is now known as adamholmberg
zmt00 has joined #pypy
marky1991 has joined #pypy
tbodt has joined #pypy
<cfbolz> antocuni: would you unbreak test_whatsnew please?
<antocuni> cfbolz: sure
ceridwen has quit [Quit: Ex-Chat]
<antocuni> we should have an hg hook which reminds you
ceridwen has joined #pypy
ceridwen has quit [Changing host]
ceridwen has joined #pypy
marky1991 has quit [Ping timeout: 260 seconds]
<kenaan_> antocuni default 95e0fdd7cd86 /pypy/doc/whatsnew-head.rst: fix test_whatsnew
<fijal> it's called buildbot
oberstet has quit [Ping timeout: 240 seconds]
<antocuni> yes, it takes only 24hours
drolando has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drolando has joined #pypy
drolando has quit [Remote host closed the connection]
drolando has joined #pypy
<fijal> indeed
<antocuni> well nowadays it might be that pypy-only non-translated tests take a reasonable amount of time
<antocuni> like, we might be able to run them on travis or similar
<fijal> we can run test_whatsnew on travis :)
<antocuni> LOL
marky1991 has joined #pypy
<fijal> or some interesting subset
<fijal> like interpreter/ and objspace/
<fijal> I'm not joking
<antocuni> I just launched a "time py.test pypy/" on bencher4
<antocuni> let's see how much it takes
<fijal> does it not crash?
<antocuni> we will see
<fijal> during collection
Arfrever has joined #pypy
<antocuni> no, it doesn't crash but I see tons of skipped tests
<ronan> antocuni: it takes 36 mins, 6 secs on py3.5
<antocuni> and if I try to run these tests directly, they just pass
<antocuni> weird
oberstet has joined #pypy
<antocuni> ronan: cool, especially because if we run them on travis we can e.g. parallelize them
<antocuni> so it might be that a build takes a total wall clock time of ~10minutes or so
raynold has quit [Quit: Connection closed for inactivity]
<ronan> antocuni: we can't run them on travis, though, because bitbucket
<antocuni> yes sure
<antocuni> it might be worth moving to github just for this, possibly
lritter_ has quit [Ping timeout: 268 seconds]
<antocuni> also, bitbucket has pipelines nowdays, although they are not as feature complete as travis, AFAIK
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
asmeurer has joined #pypy
jamesaxl has quit [Read error: Connection reset by peer]
drolando has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jamesaxl has joined #pypy
<fijal> we can export stuff automatically to GH and then run travis from there
<fijal> I think
<fijal> without real migrate, just have a mirror
jamesaxl has quit [Read error: Connection reset by peer]
<fijal> antocuni: we can run interpreter/ objspace/ and module/xyz that was touched at least
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
asmeurer has quit [Quit: asmeurer]
adamholmberg has quit [Ping timeout: 255 seconds]
<antocuni> yes, sounds like a good idea
drolando has joined #pypy
<antocuni> and a good summer of code project
<fijal> infrastructure makes terrible SoC projects IMO
jamesaxl has joined #pypy
<mitsuhiko> fijal: pong
<fijal> mitsuhiko: feel like reading bit of history about the rpython annotations and such?
<mitsuhiko> send me :)
<fijal> logs from here
adamholmberg has joined #pypy
<kenaan_> fijal rpython-20 5f87d65c7f82 /rpython/: start a branch to play with stronger type guarantees
* antocuni off
antocuni has quit [Ping timeout: 248 seconds]
adamholmberg has quit [Remote host closed the connection]
<ronan> fijal: you can already that with rpython.rlib.signature
<ronan> also, please don't break equality
<ronan> *already do that
<fijal> ronan: sorry?
<fijal> ronan: did I break it?
<ronan> yes, you changed __eq__
adamholmberg has joined #pypy
<ronan> you're making SomeStuff() and SomeStuff(can_union=False) equal but behaving differently
<fijal> yes
<fijal> that's on purpose
<ronan> well, it's bad and you should feel bad ;)
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<fijal> well, I don't want it to stop comparing because someone set can_union
tbodt has joined #pypy
<fijal> ronan: do you know if we ever USE the mutated attribute on lists?
<fijal> or we just happen to have it?
<ronan> I'm pretty sure it's used
<ronan> I think I tried to remove it and it broke stuff
<arigato> hacking at __eq__ to make objects behaving differently but compare as equal is a very sure way to get into a large mess
<fijal> arigato: why?
<fijal> arigato: well the general idea is not to need all of that mess, eventually
<arigato> do I need to spell it out?
<arigato> you're getting into infinite amount of troubles
marky1991 has quit [Remote host closed the connection]
<arigato> __eq__ is used more often than you think
marky1991 has joined #pypy
<arigato> if you're trying to clean up messes, then it seems like a very bad idea
<fijal> ok, so how do you propose?
<fijal> I want to kill or severly limit the global type inference
<fijal> the idea is to have signatures on functions and check the input/output
<arigato> I'm unsure how this relates to __eq__
<fijal> how do you keep track of which types cannot be merged/mutated?
<arigato> try SomeObject.contains()?
<fijal> I need to explode at union
<fijal> and a bunch of other places
<fijal> no, more importantly
<arigato> contains() does that I think
<fijal> union does not use contains
<arigato> i.e. it's a read-only operation
<fijal> more importantly I need to track something on annotations
<fijal> how do you propose to do that if not by adding attribute?
<ronan> what do you need to track on annotation objects?
<fijal> the changes to __eq__ stem from the fact that I want an attribute, but I don't want it to be significant
<arigato> I'm very unsure to understand why you need a looser __eq__ for any of that
<fijal> arigato: how do I add an attribute to someobject otherwise?
<ronan> fijal: why do you want to add an attribute?
<ronan> annotations should be immutable
<fijal> they are
<fijal> well, they aren't
<fijal> but my changes didn't change anything
<fijal> I need to add an attribute so I explode early on merging
<ronan> why do you want to explode on merging?
<arigato> you're doing this in a branch that doesn't plan to be merged, right?
<fijal> because I want to kill merging at the end
<fijal> arigato: so here is the problem
<fijal> arigato: I want a plan forward
<fijal> so far I've been attacked by having the plan too vague, so I don't want to go down a month-long discussions on pypy-dev
<fijal> but the complaints here have been far from constructive so far as well
<fijal> I do want eventually to merge it, maybe not in that form, but in some form
<fijal> ok, so if I remove the attribute, how do I keep track of stuff?
<fijal> like if I return a non-resizable list, I don't want it to become resizable
<ronan> fijal: return from what?
<arigato> but if f() and g() both return a non-resizable list of ints, you still want this code to be valid RPython:
<arigato> if x: l = f(); else l = g()
jamesaxl has quit [Ping timeout: 268 seconds]
<arigato> I don't think you can do better than adding a flag in annotation/list*.py that means "shouldn't become resizable"
<arigato> at least if you want the code to be based on the current annotation model
<fijal> arigato: why would the following not be valid rpython any more?
<ronan> arigato: and BTW, it already exists
<arigato> the two lists are really different, and need to be merged into the annotation for 'l'
<fijal> ronan: it does not work
<fijal> arigato: how they're different?
<arigato> ronan: you're right
<arigato> fijal: try it out in a test
<fijal> ok, maybe this is not the best way, but I completely don't get your arguments tbh
<fijal> arigato: tell me what am I missing
<arigato> fijal: if you write 'x = []; y = []' then the annotations for x and y are different, right?
<fijal> yes
<arigato> because you can later do 'x.append("foo"); y.append(42)'
<fijal> but why my changes would prevent them from merging?
<fijal> here is a better example:
<fijal> if x: l = function_returning_str()
<arigato> ok, then I have no clue what you're doing. I thought you said you were adding a way to prevent annotations from merging
<fijal> else: l = function_returning_str_or_none()
<fijal> return l
<fijal> if I mark the function_returning_str() as a non_union str-with-no-none, how can I do it without having an attribute?
<fijal> arigato: no, I want to prevent merging in a case where on has can_union=False and they're not equal
<ronan> fijal: mark the function
<fijal> ronan: but it's only a problem at return l
<fijal> where the return merges
<fijal> or do I have to mark the caller?
<fijal> that seems a bit non-ideal
<fijal> but maybe ok
<ronan> you should check the return type when the function returns
<ronan> i.e. every time you see return x, you check that x matches the return type
<fijal> that's hiding errors
<arigato> fijal: sorry, can't follow you. you're adding a way to prevent *some* annotations from merging, right?
<fijal> that is, you don't see the moment of merge, you see only later that "something something returned the wrong thing"
<fijal> arigato: yes
<fijal> arigato: I want to explode if certain things occur, to be precise
<arigato> fijal: then my argument applies. for some annotations, you can't do much if you prevent all merges
<arigato> for example:
<arigato> if x: lst = function_returing_lst_marked_dont_merge()
<arigato> else: lst = []
<fijal> no
<arigato> this would never compile, and I don't understand the situation where you want that
<fijal> this is not a "dont merge no matter what"
<fijal> this is "don't merge if the result does not compare equal"
<arigato> but that's the same
<fijal> how so?
<fijal> so say function_returning_lst_marked_dont_merge returns a non-resizable list of ints
jamesaxl has joined #pypy
<fijal> then if I merge it with [], I still get non-resizable list of ints, no?
<arigato> not unless you define things more precisely
<arigato> right now what occurs is:
<arigato> function_returning_lst() returns SomeList(listdef=ListDef1)
<arigato> after the merge, it is SomeListlistdef=ListDef2)
mattip has joined #pypy
<arigato> these don't compare equal at the moment, and making them compare equal is full of issues
<arigato> e.g. they can be equal for a moment, and no longer equal when one of them is later generalized, etc.
<fijal> right
<fijal> so I want to have also a flag saying "don't ever generalize", which would spread
adamholm_ has joined #pypy
<arigato> I see what you're trying to do in general, but I don't think that rpython/annotation is a good start for that
<fijal> what is?
<arigato> I mean, I think I see what you're trying to do, but in order to do this cleanly, we shouldn't start with the code in rpython/annotation/
<fijal> but write it from scratch?
<arigato> yes, differently
<fijal> but it's not gonna give us any direct way to improve the setup in between
<fijal> which means it won't happen
<arigato> likely
<fijal> so what I'm trying to do is to get us somehow started to be able to say add annotation to W_IntObject or W_ListObject and be able to say what types are on attributes
adamholmberg has quit [Ping timeout: 240 seconds]
<fijal> and if they try to be merged we explode
<fijal> sure, in the ideal world
<arigato> ok, that looks fine
<arigato> and not too hard
<ronan> fijal: that's basically just a type signature
<fijal> ronan: no, because we need to fight things like list merges, dict merges and all the other crap
<arigato> fijal: look at classdef.py where the SomeXxx get assigned and re-assigned to attribute names
<fijal> arigato: but that does not help, for the reasons above
<fijal> because we merge stuff
<fijal> so it's all connected
<ronan> fijal: we need to fight that to get proper type signatures anyway
<fijal> ronan: fight what?
<ronan> list merges, dict merges and all the other crap
<fijal> yeah
<fijal> which is why I started there
<fijal> but instead of actually trying to get anywhere, I'm arguing on IRC
<ronan> but unions aren't the problem
<fijal> less so
<fijal> but they're still a bit of a problem
<arigato> can't you find a way to set 'too_late_for_change' on listdefs and dictdefs?
<ronan> the issue is that we can't really say "any list of ints", we can only say "this list here contains ints"
<fijal> ronan: sorry?
<arigato> ...or 'dont_change_any_more', as it is called
<ronan> fijal: well, SomeList keeps track of where the list comes from, which is why we get weird merges on unions
<fijal> is there an equivalent on classes and instances?
<arigato> I think we should set 'dont_change_any_more' in rlib/types.py, too
<arigato> there is no equivalent for classes and instances
<arigato> but you don't need one
* fijal gives up for today
<arigato> I think? can you give an example where you need that for instances? merging two instances of subclasses gives SomeInstance(base_class), but without mutating anything
<fijal> I don't want new attributes
<fijal> I don't want attributes moving up the chain
<arigato> right, but that doesn't occur at the merge
<fijal> it can, no?
<fijal> it can at least add new stuff to base class
<arigato> no?
<arigato> I'm saying that if you merge two
<arigato> ...SomeIntance(), then nothing is mutated for the attributes
<arigato> if later that SomeInstance() goes into a getattr() or setattr() operation, then yes
<arigato> but you can detect that
<arigato> there is "_slots_ = []" already doing this
<arigato> iow, the model is that SomeXxx are immutable, and a few of them point to a ListDef/DictDef/ClassDef which is itself mutable
<arigato> these three places already try to have ways to stop mutation from occurring, but not done very systemat9cally
<mattip> about failing tests - could someone with a macosx try to replicate the failing tests in pypy-c-jit-macosx-x86-64 pypy.module.posix.test.test_posix2
<mattip> and the failing test_lock own test passes after translation, hg bisect says it started after 167b802baf3b
<mattip> own-s390x is giving some kind of permission denied http://buildbot.pypy.org/builders/own-linux-s390x/builds/765
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mattip> and ARM is complaning in general but it seems cffi is causing some crash
<mattip> windows is failing vmprof, would be nice if someone took ownership of that
tbodt has joined #pypy
Rhy0lite has quit [Quit: Leaving]
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
ronan has quit [Ping timeout: 264 seconds]
raynold has joined #pypy
__main__ has quit [Read error: Connection reset by peer]
__main__ has joined #pypy
__main__ has quit [Read error: Connection reset by peer]
ronan has joined #pypy
Arfrever has quit [Quit: 御出で]
__main__ has joined #pypy
oberstet has quit [Quit: Leaving]
kipras`away is now known as kipras
__main__ has quit [Read error: Connection reset by peer]
__main__ has joined #pypy
__main__ has quit [Read error: Connection reset by peer]
_main_ has joined #pypy
_main_ is now known as __main__
mattip has left #pypy ["bye"]
__main__ has quit [Read error: Connection reset by peer]
__main__ has joined #pypy
_main_ has joined #pypy
_main_ has quit [Read error: Connection reset by peer]
_main_ has joined #pypy
__main__ has quit [Read error: Connection reset by peer]
_main_ is now known as __main__
adamholmberg has joined #pypy
adamholm_ has quit [Ping timeout: 248 seconds]
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
pilne has joined #pypy
adamholmberg has quit [Read error: No route to host]
adamholmberg has joined #pypy
<kenaan_> rlamy py3.5 4fe92f1fbcbf /lib-python/3/test/test_cmd_line_script.py: Remove obsolete PyPy-specific changes
<kenaan_> rlamy py3.5 6fc0a7040472 /pypy/interpreter/app_main.py: Always initialise __main__.__loader__ and __main__.__builtins__ (CPython does, it, don't ask me why)
adamholm_ has joined #pypy
adamholmberg has quit [Ping timeout: 258 seconds]
adamholm_ has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 250 seconds]
drolando has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drolando has joined #pypy
marky1991 has quit [Ping timeout: 268 seconds]
marky1991 has joined #pypy
tbodt has quit [Ping timeout: 240 seconds]
tbodt has joined #pypy
antocuni has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
drolando has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marky1991 has quit [Ping timeout: 248 seconds]
drolando has joined #pypy