#jython IRC Log (v0.9)


IRC Log for 2013-09-27

Timestamps are in GMT/BST.

[0:05] * zz_whg is now known as whg
[0:22] * lheuer1 (~Adium@g228227049.adsl.alicedsl.de) has joined #jython
[0:25] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 245 seconds)
[1:01] * mritz (~textual@108-196-154-226.lightspeed.austtx.sbcglobal.net) has joined #jython
[1:17] * robbyoconnor (~wakawaka@146.sub-70-208-74.myvzw.com) has joined #jython
[1:17] * robbyoconnor (~wakawaka@146.sub-70-208-74.myvzw.com) Quit (Changing host)
[1:17] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[1:37] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Read error: Connection reset by peer)
[2:10] * sinistersnare (6c1c5d99@gateway/web/cgi-irc/kiwiirc.com/ip. has joined #jython
[2:37] * sinistersnare (6c1c5d99@gateway/web/cgi-irc/kiwiirc.com/ip. Quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
[2:38] * sinistersnare (6c1c5d99@gateway/web/cgi-irc/kiwiirc.com/ip. has joined #jython
[2:58] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[3:02] * lheuer1 (~Adium@g228227049.adsl.alicedsl.de) Quit (Quit: Leaving.)
[3:13] * sinistersnare is now known as sinsnare|zzZZzz
[3:43] * whg is now known as zz_whg
[4:30] * clajo04 (~clajo04@pool-108-46-137-135.nycmny.fios.verizon.net) Quit (Ping timeout: 256 seconds)
[4:37] * mritz (~textual@108-196-154-226.lightspeed.austtx.sbcglobal.net) Quit ()
[5:26] * lheuer (~Adium@g228227049.adsl.alicedsl.de) has joined #jython
[5:26] * lheuer (~Adium@g228227049.adsl.alicedsl.de) Quit (Changing host)
[5:26] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[5:36] * clajo04 (~clajo04@pool-108-54-80-252.nycmny.fios.verizon.net) has joined #jython
[7:16] <topi`> jimbaker: why do you need to feed a "constants" variable when defining the BarClamp class?
[7:28] * Scorp1us (4b915e69@gateway/web/freenode/ip. Quit (Ping timeout: 250 seconds)
[7:54] * kral|off is now known as kral
[8:56] <vext01> hello
[10:09] * supersven (~sven@port-2839.pppoe.wtnet.de) has joined #jython
[10:46] * purplefox (~purplefox@host-80-43-252-143.as13285.net) Quit (Quit: Leaving)
[11:16] * purplefox (~purplefox@host-80-43-252-143.as13285.net) has joined #jython
[11:18] <jimbaker> topi`, because i can ... :)
[11:18] <jimbaker> it's just demonstrating the possibility. annotations etc will be nice too
[11:20] <jimbaker> normally i would expect that in most usage, no one will set constants. i would like to see some interplay between the idea of __slots__ and what could be done in terms of setting up nonstatic fields
[11:23] <jimbaker> topi`, so the fix for site.py is of course trivial. i will be merging that into trunk as a trivial, presumably today
[12:03] <vext01> jimbaker: hi again
[12:20] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 264 seconds)
[14:12] * Guest15785 is now known as mary
[14:12] * mary (~ircfnode@moya.miuark.net) Quit (Changing host)
[14:12] * mary (~ircfnode@unaffiliated/mary) has joined #jython
[14:18] * zz_whg is now known as whg
[14:35] <vext01> just tried to install setuptools into my jython install
[14:35] <vext01> File "/opt/setuptools-1.1.6/setuptools/command/easy_install.py", line 1881, in current_umask
[14:36] <vext01> tmp = os.umask(0x12) # 022
[14:36] <vext01> AttributeError: 'module' object has no attribute 'umask'
[14:49] <jimbaker> vext01, hi, just skimmed through the paper you linked on unipycation, very interesting
[14:51] <vext01> glad you liked it
[14:51] <jimbaker> vext01, if you want to use easy_install, you need to use this branch, https://bitbucket.org/jimbaker/jython-ssl
[14:52] <vext01> currently trying to figure out the best way to adjust the PYTHONPATH in any given PythonInterpreter instance
[14:52] <jimbaker> in terms of os.umask, this is available, but only when running w/ jnr
[14:52] <jimbaker> maybe you don't have the jars?
[14:52] <vext01> which jars are these?
[14:52] <jimbaker> it will fall back to not having such availability quietly turned off
[14:53] <jimbaker> extlibs/jffi- and jnr-
[14:53] <jimbaker> lastly we use JYTHONPATH, not PYTHONPATH
[14:53] <jimbaker> but i prefer installing in site-packages anyway
[14:53] <vext01> i found some references to JYTHONPATH yes
[14:54] <jimbaker> JYTHONPATH is perhaps unfortunate
[14:54] <vext01> if i can get stuff installed in site-packages i wont need to tweak the path
[14:54] <vext01> i ultimatley want py.test to do some app-level testing
[14:55] <vext01> this needs setuptools to install, you see
[14:55] <vext01> so i was just running jython on setup.py for setuptools
[14:55] <vext01> how would you have done it?
[14:57] <jimbaker> vext01, if you are resolving dependencies manually, you can use trunk. i just run dist/bin/jython setup.py install
[14:58] <jimbaker> but somehow you are not getting os.umask...
[14:58] <vext01> thats what i did, but perhaps the beta release i am running is too old?
[14:59] <jimbaker> beta1 should be fine for this. but i would run trunk
[14:59] <vext01> ill try it
[15:01] <vext01> waiting for hg to do its thing...
[15:04] <topi`> vext01: I just compiled my own jython-standalone from trunk :)
[15:04] <topi`> you can use "ant all-jars" to create that standalone jar, which contains all the python libs and some jffi stuff etc
[15:04] <vext01> doing that, thanks
[15:05] <topi`> I just needed to get a Tomcat memory leak patch
[15:05] <jimbaker> my only concern with standalone is that you lose site-packages support. but the clamp project will shortly fix that
[15:05] <topi`> to get easy_install to work, you should get the relevant patches from jimbaker's jython-ssl
[15:05] <vext01> ah, yeh i need site-packages
[15:05] <vext01> im not familiar with easy_install
[15:06] <topi`> jimbaker: well, site-packages could be "fixed" by providing a JYTHONPATH, right?
[15:06] <vext01> on second thoughts, i should just install pip
[15:06] <jimbaker> topi`, so that's working, the latest as of r7126?
[15:06] <topi`> but we shouldn't mix the standard Python libs with jython fixes, like that ssl.py
[15:06] <jimbaker> vext01, if you want to use pip, you need to use this patched version
[15:06] <vext01> right
[15:07] <jimbaker> https://github.com/jimbaker/pip
[15:07] <topi`> vext01: I didn't test with pip, just used easy_install to get started and my django setup installing
[15:07] <vext01> so, lets be clear: i use hg/master and then get the patched version of pip
[15:07] <jimbaker> vext01, yes
[15:07] <vext01> ok thanks
[15:08] <jimbaker> oops, i might have said that wrong - you want this branch: https://bitbucket.org/jimbaker/jython-ssl
[15:08] <vext01> haha
[15:08] <jimbaker> not jython trunk. sorry. that's still a wip
[15:08] <jimbaker> so the reason for this is simple: pip uses ssl. and jython trunk's ssl is completely borked
[15:09] <topi`> jimbaker: the solitary surrogate patch looks pretty scary. also, the *original* code has some interesting comments in it, like "Craziness"
[15:09] <topi`> :D
[15:09] <jimbaker> topi`, yeah, i will get to it
[15:10] <jimbaker> topi`, i wrote most of the current unicode support for jython and i'm still scratching my head on how to put together a reasonable patch for pip on this issue
[15:10] <topi`> I guess some trouble stems out of the fact that the JVM is UTF_16 by default?
[15:11] <jimbaker> yes, it makes much more sense to keep utf-16
[15:11] <jimbaker> but we have very sophisticated codebases like pip that then do interesting things
[15:11] <jimbaker> all about (apparently) to find unicode errors in input
[15:11] <jimbaker> which feels very meta
[15:12] <topi`> sophisticated errors need sophisticated codebases ;)
[15:12] <jimbaker> something along those lines
[15:12] <topi`> I decided to first try out some example code in Java (about creating a timer service for Tomcat using Quartz)
[15:13] <jimbaker> topi`, right, that's why we need annotation support
[15:13] <topi`> later, we'll see if that can be converted into Python using Clamp
[15:13] <jimbaker> in clamp
[15:13] <topi`> problem is, I'm hopeless with Java
[15:13] <jimbaker> you will be my first user
[15:13] <topi`> last time I used it was in the university back in '99
[15:14] <topi`> that was the time when writing Java applets for browsers was considered cool!
[15:14] <topi`> boy, little did they know...
[15:14] <jimbaker> topi`, sure, "we write java so you don't have to"???
[15:14] <vext01> urf
[15:15] <vext01> so i reverted to manually fetching deps
[15:15] <vext01> this was using the default branch
[15:15] <vext01> AttributeError: 'module' object has no attribute 'umask'
[15:15] <jimbaker> vext01, what's your platform?
[15:15] <vext01> openbsd
[15:15] <vext01> i invoked python like so:
[15:15] <vext01> /opt/jython/dist/bin/jython setup.py install
[15:16] <jimbaker> vext01, openbsd on x86_64?
[15:16] <vext01> indeed
[15:16] <jimbaker> so we have jffi for that
[15:17] <vext01> maybe i didnt build jffi?
[15:17] <jimbaker> (we even have it for s390)
[15:17] <vext01> i just ran "ant"
[15:17] <jimbaker> the relevant jars are prepackaged in extlibs
[15:17] <vext01> would i have to set a claspath or they are found magically?
[15:18] <vext01> i see it: jffi-x86_64-OpenBSD.jar
[15:18] <jimbaker> they should just get pulled in by the jython script
[15:18] <jimbaker> (which is a bash script - i know supersven has taken a look at it to improve)
[15:19] <jimbaker> (i suggested turning it into a cpython script)
[15:19] <vext01> i have bash installed, so that should be fine
[15:19] <vext01> not seeing any reference to jffi or extlib in the script
[15:19] <jimbaker> (because i thought it would be a lovely irony if jython was normally invoked by cpython)
[15:19] <vext01> lol
[15:22] <jimbaker> vext01, these are copied over to javalib in the ant build (or should be)
[15:22] <vext01> indeed
[15:22] <vext01> looks ok
[15:22] <jimbaker> try doing this $ bash -x dist/bin/jython
[15:23] <jimbaker> all the jars in javalib should then be in the CP var
[15:23] <vext01> dist/javalib/jffi-x86_64-OpenBSD.jar is in the classpath
[15:23] <jimbaker> probably one of the more important things that the jython script does
[15:23] <jimbaker> yeah, so something is wrong here
[15:24] <vext01> hrm
[15:24] <vext01> jar is empty :P
[15:24] <jimbaker> ahhh
[15:24] <jimbaker> yes, that could be a small problem
[15:24] <vext01> some might say
[15:25] <vext01> you want me to regen it and mail it over?
[15:25] <jimbaker> vext01, sounds like you need to start w/ jnr project
[15:25] <jimbaker> no need to email ;), we will go to the source project as well
[15:26] <jimbaker> but this is a very good reason to run buildbots
[15:26] <vext01> sorry, im kinda new here, "jnr"?
[15:26] <vext01> :P
[15:26] <jimbaker> java native runtime
[15:26] <jimbaker> https://github.com/jnr
[15:26] <jimbaker> lots of good stuff there
[15:27] <vext01> so i would have to write the backend?
[15:27] <jimbaker> it's a project we have successfully shared w/ jruby
[15:27] <jimbaker> no, i would hope not, it's automatically generated
[15:27] <vext01> i dont think i have time tbh
[15:27] <jimbaker> somehow we have a bad copy
[15:28] <vext01> oh its magic?
[15:28] <jimbaker> yeah, i don't know its magical details
[15:28] <supersven> btw it is empty in extlibs, too
[15:28] <jimbaker> supersven, yes, we have been shipping empty jars for systems we don't use
[15:29] <jimbaker> imagine how that happens :)
[15:29] <vext01> oh maven
[15:29] <supersven> that's the trouble with manually maintaining a dependency tree ;)
[15:30] <jimbaker> yes, so agree :)
[15:30] <vext01> ill try this quick, but i have never had any luck with maven on openbsd
[15:30] <supersven> well, after fighting a lot with maven and gradle, i finally made ivy almost work for jython
[15:31] <jimbaker> supersven, fantastic
[15:31] <vext01> no build instructions...
[15:32] <supersven> developer-build and javatest/regrtest work already, but jar-complete and jar-standalone are todo ...
[15:33] <supersven> i'll push that to bitbucket soon - perhaps with some words, why maven for jython is a horrible idea
[15:33] <vext01> 'mvn compile' seems to do something
[15:33] <vext01> looks like its downloading the internet
[15:33] <supersven> maven?
[15:34] <vext01> this jni thing that jim pointed me at
[15:35] <supersven> yes, the pom.xml of jffi has some stuff in it
[15:35] <supersven> so, if you fetch it with maven there'll be some maven logic executed
[15:37] <vext01> ugh, non-portable shell script in maven-antrun-plugin
[15:38] <vext01> this is taking too long
[15:38] <vext01> im just going to write interpreter level tests
[15:40] <supersven> hm, i'm not sure i understand what you're doing... you want to rebuild the jffi OpenBSD jar, right?
[15:40] <vext01> ineed
[15:40] <vext01> i checked out the code and ran 'mvn package'
[15:41] <supersven> well, i've got a simpler idea
[15:41] <supersven> fetch http://repo1.maven.org/maven2/com/github/jnr/jffi/1.2.7/jffi-1.2.7-native.jar
[15:42] <supersven> extract the jar
[15:43] <supersven> you should recognize a pattern in the directories:
[15:44] <supersven> jni/ARCHITECTURE/libjffi.so
[15:44] <vext01> sure
[15:44] <supersven> oki
[15:45] <vext01> there is no openbsd dir :P
[15:45] <supersven> i'm sorry - i recognized that just a few seconds ago :(
[15:46] <supersven> but in principle you should be able to just take the jni/ARCHTECTURE/libjffi.so, put it in a jar and thats should be it
[15:48] <vext01> ok, i dont really have the time to look into this further
[15:48] <vext01> thanks anyway
[15:48] <vext01> ill raise a bug for now
[15:49] <topi`> vext01: using openbsd sounds like masochism to me ;)
[15:49] <topi`> sorry
[15:49] <vext01> hehe
[15:49] <vext01> ive used it for >10 years
[15:49] <topi`> I know one openbsd freak
[15:49] <vext01> hehe
[15:50] <topi`> I bet he's still using it :)
[15:50] <vext01> who's that then? its a small community
[15:50] <topi`> it does have a solid track record on security.
[15:50] <topi`> I don't remember his name or handle ;) I'd know him by face, though
[15:51] <vext01> is he a dev?
[15:54] <topi`> probably not. just a geek :)
[15:55] <topi`> he's from Finland, like me
[16:07] * kral is now known as kral|off
[16:17] <vext01> jimbaker: so i managed to install pytest using your ssl branch and easy_install
[16:17] <vext01> does not run however :P
[16:18] <vext01> http://paste.pound-python.org/show/eUKVfT27c9oMH53nX08i/
[16:19] * lheuer (~Adium@unaffiliated/lheuer) Quit (Quit: Leaving.)
[16:24] <jimbaker> vext01, right, we don't support the compiler module
[16:25] <vext01> --assert=plain works
[16:26] <vext01> also, cfbolz just linked me to this:
[16:26] <vext01> https://github.com/wmeissner/jffi/blob/master/archive/jffi-x86_64-OpenBSD.jar
[16:28] <topi`> grr, this must be a really simple issue, but... my maven project (a simple quartz scheduler) works otherwise, but log4j complains:
[16:28] <topi`> log4j:WARN No appenders could be found for logger (org.foob.job.MyJob).
[16:28] <topi`> anyone seen this? I've read a few StackOverflow threads but they don't apply
[16:29] <jimbaker> vext01, right, wmeissner is the principal author of jffi
[16:30] <topi`> "Knowing the appropriate location to place log4j.properties or log4j.xml requires understanding the search strategy of the class loader in use. "
[16:30] <topi`> grrr, this is exactly why I hate java. requires expert knowledge or then some wizardry.
[16:31] <topi`> let me relegate my questions to #maven ...
[16:33] <supersven> just put it in the resources directory
[16:34] <vext01> jimbaker: wonder why the openbsd jar didnt make the offical fork
[16:35] <agronholm> topi`: there is a python alternative for quartz too if you're interested
[16:37] <topi`> agronholm: I bet there is, but how would it run under Tomcat?
[16:37] <topi`> using some servlet mechanism, I guess...
[16:37] <agronholm> this isn't jython related?
[16:37] <topi`> sorry for sounding a bit pessimistic :)
[16:37] <topi`> I need the scheduling for my Django war :)
[16:37] <agronholm> tomcat doesn't let you run code on deploy?
[16:38] <topi`> the Django code is supposed to just display the stuff out of a SQL table
[16:38] <topi`> and the SQL table should be filled every minute with fresh info
[16:38] <topi`> yes, tomcat lets you run code on deploy. It's just that I don't know how this all fits together...
[16:38] <agronholm> well, can't you launch the scheduler along with django?
[16:39] <topi`> damn it! I got the log4j actually logging something (out of my scheduled task)
[16:40] <topi`> I just don't get it why I get the "MyJob run successfully" text 4 times!
[16:40] <topi`> and now 5.. increasing with every 30 seconds. odd.
[16:40] <topi`> I'll ask this on #quartz. sorry guys
[16:40] <topi`> empty channel... damn
[16:40] <jimbaker> i personally like the idea of supporting quartz in jython. whether this makes sense vs other alternatives like celery... i don't know
[16:41] <agronholm> apscheduler?
[16:41] <agronholm> celery is a distributed job queue with minimal scheduling features
[16:41] <agronholm> very complicated to set up
[16:41] <vext01> jimbaker: that ffi jar seems incomplete, nm doesnt find any umask for example
[16:41] <vext01> maybe its a WIP
[16:42] <jimbaker> vext01, so jffi does not have any stuff related to posix
[16:42] <topi`> jimbaker: wfrom what i've ready, quartz is very widely used in enterprise world
[16:42] <vext01> jimbaker: ah, ok im not sure then
[16:42] <jimbaker> topi`, right, and it would seem to be nice to readily define such tasks in python
[16:43] <vext01> all i know is with the jar in place:
[16:43] <vext01> *sys-package-mgr*: processing modified jar, '/opt/jython-ssl/dist/javalib/jffi-x86_64-OpenBSD.jar'
[16:43] <agronholm> *ahem* https://pypi.python.org/pypi/APScheduler/2.1.1
[16:43] <vext01> then accessing os.umask fails as before
[16:44] <jimbaker> topi`, my reading of http://quartz-scheduler.org/documentation/quartz-2.x/new-in-quartz-2#api-changes is that we need good annotation support to take full advantage
[16:44] <supersven> vext01: did you put it into extlibs and ran ant again?
[16:44] <jimbaker> agronholm, agreed, APScheduler looks good
[16:44] <vext01> supersven: ill try
[16:48] <topi`> agronholm: hah, so you had your fingers in apscheduler ;)
[16:48] <agronholm> yeh :)
[16:48] <supersven> vext01: the jar you got is pretty old (1.0 ,we use 1.2.x) - so there are no guarantees ... :(
[16:48] <topi`> agronholm: what would be welcome, is a short example on how to get apscheduler working under tomcat...
[16:49] <vext01> there is no chance
[16:49] <agronholm> I have no clue
[16:49] <topi`> I can write that
[16:49] <vext01> openbsd changed to time64 a few weeks ago
[16:49] <agronholm> well okay some
[16:49] <topi`> provided that it works ;)
[16:49] <vext01> ill just have to not use the os module :P
[16:49] <agronholm> but it depends on how you get jython to work on tomcat in the first place
[16:49] <topi`> agronholm: django works fine :)
[16:50] <agronholm> so put the scheduler initialization code in the same place?
[16:50] <topi`> my bosses didn't like the idea of running python code under tomcat, they want me to rewrite everything in java. BUT, I've tried to tout the benefits of Django.
[16:50] <agronholm> benefits of django...heh
[16:50] <agronholm> out of all python web frameworks you chose the clumsiest, most bloated one
[16:51] <agronholm> I had enough of it after one project
[16:51] <topi`> agronholm: I know :) I would prefer Pyramid. but Django is a quick start
[16:51] <agronholm> so is flask
[16:51] <topi`> and it's easy to hire Django devs
[16:51] <supersven> vext01: well, i don't know much about jffi, so i can't say if time64 has an impact to it
[16:51] <topi`> agronholm: the Django Admin actually solves part of my requisites here, that's why
[16:52] <supersven> vext01: what about compat-linux or compat-bsd?
[16:53] <topi`> agronholm: I suppose that to get started with APScheduler, I just create a Modjy servlet that gets loaded at Tomcat startup time, and that servlet imports APScheduler and stays somehow running?
[16:54] <agronholm> the scheduler runs in its own thread by default
[16:54] <agronholm> so you need only get it started
[16:54] <agronholm> and keep a reference to it
[16:54] <agronholm> (so you can add jobs to it)
[16:54] <agronholm> or just add a job during initialization, then you won't even need the reference any more
[16:55] * sinsnare|zzZZzz is now known as sinistersnare
[16:56] <vext01> supersven: compat-linux is for i386 only :P
[16:56] <vext01> basically, i'm screwed
[17:04] * lheuer (~Adium@g228227049.adsl.alicedsl.de) has joined #jython
[17:04] * lheuer (~Adium@g228227049.adsl.alicedsl.de) Quit (Changing host)
[17:04] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[17:10] <jimbaker> vext01, it's really hard to avoid using the os module as you know. there are some use cases of jython where one can do a reasonable split - ahead-of-time package (setup.py, pip, etc, etc) then run the built stuff under a more restricted security manager (such as tomcat)
[17:11] <jimbaker> vext01, i suppose you could try packaging on one system (such as linux), then run on openbsd
[17:11] <jimbaker> running stuff under tomcat normally means no jni, so no jffi, so no jnr, so no extended posix support
[17:12] * vext01 (~edd@host-92-20-152-6.as13285.net) Quit (Ping timeout: 248 seconds)
[17:14] * vext01 (~edd@host-92-20-138-203.as13285.net) has joined #jython
[17:15] <vext01> calling it a day
[17:16] <vext01> seey later guys
[17:16] * supersven (~sven@port-2839.pppoe.wtnet.de) Quit (Quit: Ex-Chat)
[17:25] <jimbaker> vext01, sounds good
[17:25] <jimbaker> you might have missed my last suggestions, so look at the log
[17:27] <vext01> will do
[17:27] <sinistersnare> jimbaker: ive been making strides in JyGDX
[17:28] <sinistersnare> https://www.refheap.com/19067 < python, java > https://www.refheap.com/19068
[17:28] <sinistersnare> except for some reason, textures arent being drawn
[17:30] <sinistersnare> or anything inside the self.batch.begin/end block
[17:34] <topi`> sinistersnare: sounds fun
[17:35] <sinistersnare> it could be a blast, once i work out why the SpriteBatch isnt doing anything...
[17:36] <topi`> sinistersnare: this Gdx library sounds like something higher-level on top of OpenGL?
[17:37] <sinistersnare> yes, topi` its a java gaming framework
[17:37] <sinistersnare> its really fun, and i think that it could bring gaming to JVM langauges other than java
[17:38] <topi`> huh, I've broken my easy_install?
[17:38] <topi`> IOError: [Errno 2] No such file or directory: '/home/topi/jython/jython.jar/Lib/distutils/__init__.py'
[17:39] <topi`> the culprit might be my recent compile of the jython trunk and replacing jython.jar with the result...
[17:39] <topi`> back to the old jar.
[17:41] <sinistersnare> i fixed the drawing, im stupid and had a bad constructor :p
[17:47] <vext01> jimbaker: we will benchmark on linux, so ill use a vm or a linux install if i hit problems
[17:47] <topi`> agronholm: the APscheduler 2.0.1 documentation doesn't seem to mention the exact file format of the config file
[17:47] <topi`> sched.configure(options_from_ini_file)
[17:54] <topi`> now, I just wonder, should I really need modjy to kick the APScheduler into working shape? since what Modjy does is take incoming connections and fit them into the WSGI spec.
[17:55] <topi`> so probably I should just try to create a PythonInterpreter from a java class, and init APScheduler that way...
[17:57] <topi`> maybe a ServletContextListener
[17:57] <topi`> or then just a Servlet that gets loaded at app startup time...
[18:10] <jimbaker> topi`, yes, rebuild jython with ant, get to reinstall packages. some might see this as a feature :)
[18:10] <jimbaker> (as in, nice clean slate to play with)
[18:11] <jimbaker> ok, just about to push up clamp site-packages fix, assuming one last pass through regrtest passes
[18:15] <topi`> I'm working on calling python classes from a dummy servlet using PythonInterpreter
[18:16] <topi`> maybe there are some examples out there
[18:16] <jimbaker> topi`, maybe using http://docs.oracle.com/javaee/6/api/javax/servlet/Servlet.html#init(javax.servlet.ServletConfig)
[18:17] <jimbaker> not certain how much control of this we expose, but you could spin off a background thread, then use destroy to ask it to stop. feels like a hack, but a necessary one in this case
[18:17] <topi`> I wonder if PyServlet works any more with jython 2.7b1
[18:18] <sinistersnare> where is jython's source hosted?
[18:19] <sinistersnare> oh bitbucket, found it
[18:19] <jimbaker> sinistersnare, hg.python.org, but mirrored to bitbucket
[18:19] <sinistersnare> oh ok cool
[18:20] <jimbaker> topi`, i really would recommend using modjy so as to get wsgi support
[18:21] <jimbaker> topi`, modjy does not use PyServlet, so don't know how much this path has been tested
[18:22] <topi`> the PyServlet tutorial (from S.McGrath) I found is from 2002
[18:22] <topi`> no, 2004
[18:22] <topi`> so I'd consider it a bit outdated.
[18:22] <jimbaker> yeah, we might want to deprecate/remove PyServlet...
[18:22] <topi`> jimbaker: I don't need wsgi for this servlet, it's only mission is to start up a thread of APScheduler...
[18:23] <topi`> so I wrote a simple servlet in java, its init() method seems to print out stuff into catalina.out
[18:23] <topi`> so, that'd be a prime place for me to start PythonInterpreter
[18:23] <jimbaker> topi`, makes sense. you want your own init to control things
[18:25] <topi`> the init just spawns a thread, the APScheduler thread...
[18:25] <topi`> I wonder if I need to exit from servlet init() immediately or not...
[18:27] <sinistersnare> ok heres what i have with JyGDX so far
[18:27] <sinistersnare> i am having trouble figuring out how to PYTHONPATH so i just did a sys.path.append ( i need to fix that!) https://gist.github.com/sinistersnare/6732960
[18:34] <sinistersnare> i am having trouble figuring out how to do a JythonObjectFactory#createObject with args
[18:35] <jimbaker> topi`, yes, you need to return from init, cannot just use that as your thread :)
[18:37] <jimbaker> sinistersnare, you also want to be using clamp it would seem...
[18:37] <sinistersnare> no idea what that is, im just trying to get something down with as little setup as possible
[18:37] <sinistersnare> ...
[18:38] <jimbaker> sinistersnare, just a project that i'm working to get out asap
[18:38] <jimbaker> https://gist.github.com/jimbaker/6717525
[18:39] <jimbaker> relies on this branch, https://github.com/rackerlabs/clamp
[18:40] <jimbaker> to install, use the jython-ssl branch, $ jython setup.py install
[18:40] <sinistersnare> what is clamp?
[18:40] <jimbaker> but soon it will be in pypi
[18:40] <jimbaker> clamp allows direct import of python classes into java
[18:41] <jimbaker> and it does so efficiently
[18:41] <topi`> sinistersnare: it lets you avoid instantiating and using PythonInterpreter from within your java app
[18:41] <sinistersnare> oh that sounds wonderful, jimbaker
[18:41] <jimbaker> so no extra overhead of PythonInterpreter, because it can reuse
[18:42] <jimbaker> so you still need the PythonInterpreter (= jython runtime, not an interpreter)
[18:42] <jimbaker> but all that is managed automatically
[18:42] <sinistersnare> yes the jython.jar
[18:48] <jimbaker> site module import bug fix pushed up, so site-packages will now be available to clamp
[18:49] <jimbaker> or, better stated, usable, which is the point of doing this in conjunction w/ setuptools
[18:50] <jimbaker> fwierzbicki, looks like we need to go through a bunch of pull requests against bitbucket. wish this wasn't so annoyingly manual :)
[18:51] <jimbaker> (bitbucket is a mirror. we need to actually push against hg.python.org)
[18:53] <sinistersnare> sounds fun
[18:54] <sinistersnare> well, ill look into clamp, that sounds like a lifesaver
[18:54] <sinistersnare> i wish that i didnt have to write any java for this to work
[18:56] <sinistersnare> for integration with libgdx*
[19:04] <jimbaker> sinistersnare, in your case, you shouldn't need to use java at all for the project you posted, but if you want to integrate jython into some sort of java framework, clamp makes that feasible. and because the integration is deeper, you can further than object factory approaches
[19:08] <sinistersnare> well, thats a good point actually. i can just run a LwjglApplication also from jython... hmmm
[19:17] <jimbaker> sinistersnare, exactly. as presented in that gist, no problem whatsoever
[19:18] <sinistersnare> jimbaker: could i do an 'if __name__ == '__main':' in jython? i guess this is more of a pydev question, ill try and see
[19:18] <jimbaker> sinistersnare, yes, i do that all the time
[19:19] <jimbaker> all standard python semantics like that apply
[19:19] <sinistersnare> great, good to know
[19:19] <sinistersnare> my fglrx just blew up, ima restart my computer
[19:20] * sinistersnare (6c1c5d99@gateway/web/cgi-irc/kiwiirc.com/ip. Quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
[19:22] * sinistersnare (6c1c5d99@gateway/web/cgi-irc/kiwiirc.com/ip. has joined #jython
[19:39] <sinistersnare> jimbaker: after adding the jars to my PYTHONPATH, it works!!!! https://www.refheap.com/19082
[19:45] <jimbaker> sinistersnare, that sounds great!
[19:50] <sinistersnare> it works beautifully
[19:55] <sinistersnare> now, jimbaker, is there an easy way to export to a jar? i cant seem to do a runnable jar (as it seems i dont have a main.java, obviously :p)
[19:57] <jimbaker> sinistersnare, i'm working on that tool, more or less as we chat
[19:57] <jimbaker> so also will be part of clamp
[19:57] <sinistersnare> oh :)
[19:57] <sinistersnare> im just trying to find a simple way to make it a jar, so im glad youre working on it!
[19:58] <jimbaker> it happens to be exactly what i need for rackspace, so it works out nicely
[19:58] <sinistersnare> good, im glad we can reap the fruits of your labour :D
[19:59] <jimbaker> there's an early version of such tool here: https://github.com/rackerlabs/romper/blob/master/gen-storm-jar.py, but it's a little too much specific to storm. so the idea is you will be able to have a regular python project, using setuptools, and then do $ jython setup.py singlejar
[19:59] <jimbaker> and it will build the jar
[19:59] <sinistersnare> oh that seems nice
[20:00] <sinistersnare> oh you work for rackspace, that makes sense
[20:00] <jimbaker> your setup.py will describe all dependencies including that it uses clamp, so it will just work
[20:00] <sinistersnare> that sounds good
[20:00] <sinistersnare> how far along is it?
[20:06] <jimbaker> sinistersnare, so the clamp project i pushed works; let me push up my little test project, clamped, as well in a personal branch
[20:07] <jimbaker> i'm going to add singlejar support today
[20:07] <jimbaker> should be super simple
[20:07] <sinistersnare> thats really cool
[20:08] <sinistersnare> im really glad youre helping!
[20:08] <jimbaker> well, you can help me by using it, so that works in a nice virtuous cycle :)
[20:09] <sinistersnare> ill totally be trying it out!
[20:27] * sinistersnare is now known as sinsnare|away
[20:53] * thereisnospoon (~thereisno@27-33-1-87.tpgi.com.au) Quit (Ping timeout: 268 seconds)
[21:06] * thereisnospoon (~thereisno@27-33-1-87.tpgi.com.au) has joined #jython
[21:18] <jimbaker> ok, i have documented how to use clamp with the clamped project (perhaps too close of a name?)
[21:18] <jimbaker> https://github.com/jimbaker/clamped
[21:19] <jimbaker> topi`, sinsnare|away - this should get you going
[21:41] * whg is now known as zz_whg
[21:56] * lheuer1 (~Adium@g228227049.adsl.alicedsl.de) has joined #jython
[21:56] <jimbaker> topi`, an initial buffer implementation - https://bitbucket.org/tournesol/jython-ja-buffer
[21:57] <jimbaker> jeff allen, who implemented memoryview, put this together
[21:59] * lheuer (~Adium@unaffiliated/lheuer) Quit (Read error: Connection reset by peer)
[23:10] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[23:19] <jimbaker> ok, i'm probably not going to get singlejar support done today
[23:20] <jimbaker> but at least i put out that info on clamp
[23:21] * sinsnare|away (6c1c5d99@gateway/web/cgi-irc/kiwiirc.com/ip. Quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
[23:23] * sinistersnare (6c1c5d99@gateway/web/cgi-irc/kiwiirc.com/ip. has joined #jython
[23:24] * sinistersnare (6c1c5d99@gateway/web/cgi-irc/kiwiirc.com/ip. Quit (Client Quit)
[23:28] * sinistersnare (6c1c5d99@gateway/web/cgi-irc/kiwiirc.com/ip. has joined #jython
[23:43] * sinistersnare (6c1c5d99@gateway/web/cgi-irc/kiwiirc.com/ip. Quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)


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