#jython IRC Log

Index

IRC Log for 2013-12-10

Timestamps are in GMT/BST.

[0:08] * agronholm (~agronholm@2001:1bc8:102:6f29:e464:3816:2395:d710) Quit (Ping timeout: 264 seconds)
[0:10] * agronholm (~agronholm@2001:1bc8:102:6f29:81a0:a2df:6e1:e166) has joined #jython
[0:10] * ChanServ sets mode +o agronholm
[0:24] * agronholm (~agronholm@2001:1bc8:102:6f29:81a0:a2df:6e1:e166) Quit (Ping timeout: 246 seconds)
[0:36] * agronholm (~agronholm@2001:1bc8:102:6f29:81a0:a2df:6e1:e166) has joined #jython
[0:36] * ChanServ sets mode +o agronholm
[1:08] * agronholm (~agronholm@2001:1bc8:102:6f29:81a0:a2df:6e1:e166) Quit (Ping timeout: 246 seconds)
[1:20] * agronholm (~agronholm@2001:1bc8:102:6f29:81a0:a2df:6e1:e166) has joined #jython
[1:20] * ChanServ sets mode +o agronholm
[3:05] * agronholm (~agronholm@2001:1bc8:102:6f29:81a0:a2df:6e1:e166) Quit (Ping timeout: 246 seconds)
[3:16] * agronholm (~agronholm@2001:1bc8:102:6f29:81a0:a2df:6e1:e166) has joined #jython
[3:16] * ChanServ sets mode +o agronholm
[3:28] * scavenger (52f43269@gateway/web/freenode/ip.82.244.50.105) Quit (Ping timeout: 250 seconds)
[3:35] * agronholm (~agronholm@2001:1bc8:102:6f29:81a0:a2df:6e1:e166) Quit (Ping timeout: 246 seconds)
[3:42] * agronholm (~agronholm@2001:1bc8:102:6f29:81a0:a2df:6e1:e166) has joined #jython
[3:42] * ChanServ sets mode +o agronholm
[4:54] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[5:11] * sinistersnare is now known as sinsnare|zzZZzz
[6:17] * lheuer (~Adium@f049099182.adsl.alicedsl.de) has joined #jython
[6:17] * lheuer (~Adium@f049099182.adsl.alicedsl.de) Quit (Changing host)
[6:17] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[7:35] * lheuer1 (~Adium@f048000150.adsl.alicedsl.de) has joined #jython
[7:37] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 246 seconds)
[7:52] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) has joined #jython
[8:59] * lheuer1 is now known as lheuer
[8:59] * lheuer (~Adium@f048000150.adsl.alicedsl.de) Quit (Changing host)
[8:59] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[9:23] * Arfrever (~Arfrever@apache/committer/Arfrever) has joined #jython
[10:38] * scavenger (c2ce95e6@gateway/web/freenode/ip.194.206.149.230) has joined #jython
[10:38] <scavenger> hi jimbaker
[10:38] <scavenger> rlwrap works well under AIX too
[10:39] <scavenger> it's definitely not a stty issue
[10:39] <scavenger> the issue stands on the ibm websphere wsadmin connector module
[10:48] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) Quit (Ping timeout: 252 seconds)
[10:49] <scavenger> i get an idea: what if i rejar the whole IBM com.ibm.ws.admin.client_7.0.0.jar stuff with the org/python/util/jline part from jython.jar ?
[10:49] <scavenger> what i don't get is why isn't it available while both are loaded in CLASSPATH...
[11:25] <scavenger> maybe both are building a console environement that are mutually independant
[11:43] * lopex (uid4272@gateway/web/irccloud.com/x-vrxlppjqzejhelmh) Quit (Ping timeout: 240 seconds)
[11:45] * lopex (uid4272@gateway/web/irccloud.com/x-kmlzksgbiyibwwkv) has joined #jython
[11:47] <scavenger> hmm i rebuild a jar with jython inside and the MANIFEST loads org.python.util.jython too but sys._jy_interpreter.reader still unavailable
[13:02] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 246 seconds)
[13:10] * dothebart (~willi@mail.outgesourced.org) has joined #jython
[13:10] <dothebart> hi everyone..
[13:10] <dothebart> reading http://www.jython.org/docs/library/socket.html#example
[13:11] <dothebart> is there some breakage here? it seems lines which shouldn't be in one are?
[13:29] * fluxdude (~fluxdude@unaffiliated/fluxdude) has joined #jython
[14:15] * fluxdude (~fluxdude@unaffiliated/fluxdude) Quit (Ping timeout: 260 seconds)
[14:54] * mcurve (~quassel@pop.nakinasystems.com) Quit (Read error: Connection reset by peer)
[14:57] * mcurve (~quassel@pop.nakinasystems.com) has joined #jython
[15:00] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[15:04] * scavenger (c2ce95e6@gateway/web/freenode/ip.194.206.149.230) Quit (Ping timeout: 250 seconds)
[15:12] * fluxdude (~fluxdude@unaffiliated/fluxdude) has joined #jython
[15:27] * zz_whg is now known as whg
[16:18] * whg is now known as zz_whg
[16:42] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) has joined #jython
[17:32] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[17:41] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) Quit (Quit: oscar_toro)
[17:57] * paolo (~Paolo@net-37-117-0-21.cust.dsl.vodafone.it) has joined #jython
[18:08] * sinsnare|zzZZzz (~sinisters@pool-108-28-93-153.washdc.fios.verizon.net) Quit (Ping timeout: 245 seconds)
[18:21] * also (uid1186@gateway/web/irccloud.com/x-hhsdiqqzqgcjsajw) has joined #jython
[18:23] * sinsnare|zzZZzz (~sinisters@pool-108-28-93-153.washdc.fios.verizon.net) has joined #jython
[18:24] <also> what sort of issues would lead to a "No module named datetime" when my only JAR has "Lib/datetime.py" in it?
[18:24] <also> i've built an containing jython standalone, and it works locally, but not when i'm deploying it to a server
[18:25] <also> i've built an *uberjar*
[18:29] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) has joined #jython
[18:30] <jimbaker> also, did you use my uberjar support?
[18:30] <jimbaker> the normal problem is ensuring Lib is available on CLASSPATH for standalone
[18:31] <jimbaker> so the clamp package makes that work, with singlejar
[18:31] <jimbaker> (ideally jython standalone could more readily resolve sources of python code??? right now, it's pretty fussy. something we should revisit)
[18:33] <also> where does it look now?
[18:34] <also> i'm running `java -cp uber.jar main.class`
[18:35] <also> and `jar -tf uber.jar | grep datetime` shows "Lib/datetime.py"
[18:36] <jimbaker> also, so you're using setup.py singlejar for this uberjar ?
[18:39] <also> no
[18:39] <also> my build is not jython aware
[18:40] <also> what does it need to do?
[18:42] <also> it's a java project, with a maven dependency on jython-standalone 2.7-b1
[18:47] <jimbaker> also, i did write a simpler example of creating uber jars in this repo, https://github.com/jimbaker/jython-storm-starter/blob/master/gen-storm-jar.py
[18:48] <jimbaker> you might be able to use it
[18:48] <jimbaker> the difference in setup.py singlejar is that it's setuptools aware
[18:50] <also> what is that doing beyond unzipping the jars and putting all the files in the result?
[18:51] <also> or, why is having "Lib/datetime.py" in my jar not enough?
[18:52] <jimbaker> also, you're right i would expect that Lib/* should be resolvable, this is special cased by the standalone support
[18:53] <jimbaker> for once, i have committed to a date when it comes to jython
[18:54] <jimbaker> topi`, so i'm planning to land full streaming socket support, with SSL, by the end of this year. what crazy commitment have i made? ;)
[18:56] <also> i will try running with -Dpython.verbose=debug
[18:58] <topi`> jimbaker: I'll try to help you where I can. do you have any halfbaked code ready for reviewing?
[19:00] <topi`> but frankly, there's a lot of new stuff for me to learn, like Futures
[19:01] <jimbaker> topi`, so far my only half-baked code is what i previously posted in this gist, https://gist.github.com/jimbaker/7752779
[19:01] <jimbaker> i have refined my design ideas a bit since then, so i will write up
[19:02] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[19:02] <jimbaker> but the real piece is getting SSLEngine running. i built a state machine for that, which i'm trying to run
[19:02] <jimbaker> i should say, i have written most of the state machine
[19:02] <jimbaker> docs on this stuff are hard to find. sample code is generally abysmal
[19:03] <topi`> jimbaker: I can have a look at it, since I forced me to understand how SSLEngine is supposed to work ;)
[19:03] <topi`> took me a fair amount of time to wade through the docs
[19:03] <jimbaker> topi`, ok, i will add it to the gist now
[19:04] <jimbaker> topi`, it's not a lot of code
[19:05] <jimbaker> but of course, not there yet. the key piece i need to work through is just managing partial app data in handshakes, along w advancing the streams as necessary - eg a read may require a write, and vice versa
[19:07] <topi`> indeed that gets more complex than just supporting one direction
[19:08] <jimbaker> topi`, it's the core of the complexity. once handshaking is done, it's simple. unless keys are renegotiated :)
[19:09] <jimbaker> topi`, the other bit of trickiness is that nonblocking SSL sockets on cpython can expose some of this handshaking. what's an open question, is this absolutely required? or can we quietly just do it...
[19:10] <jimbaker> topi`, needless to say, i haven't thought through that part. i just want to complete the code snippet i just added first ;)
[19:12] <topi`> we need to test it against some common use cases - e.g. our friend pip :)
[19:16] * sinsnare|zzZZzz (~sinisters@pool-108-28-93-153.washdc.fios.verizon.net) Quit (Remote host closed the connection)
[19:20] <jimbaker> topi`, yes, it either works on pip, or it doesn;t :)
[19:21] <jimbaker> fortunately, i have a test case lying around for this
[19:22] <topi`> i'm stil disappointed about how the Macropy project isn't ready for production... I would have a dire need for javascript generation :)
[19:23] <topi`> it's a pain to have to integrate some javascript code onto your backend repository...
[19:30] * fluxdude (~fluxdude@unaffiliated/fluxdude) Quit (Ping timeout: 272 seconds)
[19:35] <jimbaker> topi`, yeah, someone should continue that project. and make it work w/ jython
[19:36] <jimbaker> it might be useful for some academics i know
[19:37] <topi`> jimbaker: having real syntactic macros would be useful in many applications
[19:37] <topi`> not just academics :)
[19:38] <jimbaker> oh sure, but i know of some people who are researching a number of interesting projects in python - including java integration - who might find this package especially useful
[19:39] <jimbaker> so if in using it, they adopt it, then everything is better
[19:55] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) Quit (Remote host closed the connection)
[20:06] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) has joined #jython
[21:48] <also> jimbaker: i figured out the cause of my classpath issues from earlier
[21:48] <jimbaker> also, cool, what was it?
[21:48] <also> the path to the jar has : in it
[21:49] <jimbaker> ahh, well, that's just the sort of thing that might screw things up
[21:49] <jimbaker> also, i do know jars are very sensitive in terms of path construction
[21:49] <also> seems like it's a jython problem, not a jar problem
[21:50] <also> the sys.path ends up weird
[21:51] <jimbaker> also, that might be the case. the python module loader actually needs to figure out where jython is so it can locate Lib in the same jar
[21:54] <also> is there a way to add a jar to the pythonpath directly? i don't have control over the path where it is located
[21:58] <jimbaker> also, iirc, sys.path.append(JAR) will not work for standalone
[21:59] <jimbaker> but i have to say, my usual case is that i really need an ??ber jar, that contains all jar dependencies
[21:59] <jimbaker> not just standalone python
[22:00] <jimbaker> also, setup.py singlejar does do this, by relying on jar.pth
[22:00] <jimbaker> which is a new .pth file added to site-packages to manage jars
[22:04] <also> so, the jython bug looks to be that PySystemState calls addPath on jarFileName: http://hg.python.org/jython/file/8a556c4cc281/src/org/python/core/PySystemState.java#l1112
[22:05] <also> and addPath tokenizes the filename on the path separator, which is clearly wrong for a filename
[22:05] * paolo (~Paolo@net-37-117-0-21.cust.dsl.vodafone.it) Quit (Quit: Leaving)
[22:15] <jimbaker> also, jarFileName with be a path like "/Users/jbaker/jythondev/jython-java7/dist/jython-dev.jar"
[22:15] <jimbaker> will be
[22:17] <also> jarFileName is the path to the jar i've created, that contains everything from jython-standalone-2.7-b1.jar and my application
[22:17] <also> if I run `java -cp /h:e:l:p/uber.jar my.main.class`, jarFileName is "/h:e:l:p/uber.jar"
[22:19] <also> or, in the case of my deployment environment, /usr/share/hubspot/mesos/slaves/201311111611-3792629514-5050-11268-10/frameworks/Singularity9/executors/singularity-lead:14:web:1386711249988-1386711361820-7-ironcreek-us_east_1a/runs/1dfdccce-0d52-4ad8-9117-d0eb999dd9e0
[22:20] <also> ... /app/target/uber.jar
[22:23] <also> so, i'm just taking the path the jar + "/Lib", and adding it to the front of PySystemState.path. that seems to work around the bug
[22:30] <also> jimbaker: thanks for your help
[22:30] <jimbaker> also, sure. i think the issue here is that java does have a well-defined idea of a path separator (for usage in say -classpath)
[22:30] <also> right, but it shouldn't be applied to *filenames*
[22:30] <jimbaker> specifically, java.io.File.pathSeparator, which on unix like systems should be u':'
[22:31] <jimbaker> right, but /h:e:l:p/uber.jar is a path
[22:31] <jimbaker> now for standalone purposes, maybe it doesn't need to do this parse by splitting on :
[22:32] <also> pathSeparator is the separator for a list of files
[22:32] <also> jarFileName is not a list of files, so it's wrong to split it on pathSeparator
[23:31] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[23:58] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) Quit (Ping timeout: 260 seconds)

Index

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