#jython IRC Log


IRC Log for 2014-03-05

Timestamps are in GMT/BST.

[0:01] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[0:01] * clajo05 (~clajo04@pool-108-21-222-14.nycmny.fios.verizon.net) has left #jython
[0:04] * lheuer (~Adium@unaffiliated/lheuer) Quit (Quit: Leaving.)
[0:05] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 240 seconds)
[0:43] * lheuer (~Adium@f049130137.adsl.alicedsl.de) has joined #jython
[0:43] * lheuer (~Adium@f049130137.adsl.alicedsl.de) Quit (Changing host)
[0:43] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[0:43] * lheuer (~Adium@unaffiliated/lheuer) Quit (Client Quit)
[1:00] * clajo04 (~clajo04@pool-108-21-222-14.nycmny.fios.verizon.net) Quit (Quit: clajo04)
[1:28] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[2:00] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Read error: Connection reset by peer)
[2:00] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[2:07] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 240 seconds)
[2:52] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[3:25] * mantovani (~mantovani@li74-187.members.linode.com) Quit (Ping timeout: 245 seconds)
[3:54] * mantovani (~mantovani@li74-187.members.linode.com) has joined #jython
[4:20] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 245 seconds)
[5:13] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[6:17] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Read error: Connection reset by peer)
[7:13] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[8:11] * lheuer (~Adium@f048103098.adsl.alicedsl.de) has joined #jython
[8:11] * lheuer (~Adium@f048103098.adsl.alicedsl.de) Quit (Changing host)
[8:11] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[8:13] * zz_whg (whg@nat/ibm/x-gmmknsocqyquqzvv) Quit (*.net *.split)
[8:13] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (*.net *.split)
[9:02] * whg (whg@nat/ibm/x-izkfnuwdvwoiicih) has joined #jython
[9:02] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[9:04] * whg (whg@nat/ibm/x-izkfnuwdvwoiicih) Quit (Changing host)
[9:04] * whg (whg@unaffiliated/whg) has joined #jython
[11:50] * lopex_ (uid4272@gateway/web/irccloud.com/x-fdioriymzmhzsquy) has joined #jython
[11:53] * mantovan1 (~mantovani@li74-187.members.linode.com) has joined #jython
[11:53] * thereisnospoon_ (~thereisno@113-61-86-28.static.qld.dsl.net.au) has joined #jython
[11:57] * lopex (uid4272@gateway/web/irccloud.com/x-vxldcdymchsdtqbl) Quit (Ping timeout: 265 seconds)
[11:58] * lopex_ is now known as lopex
[11:58] * mantovani (~mantovani@li74-187.members.linode.com) Quit (Ping timeout: 265 seconds)
[11:58] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) Quit (Ping timeout: 265 seconds)
[11:58] * lopex is now known as Guest17399
[11:58] * diametric (~diametric@2604:3400:dc1:43:216:3eff:fe27:bf9d) Quit (Ping timeout: 265 seconds)
[11:58] * diametric (~diametric@2604:3400:dc1:43:216:3eff:fe27:bf9d) has joined #jython
[12:00] * Guest17399 (uid4272@gateway/web/irccloud.com/x-fdioriymzmhzsquy) Quit ()
[12:01] * verterok (~ggonzalez@ Quit (Changing host)
[12:01] * verterok (~ggonzalez@unaffiliated/verterok) has joined #jython
[12:02] * Guest17399 (uid4272@gateway/web/irccloud.com/x-zoitsgkrxpqrmvcx) has joined #jython
[12:04] * Guest17399 is now known as lopex
[13:51] * clajo04 (~clajo04@pool-108-21-222-14.nycmny.fios.verizon.net) has joined #jython
[14:00] <topi`> jimbaker: it is an easy fix, I just set up my CLASSPATH to include ~/jython-ssl/extlibs/ whatnot JAR needed
[14:27] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[14:32] * clajo04 (~clajo04@pool-108-21-222-14.nycmny.fios.verizon.net) has left #jython
[14:59] * clajo04 (~clajo04@pool-108-21-222-14.nycmny.fios.verizon.net) has joined #jython
[14:59] * cameron__ (~thereisno@113-61-86-28.static.qld.dsl.net.au) has joined #jython
[15:02] * thereisnospoon_ (~thereisno@113-61-86-28.static.qld.dsl.net.au) Quit (Ping timeout: 240 seconds)
[16:21] <jimbaker> topi`, makes sense
[16:21] <topi`> jimbaker: did I mention that I'm very close of getting my entire codebase written in twisted to run on jython? :)
[16:21] <jimbaker> topi`, that's very cool!
[16:21] <topi`> I even managed to get reportlab going on jython, after rm -rf'ing the ext modules so that it wouldn't try to compile those
[16:22] <topi`> jimbaker: at some point, I'm tempted of creating a "twistd" clone that would actually work as a servlet
[16:22] <topi`> so you deploy all your twisted code on Tomcat, and it "just works"
[16:22] <topi`> well... there's still some way to go :)
[16:23] <jimbaker> topi`, interesting - this is using twisted to wsgi support?
[16:23] <topi`> my current blunder is with the twisted ADBAPI (asynchronous DBAPI 2.0)
[16:23] <topi`> I'm not using wsgi, just klein on top of twisted, but that's just the UI side which is not so important
[16:23] <topi`> the important bit is the machine that is running every minute to do stuff, collect data etc
[16:23] <topi`> so it's using LoopingCalls and txscheduling
[16:24] <jimbaker> sure, just trying to understand how it maps through servlet. i suppose you could use AsyncContext
[16:24] <topi`> I was thinking of creating a "dummy" servlet that just spawns a thread that runs the reactor
[16:25] <topi`> I already have one Django-based code that sets up a Servlet Context Listener that does eternal looping :)
[16:25] <jimbaker> ahh, i see. makes sense. then it can just do arbitrary stuff
[16:25] <topi`> the most interesting bit in servlets is that it's easy to explain to management ;)
[16:25] <topi`> "you have this WAR file and then you drop it here and hey, it works" :)
[16:26] <topi`> I would prefer just running twistd on a naked unix system, but hey, you gotta have options :)
[16:26] <jimbaker> right, so long as it's a WAR, you're good. and probably there's a no network lockdown
[16:27] <topi`> the servlet container environment is slightly locked down, so not *everything* is possible, but I'd like to explore what is
[16:27] <jimbaker> topi`, so were you able to get twisted trial working then?
[16:27] <topi`> my code base is just basically a "reporting engine" that collects data in the background and at midnight, it springs to life and sends all sorts of PDF reports everywhere
[16:27] <topi`> lots of email traffic :)
[16:28] <topi`> jimbaker: I haven't actually tried trial, yet
[16:28] <topi`> just running the code itself :)
[16:28] <jimbaker> i did talk with radix (the maintainer), and he told me trial doesn't do any magic
[16:28] <jimbaker> so it's strange what we saw
[16:28] <topi`> ImportError: No module named trial
[16:28] <topi`> heh. we should investigate this!
[16:29] <jimbaker> topi`, exactly. what craziness is that?!!! ;)
[16:29] <jimbaker> i also talked w/ glyph about writing a high performance reactor for jython, based on netty 4
[16:30] <jimbaker> so it's not my highest priority, but i like to get started on it in the next month or so
[16:30] <topi`> that would definitely be interesting
[16:30] <topi`> right now, the reactor is suboptimal for running twisted on jython
[16:30] <topi`> with a good reactor, there would be some nice perf benefits to be reaped
[16:31] <topi`> I put a "debug print" right in the beginning of twisted/scripts/trial.py and got nothing, SO the import really fails early!
[16:31] <jimbaker> yes, very early indeed!
[16:31] <jimbaker> something crazy that we are not seeing
[16:32] <jimbaker> i suspect it's super minor, but might point to an interesting bug in our module import mechanism
[16:32] <topi`> is this pkg_resources.py always called when importing stuff behind an .egg directory?
[16:33] <topi`> I really don't know about this easy_setup craziness
[16:33] <jimbaker> so i have only eyeballed things, but current socket implementation in jython is not going to be fast. socket-reboot will improve things
[16:33] <jimbaker> so pkg_resources.py iirc manages such things as getting files that are in a zipped egg
[16:34] <topi`> sys.path.insert(0, os.path.abspath(os.getcwd()))
[16:34] <topi`> from twisted.scripts.trial import run
[16:34] <topi`> maybe there's something fishy about that path?
[16:34] <jimbaker> worth trying w/ some print instrumentation
[16:35] <topi`> just executing this from jython interactive fails:
[16:35] <topi`> >>> from twisted.scripts.trial import run
[16:35] <jimbaker> so the twisted reactor is pretty close to netty api
[16:36] * cameron__ (~thereisno@113-61-86-28.static.qld.dsl.net.au) Quit (Ping timeout: 240 seconds)
[16:36] <topi`> *none* of those .py files in twisted.scripts can be imported !
[16:36] <jimbaker> right now, i'm doing one extra copy because buffer doesn't work with jython's arg conversion support. but that should be an easy fix
[16:36] <topi`> import twisted.scripts.tapconvert
[16:36] <topi`> Traceback (most recent call last): File "<stdin>", line 1, in <module>
[16:36] <topi`> ImportError: No module named tapconvert
[16:36] <jimbaker> exactly! that's the craziness of it all
[16:36] <topi`> are there some hidden files there?
[16:37] <topi`> there's a small __init__.py
[16:38] <topi`> I guess jython's Import mechanism is a fairly custom one and doesn't exactly resemble that of CPython?
[16:38] <jimbaker> we have lots of compliance tests around import
[16:39] <jimbaker> there's some extras around importing java classes and supporting jars on sys.path
[16:39] <topi`> heh, maybe it's a bug in CPython! that allows it to work there, and not work on a *compliant* python interpreter ;)
[16:39] <jimbaker> right, maybe something like that ;)
[16:40] <topi`> I can execute the trial.py directly from cmd line, and no problem there.
[16:41] <topi`> so, the question is, which or what breaks the import machinery?
[16:42] <topi`> ha! got trial.run() to work
[16:42] <jimbaker> what was it?
[16:42] <topi`> trick is: I had to "cd" to the twisted.scripts directory
[16:42] <topi`> if I start the interpreter from *there*, import works
[16:42] <topi`> so this is something about module paths
[16:43] <jimbaker> there's an interesting bit of machinery in twisted/__init__.py
[16:43] <topi`> hm, I'll try to remove that, let's see
[16:43] <jimbaker> should go over the _checkRequirements function
[16:44] <topi`> success!!
[16:44] <topi`> well, none of the bits in that __init__ are useful for me in any way
[16:45] <jimbaker> right, so that's the source of the issue. _checkRequirements looks reasonable... not certain about twisted.python.compat as well
[16:45] <topi`> finally I can run trial!
[16:45] <jimbaker> yes, that's a good start
[16:45] <topi`> maybe we could nail down the exact bit that is causing the mayhem here, and submit a patch for the twisted folks
[16:45] <jimbaker> so i guess when i asked radix about magic, he meant at the level of twisted.scripts, not at twisted top level
[16:45] <jimbaker> topi`, +1
[16:47] <jimbaker> topi`, the other thing i looked at is modjy
[16:48] <jimbaker> two things. 1) i haven't benchmarked, but it looks like it would be slow. certainly that's what people have reported 2) the layouts it supports doesn't seem to support site-packages properly
[16:49] <jimbaker> so i'm thinking of revisiting with a WSGIServlet implementation, that would be written to be compatible w/ clamp
[16:51] <jimbaker> so complete support for a site-packages driven approach; written in java for speed (but initially in python to verify the idea; of course this would be clamped); singlejar only for now, although maybe possible to look at a maven style assembly for later
[16:51] <jimbaker> and actual tests
[16:53] * cameron__ (~thereisno@113-61-86-28.static.qld.dsl.net.au) has joined #jython
[16:54] <topi`> is it already possible to build clamped projects with maven?
[16:54] <topi`> frankly, I know almost nothing of maven
[16:55] <topi`> another issue with trial: if you try trial --help-reporters, you get none. This is probably because it cannot find the right plugins.
[16:56] <topi`> for p in plugin.getPlugins(itrial.IReporter): print(' ', p.longOpt, '\t', p.description)
[16:56] <topi`> so getPlugins() is out of order. This must be some path issue.
[16:57] <jimbaker> topi`, no maven support yet
[16:58] <jimbaker> i have played a bit with aether, just to figure out how it works; mostly captured in one gist so far - https://gist.github.com/jimbaker/8798273
[16:59] <jimbaker> that basically just demonstrates the wiring that needs to be setup
[17:00] <jimbaker> topi`, re plugins - likely because of compat in twisted/__init__.py
[17:01] <jimbaker> i wonder if any exceptions are being quietly swallowed there, which would be make sense given the type of thing it's doing
[17:01] <topi`> I'm debugging the plugins issue further - it seems twisted.plugin.getCache() is not returning anything
[17:01] <jimbaker> then the lack of support maybe cascading further. at least one working hypothesis
[17:02] <topi`> yeah, I'd need to revisit all that compat stuff.
[17:02] <topi`> last time I had a look at it was in last October
[17:02] <topi`> submitted some patches to twisted tracker, but not all of them were accepted
[17:02] <jimbaker> but the idea is that setup.py should integrate w/ aether to describe maven dependencies, possibly in conjunction w/ a pom.xml for a clamped project
[17:03] <jimbaker> topi`, yeah, i think we were a bit early on that
[17:03] <topi`> so a customized setup.py
[17:03] <jimbaker> well, a clamp-aware setup.py, with extra maven stuff
[17:04] <jimbaker> so you could say in your setup.py, these are my maven dependecies, instead of having to get jars explicitly
[17:04] <jimbaker> and clamp would resolve these dependencies on your behalf
[17:05] <jimbaker> and of course, java code using clamped stuff could see what you need, possibly including a stripped down jython runtime
[17:05] <jimbaker> eg you may not use unicodedata, therefore no need for icu4j support
[17:10] <topi`> yeah, lots of unicode woes
[17:16] <jimbaker> well, that's a different matter :) anyway, stripped-down jython is certainly the lowest priority. *correctness first*
[17:16] <topi`> I wonder how one standard can be so difficult to implement ;) I recall there was a period of time when many packages were broken on jython because of some unicode surrogate problem
[17:17] <jimbaker> yeah, it still impacts some packages like pip, due to a vendor lib that does that. it will be fixed. whg also put together the patois project to centralize these fixes in one place
[17:22] <topi`> oh, this is interesting news
[17:22] <topi`> pip is one heck of an important package :/
[17:22] <jimbaker> topi`, it's what holding up everything else for jython 2.7. pretty much the reason for socket-reboot
[17:23] <jimbaker> but in the end, we will have much greater compatibility across the board, so it's a good thing
[17:33] <topi`> damn this is the worst winter in Finland for a century, it's been all around 0 degC (32F) and bloody cloudy, no sun
[17:33] <topi`> one more reason to stay inside and hack ;)
[17:57] <jimbaker> topi`, we have had a very snowy winter here in colorado, but it's usually sunny too. so that's why you might not see me on this channel on weekends, given my love for skiing :)
[18:06] <topi`> *sigh*
[18:06] <topi`> my snowboard has seen very little love this winter :(
[18:07] <topi`> I usually ski on a local hill here half an hour away, don't have the time to go to Lapland (where there *is* snow)
[18:07] <topi`> but our "hills" won't be any match against those Rockies you have there.. *sigh*
[18:13] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 240 seconds)
[18:18] * jorgew (~Adium@ has joined #jython
[18:42] <topi`> I'm surprised that even things like "inspect" seem to work! I tried inspect.getsource() and it worked.
[18:42] <topi`> at some point in twisted.python.deprecate, the inspect module is being used.
[18:45] <whg> jimbaker: Speaking of patois, I'm on an (already extended) deadline at work
[18:46] <whg> jimbaker: But my basic problem is making sure I'm testing what I think I'm testing
[18:46] <whg> I haven't forgotten, just don't trust myself on Unicode stuff by the time I'm done for the day right now
[19:00] * ivan` (~ivan@unaffiliated/ivan/x-000001) Quit (Ping timeout: 245 seconds)
[19:03] * ivan` (~ivan@unaffiliated/ivan/x-000001) has joined #jython
[19:17] * jorgew (~Adium@ has left #jython
[19:18] <jimbaker> topi`, yeah, we made sure stuff like inspect and pdb worked
[19:18] <jimbaker> whg, hey, no worries - my plan is to work w/ you on those specifics as soon as i get back to that part of pip
[19:20] <jimbaker> btw, my plan is now to write a WSGIServlet (and next WSGIServletFilter) that maps wsgi to sevlet 3, including the possibility of supporting AsyncContext. it will support clamp and it will be fast :)
[19:20] <jimbaker> since i have direct work reasons for all of that
[19:20] <jimbaker> biab
[20:06] <topi`> jimbaker: did I mention that twisted adbapi seems to have problems both with zxJDBC and mysql-connector-python ?
[20:06] <topi`> you probably haven't tried it, but there's a problem with Cursor objects when reusing connections from adbapi.ConnectionPool
[20:06] <topi`> the zxJDBC issue I don't remember, gotta peer at my logs
[20:07] <topi`> I tried mysql-connector-python since it's written in pure python, but it seems to have more issues than the traditional MySQLdb
[20:17] <jimbaker> topi`, i recommend use jyjdbc - we really need to deprecate zxJDBC as unmaintained
[20:17] <jimbaker> jyjdbc is much better code, and it's easier to get the python integration right given it's in python
[20:33] * oscar_toro (~Thunderbi@h-17-170.a328.priv.bahnhof.se) has joined #jython
[20:49] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[21:30] * rodygin (~rodygin@ has joined #jython
[21:43] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[21:54] * oscar_toro (~Thunderbi@h-17-170.a328.priv.bahnhof.se) Quit (Quit: oscar_toro)
[22:00] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[22:16] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 240 seconds)
[22:17] * whg is now known as whg_away
[22:17] * whg_away is now known as zz_whg_away
[22:28] * clajo05 (~clajo04@pool-108-21-222-14.nycmny.fios.verizon.net) has joined #jython
[22:59] * clajo04 (~clajo04@pool-108-21-222-14.nycmny.fios.verizon.net) Quit (Quit: clajo04)
[22:59] * clajo05 is now known as clajo04
[23:00] * clajo04_ (~clajo04@pool-108-21-222-14.nycmny.fios.verizon.net) has joined #jython
[23:04] * rodygin (~rodygin@ Quit (Ping timeout: 240 seconds)
[23:14] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[23:22] * clajo04 (~clajo04@pool-108-21-222-14.nycmny.fios.verizon.net) Quit (Quit: clajo04)
[23:22] * clajo04_ is now known as clajo04
[23:32] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Quit: Konversation terminated!)
[23:35] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[23:52] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython


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