#jython IRC Log (v0.9)

Index

IRC Log for 2011-08-24

Timestamps are in GMT/BST.

[0:19] * Glycan (~wisepoiso@24.48.125.80) has joined #jython
[0:19] <Glycan> How would I mod MC with jython?
[0:23] <Glycan> And is there a function to make a executable, standalone, jar from a file?
[0:50] * iq (~iq@unaffiliated/iq) Quit (Ping timeout: 260 seconds)
[1:00] * enebo (~enebo@67-4-212-80.mpls.qwest.net) Quit (Quit: enebo)
[1:04] <agronholm> MC?
[1:28] * lopex (~lopx@84-10-213-252.dynamic.chello.pl) Quit ()
[1:43] * stakkars_ (~tismer@89.204.137.96) Quit (Ping timeout: 245 seconds)
[2:06] * juneau001 (~juneau@50-45-113-101.dklb.il.frontiernet.net) has joined #jython
[2:41] * Glycan (~wisepoiso@24.48.125.80) Quit (Ping timeout: 258 seconds)
[5:34] * thobe (~Adium@63-235-13-3.dia.static.qwest.net) has joined #jython
[7:18] * wmeissner (~wmeissner@ppp59-167-223-31.static.internode.on.net) Quit (Read error: Connection reset by peer)
[7:18] * wmeissner (~wmeissner@ppp59-167-223-31.static.internode.on.net) has joined #jython
[7:24] * MacRohard (rm@felix.lechat.ir) Quit (Ping timeout: 260 seconds)
[7:43] * MacRohard (rm@felix.lechat.ir) has joined #jython
[7:49] * wmeissner (~wmeissner@ppp59-167-223-31.static.internode.on.net) Quit (Ping timeout: 252 seconds)
[7:50] * wmeissner (~wmeissner@ppp59-167-223-31.static.internode.on.net) has joined #jython
[8:08] * pr3d4t0r (~zhenya01@varenka.cime.net) Quit (Ping timeout: 240 seconds)
[8:08] * Glycan (~wisepoiso@24.48.125.80) has joined #jython
[8:29] * pr3d4t0r (~zhenya01@varenka.cime.net) has joined #jython
[8:45] * Trundle (~andy@python/site-packages/trundle) has joined #jython
[9:07] * pr3d4t0r (~zhenya01@varenka.cime.net) Quit (Ping timeout: 240 seconds)
[9:33] * pr3d4t0r (~zhenya01@varenka.cime.net) has joined #jython
[9:37] * Glycan (~wisepoiso@24.48.125.80) Quit (Ping timeout: 260 seconds)
[9:44] * Glycan (~wisepoiso@24.48.125.80) has joined #jython
[10:17] * juneau001 (~juneau@50-45-113-101.dklb.il.frontiernet.net) Quit (Quit: juneau001)
[10:26] * lopex (531346b2@gateway/web/freenode/ip.83.19.70.178) has joined #jython
[11:06] * juneau001 (~juneau@fess-116326.dhcp.fnal.gov) has joined #jython
[12:17] * chacara (~chacara@201.57.231.226) has joined #jython
[12:20] * chacara (~chacara@201.57.231.226) Quit (Client Quit)
[12:22] * chacara (~chacara@201.57.231.226) has joined #jython
[12:43] * wmeissner_ (~wmeissner@ppp59-167-223-31.static.internode.on.net) has joined #jython
[12:43] * wmeissner (~wmeissner@ppp59-167-223-31.static.internode.on.net) Quit (Read error: Connection reset by peer)
[12:44] * wmeissner_ is now known as wmeissner
[12:54] * Glycan (~wisepoiso@24.48.125.80) has left #jython
[13:23] * enebo (~enebo@67-4-212-80.mpls.qwest.net) has joined #jython
[14:44] * lopex (531346b2@gateway/web/freenode/ip.83.19.70.178) Quit ()
[14:44] * chacara (~chacara@201.57.231.226) Quit (Quit: Leaving)
[14:44] * chacara (~chacara@201.57.231.226) has joined #jython
[14:45] * chacara (~chacara@201.57.231.226) Quit (Client Quit)
[14:45] * chacara (~chacara@201.57.231.226) has joined #jython
[15:39] * Arfrever (~Arfrever@gentoo/developer/Arfrever) has joined #jython
[15:47] * enebo (~enebo@67-4-212-80.mpls.qwest.net) Quit (Quit: enebo)
[15:58] * Trundle (~andy@python/site-packages/trundle) Quit (Remote host closed the connection)
[16:11] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) Quit (Ping timeout: 240 seconds)
[16:23] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[16:42] * wainersm (~wainersm@186.240.72.96) has joined #jython
[16:50] * wainersm (~wainersm@186.240.72.96) Quit (Quit: Ex-Chat)
[17:33] * abki|home (~abki|home@aul93-4-82-239-61-147.fbx.proxad.net) has joined #jython
[17:33] <abki|home> h??llo
[17:34] <abki|home> what's the prupose of *Derived class ?
[17:44] * Glycan (~wisepoiso@24.48.125.80) has joined #jython
[17:44] <Glycan> Hello
[17:46] <Glycan> I want to compile Python/Jython to pure Java
[17:46] <Glycan> How?
[17:46] * abki|home (~abki|home@aul93-4-82-239-61-147.fbx.proxad.net) Quit (Remote host closed the connection)
[17:55] <jimbaker> Glycan, Jython only compiles currently to java bytecode. among other things, it takes advantage of goto. new functionality, to be merged shortly, will use invokedynamic. fwiw, it might be possible to do what you ask of java 8
[17:55] <jimbaker> your other option is to jython 2.1, which does support it somewhat
[17:57] <jimbaker> i should point out that indy actually does allow us to remove the use of goto bytecodes in their main case, although we still need to do some work to remove them from generators
[17:58] <Glycan> Um
[17:59] <Glycan> Couldn't you just decompile the java btyecode, jimbaker?
[17:59] <Glycan> And how do you get java bytecode, at least?
[18:00] <jimbaker> Glycan, unfortunately the decompiled java bytecode is *not* legal java
[18:00] <Glycan> Why not?
[18:00] <jimbaker> Glycan, i recommend using the jad tool. you can see the bytecode in the $py.class files that are compiled
[18:01] <jimbaker> Glycan, because we use the goto bytecode :)
[18:01] <Glycan> goto bytecode?
[18:01] <Glycan> Um
[18:01] <Glycan> Don't the $py.class files require jython to run them?
[18:02] <jimbaker> Glycan, see http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc5.html
[18:03] <jimbaker> now it is possible to use goto for legally compiled java code. but jython doesn't, because goto is rather powerful for implementing certain things like forms of continuations
[18:04] <jimbaker> or for computed switches
[18:04] <jimbaker> the latter does can be efficiently replaced with methodhandles, as shashank recently demonstrated in his work
[18:05] <jimbaker> and yes, the $py.class files do require the jython runtime
[18:05] * lheuer (~heuer@unaffiliated/lheuer) has joined #jython
[18:05] <jimbaker> it's interesting stuff, but it won't do what you want, i'm afraid
[18:06] <Glycan> I need a class that can be run without jython
[18:10] <kuja> Write it in Java? :)
[18:10] <kuja> I know, I know. Ignore me.
[18:14] <Glycan> Grr
[18:15] <Glycan> So how do I do that?
[18:22] <Glycan> Even when I run $py.class, it doesn't work
[18:22] <Glycan> (tinyurl.com/lin)
[18:27] <Glycan> So how do I compile jython to 'standalone' java bytecode?!
[18:32] <Glycan> jimbaker?
[18:37] * Trundle (~andy@python/site-packages/trundle) has joined #jython
[18:42] <jimbaker> Glycan, that's not possible. you need the runtime.
[18:43] <jimbaker> it's certainly possible to have a subset of python that compiles directly to java. jython is not that implementation
[18:43] <Glycan> ...!
[18:44] <Glycan> Then what's the point?
[18:44] <Glycan> Oh, sorry
[18:44] <kuja> Serious?
[18:44] <Glycan> Manipulation of java with py
[18:44] <Glycan> Sorry, I thought you were missing both halves
[18:44] <kuja> You can also invoke Python routines from Java as well, with Jython
[18:45] <Glycan> Yes, but I don't control the Java
[18:45] <Glycan> I'm trying to write plugins and mods for minecraft
[18:45] <kuja> Heh
[18:45] <Glycan> ?
[18:45] <kuja> Then you are sorely mistaken on the usefulness of Jython
[18:45] <kuja> I wrote a Jython plugin interface for Bukkit
[18:45] <jimbaker> Glycan, i recommend taking a look at jythonbook.com - that will give you more insight
[18:45] <Glycan> Daminations
[18:45] <kuja> All my Minecraft plugins were written in Python.
[18:46] <kuja> So yes, it's possible to accomplish that end goal.
[18:46] <kuja> You simply need to stop using the standard Minecraft server and switch to something like Bukkit that would allow you to implement to appropriate plugin interface
[18:46] <Glycan> I do use bukkit
[18:47] <Glycan> But I was hoping to do mods to
[18:47] <kuja> Then you would know that it's possible to write Bukkit plugins in any language, really
[18:47] <Glycan> Implement to the appropriate plugin interface?
[18:47] <kuja> Hm, it's been a while since I did any of this, let me see if I can find you a reference
[18:49] <Glycan> I use bukkit, but this is the first I've decided o do stuff with it
[18:49] <kuja> There are existing plugins for Bukkit that seem to enable Python as an alternative plugin interface
[18:49] <kuja> One of them using Jython and the other using javax/Jython
[18:50] <kuja> A good reference on how to build your own Jython plugin interface would be the existing Java plugin interface.
[18:51] <Glycan> Um
[18:51] <Glycan> ?
[18:52] <Glycan> I've seen easyscript, but I havn't gotten it to work and it doesn't have a doc
[18:52] <kuja> Do you have any Java experience?
[18:52] <Glycan> Very little
[18:52] <Glycan> I can understand it, at most
[18:52] <Glycan> Aside from simple stuff which I've probably already forgotten
[18:53] <kuja> You have really 2 choices, you can choose to write your own Jython plugin for Bukkit that would allow you to write plugins in Python, or you can use an existing plugin like jxpl
[18:54] <kuja> I'm not even sure if jxpl still works though, heh. It would seem there has been little intererst.
[18:55] <Glycan> How does it work
[18:55] <Glycan> ?
[18:55] <kuja> Which?
[18:55] <kuja> My first suggestion or jxpl?
[18:55] <Glycan> jxpl
[18:55] <kuja> It works by using the javax.scripting engine
[18:55] <Glycan> Which is?
[18:55] <Glycan> And I *can't* mod vanilla with jython?
[18:56] <kuja> "The scripting API consists of interfaces and classes that define Java TM Scripting Engines and provides a framework for their use in Java applications."
[18:57] <kuja> I'm not entirely sure on HOW it works =) .. I personally chose the first option, write my own "PyBukkit" plugin
[18:57] <kuja> And no, you can't mod vanilla with Jython
[18:58] <kuja> But jxpl, AFAIK, doesn't concern you with the details, just lets you write in Bukkit plugins in whatever language supported by javax.script (which is quite a lot, including Ruby and Python for example)
[19:01] <kuja> The single biggest issue writing Python plugins for me is that objects weren't correctly recycled when reloading the plugin. Which is why I stopped using Python for Bukkit
[19:02] <kuja> Otherwise I would have released PyBukkit and used it more often :(
[19:04] * lheuer (~heuer@unaffiliated/lheuer) Quit (Ping timeout: 240 seconds)
[19:04] <Glycan> ?
[19:04] <Glycan> Objects weren't correctly recycled?
[19:05] <kuja> Yep... somewhere obviously references were left over and the garbage collector wasn't able to do its job
[19:05] <Glycan> ?
[19:05] <kuja> I spent days figuring it out, but meh my Java is limited
[19:06] <kuja> What that means is, there were unused objects being left in memory
[19:06] <kuja> And not being deleted
[19:08] <Glycan> Oh
[19:08] <kuja> So every time you would reload a Python-written Bukkit plugin, you'd always have a bunch of objects left over from the previous time it was loaded.
[19:08] <Glycan> Hang on, can't you use the old jythonc?
[19:09] <kuja> Not sure. Maybe?
[19:10] * lheuer (~heuer@unaffiliated/lheuer) has joined #jython
[19:11] <kuja> Of course even if it worked, you'd be locked into Jython 2.2 I think, someone may correct me on that :p
[19:14] * srcerer_ (~chatzilla@dns2.klsairexpress.com) has joined #jython
[19:16] * srcerer (~chatzilla@dns2.klsairexpress.com) Quit (Ping timeout: 258 seconds)
[19:16] * srcerer_ is now known as srcerer
[19:16] * juneau001 (~juneau@fess-116326.dhcp.fnal.gov) Quit (Quit: juneau001)
[19:23] * thobe (~Adium@63-235-13-3.dia.static.qwest.net) Quit (Quit: Leaving.)
[19:24] * chacara_ (~chacara@201.57.231.226) has joined #jython
[19:25] <Glycan> How do I get jython2.2
[19:25] <Glycan> ?
[19:25] * chacara (~chacara@201.57.231.226) Quit (Read error: Connection reset by peer)
[19:28] <Glycan> kuja?
[19:31] <kuja> Subversion: http://jython.svn.sourceforge.net/viewvc/jython/tags/Release_2_2/
[19:31] <Glycan> You can't apt-get it?
[19:32] <kuja> No, probably not.
[19:32] <kuja> You have to manually build it.
[19:34] <Glycan> Dammit
[19:34] <Glycan> How?
[19:34] <kuja> Uh, you need to learn to be a LITTLE more self resourceful :)
[19:35] <kuja> I'm really not about to explain how to build a Java prjoect.
[19:35] <kuja> However, there are instructions I believe on the website
[19:36] <Glycan> Oh, okay
[19:53] <Glycan> kuja: java -jar jython, right??
[19:53] <Glycan> ?
[19:54] <Glycan> Oops, sorry
[20:01] * Trundle (~andy@python/site-packages/trundle) Quit (Ping timeout: 240 seconds)
[20:50] * chacara_ (~chacara@201.57.231.226) Quit (Quit: Leaving)
[20:55] * lheuer (~heuer@unaffiliated/lheuer) Quit (Quit: Closing Time)
[21:30] * Glycan_ (~wisepoiso@24.48.125.80) has joined #jython
[21:32] * Glycan (~wisepoiso@24.48.125.80) Quit (Ping timeout: 264 seconds)
[23:14] * lopex (~lopx@84-10-213-252.dynamic.chello.pl) has joined #jython
[23:17] * Glycan_ (~wisepoiso@24.48.125.80) has left #jython
[23:20] * JStoker (jstoker@unaffiliated/jstoker) Quit (Ping timeout: 252 seconds)
[23:23] * lopex (~lopx@84-10-213-252.dynamic.chello.pl) Quit ()

Index

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