#jython IRC Log (v0.9)

Index

IRC Log for 2012-10-08

Timestamps are in GMT/BST.

[0:03] * xymox (xymox@unaffiliated/contempt) Quit (Read error: Connection reset by peer)
[0:03] * xymox (xymox@unaffiliated/contempt) has joined #jython
[0:34] * lheuer (~Adium@unaffiliated/lheuer) Quit (Quit: Leaving.)
[1:06] * shashank (~shashank@71-218-30-138.hlrn.qwest.net) Quit (Ping timeout: 246 seconds)
[1:47] * shashank (~shashank@71-218-30-138.hlrn.qwest.net) has joined #jython
[2:18] * shashank (~shashank@71-218-30-138.hlrn.qwest.net) Quit (Ping timeout: 246 seconds)
[2:21] * shashank (~shashank@71-218-30-138.hlrn.qwest.net) has joined #jython
[3:38] * Juneau001 (~Juneau@50-45-124-49.dklb.il.frontiernet.net) has joined #jython
[4:07] * Juneau001 (~Juneau@50-45-124-49.dklb.il.frontiernet.net) Quit (Quit: Juneau001)
[4:13] * Juneau001 (~Juneau@50-45-124-49.dklb.il.frontiernet.net) has joined #jython
[4:15] * Juneau001 (~Juneau@50-45-124-49.dklb.il.frontiernet.net) Quit (Client Quit)
[5:06] * shashank (~shashank@71-218-30-138.hlrn.qwest.net) Quit (Ping timeout: 260 seconds)
[5:19] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[5:52] * bony (~bhuvan@swecha/bony) has joined #jython
[5:52] <bony> i am trying to work on vert.x which is a framework for asynchronous app development using any of the following langs, JS, Python, Java, Ruby. I running the app for which jython is required which i installed system wide. when i run the app i get the following error http://pastebin.com/2JuxMftA
[6:20] * bony (~bhuvan@swecha/bony) Quit (Read error: Connection reset by peer)
[7:08] * xymox (xymox@unaffiliated/contempt) Quit (Ping timeout: 246 seconds)
[7:17] * xymox_ (xymox@2001:470:1f09:f3a::4) has joined #jython
[7:17] * xymox (xymox@unaffiliated/contempt) has joined #jython
[7:17] * xymox (xymox@unaffiliated/contempt) Quit (Remote host closed the connection)
[9:47] * sera (~sera@gentoo/developer/sera) has joined #jython
[9:50] * sera_ (~sera@gentoo/developer/sera) Quit (Ping timeout: 256 seconds)
[11:07] * l4mpi (584f7e12@gateway/web/freenode/ip.88.79.126.18) has joined #jython
[11:09] * wmeissner (~wmeissner@121.91.44.181) has joined #jython
[11:16] * l4mpi (584f7e12@gateway/web/freenode/ip.88.79.126.18) Quit (Quit: Page closed)
[11:17] * msavy (~msavy@redhat/jboss/msavy) has joined #jython
[13:21] * Hukka (hukka@hilla.kapsi.fi) Quit (Ping timeout: 245 seconds)
[13:28] * Hakku (hukka@hilla.kapsi.fi) has joined #jython
[13:33] * Hakku is now known as Hukka
[13:53] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[14:06] * lheuer (~Adium@unaffiliated/lheuer) Quit (Quit: Leaving.)
[14:48] * CopaceticMan (83f78b0e@gateway/web/freenode/ip.131.247.139.14) has joined #jython
[14:48] <CopaceticMan> Hi?
[14:49] <CopaceticMan> Well, I might as well ask my question.
[14:50] <CopaceticMan> and hope someone responds
[14:50] <CopaceticMan> Anyway
[14:50] <CopaceticMan> Is jypthon written in the python language and uses the java compiler to translate it into java?
[14:50] <CopaceticMan> Also, is jython currently in python 3.3 or 2.7?
[14:51] <agronholm> 2.5
[14:51] <CopaceticMan> The second question depends on the first
[14:51] <agronholm> I don't understand the first question
[14:51] <agronholm> Jython is a Java implementation of the Python language
[14:51] <agronholm> so it runs on top of the jvm
[14:53] <CopaceticMan> I have read that much, but I was wondering if it was written in python and then compiled into the java code. Basically I am asking if I am writing in Latin and it is being converted into Greek.
[14:53] <agronholm> are you asking about the jython interpreter itself?
[14:54] <CopaceticMan> yes
[14:54] <agronholm> there is no way to convert python 2.5 code to java
[14:54] <agronholm> the interpreter is written in java
[14:54] <CopaceticMan> :/
[14:54] <agronholm> but what it does is compile python code into jvm bytecode
[14:55] <CopaceticMan> And byte code is just machine language, correct?
[14:55] <CopaceticMan> *bytecode
[14:55] <agronholm> no, it's virtual machine byte codes that the JIT compiler translates into machine code as necessary
[14:56] <agronholm> the jvm bytecode is platform independent
[14:56] <CopaceticMan> Ok
[14:57] <CopaceticMan> So is the syntax of jython the same as python 2.5? I just want to make sure.
[14:57] <agronholm> 99.9% the same
[14:57] <CopaceticMan> Ok
[14:58] <agronholm> the only difference is that class decorators from 2.6 are supported
[14:58] <CopaceticMan> Ok
[14:58] <agronholm> oh, and that "print" can be used in imports (to import java.print stuff)
[14:58] <CopaceticMan> Ok
[14:59] <CopaceticMan> I am so new to programming that I honestly have no clue what that means... Any idea if/when jython will be updated to python 3.x?
[14:59] <agronholm> jython 2.7 is in progress (as you can see from the topic) but it's not in a usable state yet
[14:59] <agronholm> CopaceticMan: not really
[14:59] <agronholm> we don't have anyone working full time on it...anymore
[14:59] <agronholm> when it gets to 3.x, it'll be at least 3.3
[15:00] <CopaceticMan> One last question
[15:00] <CopaceticMan> Do you have any idea when it will be updated to python 2.7?
[15:01] <agronholm> hopefully this year
[15:01] <agronholm> but hard to make promises
[15:02] <CopaceticMan> okk, thanks for the info
[15:02] <agronholm> it'd help if we had more contributors
[15:05] <CopaceticMan> Well, I don't know what I can do. I only started programming two months ago. And creating a code interpreter is way above my head. But to be honest. If I could I would.
[15:05] <agronholm> if you just started, then I understand
[15:05] <agronholm> why are you interested in jython if you just started btw?
[15:06] <agronholm> jython is usually used for fairly special purposes
[15:06] <agronholm> most people use CPython instead
[15:07] <CopaceticMan> Yeah... I know basic python, a little bit of java, and I am pretty good at IDL (interactive data language)
[15:07] <CopaceticMan> Sorry
[15:07] <CopaceticMan> My screen minimized
[15:07] <agronholm> doesn't IDL mean Interface Description Language?
[15:07] <CopaceticMan> And now it doesn't auto scroll everytime I type something in
[15:07] <CopaceticMan> yes, depending on the context
[15:08] <agronholm> I've never heard of this other IDL
[15:09] <CopaceticMan> http://www.exelisvis.com/ProductsServices/IDL.aspx
[15:09] <CopaceticMan> Anyway
[15:10] <CopaceticMan> the reason I was interested in jython is that I was 1) curious as to what it was 2) If I could code in python and have it work with java programs, that would allow me to modify games.
[15:10] <CopaceticMan> (Aka minecraft, the whole reason I got into programming)
[15:11] <CopaceticMan> I probably sound like a little kid for admitting that.
[15:13] <agronholm> there are limitations on jython's interaction with other java apps
[15:13] <agronholm> for example, discovery of Python classes from Java is not possible right now
[15:15] <CopaceticMan> So, if I understand that, then there is a fundamental limitation on my ability to create and modify games?
[15:15] <agronholm> most likely, yes
[15:16] <agronholm> depends on how these games use Java
[15:16] <agronholm> jython code is also considerably slower than regular java code
[15:16] <CopaceticMan> Ok
[15:19] <CopaceticMan> Well, thanks for the info
[15:25] * CopaceticMan (83f78b0e@gateway/web/freenode/ip.131.247.139.14) Quit (Quit: Page closed)
[15:28] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[15:31] <Hukka> agronholm: I didn't actually know that
[15:31] <Hukka> Many places seem to throw points like "Well it runs on JVM, so it's the same speed as all JVM languages like Java"
[15:32] <agronholm> it's because there's so much extra overhead
[15:32] <agronholm> the python language model isn't exactly compatible with java's
[15:32] <agronholm> especially python 2
[15:33] <agronholm> 3 falls more in line with java
[15:33] <Hukka> Oh, what has cahnged in 3?
[15:33] <Hukka> changed, even
[15:33] <agronholm> chained exceptions, bytes/str align with java
[15:38] * xymox_ (xymox@2001:470:1f09:f3a::4) Quit (Ping timeout: 268 seconds)
[15:38] * xymox (xymox@unaffiliated/contempt) has joined #jython
[15:42] * shashank (~shashank@71-218-30-138.hlrn.qwest.net) has joined #jython
[16:33] * wmeissner (~wmeissner@121.91.44.181) Quit (Quit: wmeissner)
[17:27] * Trundle (~andy@python/site-packages/trundle) has joined #jython
[19:23] * pr3d4t0r (~zhenya01@varenka.cime.net) has joined #jython
[19:23] <pr3d4t0r> agronholm: b00.
[19:23] <pr3d4t0r> agronholm: :*
[19:23] * pr3d4t0r hugs agronholm
[19:23] <agronholm> yes?
[19:25] <pr3d4t0r> agronholm: Eclipse.
[19:25] <Hukka> agronholm: Do you get this often?
[19:25] <agronholm> get what?
[19:25] <agronholm> hugs?
[19:25] <Hukka> Sudden hugs
[19:25] <agronholm> no
[19:25] <pr3d4t0r> agronholm: I want to set my Python modules off src/main/python
[19:25] <Hukka> Without you even knowing why
[19:25] <agronholm> set off?
[19:25] <pr3d4t0r> agronholm: Then, when packaged, I'd like them to be in the .jar off / just like Java.
[19:26] <pr3d4t0r> agronholm: So that module com.stuff.python.module.here lives right next to com.my.java.stuff
[19:26] <pr3d4t0r> agronholm: That's how I manually set up the Python code so that Mule/Spring can find it -- but manual is a bitch.
[19:27] <agronholm> is this a packaging problem?
[19:27] <pr3d4t0r> agronholm: Yes - since Mule picks up the user/app packages from lib/user/file.jar OR from lib/user/com/stuff/python/module/here
[19:28] <pr3d4t0r> agronholm: I have no idea how to tell Eclipse to get those .py files and shove them in the .jar alongside the .class files.
[19:28] <pr3d4t0r> agronholm: Doing that would bring tremendous joy to my hreat.
[19:28] <pr3d4t0r> Er, heart.
[19:28] <agronholm> eclipse? you package stuff with eclipse?
[19:28] <pr3d4t0r> agronholm: Yes.
[19:28] <agronholm> I use ant for that
[19:28] <pr3d4t0r> agronholm: It's for the Mule module.
[19:29] <agronholm> I don't understand the relevance
[19:29] <agronholm> I've never used eclipse to make jars for me
[19:30] <agronholm> well, I tried once, but found that it was inflexible that I was much better off using ant
[19:30] <agronholm> oh right...eclipse does package my one single ejb project for me when I deploy on my dev server
[19:30] <agronholm> so there's that
[19:30] <agronholm> but I don't include any python code in it
[19:31] <agronholm> pr3d4t0r: are you trying to ask me how to make some eclipse plugin I don't have to do something it wasn't designed to do?
[19:31] <agronholm> correct me if I'm wrong :)
[19:32] <pr3d4t0r> agronholm: I want to put the Python files in module paths alongside Java package paths.
[19:32] <pr3d4t0r> agronholm: e.g.
[19:32] <agronholm> but does it know to include .py files then?
[19:32] <agronholm> that should be easily testable
[19:33] <pr3d4t0r> agronholm: src/main/java/com/x/y package has com.x.y.MyCode.class and src/main/python/a/b/c module as my a.b.c.MyCode.py
[19:33] <pr3d4t0r> agronholm: I don't know how to do it.
[19:33] <pr3d4t0r> agronholm: And I can't figure out how to tell it how to do it.
[19:34] <pr3d4t0r> agronholm: There's some retarded thing about putting this in src/main/resources but that's not what I need - resources aren't supposed to be live code.
[19:34] <agronholm> how do you do the packaging in the first place?
[19:34] <pr3d4t0r> agronholm: Manually.
[19:36] <agronholm> I guess what I wanted to ask was, how would you do it if you didn't do it manually?
[19:43] <pr3d4t0r> agronholm: I don't understand your question.
[19:44] <pr3d4t0r> agronholm: I need to do it.
[19:44] <agronholm> manual is the only alternative then?
[19:44] <pr3d4t0r> agronholm: So - I have a shell script that finds the files, runs jar -cvf and off we go.
[19:44] <pr3d4t0r> agronholm: Until I figure out how to do it in Eclipse, yes.
[19:44] <pr3d4t0r> agronholm: In Maven I'd use an artifact for packaging via the .zip or .jar archiver.
[19:44] <agronholm> if you didn't have python code, would it be easier somehow then?
[19:45] <agronholm> pr3d4t0r: you could at least set up an external tool configuration in eclipse I suppose?
[19:46] <agronholm> if ant is not acceptable
[19:46] <agronholm> I've never used maven so I dunno how to work that
[19:47] * wmeissner (~wmeissner@121.91.44.181) has joined #jython
[19:51] <pr3d4t0r> agronholm: I want to do it without Ant (hate it), directly from Eclipse if possible. Sounds like I'm better off doing it manually.
[19:52] <pr3d4t0r> agronholm: Are you deploying any Python code into a Jython run-time? Dl you use Ant for that?
[19:52] <pr3d4t0r> (Packaging + deployment.)
[19:52] <agronholm> I don't understand the question
[19:52] <agronholm> deploying python code into jython run-time?
[19:59] <pr3d4t0r> agronholm: What part isn't clear? You can deploy to CPython, Jython, whatever.
[19:59] <pr3d4t0r> agronholm: Do you deploy to a Jython run-time?
[19:59] <agronholm> it's the verb "deploy" that is unclear here
[20:00] <agronholm> it means different things in different environments
[20:00] <agronholm> I'm using Jython in just one project
[20:00] <agronholm> the entry point is a java app which fires up a PythonInterpreter
[20:01] <agronholm> half of the app is actually python code
[20:02] <pr3d4t0r> agronholm: OKi - so imagine that instead of .class files in the .jar you have only .py files in it. That's what I need to do. Then drop it on a server, just like I would a .war or a .jar and have the server start resolving it.
[20:02] <pr3d4t0r> agronholm: That's what I mean by deployment.
[20:02] <agronholm> no jars are involved during the development process though
[20:02] <agronholm> only when I move it to production
[20:03] <agronholm> I have separate namespaces for python and java code
[20:03] <agronholm> and I never deploy any .py files to production
[20:03] <agronholm> only $py.class
[20:04] * catmtking (~catmtking@dhcp-138-23-59-162.dyn.ucr.edu) has joined #jython
[20:04] <pr3d4t0r> agronholm: OKi - to me is all the same. How about generating and packaging $py.class files?
[20:05] <agronholm> jython contains a special ant task for compiling to $py.class
[20:05] <pr3d4t0r> agronholm: (I deploy .py to the file system in case I reload dynamically - different problem.)
[20:05] <agronholm> alternatively you can use the compileall module
[20:06] <agronholm> since I use different namespaces for python and java code, there are no conflicts so I just package them in the same jar
[20:07] <pr3d4t0r> agronholm: That's what I want to do.
[20:07] <pr3d4t0r> agronholm: Put them in the same .jar.
[20:08] <agronholm> I don't see a problem -- copy them into a single directory tree and jar it up
[20:08] <pr3d4t0r> agronholm: One root has com.whatever Java classes, the other has module.whatver Python source or $py.class files.
[20:08] * pr3d4t0r rolls his eyes.
[20:08] <pr3d4t0r> agronholm: HOW TO DO IT IN ECLIPSE?
[20:08] <agronholm> in eclipse? heck if I know, I use ant for that
[20:08] <pr3d4t0r> agronholm: I already do that manually - I want to do it in one go.
[20:09] <agronholm> ant lets me do it in one go
[20:09] <pr3d4t0r> agronholm: OKi - so you drop to command line and run Ant like I run Maven - yes?
[20:09] <agronholm> I don't drop to command line
[20:09] <agronholm> I right click on the ant file and select "run"
[20:09] <agronholm> or I select the preconfigured task from External Tools
[20:10] <pr3d4t0r> agronholm: Is that in Eclipse?
[20:10] <agronholm> yes
[20:10] <pr3d4t0r> agronholm: Or from Finder?
[20:10] <pr3d4t0r> agronholm: Got it - OKi, thanks.
[20:11] <agronholm> Finder?
[20:11] <agronholm> oh, mac
[20:11] <agronholm> external tools is the green arrow button with a toolbox on it
[20:11] <agronholm> about in the middle of the default toolbar
[20:11] <agronholm> I can send you my ant file
[20:11] <agronholm> if that helps
[20:15] * jlwestsr (~jlwestsr@2602:304:ab2a:83e9:b46f:42c9:e3ec:8bd1) has joined #jython
[20:20] <pr3d4t0r> agronholm: Nah, thanks. It's the same thing I'm doing, just with Maven + archiver instead of Ant + archiver.
[20:20] <pr3d4t0r> agronholm: I was hoping there'd be some built-in way of doing that in Eclipse.
[20:21] <agronholm> of doing what exactly?
[20:21] <agronholm> this build process isn't trivial
[20:27] <agronholm> pr3d4t0r: is there a maven artifact or whatever for compiling python modules?
[20:27] <agronholm> the same way there's an ant task for it
[20:34] <pr3d4t0r> agronholm: No - and I don't care much about that part; once the bean is loaded in memory it's not preempted anyway.
[20:35] <pr3d4t0r> agronholm: Since the server will run for weeks, an extra second won't hurt.
[20:35] <agronholm> ok
[20:35] <agronholm> in my environment (webstart) it does matter
[20:37] <pr3d4t0r> agronholm: We only take the hit when it loads in <spring:bean class='whatever' id='myBean'>
[20:37] <pr3d4t0r> agronholm: It's a Spring singleton so it stays around until we load a new module with the same code over a different class loader. Not a common occurrence. Connecting to the DB or to some of the external services takes way longer.
[20:38] <pr3d4t0r> agronholm: The first Jython object does take forever to load because the container loads the jython.jar and whatever it needs, then it's all just a half second here, a second there. It adds maybe 15 seconds to startup time, then stays up for weeks.
[20:45] * xymox (xymox@unaffiliated/contempt) Quit (Ping timeout: 260 seconds)
[20:48] <pr3d4t0r> agronholm: Thanks - cheers!
[20:51] * xymox (xymox@unaffiliated/contempt) has joined #jython
[21:33] * Trundle (~andy@python/site-packages/trundle) Quit (Remote host closed the connection)
[21:37] * lheuer (~Adium@unaffiliated/lheuer) Quit (Quit: Leaving.)
[21:39] * wmeissner (~wmeissner@121.91.44.181) Quit (Quit: wmeissner)
[21:43] * agronholm (~agronholm@2001:1bc8:102:6f29:2dce:f86b:9a13:59a1) Quit (Ping timeout: 245 seconds)
[21:47] * agronholm (~agronholm@2001:1bc8:102:6f29:d9d1:640d:e5a8:783a) has joined #jython
[21:47] * ChanServ sets mode +o agronholm
[22:40] * shashank (~shashank@71-218-30-138.hlrn.qwest.net) Quit (Ping timeout: 246 seconds)
[22:41] * MikeFair_ (~quassel@pool-71-108-121-195.lsanca.dsl-w.verizon.net) Quit (Read error: Operation timed out)
[22:47] * MikeFair_ (~quassel@pool-71-108-121-195.lsanca.dsl-w.verizon.net) has joined #jython
[23:33] * Nordom (~Nordom@KD182249049089.au-net.ne.jp) has joined #jython
[23:34] * Nordom (~Nordom@KD182249049089.au-net.ne.jp) has left #jython
[23:42] * MikeFair_ (~quassel@pool-71-108-121-195.lsanca.dsl-w.verizon.net) Quit (Ping timeout: 240 seconds)
[23:50] * MikeFair (~quassel@pool-71-108-121-195.lsanca.dsl-w.verizon.net) has joined #jython
[23:59] * catmtking_ (~catmtking@wireless-fac-staff-wpa-138-23-66-200.bulk.ucr.edu) has joined #jython
[23:59] * catmtking_ (~catmtking@wireless-fac-staff-wpa-138-23-66-200.bulk.ucr.edu) Quit (Client Quit)

Index

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