#jython IRC Log (v0.9)

Index

IRC Log for 2010-06-06

Timestamps are in GMT/BST.

[0:03] * mattbrandt (~evilmarti@c-71-56-218-237.hsd1.co.comcast.net) Quit (Quit: mattbrandt)
[0:30] * lucian (~lucian@94-193-66-109.zone7.bethere.co.uk) Quit (Quit: Leaving...)
[1:06] * jabley (~jabley@fl-64-45-218-122.dyn.embarqhsd.net) has joined #jython
[1:20] * mattbrandt (~evilmarti@161.98.13.100) has joined #jython
[1:36] * goundy (~goundy@109.128.145.160) Quit (Quit: Ex-Chat)
[1:44] * mattbrandt (~evilmarti@161.98.13.100) Quit (Quit: mattbrandt)
[2:38] * jabley (~jabley@fl-64-45-218-122.dyn.embarqhsd.net) Quit (Quit: jabley)
[3:12] * verterok (~ggonzalez@unaffiliated/verterok) Quit (Ping timeout: 240 seconds)
[3:23] * ronny (ronny@pida/ronny) Quit (Ping timeout: 272 seconds)
[3:30] * brweber2 (~bweber@ip68-100-65-167.dc.dc.cox.net) has joined #jython
[4:13] * ttmrichter (~ttmrichte@59.173.200.188) has joined #jython
[4:40] * thobe (~Adium@c83-249-235-76.bredband.comhem.se) Quit (Ping timeout: 240 seconds)
[5:01] * thobe (~Adium@c83-249-235-76.bredband.comhem.se) has joined #jython
[5:17] * brweber2 (~bweber@ip68-100-65-167.dc.dc.cox.net) Quit (Quit: brweber2)
[6:05] * thobe (~Adium@c83-249-235-76.bredband.comhem.se) Quit (Ping timeout: 276 seconds)
[6:10] * thobe (~Adium@c83-249-235-76.bredband.comhem.se) has joined #jython
[6:11] * jabley (~jabley@fl-64-45-218-122.dyn.embarqhsd.net) has joined #jython
[6:29] * verterok (~ggonzalez@unaffiliated/verterok) has joined #jython
[6:32] * exobyte (~exobyte@user-64-9-238-122.googlewifi.com) has joined #jython
[6:42] * verterok (~ggonzalez@unaffiliated/verterok) Quit (Ping timeout: 264 seconds)
[7:11] * jabley (~jabley@fl-64-45-218-122.dyn.embarqhsd.net) Quit (Quit: jabley)
[7:50] * rj0nes (~richard@c122-107-171-50.eburwd5.vic.optusnet.com.au) has joined #jython
[7:50] <rj0nes> hello, anyone home?
[8:24] * rj0nes (~richard@c122-107-171-50.eburwd5.vic.optusnet.com.au) Quit (Quit: rj0nes)
[9:00] * exobyte_ (~exobyte@user-64-9-238-122.googlewifi.com) has joined #jython
[9:00] * exobyte (~exobyte@user-64-9-238-122.googlewifi.com) Quit (Read error: Connection reset by peer)
[9:23] * agronholm (agronholm@nblzone-211-17.nblnetworks.fi) Quit (Ping timeout: 245 seconds)
[9:27] * agronholm (agronholm@2001:1bc8:102:413a:e520:ea60:ed6b:6b17) has joined #jython
[11:28] * thobe (~Adium@c83-249-235-76.bredband.comhem.se) Quit (Ping timeout: 260 seconds)
[11:33] * thobe (~Adium@c83-249-235-76.bredband.comhem.se) has joined #jython
[14:02] * lucian (~lucian@94-193-66-109.zone7.bethere.co.uk) has joined #jython
[14:40] * thijstriemstra (~thijstrie@dhcp-077-249-108-126.chello.nl) has joined #jython
[15:06] * lucian (~lucian@94-193-66-109.zone7.bethere.co.uk) Quit (Ping timeout: 240 seconds)
[15:07] * lucian (~lucian@nat67.mia.three.co.uk) has joined #jython
[15:15] * lucian_ (~lucian@188-222-55-189.zone13.bethere.co.uk) has joined #jython
[15:16] * lucian (~lucian@nat67.mia.three.co.uk) Quit (Ping timeout: 240 seconds)
[15:18] * lucian_ is now known as lucian
[15:41] * thijstriemstra (~thijstrie@dhcp-077-249-108-126.chello.nl) Quit (Quit: thijstriemstra)
[16:41] * mattbrandt (~evilmarti@c-98-245-93-164.hsd1.co.comcast.net) has joined #jython
[16:42] * jimbaker (~jbaker@c-24-8-39-78.hsd1.co.comcast.net) has joined #jython
[16:45] * verterok (~ggonzalez@unaffiliated/verterok) has joined #jython
[17:11] * ttmrichter_ (~ttmrichte@111.172.28.19) has joined #jython
[17:13] * ttmrichter (~ttmrichte@59.173.200.188) Quit (Ping timeout: 276 seconds)
[17:25] * exobyte (~exobyte@user-64-9-238-122.googlewifi.com) has joined #jython
[17:25] * exobyte_ (~exobyte@user-64-9-238-122.googlewifi.com) Quit (Read error: Connection reset by peer)
[17:26] * ttmrichter_ (~ttmrichte@111.172.28.19) Quit (Quit: ...and I'm taking my ball with me!)
[18:08] * mattbrandt (~evilmarti@c-98-245-93-164.hsd1.co.comcast.net) Quit (Quit: mattbrandt)
[18:25] * thijstriemstra (~thijstrie@2002:5450:63c5:1234:219:e3ff:fed6:8355) has joined #jython
[18:56] * dany2 (~dan@2001:470:1f06:309:21f:5bff:fef5:c3fb) has joined #jython
[19:08] * thijstriemstra (~thijstrie@2002:5450:63c5:1234:219:e3ff:fed6:8355) Quit (Read error: Operation timed out)
[19:09] * thijstriemstra (~thijstrie@2002:5450:63c5:1234:219:e3ff:fed6:8355) has joined #jython
[19:12] * jimbaker (~jbaker@c-24-8-39-78.hsd1.co.comcast.net) Quit (Quit: jimbaker)
[19:18] * verterok (~ggonzalez@unaffiliated/verterok) Quit (Ping timeout: 248 seconds)
[19:50] * clajo04_ (~clajo04_@pool-74-108-95-175.nycmny.fios.verizon.net) Quit (Quit: clajo04_)
[20:00] * clajo04_ (~clajo04_@pool-74-108-95-175.nycmny.fios.verizon.net) has joined #jython
[20:07] * lucian (~lucian@188-222-55-189.zone13.bethere.co.uk) Quit (Quit: Leaving...)
[20:08] * lucian (~lucian@188-222-55-189.zone13.bethere.co.uk) has joined #jython
[20:26] * lopex (lopex@chello089076044027.chello.pl) has joined #jython
[20:33] == Oti [~ohumbel@adsl-84-226-102-148.adslplus.ch] has quit [Ping timeout: 258 seconds]
[20:34] == JythonLogBot [~PircBot@adsl-84-226-102-148.adslplus.ch] has quit [Ping timeout: 265 seconds]
[20:39] == Oti [~ohumbel@adsl-89-217-188-177.adslplus.ch] has joined #jython
[21:05] == verterok [~ggonzalez@unaffiliated/verterok] has joined #jython
[21:13] == verterok [~ggonzalez@unaffiliated/verterok] has quit [Ping timeout: 240 seconds]
[21:37] <exobyte> how can I compile some python code from either a sting or an input stream into a byte[] ? I want to feed it into the classloader
[21:37] == pigletto [~pigletto@dynamic-78-8-96-183.ssp.dialog.net.pl] has joined #jython
[22:00] <agronholm> feed it into classloader? what for?
[22:17] <exobyte> agronholm: load some code dynamically
[22:17] <exobyte> agronholm: an eval, of sorts
[22:18] <agronholm> why not use actual eval then
[22:18] <exobyte> agronholm: I'm running it from java
[22:18] <agronholm> so?
[22:18] == thobe [~Adium@c83-249-235-76.bredband.comhem.se] has quit [Ping timeout: 252 seconds]
[22:18] <exobyte> agronholm: so maybe there's a jython eval method, BUT I'll be calling this often enough that I'd rather not eval it
[22:19] <agronholm> you could compile the code once and use the code object then
[22:20] <agronholm> PyInterpreter has a "compile" method that produces PyCode objects
[22:20] <exobyte> maybe, but I was thinking I actually want an object, so I really might want a class
[22:20] <agronholm> eh?
[22:21] <agronholm> you want an object so you really want a class? that doesn't make any sense
[22:21] <exobyte> I was thinking I might use inheritance to define my api
[22:21] <agronholm> how is this related?
[22:21] <exobyte> then have the jython code inherit from the java base class.
[22:21] <exobyte> it's how I'd use it in the java code
[22:22] <agronholm> ok I'm pretty confused now
[22:22] <agronholm> did you just change the requirements? because I don't see how feeding bytes to a class loader has anything to do with this
[22:23] <exobyte> if I want an object I can use with java code, I need the class loaded in
[22:23] <exobyte> I was thinking I could implement the class in python, then use jython to compile it at runtime
[22:23] <exobyte> but maybe I'll looking into PyInterpreter a bit
[22:23] <exobyte> *look
[22:24] <agronholm> why would you want to compile your python code at runtime?
[22:24] == thobe [~Adium@c83-249-235-76.bredband.comhem.se] has joined #jython
[22:24] <agronholm> I always do it statically at build time
[22:24] <exobyte> it's supplied by the user
[22:24] <exobyte> oh, sooooo
[22:24] <agronholm> I see
[22:24] <exobyte> I want to provide a scripting facility
[22:24] <agronholm> look into jsr223 then
[22:25] <exobyte> I saw that mentioned on the jruby page
[22:25] <agronholm> oh, and if you do, use the latest build
[22:25] <exobyte> (I'm also debating languages, still)
[22:25] <agronholm> jsr223 is broken in 2.5.1
[22:25] <exobyte> latest *build*, not release, right?
[22:25] <agronholm> yeah
[22:25] <agronholm> 2.5.1 is the latest release
[22:25] <agronholm> and the devs are really dragging their feet with the 2.5.2 release
[22:26] <exobyte> I'll poke around
[22:26] <agronholm> PyInterpreter should be problem free though
[22:27] <exobyte> my big question: would you go with jython, jruby, or groovy? There's a case to be made for all of them, and I'm sure you're biased, but I'm still curious to hear opinions
[22:27] <agronholm> I don't know much about groovy
[22:28] <agronholm> jruby is apparently faster than jython
[22:28] <agronholm> although that's not saying much :)
[22:28] <exobyte> the jython website claims it's about as fast as cpython
[22:28] <agronholm> jruby?
[22:28] <exobyte> jython
[22:28] <agronholm> what? where?
[22:29] <agronholm> jython is many times slower than cpython
[22:29] <exobyte> groovy is like a java scriping language. it's more or less a scripty syntax for java that compiles to .class
[22:29] <agronholm> jython's only application is bridging python and java
[22:29] <agronholm> it's too slow for anything else
[22:30] <agronholm> it'll be interesting how much faster it'll get with java 7 though
[22:30] <agronholm> since java 7 supports dynamic languages in the vm
[22:30] <exobyte> it's significantly slower when it's compiled, too?
[22:31] == lucian [~lucian@188-222-55-189.zone13.bethere.co.uk] has quit [Remote host closed the connection]
[22:31] <agronholm> yeah
[22:31] <agronholm> I always precompile my python code before I package it
[22:31] <agronholm> takes more space but avoids compilation overhead
[22:32] <exobyte> so what's a typical jython use case?
[22:32] <agronholm> allowing python scripting in a java app, or running a python webapp on top of tomcat or some java ee server
[22:33] <agronholm> my case is that I have a swing app that is an EJB client, and I'm porting it to python, piece by piece
[22:33] <exobyte> but the scripting would be kinda slow. I take it something like django under tomcat would be kinda slow?
[22:33] <agronholm> jython allows me to incrementally convert pieces from here and there to python, and users are none the wiser
[22:34] <agronholm> scripting is hardly expected to be fast anyway
[22:35] <exobyte> neither is java...
[22:35] <exobyte> I should write a C JIT compiler
[22:35] <agronholm> another?
[22:36] <agronholm> or you mean, opposed to a C++ one?
[22:36] <exobyte> it seems my idea has been taken...
[22:36] <agronholm> what do you think hotspot does?
[22:36] <exobyte> c++ is so close to a superset of c
[22:36] <agronholm> and gcj compiles java code to a native executable
[22:37] <agronholm> you lose dynamic class loading capabilities then though
[22:37] <exobyte> it only compiles t "c" in the sense that c is very close to unix and hardware
[22:37] <exobyte> *to
[22:37] <agronholm> what was that a reply to?
[22:37] <exobyte> "what do you think hotspot does?"
[22:38] <agronholm> hotspot is a JIT compiler for the sun jvm
[22:38] <agronholm> it's pretty fast
[22:39] <exobyte> anyway, I have more poking around to do. What's the benefit of jsr223 over jyinterpreter?
[22:39] <agronholm> standardized interface
[22:39] == thijstriemstra [~thijstrie@2002:5450:63c5:1234:219:e3ff:fed6:8355] has quit [Quit: thijstriemstra]
[22:39] <exobyte> ahh
[22:40] <exobyte> but the backend (at leasr for jython) is the same?
[22:41] <agronholm> I'm pretty sure it is
[23:21] * lucian (~lucian@188-222-55-189.zone13.bethere.co.uk) has joined #jython
[23:29] * pigletto (~pigletto@dynamic-78-8-96-183.ssp.dialog.net.pl) Quit (Remote host closed the connection)

Index

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