#jython IRC Log (v0.9)

Index

IRC Log for 2011-07-31

Timestamps are in GMT/BST.

[0:02] * bender23 (~bender23@nrbg-4dbe6a9c.pool.mediaWays.net) has joined #jython
[0:02] * thobe (~Adium@c-69-181-180-174.hsd1.ca.comcast.net) has joined #jython
[0:58] * bender23 (~bender23@nrbg-4dbe6a9c.pool.mediaWays.net) Quit (Quit: Leaving.)
[1:08] * thobe (~Adium@c-69-181-180-174.hsd1.ca.comcast.net) Quit (Quit: Leaving.)
[1:51] * lopex (~lopx@84-10-213-252.dynamic.chello.pl) Quit (Ping timeout: 260 seconds)
[2:37] * wmeissner (~wmeissner@ppp59-167-223-31.static.internode.on.net) Quit (Ping timeout: 240 seconds)
[3:30] * wmeissner (~wmeissner@ppp59-167-223-31.static.internode.on.net) has joined #jython
[3:39] * wmeissner (~wmeissner@ppp59-167-223-31.static.internode.on.net) Quit (Ping timeout: 276 seconds)
[4:03] * wmeissner (~wmeissner@ppp59-167-223-31.static.internode.on.net) has joined #jython
[4:32] * thobe (~Adium@76.14.73.20) has joined #jython
[5:00] * thobe (~Adium@76.14.73.20) Quit (Quit: Leaving.)
[5:52] * jack-e (~jack-e@124-171-178-105.dyn.iinet.net.au) has joined #jython
[6:21] <luizribeiro> what is the best way to expose static java methods as jython global functions?
[6:21] <luizribeiro> (I'm running the JythonInterpreter from inside my application)
[7:06] <agronholm> luizribeiro: just import and call them?
[7:11] <luizribeiro> agronholm: yeap, but how can I do that from java?
[7:11] <agronholm> MacRohard: you don't need to do anything
[7:11] <agronholm> oops
[7:11] <agronholm> luizribeiro:
[7:12] <agronholm> or what do you mean
[7:12] <agronholm> I thought you said you wanted to use java static methods in jython
[7:12] <luizribeiro> I'll try to make myself more clear
[7:13] <luizribeiro> I have a few static methods in the class org.gephi.scripting.util.GyGlobals that I want to expose to jython
[7:13] <luizribeiro> for example
[7:13] <luizribeiro> there's the addFilter method, that I would like to expose as addFilter
[7:14] <agronholm> so just import GyGlobals and use those methods? what is the problem?
[7:14] <luizribeiro> (just addFilter, so that the user can type addFilter(foo, bar) on the scripting console)
[7:15] <agronholm> addFilter = GyGlobals.addFilter
[7:16] <luizribeiro> so I would have to write a python script that is preloaded everytime the interpreter is instantiated?
[7:19] <agronholm> or you can write some java code alongside that which you use to initialize the python interpreter
[7:19] <agronholm> but
[7:20] <agronholm> afaik you can't have globals that are available universally without importing first
[7:20] <agronholm> oh wait
[7:20] <agronholm> scripting console?
[7:20] <agronholm> then it could be possible
[7:20] <agronholm> but yeah you'd have to do some work first to import those names
[7:24] <luizribeiro> hmmm, okay
[7:24] <luizribeiro> thanks! that's what I wanted to know
[7:24] <luizribeiro> :)
[8:11] * haard_ (~haard@80.73.191.31) has joined #jython
[8:45] * thobe (~Adium@63-235-13-3.dia.static.qwest.net) has joined #jython
[8:58] * pr3d4t0r (~zhenya01@varenka.cime.net) Quit (Quit: WeeChat 0.3.0)
[9:02] * pr3d4t0r (~zhenya01@varenka.cime.net) has joined #jython
[9:05] <haard_> Is there a way to overload/replace an existing java class (for mocking purposes) in runtime?
[10:07] * thobe (~Adium@63-235-13-3.dia.static.qwest.net) Quit (Ping timeout: 240 seconds)
[11:39] * lopex (~lopx@84-10-213-252.dynamic.chello.pl) has joined #jython
[12:23] <pr3d4t0r> Hola.
[12:23] <pr3d4t0r> agronholm!!
[13:49] * plankton (~kvirc@189.31.252.116) has joined #jython
[13:50] <plankton> :)
[13:57] * plankton (~kvirc@189.31.252.116) Quit (Quit: KVIrc 4.0.2 Insomnia http://www.kvirc.net/)
[14:35] * Trundle (~andy@python/site-packages/trundle) has joined #jython
[15:21] * jack-e (~jack-e@124-171-178-105.dyn.iinet.net.au) Quit (Quit: jack-e)
[15:55] * lopexx (~lopx@84-10-213-252.dynamic.chello.pl) has joined #jython
[15:55] * lopex (~lopx@84-10-213-252.dynamic.chello.pl) Quit (Ping timeout: 246 seconds)
[15:55] * lopexx (~lopx@84-10-213-252.dynamic.chello.pl) Quit (Client Quit)
[15:56] * lopex (~lopx@84-10-213-252.dynamic.chello.pl) has joined #jython
[16:12] <luizribeiro> anyone here with knowledge of jython's inner-workings? I'm trying to fix issue 1764 from the bug tracker here (once again)...
[16:17] * lopexx (~lopx@84-10-213-252.dynamic.chello.pl) has joined #jython
[16:20] * lopex (~lopx@84-10-213-252.dynamic.chello.pl) Quit (Ping timeout: 258 seconds)
[16:20] * lopexx (~lopx@84-10-213-252.dynamic.chello.pl) Quit (Client Quit)
[16:21] * lopex (~lopx@84-10-213-252.dynamic.chello.pl) has joined #jython
[16:45] * thobe (~Adium@63-235-13-3.dia.static.qwest.net) has joined #jython
[17:15] * lopex (~lopx@84-10-213-252.dynamic.chello.pl) Quit ()
[17:22] * lopex (~lopx@84-10-213-252.dynamic.chello.pl) has joined #jython
[17:26] * lopex (~lopx@84-10-213-252.dynamic.chello.pl) Quit (Client Quit)
[17:27] * lopex (~lopx@84-10-213-252.dynamic.chello.pl) has joined #jython
[19:31] * millertimek1a2m3 (~millertim@c-71-227-188-237.hsd1.wa.comcast.net) has joined #jython
[19:34] * millertimek1a2m3 (~millertim@c-71-227-188-237.hsd1.wa.comcast.net) Quit (Quit: Leaving)
[19:34] * millertimek1a2m3 (~millertim@c-71-227-188-237.hsd1.wa.comcast.net) has joined #jython
[19:52] <agronholm> pr3d4t0r: hi
[20:02] * haard_ (~haard@80.73.191.31) Quit (Quit: flippetyflop)
[20:30] <pjenvey> luizribeiro - wee that's a fun one
[20:31] <pjenvey> luizribeiro - so that is most likely a Compiler bug
[20:31] <pjenvey> the jython compiler is generating bad bytecode for that
[20:32] <pjenvey> so what you want to do is, first generate the .class file with the bad bytecode on disk so you can introspect it later
[20:32] <pjenvey> put those 3 lines in a .py file, run jython in the same dir, and then import it
[20:32] <pjenvey> that should trigger the error but you should have a $py.class file generated in the dir
[20:32] <pjenvey> then you'll want to go through basically these steps: http://dunderboss.blogspot.com/2008/10/debugging-jython-compiler.html
[20:39] <pjenvey> luizribeiro - actually the #1764 bug looks suspiciously similar to the bug I described in the blog post
[20:41] <pjenvey> whereas #1764 is setting an attribute (visitAttribute in the Compiler, foo.bar = baz) and the sympy bug was visitSubscript foo[bar] = baz
[20:49] * Trundle (~andy@python/site-packages/trundle) Quit (Ping timeout: 240 seconds)
[20:58] * millertimek1a2m3 (~millertim@c-71-227-188-237.hsd1.wa.comcast.net) Quit (Quit: Leaving)
[22:22] * jabley (u2487@gateway/web/irccloud.com/x-zufelnengcarwdta) Quit (Quit: Connection closed for inactivity)
[22:49] * millertimek1a2m3 (~millertim@c-71-227-188-237.hsd1.wa.comcast.net) 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).