#jython IRC Log (v0.9)

Index

IRC Log for 2012-09-16

Timestamps are in GMT/BST.

[0:24] * ChanServ (ChanServ@services.) Quit (*.net *.split)
[0:28] * ChanServ (ChanServ@services.) has joined #jython
[2:32] * catmtking (~catmtking@108-224-122-111.lightspeed.irvnca.sbcglobal.net) Quit (Quit: catmtking)
[3:21] * catmtking (~catmtking@108-224-122-111.lightspeed.irvnca.sbcglobal.net) has joined #jython
[5:10] * catmtking (~catmtking@108-224-122-111.lightspeed.irvnca.sbcglobal.net) Quit (Quit: catmtking)
[6:17] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[6:48] * ChanServ (ChanServ@services.) Quit (*.net *.split)
[6:48] * diminoten (~diminoten@unaffiliated/diminoten) Quit (*.net *.split)
[6:48] * lheuer (~Adium@unaffiliated/lheuer) Quit (*.net *.split)
[6:48] * juneau001 (~juneau@50-45-108-183.dklb.il.frontiernet.net) Quit (*.net *.split)
[6:48] * agronholm (~agronholm@2001:1bc8:102:6f29:49d9:e0d:3592:afe1) Quit (*.net *.split)
[6:48] * juh^ (~juh^@hutcs.cs.hut.fi) Quit (*.net *.split)
[6:48] * Azerith_ (~vps@azerith.com) Quit (*.net *.split)
[6:48] * xymox_ (xymox@2001:470:1f09:f3a::4) Quit (*.net *.split)
[6:48] * pjenvey (~pjenvey@underboss.org) Quit (*.net *.split)
[6:48] * jimbaker (~jbaker@canonical/jimbaker) Quit (*.net *.split)
[6:48] * srcerer (~chatzilla@dns2.klsairexpress.com) Quit (*.net *.split)
[6:48] * Hukka (hukka@hilla.kapsi.fi) Quit (*.net *.split)
[6:48] * clajo04_ (~clajo04_@pool-74-108-95-112.nycmny.fios.verizon.net) Quit (*.net *.split)
[6:48] * lahwran (lahwran@unaffiliated/lahwran) Quit (*.net *.split)
[6:48] * verterok (~ggonzalez@unaffiliated/verterok) Quit (*.net *.split)
[6:48] * ctismer (~ctismer@django.stackless.com) Quit (*.net *.split)
[6:48] * jabley (u2487@gateway/web/irccloud.com/x-yoemzxspicqtytrj) Quit (*.net *.split)
[6:48] * Rondom_ (~rondom@2a01:488:66:1000:b24d:4f2f:0:1) Quit (*.net *.split)
[6:48] * [Arfrever] (~Arfrever@apache/committer/Arfrever) Quit (*.net *.split)
[6:48] * augustl (~augustl@236.79-160-15.customer.lyse.net) Quit (*.net *.split)
[6:48] * lopex (u4272@gateway/web/irccloud.com/x-fikoyftjoldnyfxt) Quit (*.net *.split)
[6:48] * Wolfzz (Wolfzz@2a01:7e00::f03c:91ff:feae:9ac7) Quit (*.net *.split)
[6:48] * Zougloub (~cJ@zougloub.eu) Quit (*.net *.split)
[6:48] * ivan` (~ivan@unaffiliated/ivan/x-000001) Quit (*.net *.split)
[6:48] * JStoker (jstoker@unaffiliated/jstoker) Quit (*.net *.split)
[6:48] * njoyce (~njoyce@109.203.113.22) Quit (*.net *.split)
[6:48] * deepy (~deepy@c83-248-153-114.bredband.comhem.se) Quit (*.net *.split)
[6:48] * Arfrever (~Arfrever@apache/committer/Arfrever) Quit (*.net *.split)
[6:48] * svenn (svenn@invalid.ed.ntnu.no) Quit (*.net *.split)
[6:48] * maxb (~maxb@jabberwock.vm.bytemark.co.uk) Quit (*.net *.split)
[6:48] * henkelh_ (~henning@rps2.henkel.cx) Quit (*.net *.split)
[6:48] * ivan (~ivan@unaffiliated/ivan/x-000001) Quit (*.net *.split)
[6:48] * Thev00d00 (~v00d00@gentoo/developer/TheV00d00) Quit (*.net *.split)
[6:48] * tcrawley-away (~tcrawley@redhat/jboss/tcrawley) Quit (*.net *.split)
[6:48] * Guest65599 (~stevensmi@173-45-242-243.slicehost.net) Quit (*.net *.split)
[6:48] * Katharsis (~Katharsis@s42.linuxpl.com) Quit (*.net *.split)
[6:48] * kandinski (~kandinski@hiperactivo.com) Quit (*.net *.split)
[6:57] * shashank (~shashank@75-171-232-129.hlrn.qwest.net) has joined #jython
[7:11] * shashank (~shashank@75-171-232-129.hlrn.qwest.net) Quit (Quit: Leaving.)
[7:12] * diminoten (~diminoten@unaffiliated/diminoten) has joined #jython
[7:12] * shashank (~shashank@75-171-232-129.hlrn.qwest.net) has joined #jython
[7:12] * deepy (~deepy@c83-248-153-114.bredband.comhem.se) has joined #jython
[7:12] * augustl (~augustl@236.79-160-15.customer.lyse.net) has joined #jython
[7:12] * juneau001 (~juneau@50-45-108-183.dklb.il.frontiernet.net) has joined #jython
[7:12] * ivan (~ivan@unaffiliated/ivan/x-000001) has joined #jython
[7:12] * jabley (u2487@gateway/web/irccloud.com/x-yoemzxspicqtytrj) has joined #jython
[7:12] * lopex (u4272@gateway/web/irccloud.com/x-fikoyftjoldnyfxt) has joined #jython
[7:12] * agronholm (~agronholm@2001:1bc8:102:6f29:49d9:e0d:3592:afe1) has joined #jython
[7:12] * Guest65599 (~stevensmi@173-45-242-243.slicehost.net) has joined #jython
[7:12] * Azerith_ (~vps@azerith.com) has joined #jython
[7:12] * Katharsis (~Katharsis@s42.linuxpl.com) has joined #jython
[7:12] * Rondom_ (~rondom@2a01:488:66:1000:b24d:4f2f:0:1) has joined #jython
[7:12] * juh^ (~juh^@hutcs.cs.hut.fi) has joined #jython
[7:12] * kandinski (~kandinski@hiperactivo.com) has joined #jython
[7:12] * xymox_ (xymox@2001:470:1f09:f3a::4) has joined #jython
[7:12] * Arfrever (~Arfrever@apache/committer/Arfrever) has joined #jython
[7:12] * jimbaker (~jbaker@canonical/jimbaker) has joined #jython
[7:12] * Wolfzz (Wolfzz@2a01:7e00::f03c:91ff:feae:9ac7) has joined #jython
[7:12] * clajo04_ (~clajo04_@pool-74-108-95-112.nycmny.fios.verizon.net) has joined #jython
[7:12] * Thev00d00 (~v00d00@gentoo/developer/TheV00d00) has joined #jython
[7:12] * Zougloub (~cJ@zougloub.eu) has joined #jython
[7:12] * ivan` (~ivan@unaffiliated/ivan/x-000001) has joined #jython
[7:12] * JStoker (jstoker@unaffiliated/jstoker) has joined #jython
[7:12] * njoyce (~njoyce@109.203.113.22) has joined #jython
[7:12] * lahwran (lahwran@unaffiliated/lahwran) has joined #jython
[7:12] * srcerer (~chatzilla@dns2.klsairexpress.com) has joined #jython
[7:12] * [Arfrever] (~Arfrever@apache/committer/Arfrever) has joined #jython
[7:12] * verterok (~ggonzalez@unaffiliated/verterok) has joined #jython
[7:12] * Hukka (hukka@hilla.kapsi.fi) has joined #jython
[7:12] * ctismer (~ctismer@django.stackless.com) has joined #jython
[7:12] * henkelh_ (~henning@rps2.henkel.cx) has joined #jython
[7:12] * tcrawley-away (~tcrawley@redhat/jboss/tcrawley) has joined #jython
[7:12] * maxb (~maxb@jabberwock.vm.bytemark.co.uk) has joined #jython
[7:12] * svenn (svenn@invalid.ed.ntnu.no) has joined #jython
[7:12] * pjenvey (~pjenvey@underboss.org) has joined #jython
[7:12] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[7:16] * shashank (~shashank@75-171-232-129.hlrn.qwest.net) Quit (Ping timeout: 272 seconds)
[7:41] * catmtking (~catmtking@108-224-122-111.lightspeed.irvnca.sbcglobal.net) has joined #jython
[7:48] * catmtking (~catmtking@108-224-122-111.lightspeed.irvnca.sbcglobal.net) Quit (Quit: catmtking)
[7:50] * catmtking (~catmtking@108-224-122-111.lightspeed.irvnca.sbcglobal.net) has joined #jython
[8:03] * catmtking (~catmtking@108-224-122-111.lightspeed.irvnca.sbcglobal.net) Quit (Quit: catmtking)
[8:35] -mrmist- [Global Notice] - We've had some hardware problems this morning on the server that hosts services for us. We're currently working on moving services to another host. In the meantime, nickserv, chanserv etc. are not available. Thanks for your patience and thanks for flying freenode.
[9:29] <augustl> agronholm: I think I'll roll with manually calling functions. Worst case scenario is having to update my glue code when the function names change.
[9:31] <augustl> documentation on calling python from java seems a bit spares but I guess I'll figure it out ;)
[9:36] <augustl> sparse*
[10:08] * ChanServ (ChanServ@services.) has joined #jython
[10:08] * sera (~sera@gentoo/developer/sera) has joined #jython
[10:08] * sera (~sera@gentoo/developer/sera) Quit (Remote host closed the connection)
[10:10] * sera (~sera@gentoo/developer/sera) has joined #jython
[11:18] * lheuer (~Adium@unaffiliated/lheuer) Quit (Quit: Leaving.)
[11:45] <augustl> how would you go about executing some of the functions in https://github.com/jarib/google-closure-library/blob/master/closure/bin/build/closurebuilder.py?
[11:45] <augustl> basically I want to manually do some of the things the "main" function does
[11:47] <agronholm> you just have to manipulate sys.argv
[11:47] <agronholm> also, make sure there is no concurrent access to main()
[11:47] <agronholm> this code is not thread safe
[11:49] <agronholm> so, do this: load the script, set sys.argv to the list of arguments, then call main()
[11:50] <agronholm> this really wasn't designed to be used as a library though
[11:50] <augustl> I'm thinking of not calling main
[11:50] <agronholm> what then?
[11:50] <agronholm> that's where the "meat" of the code seems to be
[11:50] <augustl> just loading that file, making sure __name__ is not "__main__" so it doesn't auto execute, and then call the same functions main does
[11:51] <augustl> reimplement main by calling stuff via jython, so to speak
[11:51] <agronholm> you're in for a rough ride then
[11:52] <augustl> I'm currently trying execfile and I pass in a PySystemState with some args that should work. Getting "org.python.core.PyException: null" though
[11:53] <augustl> here's the full stack trace, in case that's helpful https://www.refheap.com/paste/5098
[11:53] <augustl> I'm calling jython via clojure but that shouldn't matter
[11:56] <augustl> trying to find some existing java code that does what I'm trying to do, that would be helpful. But I haven't found any
[12:00] <augustl> I'm just creating a PythonInterpreter with nil and a PySystemState, then calling execfile with the path to closurebuilder.py
[12:00] <agronholm> PythonInterpretr with nil...?
[12:06] <augustl> as the first argument
[12:07] <augustl> saw that on stack overflow
[12:08] <augustl> also tried setting it to a blank PyObject, same error
[12:09] <augustl> agronholm: what classes ae you using when doing what you described earlier?
[12:10] <augustl> the "load the script" part
[12:10] <agronholm> PythonInterpreter
[12:10] <agronholm> I just do interpreter = new PythonInterpreter()
[12:10] <agronholm> why would you need an argument for it
[12:13] <augustl> in order to set argv
[12:13] <agronholm> um, no
[12:14] <agronholm> you can just import the sys module and do it there
[12:14] <agronholm> unless you mean to only set argv once
[12:14] <augustl> if I don't pass it any arguments, I get the same error
[12:14] <augustl> the stack trace I pasted above
[12:14] <agronholm> show me your code
[12:14] <augustl> https://www.refheap.com/paste/5099
[12:15] <agronholm> ok this is a language I don't know
[12:15] <augustl> that yields https://www.refheap.com/paste/5098 (same stack trace as I pasted earlier)
[12:15] <augustl> agronholm: as I said, it's in Clojure
[12:15] <augustl> you're seeing the Java interop. Shouldn't be too hard to guess what it does ;)
[12:15] <agronholm> did you try PySystemState.initialize() before constructing the interpreter?
[12:15] <augustl> no
[12:15] <agronholm> that's what I do in my code
[12:16] <augustl> it doesn't seem to have an initialize method
[12:16] <augustl> looking at the javadoc now
[12:16] <agronholm> it sure does
[12:16] <augustl> found it
[12:16] <augustl> still getting the same error
[12:17] <agronholm> sorry but this goes beyond my expertise
[12:17] <augustl> PythonInterpreter also has a static initialize method, guess I have to call it too
[12:17] <agronholm> I don't do that in my code
[12:18] <agronholm> still works fine
[12:18] <augustl> so you're able to call initialize on PySystemState and create a PythonInterpreter with no arguments, and call execfile on it?
[12:19] <augustl> all the examples I find online calls "exec" with a string. Seems nobody else is doing what I'm trying to do :)
[12:19] <agronholm> I don't call execfile
[12:19] <agronholm> I just do imports
[12:19] <augustl> I see, thanks
[12:19] <augustl> how do you do imports? Via exec?
[12:20] <agronholm> via org.python.core.imp
[12:20] <agronholm> imp.load(modulename)
[12:20] <augustl> tnx
[12:21] <augustl> jython seems to be all about singletons :)
[12:21] <agronholm> that should change in Jython 3.x
[12:21] <augustl> nice
[12:21] <agronholm> whenever we get around to that :)
[12:22] <augustl> how do I set up the "load path" for jython? As in the path where it looks for modules when I import
[12:22] <agronholm> either modify sys.path or use the java class path
[12:23] <augustl> what's a good way of modifying sys path? Via exec?
[12:23] <agronholm> that's one way
[12:23] <agronholm> or you could just import the sys module and assign to the path attribute
[12:23] <agronholm> append I mean
[12:25] <augustl> should I do all of this via exec? Or are there java methods for doing it?
[12:26] <agronholm> PyObject sysmodule = imp.load("sys");
[12:26] <augustl> I see, thanks
[12:26] <agronholm> PyObject path = sysmodule.__getattr__("path");
[12:26] <agronholm> etc.
[12:30] <augustl> is there a beta of 3.x around? The singletons are causing trouble
[12:31] <augustl> or do you know if there's a way to create multiple jython "runtimes" in one jvm?
[12:31] <agronholm> work on 3.x has not even started
[12:32] <agronholm> why do you need to create multiple runtimes?
[12:32] <augustl> because my API allows for multiple concurrent compilations, where each instance is configurable as to where the python script actually exists on disk etc
[12:32] <augustl> so loading it into a shared run-time is a bit problematic
[12:33] <agronholm> sounds like you'd be better off just running it as a shell script
[12:33] <augustl> the problem with that is that the shell script itself is bundled inside a .jar file..
[12:33] <augustl> so python won't find any of the scripts
[12:33] <agronholm> can't you just extract it then?
[12:33] <augustl> not sure how to do that
[12:33] <agronholm> jar is just a zip file
[12:34] <augustl> indeed, but no dependency managers unzip them
[12:34] <agronholm> you're a programmer
[12:34] <augustl> haha
[12:34] <agronholm> surely you can do something as simple as unzippin a file?
[12:34] <augustl> it's not that simple
[12:34] <agronholm> why not?
[12:34] <augustl> have you programmed on the JVM before?
[12:35] <agronholm> I used to do Java before I got into Python
[12:35] <augustl> I see
[12:35] <agronholm> and I did mention how "my" code runs Jython
[12:35] <agronholm> my Java app that is
[12:35] <augustl> typically, you just say in a config file "I want version x of package y". Then a class loader system will resolve that jar file and load it into your jvm
[12:36] <augustl> you don't know where the .jar file is or even if you have access to unzipping and writing to the file system at all
[12:36] <agronholm> that's maven, not standard java
[12:36] <agronholm> you asked me if I programmer on the JVM before, and I have
[12:36] <agronholm> but like I said yesterday, I've never used maven
[12:36] <augustl> I'm not following
[12:36] <agronholm> what config file is this?
[12:37] <augustl> in Clojure, you typically use leiningen, which uses maven under the hood
[12:37] <agronholm> well that's definitely not a part of the JVM
[12:37] <augustl> the config file is called project.clj and you just give it a list of package names
[12:37] <augustl> still not following :)
[12:37] <agronholm> you asked me if I've programmed on the JVM before
[12:38] <agronholm> I fail to see the relevance
[12:38] <augustl> I'm sorry if I phrased my question in a bad way
[12:38] <augustl> perhaps a better question would have been if you have experience in working on the java platform
[12:38] <agronholm> I do
[12:38] <agronholm> but I still have never used maven
[12:38] <augustl> typically you use dependency managers so you don't have a system of accessing the .jar files you depend on directly
[12:38] <agronholm> I've never used any sort of dependency manager on Java
[12:39] <augustl> I seem to have offended you, sorry
[12:39] <agronholm> you seem to assume that if one has done Java programming, they've automatically used a dependency manager
[12:40] <augustl> so there's no way to have multiple jython runtimes in the same java process?
[12:40] <agronholm> I'm no expert on that, but it's problematic
[12:41] <augustl> are there any other python implementations for the jvm that you're aware of?
[12:41] <agronholm> none
[12:41] <agronholm> seems odd to me that you can given PythonInterpreter the path to the script but you can't, for example, read it to memory yourself
[12:41] <agronholm> *give
[12:46] <augustl> if the PythonInterpreter stuff worked I'd definitely use that
[12:46] <augustl> as it seems to be instance based
[12:46] <agronholm> I don't think you follow
[12:47] <agronholm> if you could read it to memory, you could write it to a file and call CPython in a shell
[12:47] <augustl> what's CPython? The default python?
[12:47] <agronholm> the mainline python
[12:47] <augustl> that's one way of doing it I suppose - read out the File instances from the classpath, write them to some folder in the project that depends on my package, and point to those
[12:51] <augustl> best method so far :)
[13:00] * tcrawley-away (~tcrawley@redhat/jboss/tcrawley) has left #jython
[13:04] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[14:24] * shashank (~shashank@75-171-232-129.hlrn.qwest.net) has joined #jython
[14:45] * lheuer (~Adium@unaffiliated/lheuer) Quit (Quit: Leaving.)
[15:25] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[15:28] * ohumbel (~ohumbel@adsl-89-217-238-173.adslplus.ch) has joined #jython
[15:28] * Oti (~ohumbel@adsl-89-217-238-173.adslplus.ch) Quit (Read error: Connection reset by peer)
[15:28] * ohumbel is now known as Oti
[15:30] * ohumbel (~ohumbel@adsl-89-217-238-173.adslplus.ch) has joined #jython
[15:30] * Oti (~ohumbel@adsl-89-217-238-173.adslplus.ch) Quit (Read error: Connection reset by peer)
[15:30] * ohumbel is now known as Oti
[15:58] * catmtking (~catmtking@108.224.122.111) has joined #jython
[16:46] * catmtking (~catmtking@108.224.122.111) Quit (Quit: catmtking)
[17:00] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[17:38] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[18:24] * Oti (~ohumbel@adsl-89-217-238-173.adslplus.ch) Quit (Read error: Connection reset by peer)
[18:24] * ohumbel (~ohumbel@adsl-89-217-238-173.adslplus.ch) has joined #jython
[18:26] * Oti (~ohumbel@adsl-89-217-238-173.adslplus.ch) has joined #jython
[18:26] * ohumbel (~ohumbel@adsl-89-217-238-173.adslplus.ch) Quit (Read error: Connection reset by peer)
[18:45] * lheuer (~Adium@unaffiliated/lheuer) Quit (Quit: Leaving.)
[18:58] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[19:59] * xymox_ (xymox@2001:470:1f09:f3a::4) Quit (K-Lined)
[20:51] * ohumbel (~ohumbel@adsl-89-217-238-173.adslplus.ch) has joined #jython
[20:51] * Oti (~ohumbel@adsl-89-217-238-173.adslplus.ch) Quit (Read error: Connection reset by peer)
[20:51] * ohumbel is now known as Oti
[20:51] * ohumbel (~ohumbel@adsl-89-217-238-173.adslplus.ch) has joined #jython
[20:51] * Oti (~ohumbel@adsl-89-217-238-173.adslplus.ch) Quit (Read error: Connection reset by peer)
[20:51] * ohumbel is now known as Oti
[20:54] * ohumbel (~ohumbel@adsl-89-217-238-173.adslplus.ch) has joined #jython
[20:54] * Oti (~ohumbel@adsl-89-217-238-173.adslplus.ch) Quit (Read error: Connection reset by peer)
[20:54] * ohumbel is now known as Oti
[23:03] * sera_ (~sera@gentoo/developer/sera) has joined #jython
[23:04] * sera (~sera@gentoo/developer/sera) Quit (Ping timeout: 240 seconds)

Index

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