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)"
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
adamholmberg has quit [Ping timeout: 248 seconds]
<simpson> Is there a way to hint to the GC that I'm creating an object which I expect will be long-lived?
<simpson> Not important, just an interesting thought I had had.
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
antocuni_ has joined #pypy
adamholmberg has quit [Ping timeout: 272 seconds]
marr has quit [Ping timeout: 260 seconds]
Nizumzen has joined #pypy
tbodt has joined #pypy
jcea has quit [Quit: jcea]
<cfbolz> simpson: nope. Long lived objects are basically never touched by the GC
<cfbolz> Except if if you would mutate them a lot
<simpson> cfbolz: Okay, thanks.
dcrosta has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
antocuni_ has quit [Ping timeout: 256 seconds]
tbodt has joined #pypy
tbodt has quit [Read error: Connection reset by peer]
tbodt has joined #pypy
dddddd has quit [Remote host closed the connection]
pilne has joined #pypy
ArneBab_ has joined #pypy
ArneBab has quit [Ping timeout: 256 seconds]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
astronavt has joined #pypy
fryguybob has quit [Remote host closed the connection]
forgottenone has joined #pypy
mat^2 has quit [Ping timeout: 240 seconds]
Nizumzen has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<kenaan_> rlamy py3.5 570c2749ff19 /pypy/: Fix handling of time.sleep()'s argument and use nanosecond precision internally
astronavt has quit [Remote host closed the connection]
pilne has quit [Quit: Quitting!]
jamesaxl has joined #pypy
guilherme has quit [Remote host closed the connection]
guilherme has joined #pypy
Nizumzen has joined #pypy
guilherme has quit [Ping timeout: 265 seconds]
guilherme has joined #pypy
guilherme has quit [Remote host closed the connection]
guilherme has joined #pypy
guilherme has quit [Ping timeout: 240 seconds]
dcrosta has quit [Read error: Connection reset by peer]
gclawes_ has joined #pypy
gclawes has quit [Ping timeout: 240 seconds]
tayfun26 has joined #pypy
zmt00 has quit [Quit: Leaving]
Nizumzen has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
tayfun26 has quit [Remote host closed the connection]
tayfun26 has joined #pypy
amaury has joined #pypy
jacob22_ has quit [Ping timeout: 264 seconds]
<jneen> cfbolz: haha i see. i'm actually working on a different lang right now, but it looks like i'll probably want to go through the ffi for some string stuff
<cfbolz> jneen: ah, cool! Which language is that? Or still secret?
<cfbolz> the pieces that are needed for a decoding stream are all there, somehow. But so far the main rpython language that does Unicode stuff is pypy, so there's not a lot of useful code in rlib (yet)
<fijal> cfbolz: we're also trying to make rutf8.py more generally useful
<fijal> (on branch currently)
<cfbolz> Cool
<fijal> so yes, maybe that
<cfbolz> fijal: but I suppose it doesn't do much for you if you're using the RPython unicode type?
<fijal> nope
<fijal> but maybe you shouldn't :)
<cfbolz> Weeeell
<cfbolz> That's an open question, at this point
<fijal> yeah
<jneen> really?
<jneen> hmm ok
<fijal> jneen: we're experimenting with using UTF8 internally in pypy
<fijal> (as opposed to UCS4)
<jneen> oh neat
<jneen> that would be cool
<jneen> the lang i'm working on now is for my master thesis
<jneen> i'm trying to solve the shell design problem :|
<jneen> i.e. something that's usable as a unix shell but also suitable for large programs
<jneen> the more i develop it the more it seems like the unix process model is (abstractly) actually a pretty nice way of specifying parallel programs
<jneen> (i'm first-classing channels, environments, pids, and signals)
<jneen> buuuut i'm parsing it by hand because barewords are *hard*
<njs> jneen: btw, are you familiar with xonsh?
<jneen> yep
<jneen> xonsh's goal is more to provide python integration
<jneen> er, s/goal/strategy/
<jneen> this is a language to itself, with abstractions that stay very close to unix concepts
<jneen> the goal being to have almost no conversion overhead on the part of the user for interacting with external programs
<jneen> as long as those programs are built to work with stdio, return codes, and signals
amaury has quit [Ping timeout: 265 seconds]
utek_ is now known as utek
gclawes_ has quit [Read error: Connection reset by peer]
gclawes has joined #pypy
<cfbolz> jneen: sounds cool!
realitix has joined #pypy
<jneen> :]
jacob22_ has joined #pypy
<cfbolz> jneen: just out of curiosity, who's your advisor?
<jneen> hidehiko masuhara
<jneen> at tokyo tech
<cfbolz> oh great! please tell him I said hi :-)
<jneen> haha ok will do :]
<jneen> if you know matthias springer he's in my lab too
<cfbolz> I do. he was in potsdam before, right?
<jneen> maybe?
<jneen> not quite sure
<cfbolz> I googled, now I am sure
<jneen> :]
jacob22__ has joined #pypy
jacob22_ has quit [Ping timeout: 272 seconds]
marr has joined #pypy
<jneen> the thing that would be the most useful is some kind of unicode class tester for a codepoint
<cfbolz> jneen: to find out what kind of character category a codepoint is in?
Jellyg00se has joined #pypy
forgottenone has quit [Quit: Konversation terminated!]
antocuni_ has joined #pypy
<cfbolz> jneen: That's possible using the rlib.unicodedata.unicodedb*.category
realitix has left #pypy [#pypy]
realitix has joined #pypy
dddddd has joined #pypy
<jneen> oh sweeeet
guilherme has joined #pypy
guilherme has quit [Ping timeout: 248 seconds]
<cfbolz> :-)
antocuni_ has quit [Ping timeout: 240 seconds]
<jneen> is there a container similar to python 3's bytes?
<jneen> like, just a raw byte string that the thing doesn't try to encode as ascii
<cfbolz> jneen: yes, str is that
<jneen> erm
<arigato> what result would you expect from doing this?
<jneen> an unencoded byte string?
<jneen> certainly not ascii encoding
<cfbolz> Yes, but what encoding then?
<cfbolz> UCS-4? utf-8?
<jneen> i see
<arigato> you can't fit arbitrary unicode code points in a *byte* string because codepoints don't fit bytes
<jneen> right, i always forget python's unicode() is unencoded
<arigato> maybe you mean u'xxx'.encode('utf-8')?
<cfbolz> jneen: it works differently in Ruby, right?
<arigato> python's unicode() is not "unencoded" as much as it's a list of arbitrary codepoints
<jneen> cfbolz: it only sort of works in ruby. there's a global default encoding that works if you only use utf8
<cfbolz> Heh
<jneen> arigato: that's pretty much what i mean. there's no embedded encoding
<jneen> like, a string is a bytestring together with an optional encoding specifier
<jneen> so you never have a list of codepoints independent of an encoding
<jneen> though you can re-encode a string manually
<jneen> or forcibly override an encoding (if you have a bytestring whose encoding you happen to know)
<cfbolz> No, it's a bit different still. A str is really a list of bytes, with no implicit or explicit encoding. A unicode is a list of codepoints, again with no encoding. Only when you convert between those two do you need to specify an encoding
<jneen> oh jeez
<jneen> (what i described is how i understand ruby btw)
<cfbolz> Right
<jneen> and in python 3...?
<fijal> same
<jneen> hm ok
<fijal> except "str" is a list of codepoints and "bytes" is a list of bytes
<fijal> note that it's similar to what would happen in ruby if you said "ascii" as the encoding
<jneen> ahhh i see
<jneen> it was just renamed
<jneen> and unicode made default
<fijal> yeah
<fijal> and implicit conversion was removed
<fijal> so in python 2 you can say u"foo" + "bar"
<fijal> and it would convert "bar" to unicode using ascii
<fijal> that does not work in py3
<jneen> or in rpython, so
<fijal> in rpython that's illegal too I think
jcea has joined #pypy
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
<mattip> something is wrong with win32 py3.5 cffi modules
<mattip> it is building them OK in lib-pypy as _pypy_openssl.pypy3-510-AMD64-win32.pyd, but "import _pypy_openssl" fails
<mattip> "import cffi; ffi = cffi.FFI(); ffi.dlopen('_pypy_openssl.pypy3-510-AMD64-win32.pyd')" succeeds
<mattip> the exported init funcion is "PyInit__pypy_openssl", which seems to checkout OK
<mattip> the modules are in the nightly zip file, so just a VM is needed to debug this
<mattip> also - all lib-python tests are being skipped, "faulthandler module not included"
raynold has quit [Quit: Connection closed for inactivity]
<mattip> own tests are not showing imp failures http://buildbot.pypy.org/summary?builder=own-win-x86-32&branch=py3.5
<mattip> anyone want to give me an educated (or even wild) guess what is wrong?
mat^2 has joined #pypy
<fijal> you probably need a debug build to see why the import system does not like it
<mattip> ok. Approximately where does the loading happen?
<fijal> I don't know the 3 system, maybe some of it is pure python?
<fijal> in importlib somewhere
<mattip> ok, gotta go.
<mattip> be back later
raynold has joined #pypy
guilherme has joined #pypy
Rhy0lite has joined #pypy
antocuni_ has joined #pypy
realitix_ has joined #pypy
realitix has quit [Ping timeout: 265 seconds]
realitix_ is now known as realitix
realitix has quit [Client Quit]
realitix has joined #pypy
cjwelborn has quit [Ping timeout: 250 seconds]
Lightsword has quit [Ping timeout: 240 seconds]
Lightsword has joined #pypy
cjwelborn has joined #pypy
guilherme has quit [Remote host closed the connection]
Nizumzen has joined #pypy
guilherme has joined #pypy
antocuni_ is now known as antocuni
guilherme has quit [Ping timeout: 255 seconds]
lesshaste has joined #pypy
<lesshaste> hi
<cfbolz> Hello
adamholmberg has joined #pypy
realitix has quit [Quit: realitix]
realitix has joined #pypy
jacquerie has joined #pypy
<jacquerie> So, I have been trying the PyPy build a project for a while, but I'm stuck on this error: https://travis-ci.org/celery/vine/jobs/316952124#L506
<jacquerie> pip install -U tox dies of the usual UnicodeEncodeError when trying to write the progress bar
<antocuni> it look like a tox bug, you should report it to them
<jacquerie> I think installation of any package fails, not just tox
<jacquerie> so perhaps it's a bug in pip not being compatible with pypy
<antocuni> ah right, then it's a bug of pip :)
<jacquerie> but then I'm surprised to be the first to report this
<antocuni> I'm surprised as well: I use pypy regularly on travis, never happened to me
<jacquerie> can I peek at a .travis.yml of one of your projects, so that I can shamelessly steal it?
<antocuni> this is a travis build: https://travis-ci.org/antocuni/capnpy
<antocuni> although I realize now that it's using an old pypy
<antocuni> jacquerie: but e.g., this one seems to be using pypy 5.8
<jacquerie> oh, you're the author of pdbpp? thanks for that!
<antocuni> you're welcome :)
<antocuni> pdbpp is a "pypy fault": I used to debug a part of pypy which contains a lot of variables named "r", but if you type "r" at (Pdb) prompts, it resumes the execution. So, I started pdb++ just to avoid that :)
guilherme has joined #pypy
<xorAxAx> how does it handle the variable ll? :)
<antocuni> pdb++ gives precedence to variables over commands
<xorAxAx> ah, ok
<antocuni> but you can force the command by typing "!!ll"
forgottenone has joined #pypy
mat^2 has quit [Quit: Leaving]
guilherme has quit [Ping timeout: 265 seconds]
tayfun26 has quit [Remote host closed the connection]
<antocuni> cfbolz: I looked at cpyext-faster-arg-passing, it looks nice and reasonable
zmt00 has joined #pypy
<antocuni> I am wondering whether it would be better to add a method "get_cpy_ref_fast" to W_Root
<antocuni> this way, we can remove the ifs inside realize() and as_pyobj(), and it also provides a nice hook if we want to implement it for more types
jacquerie has quit [Quit: Ex-Chat]
Nizumzen has quit [Ping timeout: 240 seconds]
dddddd has quit [Ping timeout: 265 seconds]
Jellyg00se has quit [Quit: Leaving]
<cfbolz> antocuni: yes that's what I do in the unpushed commit that's sitting on my laptop ;-)
<antocuni> cool :)
dddddd has joined #pypy
<cfbolz> antocuni: also using that mechanism to do the same for types, None, bools
<antocuni> did you also measure performance for all those cases?
<cfbolz> antocuni: not yet
<antocuni> if you do, please send a PR to my benchmarks repo
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
guilherme has joined #pypy
<cfbolz> antocuni: will do
guilherme has quit [Ping timeout: 256 seconds]
Nizumzen has joined #pypy
forgottenone has quit [Quit: Konversation terminated!]
jcea has quit [Quit: jcea]
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholm_ has joined #pypy
adamholmberg has quit [Ping timeout: 265 seconds]
dddddd has quit [Ping timeout: 260 seconds]
guilherme has joined #pypy
dddddd has joined #pypy
guilherme has quit [Ping timeout: 248 seconds]
adamholm_ has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Read error: No route to host]
adamholmberg has joined #pypy
guilherme has joined #pypy
Rhy0lite has quit [Quit: Leaving]
antocuni has quit [Ping timeout: 240 seconds]
forgottenone has joined #pypy
mentalita has quit [Quit: Leaving]
mentalita has joined #pypy
kipras`away is now known as kipras
jcea has joined #pypy
mentalita has quit [Quit: Leaving]
mentalita has joined #pypy
Rhy0lite has joined #pypy
tbodt has joined #pypy
fryguybob has joined #pypy
jamesaxl has quit [Quit: WeeChat 1.9.1]
<ronan> why do we have 2 _md5 modules?
tormoz has quit [Ping timeout: 256 seconds]
<mjacob> ronan: you mean one in lib_pypy and one as a mixed module?
<ronan> yes
<mjacob> if you ask me, all hashing modules in lib_pypy (there are more) should die
guilherme has quit [Ping timeout: 256 seconds]
guilherme has joined #pypy
<mjacob> why are they there in the first place? i guess only guess
<mjacob> i guess it was easier to take some existing pure-python module, modify it a bit and put it in lib_pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ronan> maybe we could vendor stuff from cryptography?
<ronan> like we already do for _ssl
<mjacob> have a look at lib-python/3/hashlib.py to see where the hashes come from
<mjacob> it tries to get the hashes from openssl first (except for blake2b and blake2s)
<mjacob> if that's not possible, it tries to get them from _md5, _sha3 etc.
<ronan> oh, so we don't actually use them, do we?
<mjacob> note that some newer algorithms are not available in all openssl versions
<mjacob> older ones like md5 are of course always available from openssl
<mjacob> see also the commented out hashes in py3.6's hashlib.py
<mjacob> (definition of __always_supported)
guilherme has quit [Remote host closed the connection]
guilherme has joined #pypy
tormoz has joined #pypy
<ronan> pfff, it's a mess I don't want to get into right now
<mjacob> that's what i thought as well and then i stopped digging ;)
<mjacob> from a quick look it seems like cryptography only uses openssl's hashes and doesn't implement them itself
guilherme has quit [Ping timeout: 256 seconds]
tbodt has joined #pypy
forgottenone has quit [Quit: Konversation terminated!]
<mjacob> ronan: why did you ask, btw?
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
<kenaan_> rlamy py3.5 404dc45db8ca /pypy/module/imp/test/test_app.py: Try to make test_builtin_reimport_mess() clearer and fix it Note: _md5 was a builtin module in -A tests only, so use...
<ronan> mjacob: because of this ^^^
dcrosta has joined #pypy
guilherme has joined #pypy
realitix has quit [Quit: realitix]
<kenaan_> rlamy py3.5 ff0600c50bee /pypy/: kill __pypy__.save_module_content_for_future_reload(), it does not do anything (probably maybe)
<bbot2> Started: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/6447 [ronan: force build, py3.5]
Rhy0lite has quit [Quit: Leaving]
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 265 seconds]
drolando has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kenaan_> cfbolz cpyext-faster-arg-passing fc3f8f9e8b75 /pypy/: refactor to use methods
<kenaan_> cfbolz cpyext-faster-arg-passing 5187eda5bf36 /pypy/module/cpyext/: generalize the code and store py_obj references in types, bools, and None
pilne has joined #pypy
<kenaan_> rlamy py3.5 09836355d06a /: I hate RPython
<bbot2> Failure: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/6447 [ronan: force build, py3.5]
guilherme has quit [Remote host closed the connection]
mentalita has quit [Ping timeout: 264 seconds]
mentalita has joined #pypy
guilherme has joined #pypy
Hotpot33 has quit [Ping timeout: 255 seconds]
guilherme has quit [Remote host closed the connection]
Hotpot33 has joined #pypy