#jython IRC Log (v0.9)

Index

IRC Log for 2013-05-19

Timestamps are in GMT/BST.

[0:23] * fvox13 (~stevensmi@173-45-242-243.slicehost.net) Quit (Read error: Operation timed out)
[0:23] * fvox13 (~stevensmi@173-45-242-243.slicehost.net) has joined #jython
[1:12] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) Quit (Ping timeout: 276 seconds)
[1:33] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) has joined #jython
[1:36] * lheuer1 (~Adium@blfd-4db0e375.pool.mediaWays.net) has joined #jython
[1:39] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 260 seconds)
[1:50] * lheuer1 (~Adium@blfd-4db0e375.pool.mediaWays.net) Quit (Quit: Leaving.)
[2:18] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) Quit (Ping timeout: 276 seconds)
[2:29] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) has joined #jython
[2:36] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) Quit (Ping timeout: 276 seconds)
[2:49] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) has joined #jython
[3:29] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) Quit (Remote host closed the connection)
[4:54] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[5:06] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) has joined #jython
[5:25] * thereisnospoon_ (~thereisno@113-61-86-28.static.qld.dsl.net.au) has joined #jython
[5:26] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) Quit (Ping timeout: 264 seconds)
[5:38] * Juneau001 (~Juneau@50.44.45.165) has joined #jython
[5:41] * thereisnospoon_ (~thereisno@113-61-86-28.static.qld.dsl.net.au) Quit (Ping timeout: 260 seconds)
[5:44] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) has joined #jython
[6:13] * purplefox (~purplefox@host-80-43-244-70.as13285.net) has joined #jython
[6:49] * Juneau001 (~Juneau@50.44.45.165) Quit (Quit: Juneau001)
[6:54] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) Quit (Ping timeout: 256 seconds)
[7:06] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) has joined #jython
[7:16] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) Quit (Ping timeout: 256 seconds)
[7:20] * Juneau001 (~Juneau@50.44.45.165) has joined #jython
[7:29] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) has joined #jython
[7:36] * Juneau001 (~Juneau@50.44.45.165) Quit (Quit: Juneau001)
[7:48] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) Quit (Remote host closed the connection)
[7:54] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) has joined #jython
[8:06] * purplefox (~purplefox@host-80-43-244-70.as13285.net) Quit (Ping timeout: 256 seconds)
[8:08] * purplefox (~purplefox@host-80-43-244-70.as13285.net) has joined #jython
[8:35] * purplefox (~purplefox@host-80-43-244-70.as13285.net) Quit (Ping timeout: 276 seconds)
[11:43] * purplefox (~purplefox@host-80-43-244-70.as13285.net) has joined #jython
[11:45] * slukell (~slukell@ppp121-45-168-23.lns20.syd6.internode.on.net) has joined #jython
[12:12] * slukell (~slukell@ppp121-45-168-23.lns20.syd6.internode.on.net) Quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org)
[12:12] * purplefox (~purplefox@host-80-43-244-70.as13285.net) Quit (Ping timeout: 264 seconds)
[13:43] * Juneau001 (~Juneau@50.44.45.165) has joined #jython
[14:16] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) Quit (Ping timeout: 256 seconds)
[14:28] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) has joined #jython
[14:38] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) Quit (Ping timeout: 260 seconds)
[14:50] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) has joined #jython
[14:51] * purplefox (~purplefox@host-80-43-244-70.as13285.net) has joined #jython
[16:15] * lheuer (~Adium@unaffiliated/lheuer) Quit (Quit: Leaving.)
[16:19] * purplefox (~purplefox@host-80-43-244-70.as13285.net) Quit (Ping timeout: 260 seconds)
[18:11] * clajo04 (~clajo04@pool-108-29-162-59.nycmny.fios.verizon.net) Quit (Ping timeout: 256 seconds)
[18:45] * clajo04 (~clajo04@pool-108-46-137-135.nycmny.fios.verizon.net) has joined #jython
[19:01] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[21:30] * Juneau001 (~Juneau@50.44.45.165) Quit (Quit: Juneau001)
[22:16] * sidrero (~sidrero@80-219-172-138.dclient.hispeed.ch) has joined #jython
[22:16] <sidrero> hi
[22:17] <sidrero> can I import CPython libraries written in C such as numpy?
[22:17] <agronholm> no
[22:18] <sidrero> any implementation of numpy for Jython?
[22:18] <agronholm> no
[22:18] <sidrero> what do you use for linear algebra?
[22:18] <agronholm> I don't do linear algebra
[22:18] <agronholm> and if I did, I'd use a java lib for that
[22:19] <sidrero> any suggestion?
[22:19] <agronholm> nope, I haven't looked into it
[22:19] <sidrero> ok, thanks!
[22:19] <agronholm> may I ask what your reason for using jython is?
[22:19] <agronholm> that is, instead of CPython
[22:19] <sidrero> yes
[22:19] <sidrero> let's say there is a program written in java
[22:20] <sidrero> if I would like to extend it
[22:20] <sidrero> the direct way would be to write everything in java
[22:20] <sidrero> but I dont know java
[22:20] <sidrero> I was wondering
[22:20] <sidrero> if I could do it using jython, so that I learn some java, but can still use python syntax
[22:21] <agronholm> but you need to use numpy
[22:21] <agronholm> and that's not going to happen
[22:21] <sidrero> well, i say numpy because that's what I know right now
[22:21] <sidrero> if there is something else, why not
[22:22] <agronholm> you're going to have to look for an alternative
[22:22] <sidrero> indee
[22:22] <agronholm> I'd be surprised if there wasn't one
[22:22] <sidrero> yeah, i guess so
[22:23] <sidrero> If I write an application in Jython, is there a way to compile it to java class, so that a program written in java would understand it?
[22:24] <agronholm> no
[22:24] <sidrero> any workaround, like for example write a javaclass that invokes jython and from there run my jython code?
[22:24] <agronholm> you would have to launch a Jython interpreter and extract instances of Python classes that implement some Java interface
[22:25] <sidrero> aha
[22:25] <sidrero> so, in summary, is jython appropiate for what I have in mind?
[22:26] <agronholm> jython comes with a lot of downsides, just make sure you understand those
[22:26] <agronholm> it adds a lot of weight to the app
[22:26] <agronholm> and performance isn't very good, especially with code that goes back and forth between Python and Java
[22:26] <sidrero> aha
[22:26] <sidrero> so, what is it good for?
[22:27] <agronholm> for apps that require tight python-java integration
[22:27] <agronholm> people have used it to write apps in Python for platforms that only accept JVM compatible code
[22:28] <sidrero> i See
[22:29] <sidrero> what do you use it for agronholm?
[22:29] <agronholm> I have an ERP client written half in java, half in Python
[22:29] <agronholm> Java's clumsiness was becoming too apparent so I switched to Python
[22:30] <sidrero> interesting
[22:31] <sidrero> so, in your case you have to go from java to python and back? is it slow?
[22:31] <sidrero> or you write classes in java and use them from jython?
[22:31] <agronholm> I try to minimize the interactions of Java and Python, but where I fail to do that it is indeed slow
[22:32] <agronholm> particularly table cell renderers written in Python are painfully slow
[22:32] <sidrero> so I guess the way it works best is import java classes and then use them in jython but not going back?
[22:32] <agronholm> if you use java classes from python, you're interacting with java
[22:33] <sidrero> that's one direction, what about the other, from jython to java?
[22:34] <sidrero> what about stuff like JPype ?
[22:34] <agronholm> you mean from java to jython
[22:34] <agronholm> jpype is ancient and hasn't been maintained in years
[22:34] <agronholm> but py4j is what I use for another project
[22:35] <agronholm> it involves running python and java in separate processes
[22:35] <agronholm> and forming a transparent bridge over them
[22:35] <sidrero> it goes smoother?
[22:35] <agronholm> it's cleaner
[22:35] <agronholm> of course, python to java interaction still has a harsh performance penalty
[22:36] <agronholm> since data has to be serialized and then deserialized
[22:36] <sidrero> i see
[22:38] <sidrero> and in the case of this thing of extending a java app with python, what could be best? jython or py4j?
[22:38] <agronholm> I don't think py4j works from the java side
[22:38] <sidrero> I see
[22:38] <agronholm> it's used to "enslaving" a JVM for use in Python
[22:38] <agronholm> *for
[22:38] <sidrero> yep
[22:39] <sidrero> in Py4j how you initialize the JVM?, I mean in the examples it shows how to open the gateway to the JVM, but how you initialize it in first place?
[22:40] <agronholm> unless you're running development code, you're going to have to do that on your own
[22:41] <sidrero> yep, how?
[22:41] <agronholm> one simple way is to run the minimal example app provided in py4j
[22:42] <sidrero> ah, now I see it
[22:44] <sidrero> in which sense you found java clumsier than python?
[22:45] <agronholm> suppose you have a UI routine that needs to make several RPC calls
[22:45] <agronholm> you can't just have it block since that would freeze the UI
[22:46] <sidrero> i see
[22:46] <agronholm> so you need to start the RPC call and give it a callback object
[22:46] <agronholm> if you have three RPC calls, you need at least two callback classes
[22:47] <agronholm> which, of course, you can't define inline -- you have to make them nested classes
[22:47] <agronholm> in contrast to python where you can write it all in one method using generators
[22:47] <sidrero> aha
[22:54] <sidrero> quite instructive agronholm, thank you very much
[22:54] <agronholm> yw
[22:55] <sidrero> i go to bet, c ya
[22:55] * sidrero (~sidrero@80-219-172-138.dclient.hispeed.ch) Quit ()

Index

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