#jython IRC Log (v0.9)

Index

IRC Log for 2010-11-10

Timestamps are in GMT/BST.

[0:00] * jbaker_ (~jimbaker@173-8-237-101-Colorado.hfc.comcastbusiness.net) Quit (Client Quit)
[0:00] <Oti> Taggnostr: cool, and sorry i missed to answer sooner, and thanks again!
[0:01] <agronholm> am I on the contributor list?
[0:01] <Taggnostr> thanks to you for the review :)
[0:01] <agronholm> I would hope so, I've even contributed a tiny bit of code in addition to several bug reports
[0:05] <Oti> agronholm: you are in ACKNOLEDGEMENTS, but not on the website
[0:05] <agronholm> ok
[0:07] <Oti> ACKNOWLEDGMENTS thats the name
[0:08] * Razec (~razec@201-1-113-247.dsl.telesp.net.br) has joined #jython
[0:09] * Razec (~razec@201-1-113-247.dsl.telesp.net.br) has left #jython
[0:10] * Razec (~razec@201-1-113-247.dsl.telesp.net.br) has joined #jython
[0:10] * Razec (~razec@201-1-113-247.dsl.telesp.net.br) has left #jython
[0:16] * raymondh2 is now known as raymondh
[0:17] <Oti> agronholm - you're now in both places (revision 7171)
[0:17] <agronholm> Oti: thanks
[0:17] <Oti> agronholm: thanks to you (as soon as we update the website, you'll be online, too)
[0:19] <Oti> jimbaker: how would you write the test without timing dependency if you want to prove that the swing program does not exit on end of py file?
[0:20] * jimbaker (~jimbaker@184-96-38-253.hlrn.qwest.net) has joined #jython
[0:20] <agronholm> check exit code?
[0:22] <Oti> why not :-)
[0:29] * enebo (~enebo@184-97-220-196.mpls.qwest.net) Quit (Quit: enebo)
[0:34] * jimbaker (~jimbaker@184-96-38-253.hlrn.qwest.net) Quit (Quit: jimbaker)
[0:36] * verterok (~ggonzalez@unaffiliated/verterok) Quit (Ping timeout: 245 seconds)
[0:37] * verterok (~ggonzalez@190.188.243.32) has joined #jython
[0:37] * verterok (~ggonzalez@190.188.243.32) Quit (Changing host)
[0:37] * verterok (~ggonzalez@unaffiliated/verterok) has joined #jython
[1:04] * skay (~Adium@c-71-239-171-114.hsd1.il.comcast.net) has joined #jython
[1:07] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) has joined #jython
[1:07] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) Quit (Read error: Operation timed out)
[1:21] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Remote host closed the connection)
[1:21] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[1:30] <Oti> no luck with exit codes - good night
[1:30] * Oti (~ohumbel@adsl-89-217-220-64.adslplus.ch) Quit (Quit: Oti)
[1:31] * jimbaker (~jimbaker@c-24-8-39-78.hsd1.co.comcast.net) has joined #jython
[1:31] * jbaker_ (~jimbaker@c-24-8-39-78.hsd1.co.comcast.net) has joined #jython
[1:31] * jimbaker (~jimbaker@c-24-8-39-78.hsd1.co.comcast.net) Quit (Read error: Connection reset by peer)
[1:36] <jbaker_> agronholm: did you try forcing the proper overload? jython's algorithm is pretty naive, but it seems to work in practice. also i think it's about the last thing we would change
[1:41] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) Quit (Ping timeout: 245 seconds)
[1:53] * lopex (lopex@chello089076044027.chello.pl) Quit ()
[1:56] <agronholm> jbaker_: what are you talking about?
[1:56] <jbaker_> you mentioned this earlier: "the problem was jython selecting the wrong overloaded version of PropertyChangeSupport.firePropertyChange() so I ended up rolling my own PropertyChangeEvents and then firing them:
[1:56] <jbaker_> "
[1:58] <jbaker_> i don't know the signatures here, but in general you can force a specific overloading by an appropriate boxing
[1:58] <agronholm> jbaker_: http://bitbucket.org/agronholm/jython-swingutils/src/tip/swingutils/beans.py#cl-32
[2:00] <agronholm> the only other option was to forcibly extract the proper overloaded version by reflection
[2:01] <agronholm> this seemed quite a bit easier
[2:01] <jbaker_> agronholm: how is this overloaded?
[2:01] <agronholm> PropertyChangeSupport.firePropertyChange() has quite a few overloaded versions
[2:02] <jbaker_> ok, we're talking about http://download.oracle.com/javase/1.5.0/docs/api/java/awt/Component.html#firePropertyChange(java.lang.String, boolean, boolean)
[2:02] <jbaker_> and variants
[2:02] <agronholm> yes
[2:03] <agronholm> apparently Jython selects the int, int version if I invoke it with python Booleans
[2:03] <agronholm> err, bool
[2:03] <agronholm> which is why I got booleans converted to ints as a side effect
[2:03] <jbaker_> so sure, just pick the one you want by wrapping with a java.lang.Boolean
[2:04] <agronholm> jbaker_: that means I should have a list of if..else constructs that determine the values of the types
[2:04] <jbaker_> in reflected method, or whatever it is in jython, it will go for an exact match
[2:04] <agronholm> *types of the values
[2:04] <jbaker_> yeah, i don't know the logic. maybe reflection is easier in your case
[2:05] <agronholm> well it's NOT, that's what I'm trying to tell you
[2:05] <jbaker_> in any event, you're doing the same thing as jython, just with some more overhead
[2:05] <agronholm> I can just create my own PropertyChangeEvents and feed them to PropertyChangeSupport
[2:05] <agronholm> like I'm doing in the committed version
[2:05] <agronholm> much easier than trying to figure out the correct boxing, or reflecting a certain overloaded version
[2:05] <jbaker_> sounds like you have a good solution then. just wanted to mention that boxing is one alternative that can fix this problem
[2:06] <agronholm> I know
[2:06] <agronholm> but it's not practical in this case
[2:06] <agronholm> if this was application code, it might be doable
[2:06] <agronholm> but as a published library, not so
[2:06] <jbaker_> got it
[2:07] <agronholm> I was just wondering why jython selected the int, int version instead of the boolean, boolean version
[2:08] * pr3d4t0r (~cu4cu4@varenka.cime.net) has left #jython
[2:08] <agronholm> sounds like it selects the first variant that it can coerce the input to fit
[2:08] <jbaker_> in general, this is probably the oldest piece of code in jython
[2:09] <jbaker_> we have kept this heuristic stable because it would break a lot of user code if we were to change
[2:09] <agronholm> probably a good idea
[2:10] <jbaker_> it does predate the addition of bool to python, which was added in 2.3 - http://docs.python.org/release/2.3/whatsnew/section-bool.html
[2:12] <jbaker_> it is possible to have an alternative heuristic. i have since forgotten the details, but it's probably doable in the scope of a pep302 new import hook
[2:13] <jbaker_> if i'm not mistaken, this is done in some of the test code
[2:18] <jbaker_> ok, you can see it in Lib/test/test_joverload.py - in this case, it's just being used to instrument for testing, but it could be an arbitrary change
[2:19] <jbaker_> if you were to intercept the java class at import (w/ a pep 302 import hook), you can modify the proxy as it's constructed. this is basically a hacked up version of what clamp is attempting to do
[2:20] <jbaker_> anyway, i guess the moral here is that python is a dynamic language, and jython's integration w/ java does allow some interesting flexibility
[2:33] * pr3d4t0r (~cu4cu4@varenka.cime.net) has joined #jython
[2:34] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) has joined #jython
[2:35] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[2:51] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Remote host closed the connection)
[3:39] * verterok (~ggonzalez@unaffiliated/verterok) Quit (Quit: leaving)
[3:55] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) Quit (Ping timeout: 245 seconds)
[5:00] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) Quit (Quit: Leaving.)
[5:13] * raymondh2 (~raymond@76.89.181.64) has joined #jython
[5:16] * raymondh (~raymond@76.89.181.64) Quit (*.net *.split)
[5:50] * juneau001 (~juneau@pool-72-69-204-203.chi01.dsl-w.verizon.net) Quit (Quit: juneau001)
[6:31] * skay (~Adium@c-71-239-171-114.hsd1.il.comcast.net) Quit (Quit: Leaving.)
[7:39] * jcp (~jw@bzflag/contributor/javawizard2539) Quit (Ping timeout: 264 seconds)
[7:39] * jcp (~jw@bzflag/contributor/javawizard2539) has joined #jython
[8:02] * jabley (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) has joined #jython
[8:31] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) has joined #jython
[8:34] * thobe (~Adium@212-162-171-110.skbbip.com) has joined #jython
[8:36] * raymondh2 (~raymond@76.89.181.64) Quit (Ping timeout: 245 seconds)
[9:40] * jabley (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) Quit (Ping timeout: 245 seconds)
[9:40] * seberg (~sebastian@vpn-3222.gwdg.de) has joined #jython
[9:59] * njoyce (~njoyce@124-150-116-187.dyn.iinet.net.au) Quit (Ping timeout: 276 seconds)
[10:09] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[10:11] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) has joined #jython
[10:17] * jabley (~jabley@87-84-49-84.absolutely2.mezzonet.net) has joined #jython
[10:18] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Ping timeout: 250 seconds)
[10:20] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[10:23] * Imek (~joe@host-195-188-251-108.reversezone.co.uk) has joined #jython
[10:49] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) Quit (Ping timeout: 240 seconds)
[11:11] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Remote host closed the connection)
[11:49] * seberg (~sebastian@vpn-3222.gwdg.de) Quit (Quit: Ex-Chat)
[12:07] * juneau001 (~juneau@FESS-116326-2462732-dp.dhcp.fnal.gov) has joined #jython
[12:07] * ohumbel (5390f2dc@gateway/web/freenode/ip.83.144.242.220) Quit (Ping timeout: 265 seconds)
[12:19] * AshleyT (~AshleyT@svatos.inf.ed.ac.uk) has joined #jython
[12:54] * AshleyT (~AshleyT@svatos.inf.ed.ac.uk) Quit (Remote host closed the connection)
[13:05] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) Quit (Ping timeout: 245 seconds)
[13:31] * Oti (~ohumbel@adsl-89-217-249-196.adslplus.ch) has joined #jython
[13:41] * seberg (~sebastian@134.76.218.194) has joined #jython
[13:45] * seberg (~sebastian@134.76.218.194) Quit (Client Quit)
[13:48] * cv223 (~joel@c-24-62-47-136.hsd1.ma.comcast.net) has joined #jython
[13:52] * cv223 (~joel@c-24-62-47-136.hsd1.ma.comcast.net) Quit (Client Quit)
[14:06] * cv223 (~joel@c-24-62-47-136.hsd1.ma.comcast.net) has joined #jython
[14:26] * cv223 (~joel@c-24-62-47-136.hsd1.ma.comcast.net) Quit (Quit: Leaving)
[14:30] * Oti (~ohumbel@adsl-89-217-249-196.adslplus.ch) Quit (Quit: Oti)
[14:31] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) has joined #jython
[14:51] * jcp (~jw@bzflag/contributor/javawizard2539) Quit (Read error: Operation timed out)
[14:58] * jcp (~jw@bzflag/contributor/javawizard2539) has joined #jython
[15:01] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[15:21] * cv223 (~joel@c-24-62-47-136.hsd1.ma.comcast.net) has joined #jython
[15:22] * enebo (~enebo@184-97-220-196.mpls.qwest.net) has joined #jython
[15:26] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) Quit (Ping timeout: 245 seconds)
[15:39] <cv223> Is there any way to get a smaller jar after bundling scripts (followed Wiki)?
[16:02] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) Quit (Quit: Ex-Chat)
[16:03] <cv223> Or, use the .class files directly without requiring the jython.jar?
[16:04] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[16:19] <jbaker_> ev223: what you're proposing to do is certainly doable. however, i don't think anyone has worked on jar minimization
[16:24] <cv223> jbaker_: Ok. I would rather use the .class files directly. Is there a way to do that?
[16:24] <jbaker_> are you referring to the generated $py.class files?
[16:25] <jbaker_> you can always just remove the source code if that's what you mean
[16:25] <cv223> Yes.
[16:25] <jbaker_> there are tools that will introspect the source code, so they will need it
[16:25] <jbaker_> but you are not likely using them
[16:26] <cv223> I've tried running java with the $py.class files, but it still needs the jython.jar.
[16:27] <jbaker_> sure. you can also strip the jar
[16:27] <cv223> How do I determine what is needed from the jar?
[16:27] <jbaker_> just unpack with jar, remove what you don't need, repack and test
[16:27] <jbaker_> ev223: that's something you have to try out ;)
[16:28] <jbaker_> please note in the future, our efforts to optimize code will require source
[16:28] <cv223> Heh.
[16:28] <cv223> Ok.
[16:29] <cv223> I've tried autojar, but it haven't got it all working, yet.
[16:29] <jbaker_> ev223: if you're successful, please blog about it and/or add to the wiki
[16:29] <cv223> Happy to.
[16:29] <cv223> Big if, tho'
[16:30] <jbaker_> again, in general you should be able to remove source files. also there are some obvious candidates - if you're not using unicodedata for example
[16:30] <jbaker_> note that frameworks like django tend to inspect source
[16:31] <cv223> I'll try removing the source files - I hadn't tried that, yet.
[16:31] <cv223> Ok. My application is fairly small.
[16:34] * lopex (lopex@chello089076044027.chello.pl) has joined #jython
[16:40] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) Quit (Quit: Ex-Chat)
[16:45] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[17:04] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) has joined #jython
[17:32] * jabley (~jabley@87-84-49-84.absolutely2.mezzonet.net) Quit (Quit: jabley)
[17:40] <cv223> jbaker_: Ok, I tried removing the source files, but still won't run without jython.jar
[17:40] * pr3d4t0r is now known as pr3d4k4t
[17:41] <cv223> I then started pulling the required package out of jython.jar.
[17:41] <cv223> *packages*
[17:41] <cv223> Getting to the point where Lib/os.py requires newString from org.python.core.Py
[17:42] <cv223> Which I cannot find in jython.jar
[17:44] <cv223> But it must be there somewhere, because running against the full jython.jar works.
[17:44] <jbaker_> ev223: not certain what you're seeing here. org.python.core.Py is pretty much the most required piece of code in jython :)
[17:45] <jbaker_> since almost everything dispatches through it, for good or bad
[17:45] <cv223> Yes, I've pulled in all the org.python.core.Py* classes.
[17:45] <jbaker_> yeah, you definitely everything in that namespace as a first approx
[17:46] <cv223> Don't know why it can't find newString
[17:46] <jbaker_> in terms of org.python.*
[17:46] <jbaker_> you can run w/o source, or even large chunks of the stdlib, but the org.python packages would require a lot more precision surgery to cut down
[17:49] <cv223> Ok. I'm not to the precision stage, yet.
[17:49] <cv223> I'm pulling in big chunks of jython.jar, just to get the concept.
[17:50] <cv223> If I explode jython.jar in my current directory and run java -cp .
[17:50] <cv223> it can't find the Lib/ files
[17:52] <jbaker_> ev223: modify your sys.path
[17:53] <cv223> Hmm, ok.
[17:54] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Remote host closed the connection)
[17:55] * pr3d4k4t is now known as pr3d4t0r
[17:58] * enebo (~enebo@184-97-220-196.mpls.qwest.net) Quit (Quit: enebo)
[18:00] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[18:30] * srcerer (~chatzilla@dns2.klsairexpress.com) Quit (Read error: Connection reset by peer)
[18:33] * jabley (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) has joined #jython
[18:36] * thobe (~Adium@212-162-171-110.skbbip.com) Quit (Quit: Leaving.)
[18:37] * Imek (~joe@host-195-188-251-108.reversezone.co.uk) Quit (Quit: Good night, and have a pleasant tomorrow.)
[18:45] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Remote host closed the connection)
[18:48] * AshleyT (~AshleyT@5ac335d9.bb.sky.com) has joined #jython
[18:57] * thijstriemstra (~thijstrie@i219160.upc-i.chello.nl) has joined #jython
[19:01] * thijstriemstra (~thijstrie@i219160.upc-i.chello.nl) Quit (Ping timeout: 240 seconds)
[19:07] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[19:20] * srcerer (~chatzilla@dns2.klsairexpress.com) has joined #jython
[19:26] * srcerer (~chatzilla@dns2.klsairexpress.com) Quit (Read error: Connection reset by peer)
[19:37] * cv223 (~joel@c-24-62-47-136.hsd1.ma.comcast.net) Quit (Quit: Leaving)
[19:37] * bowenl2 (~bowenl2@rrcs-69-193-6-146.nys.biz.rr.com) has joined #jython
[19:44] * jabley_ (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) has joined #jython
[19:47] * njoyce (~njoyce@202-173-171-58.dyn.iinet.net.au) has joined #jython
[19:47] * jabley (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) Quit (Ping timeout: 245 seconds)
[19:47] * jabley_ is now known as jabley
[19:55] * srcerer (~chatzilla@dns2.klsairexpress.com) has joined #jython
[20:02] * juneau001 (~juneau@FESS-116326-2462732-dp.dhcp.fnal.gov) Quit (Quit: juneau001)
[20:18] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) has joined #jython
[20:26] * jbaker_ (~jimbaker@c-24-8-39-78.hsd1.co.comcast.net) Quit (Quit: jbaker_)
[20:47] * AshleyT (~AshleyT@5ac335d9.bb.sky.com) Quit (Ping timeout: 260 seconds)
[20:49] * Kami_ (~kami@86.58.76.208) has left #jython
[20:54] * jimbaker (~jimbaker@64.134.11.216) has joined #jython
[21:01] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) Quit (Ping timeout: 240 seconds)
[21:06] * stakkars (~tismer@i59F7F165.versanet.de) Quit (Ping timeout: 255 seconds)
[21:12] * stakkars (~tismer@i577B59A4.versanet.de) has joined #jython
[21:16] * jabley (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) Quit (Quit: jabley)
[21:36] * juneau001 (~juneau@pool-72-69-204-203.chi01.dsl-w.verizon.net) has joined #jython
[21:53] * njoyce (~njoyce@202-173-171-58.dyn.iinet.net.au) Quit (Ping timeout: 265 seconds)
[22:04] * jimbaker (~jimbaker@64.134.11.216) Quit (Quit: jimbaker)
[22:14] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Remote host closed the connection)
[22:27] * jimbaker (~jimbaker@c-24-8-39-78.hsd1.co.comcast.net) has joined #jython
[22:30] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 276 seconds)
[22:33] * jabley (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) has joined #jython
[22:43] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[23:02] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Remote host closed the connection)
[23:29] * lopex (lopex@chello089076044027.chello.pl) Quit ()
[23:57] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) has joined #jython

Index

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