#jython IRC Log (v0.9)

Index

IRC Log for 2012-02-04

Timestamps are in GMT/BST.

[0:11] <jimbaker> Katharsis, i'm working on jython performance and java integration with a research group at the univ of colorado. we are making steady progress on some branches, including some that will land soon in trunk to start using invokedynamic
[0:11] <jimbaker> i'm giving a talk on this subject at pycon
[0:12] <jimbaker> others are working on python 2.6 support
[0:14] <Katharsis> jimbaker: cool!
[0:15] <lopex> cool
[0:15] <jimbaker> perf is tricky. it's very easy to make jython run slower
[0:15] <jimbaker> and we have found even interesting ways to do that ;)
[0:16] <jimbaker> i'll talk about that too
[0:17] <lopex> do you have clues how to run certain parts using unboxed ints ?
[0:20] <jimbaker> we have actually experimented doing that
[0:21] <lopex> autopromotion is the only impediment in python I guess
[0:21] <jimbaker> specifically on the optimization of loops over range/xrange. can make certain codes run 20x faster. but the actual impl was a hack and still awaits finishing deoptimization support
[0:21] <lopex> in ruby there's also redefineable methods for fixnums
[0:22] <lopex> do you want do deopt whole chunks of code ?
[0:22] <jimbaker> we will get to it. we are currently playing with a subset of numpy arrays, including an optional typing mechanism called gradual typing
[0:22] <lopex> it's a pity jvm doesnt support fixnums
[0:23] <lopex> ints are aligned anyways in jvm
[0:23] <jimbaker> lopex, agreed. it would be nice if java 8 grew that. it was proposed by john rose a while back
[0:23] <lopex> thats two spare bits on 32 bit machines :)
[0:24] <jimbaker> re deoptimization - we have a python bytecode vm. at some point, we will leverage that by using the deopt exception we throw + frame, restart the code in the pbcvm, but without unsafe optimizations
[0:25] <lopex> in jruby strings also hurt us since we cannot use java strings
[0:25] <jimbaker> so the chunking is at the method level
[0:25] <jimbaker> (or python code objects to be precise)
[0:25] <lopex> yeah, and the bytecode also serves as an IR for type propagation ?
[0:26] <jimbaker> actually the type stuff uses an augmented ast
[0:26] <jimbaker> so the augmented ast is the ir for this work
[0:26] <lopex> oh ok
[0:27] <lopex> but ast for that is a bit limited
[0:27] <jimbaker> the python bytecode vm just runs standard python bytecode. at some point, someone will get around to writing a compiler, but for now we have cpython :)
[0:27] <lopex> sure
[0:27] <jimbaker> to produce python bytecode, instead of our usual java bytecode
[0:28] <jimbaker> the ast seems to work reasonably well for our purposes
[0:29] <agronholm> one of the worst problems I have with Jython is how imports are so slow
[0:29] <agronholm> in my app it takes several seconds just to get the imports done
[0:29] <jimbaker> re strings: java and python are pretty compatible, since both have immutable strings
[0:30] <lopex> yep
[0:30] <agronholm> but bytes <-> byte[] are not comparable
[0:30] <lopex> jimbaker: in ruby 1.9 each string has it;s own encoding, it's a nightmare
[0:30] <jimbaker> but we would like to have bytestrings actually just take one byte at a time
[0:30] <jimbaker> vs 2
[0:30] <jimbaker> agronholm, we haven't looked at slow imports yet, unfortunately
[0:31] <jimbaker> it's possible that switching to python bytecode could improve that
[0:31] <jimbaker> you could actually try that
[0:31] <agronholm> how?
[0:32] <agronholm> do I need the 2.6 branch?
[0:32] <jimbaker> no, there's one caveat
[0:32] <agronholm> ?
[0:32] <jimbaker> you cannot use certain names that are legal in jython, but not in python
[0:32] <jimbaker> such as System.print, that sort of thing
[0:33] <agronholm> that is going to be a problem since I do use the Java printing stuff
[0:33] <agronholm> but I guess I could work around it with __import__()?
[0:33] <jimbaker> sorry, that's not quite right
[0:33] <agronholm> what then?
[0:34] <jimbaker> i believe there's a comprehensive list somewhere, but i completely blanking on it :) stuff like *in*, that sort of thing
[0:34] <jimbaker> so we allow certain keywords to be used as attributes
[0:34] <jimbaker> so, let's just say you have a bunch of legal cpython files
[0:35] <agronholm> but "in" is already a keyword in jython...couldn't use that
[0:35] <jimbaker> it's legal to use as an attribute however
[0:35] <jimbaker> in jython
[0:35] <jimbaker> not in cpython
[0:35] <agronholm> well, I have pydev reminding me what is legal and what is not
[0:36] <agronholm> and it keeps bitching to me about my javax.print imports
[0:36] <jimbaker> fwierzbicki would be the expert here, since he worked around these issues
[0:36] <agronholm> and there's no way to shut it up since it thinks they're syntax errors
[0:36] <jimbaker> yep
[0:36] <jimbaker> but not in jython :)
[0:36] <agronholm> I've talked to the pydev author about it and he refuses to fix it
[0:37] <jimbaker> sure, you can always work around it by using getattr
[0:37] <agronholm> not with getattr
[0:37] <agronholm> because I'd have to import the java package
[0:37] <agronholm> which I can't do because I've disabled caching
[0:37] <jimbaker> ok... anyway, going way off topic here
[0:37] <agronholm> but __import__() works
[0:37] <jimbaker> ok
[0:38] <agronholm> getting a faster jython is a very interesting topic for me
[0:38] <jimbaker> anyway, if you can produce python bytecode files with cpython, they can be read by jython using "import pycimport"
[0:39] <agronholm> and then?
[0:39] <jimbaker> it may require using cpython 2.5. not certain. this has been an experimental feature in there for a few years, and certainly handy for a number of cases
[0:39] <jimbaker> and then it just works
[0:39] <agronholm> mmkay
[0:39] <jimbaker> i think you can't the py file there. don't recall precisely
[0:39] <agronholm> not sure I should be using this in production...
[0:40] <agronholm> if it's an experimental feature
[0:40] <jimbaker> i do know the entire regrtest except for some uninteresting aspects does pass this
[0:40] <jimbaker> but the toolchain is definitely supported. yet.
[0:40] <jimbaker> definitely *not* supported
[0:41] <jimbaker> so, we have been thinking this could be useful for startup time issues. you might give us some useful feedback if it
[0:41] <jimbaker> is
[0:42] <jimbaker> after all, we will support this better in the future. it is a fundamental aspect to our perf work, just one we haven't spent much time on, because we know it will just work :)
[0:43] <jimbaker> anyway, i wrote this stuff, based on some earlier work going the opposite direction that tobias had done. so i would be interested in if did work for you or not
[0:46] <pjenvey> lopex - yea the 1.9 encoding support does indeed seem like a nightmare
[0:47] <lopex> pjenvey: the argument is that unicode is too small
[0:47] <lopex> :)
[0:47] <lopex> there are roundtrip problems from mojikyo
[0:48] <agronholm> pjenvey: hi, pestering you about 1833 again
[0:48] <pjenvey> yea, I guess. and people still like shiftjis too o_O
[0:49] <pjenvey> speaking of roundtrip problems
[0:50] <pjenvey> agronholm - i haven't had a chance lately agronholm sorry
[2:23] * lheuer1 (~Adium@blfd-4d08e68e.pool.mediaWays.net) has joined #jython
[2:25] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 244 seconds)
[3:02] * shashank (~shashank@63-228-87-227.hlrn.qwest.net) Quit (Ping timeout: 252 seconds)
[3:44] * shashank (~shashank@63-228-87-227.hlrn.qwest.net) has joined #jython
[5:42] * shashank (~shashank@63-228-87-227.hlrn.qwest.net) Quit (Remote host closed the connection)
[6:11] * agronholm (~Demi-god@nblzone-211-37.nblnetworks.fi) Quit (Quit: KVIrc 4.1.1 Equilibrium http://www.kvirc.net/)
[6:28] * juneau001_ (~juneau@50-103-50-0.dklb.il.frontiernet.net) has joined #jython
[6:30] * juneau001 (~juneau@50-103-50-0.dklb.il.frontiernet.net) Quit (Ping timeout: 252 seconds)
[6:30] * juneau001_ is now known as juneau001
[7:26] * lheuer1 is now known as lheueer
[7:26] * lheueer is now known as lheuer
[7:26] * lheuer (~Adium@blfd-4d08e68e.pool.mediaWays.net) Quit (Changing host)
[7:26] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[11:40] * luoluoluo (~sheng@123.120.39.77) has joined #jython
[11:40] * luoluoluo (~sheng@123.120.39.77) has left #jython
[16:34] * agronholm (~Demi-god@91.113.184.146) has joined #jython
[17:24] * juneau001 (~juneau@50-103-50-0.dklb.il.frontiernet.net) Quit (Ping timeout: 248 seconds)
[17:29] * juneau001 (~juneau@50-103-53-55.dklb.il.frontiernet.net) has joined #jython
[17:42] * shashank (~shashank@63-228-87-227.hlrn.qwest.net) has joined #jython
[19:02] * agronholm (~Demi-god@91.113.184.146) Quit (Ping timeout: 245 seconds)
[19:29] * shashank (~shashank@63-228-87-227.hlrn.qwest.net) Quit (Ping timeout: 245 seconds)
[20:01] * shashank (~shashank@63-228-87-227.hlrn.qwest.net) has joined #jython
[22:45] <pjenvey> I keep hearing about projects wanting to move to min. 2.6 (to help porting to Python 3) but basically jython holds them back =o
[22:46] <pjenvey> it used to be jython + app engine
[23:43] * JythonLogBot (~PircBot@74.50.59.201) Quit (Ping timeout: 255 seconds)
[23:43] * JythonLogBot disconnected - trying to reconnect...
[23:43] -gibson.freenode.net- *** Looking up your hostname...
[23:43] -gibson.freenode.net- *** Checking Ident
[23:43] -gibson.freenode.net- *** No Ident response
[23:43] -gibson.freenode.net- *** Couldn't look up your hostname

Index

These logs were automatically created by JythonLogBot_ on irc.freenode.net using a slightly modified version of the Java IRC LogBot (github).