#jython IRC Log (v0.9)

Index

IRC Log for 2010-07-21

Timestamps are in GMT/BST.

[0:01] <thobe> hi jimbaker, headius. so yeah, with both the jruby c extensions support and the pypy c extension support we should be in a pretty good place for supporting c extensions for jython
[0:02] <thobe> jimbaker: do you know to what extent the pypy c extensions differ from iron clad?
[0:02] <jimbaker> yeah, i would think we could readily share a refcounted memory implementation
[0:02] <jimbaker> (or emulation)
[0:02] <headius> jimbaker: that sounds about the same as what we're doing
[0:02] <jimbaker> thobe: pypy's version is much simpler
[0:02] <headius> the C bits themselves are not guaranteed to be thread-safe, because they maintain structures external to the heap, so only one thread can call out to extensions at a time
[0:03] <jimbaker> right, pretty much the same in python's c ext api - need to explicitly acquire/release GIL
[0:03] <thobe> jimbaker: much simpler than iron clad? - that makes sense, from what I understand iron clad embeds a large portion of cpython
[0:04] <thobe> ^ if that is still the case
[0:04] <headius> at this point I'm treating C extensions as a novelty, because it's so odd to be able to support it; as a stopgap for libraries that have no alternative yet; and as a milestone, showing we can do anything the other impls can do
[0:05] <jimbaker> it's approx 8kloc of python code - we could probably do the same level of metaprogramming
[0:05] <headius> I don't consider them to be a recommended path
[0:05] <jimbaker> headius: there's a large body of interesting code to support, especially numpy
[0:05] <thobe> headius: yeah, it really is cool! I'd say it's quite novel to any jvm language, and to the java ecosystem as a whole
[0:06] <jimbaker> but for every bit like that, there's a blog entry like james tauber's - http://jtauber.com/blog/2010/07/19/czerny/
[0:06] <thobe> yeah, supporting numpy would put a whole new focus on jython
[0:07] <thobe> the combination of numpy and a whole lot of interesting java libraries would be truly great
[0:07] <jimbaker> i understand the scratch a personal itch and all, but starting by supporting a pyrex wrapper around an os x specific midi interface...
[0:07] <jimbaker> crazy when java sound is rather full featured
[0:08] <jimbaker> thobe: you should find james tauber and twist his arm, he's at oscon ;)
[0:08] <jimbaker> probably at the bar right now
[0:09] <thobe> I hope he's around until thursday, because I'm crazy busy until then
[0:10] <jimbaker> np, he's just influential. i've been working on an augmented reality problem in jython, and it's again one of those things where having great java libs is so nice
[0:10] <jimbaker> combining it with numpy... that would be nice
[0:10] <thobe> times like this I'm not sure which is better??? having an income or having control over my own time
[0:11] <thobe> (it's not really that bad, I do have a lot of fun, but sometimes I'd like to have some more time for Jython)
[0:11] * nandoflorestan (~nandoflor@c9063272.virtua.com.br) has joined #jython
[0:12] <jimbaker> thobe: understood - these things go up & down. fortunately the interesting problems don't go away :)
[0:13] <jimbaker> anyway, i think c ext api would give us some very interesting leverage. one other thing - it actually looks easier than ctypes
[0:13] <jimbaker> that's because the api is actually much smaller and much less abstract
[0:14] <thobe> yeah. although I would say "surprisingly" instead of "fortunately", it would be great if someone else stepped in to hack on the thing's I've brainstormed about while I'm unable to, but surprisingly (to me since I find it so interesting) nobody does
[0:14] <thobe> jimbaker: yeah, that is quite crazy, how hard ctypes seems to be
[0:15] <jimbaker> it would have been useful if it had been designed with jython in mind... oh well
[0:15] <thobe> with c extensions all the C-API stuff would be on the JNI-level, and thus shielded from the Java-level, with fewer things needing to cross the abstraction barrier. so it sort of makes sense when you think about it, but it just feels strange
[0:15] <jimbaker> exactly. i do wonder if we can also leverage our type exposing - this is most of the work in pypy
[0:16] <thobe> I wonder if supporting ctypes through the C-extension API would be esier (crazy thought)
[0:17] <thobe> headius: were you planning to go to the brewers festival on thursday (or friday)?
[0:17] * lopex (lopex@chello089076044027.chello.pl) Quit ()
[0:17] <jimbaker> thobe, headius - don't forget to chat about coroutines!
[0:18] <jimbaker> i need to go unfortunately, ttyl, wish i could be there in portland - or next week in santa clara
[0:18] * jimbaker (~jbaker@64.134.236.94) Quit (Quit: jimbaker)
[0:22] <headius> yeah, I have to run too guys
[0:22] <tristanbuckner> so I have a java method that takes arguments of type String and converts them to byte arrays. In jython the type of this return object is an array.array with typecode 'b'. Calling tostring() on the array.array in jython returns the string I just passed in. However, if I try to pass this array.array to the java method that converts back to strings I get completely munged characters. Does jython incorrectly cast from array.array to byte[]?
[0:30] * headius (~headius@67.23.205.130) Quit (Quit: headius)
[0:38] <tristanbuckner> okay I figured it out. the mapping between types is not a bijection (obviously, though there are certain mappings which are consistent both ways)
[0:43] <tristanbuckner> though is there some reason that a array.array with typecode 'b' doesn't naturally map to byte[]?
[0:44] * headius (~headius@67.23.205.130) has joined #jython
[0:53] * headius (~headius@67.23.205.130) Quit (Quit: headius)
[1:01] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) has joined #jython
[1:06] * enebo (~enebo@184-97-169-124.mpls.qwest.net) Quit (Quit: enebo)
[1:18] * tristanbuckner (~tristan@38.99.42.113) Quit (Quit: tristanbuckner)
[1:22] * ttmrichter (~ttmrichte@221.232.82.218) has joined #jython
[2:26] * jimbaker (~jbaker@97-122-104-42.hlrn.qwest.net) has joined #jython
[2:30] * jimbaker (~jbaker@97-122-104-42.hlrn.qwest.net) Quit (Ping timeout: 240 seconds)
[2:35] * jimbaker (~jbaker@97-122-104-42.hlrn.qwest.net) has joined #jython
[2:36] * juneau001 (~juneau@pool-72-69-88-199.chi01.dsl-w.verizon.net) has joined #jython
[2:55] * jimbaker (~jbaker@97-122-104-42.hlrn.qwest.net) Quit (Quit: jimbaker)
[2:55] <juneau001> We should add a link to the sources from the download page on jython.org
[2:56] <juneau001> I can take care of doing this
[3:22] * jimbaker (~jbaker@c-24-8-39-78.hsd1.co.comcast.net) has joined #jython
[3:37] * headius (~headius@173-12-167-177-oregon.hfc.comcastbusiness.net) has joined #jython
[3:41] * headius (~headius@173-12-167-177-oregon.hfc.comcastbusiness.net) Quit (Client Quit)
[4:11] * nandoflorestan (~nandoflor@c9063272.virtua.com.br) Quit (Ping timeout: 240 seconds)
[4:52] <pr3d4t0r> juneau001: Heh.
[4:52] <pr3d4t0r> juneau001: One of my business partners just downloaded the sources and twatted about it :)
[4:54] <agronholm> twatting sounds so dirty
[4:57] <pr3d4t0r> agronholm: Isn't that what we do on Twitter?
[4:57] <agronholm> twitting?
[4:58] <pr3d4t0r> agronholm: I like mine better :)
[4:58] <pr3d4t0r> agronholm: But I have a dirty mind.
[4:59] <agronholm> tweeting is the proper verb I suppose
[5:04] <pr3d4t0r> agronholm: Yeah, but that doesn't raise any eyebrows...
[5:12] * pigletto (~quassel@213.151.215.195) has joined #jython
[7:02] * pigletto (~quassel@213.151.215.195) Quit (Ping timeout: 240 seconds)
[7:22] * thobe (~Adium@72-254-81-91.client.stsn.net) Quit (Ping timeout: 246 seconds)
[9:10] * lheuer (~heuer@unaffiliated/lheuer) has joined #jython
[9:26] * jimbaker (~jbaker@c-24-8-39-78.hsd1.co.comcast.net) Quit (Quit: jimbaker)
[9:26] * jimbaker (~jbaker@c-24-8-39-78.hsd1.co.comcast.net) has joined #jython
[9:27] * jabley (~jabley@87-84-49-84.absolutely2.mezzonet.net) has joined #jython
[10:22] * jimbaker (~jbaker@c-24-8-39-78.hsd1.co.comcast.net) Quit (Quit: jimbaker)
[11:18] * mds1 (~seiler@131.220.126.195) has joined #jython
[11:18] * mds1 (~seiler@131.220.126.195) has left #jython
[12:13] * nandoflorestan (~nandoflor@c9063272.virtua.com.br) has joined #jython
[12:39] * enebo (~enebo@184-97-169-124.mpls.qwest.net) has joined #jython
[12:52] * NottsMancs (~limeydrin@cpc2-salf4-0-0-cust701.manc.cable.ntl.com) has joined #jython
[13:11] * lucian (~lucian@188-222-55-189.zone13.bethere.co.uk) has joined #jython
[13:16] * ttmrichter (~ttmrichte@221.232.82.218) Quit (Ping timeout: 265 seconds)
[13:16] * ttmrichter (~ttmrichte@221.232.82.218) has joined #jython
[13:18] * maxb (~maxb@jabberwock.vm.bytemark.co.uk) Quit (Ping timeout: 240 seconds)
[13:19] * maxb (~maxb@jabberwock.vm.bytemark.co.uk) has joined #jython
[13:28] * ttmrichter (~ttmrichte@221.232.82.218) Quit (Ping timeout: 276 seconds)
[13:29] * ttmrichter (~ttmrichte@221.232.82.218) has joined #jython
[13:35] * pigletto (~quassel@213.151.215.195) has joined #jython
[13:49] * sgithens (~sgithens@149-166-10-223.dhcp-in.iupui.edu) has joined #jython
[13:53] * pigletto (~quassel@213.151.215.195) Quit (Remote host closed the connection)
[13:57] * pigletto (~quassel@213.151.215.195) has joined #jython
[14:28] * pigletto (~quassel@213.151.215.195) Quit (Remote host closed the connection)
[14:37] <pr3d4t0r> Allo.
[15:19] * juneau001 (~juneau@pool-72-69-88-199.chi01.dsl-w.verizon.net) Quit (Quit: Take care...)
[15:45] * skay (~skay@pat1.orbitz.net) has joined #jython
[15:58] * skay (~skay@pat1.orbitz.net) Quit (Quit: skay)
[16:01] * lucian (~lucian@188-222-55-189.zone13.bethere.co.uk) Quit (Remote host closed the connection)
[16:01] * lucian (~lucian@188-222-55-189.zone13.bethere.co.uk) has joined #jython
[16:10] * lopex (lopex@chello089076044027.chello.pl) has joined #jython
[16:25] * lheuer (~heuer@unaffiliated/lheuer) Quit (Quit: Closing Time)
[16:30] * thobe (~Adium@67.23.205.130) has joined #jython
[16:32] * jabley (~jabley@87-84-49-84.absolutely2.mezzonet.net) Quit (Quit: jabley)
[16:45] * nandoflorestan (~nandoflor@c9063272.virtua.com.br) Quit (Ping timeout: 240 seconds)
[16:59] * ttmrichter (~ttmrichte@221.232.82.218) Quit (Quit: ...and I'm taking my ball with me!)
[17:01] * lopex (lopex@chello089076044027.chello.pl) Quit ()
[17:04] * jabley (~jabley@cpc1-farn4-0-0-cust318.glfd.cable.ntl.com) has joined #jython
[17:12] * thobe (~Adium@67.23.205.130) Quit (Quit: Leaving.)
[17:28] * thobe (~Adium@67.23.205.130) has joined #jython
[17:33] * skay (~skay@pat1.orbitz.net) has joined #jython
[17:34] * jabley (~jabley@cpc1-farn4-0-0-cust318.glfd.cable.ntl.com) Quit (Quit: jabley)
[17:47] * skay (~skay@pat1.orbitz.net) Quit (Quit: Leaving.)
[17:48] * skay (~skay@pat1.orbitz.net) has joined #jython
[17:55] * hsaliak (~hsaliak@cm117.kappa220.maxonline.com.sg) has joined #jython
[17:55] <hsaliak> hello, anyone had any luck running jython django on jboss?
[17:55] * skay (~skay@pat1.orbitz.net) Quit (Quit: Leaving.)
[17:55] <hsaliak> i know the book says its problematic but unfortuately i am stuck with jboss as my deployment target
[17:55] <hsaliak> i can deploy the webapp just fine but i get a weird error with modjy
[18:00] <agronholm> you could try a less problematic framework
[18:00] <agronholm> http://www.web-core.org/ <- this is much simpler
[18:01] * tristanbuckner (~tristan@38.99.42.113) has joined #jython
[18:23] <hsaliak> sure, but i do already have most of my app done
[18:23] <hsaliak> the issue seems to be around modjy
[18:24] <hsaliak> i guess i'd have to check what's the deal with glassfish
[18:24] * skay (~skay@pat1.orbitz.net) has joined #jython
[18:40] * pigletto (~quassel@213.151.215.195) has joined #jython
[19:04] <agronholm> hsaliak, try us with the error you got
[19:19] <hsaliak> just a sec, let me reproduce it
[19:19] * thobe (~Adium@67.23.205.130) Quit (Quit: Leaving.)
[19:24] <hsaliak> all i am doing is running the admin console in a war file named 'nerdy'. my own app is disabled
[19:24] <hsaliak> http://hsaliak.pastebin.org/411060
[19:25] <hsaliak> a jython manage.py runserver works fine..
[19:27] <agronholm> so there's a configuration string that isn't set...at least that's my theory
[19:30] <hsaliak> right.. any idea where, in the django side of things or the jboss side of things
[19:30] <hsaliak> trying to deploy on glassfish now, lets see if this works better, it will isolate the problem to one side at least
[19:34] <hsaliak> hot damn it deployed in glassfish without any fuss
[19:35] <agronholm> does it work too?
[19:35] <agronholm> stuff might deploy but not work...
[19:37] <hsaliak> deploys and works
[19:37] <hsaliak> i can log in to the admin console just fine
[19:37] <sabi> nice.
[19:37] * sabi is having fun with java deployment now too. :(
[19:37] <hsaliak> not nice :-/ jboss is a necessary
[19:37] <sabi> python deployment is so much easier
[19:38] <hsaliak> i recall when i used to do j2ee with bea weblogic, i used to feel that jboss was light and sleek
[19:40] <hsaliak> sabi: yep
[19:40] <agronholm> sabi, does python have an appserver where you can deploy your app in a cluster through a web/soap interface?
[19:40] <agronholm> zope does not count
[19:40] <hsaliak> agronholm: i like the jython/glassfish combo already
[19:41] <agronholm> jython adds so much overhead
[19:41] <hsaliak> glassfish seems nice, had not used it before..
[19:41] <hsaliak> agronholm: so you are suggesting straight up java?
[19:41] <agronholm> well glassfish tends to be the most technically advanced appserver
[19:41] <agronholm> no, straight up python
[19:41] <agronholm> but it's not an option for you
[19:41] <agronholm> obviously
[19:41] <hsaliak> yep :)
[19:42] <sabi> agronholm: no, but i don't particularly like that style of deployment. :)
[19:42] <hsaliak> agronholm: its ok though, python is my day job
[19:42] <agronholm> sabi, nothing in python really supports clustering atm
[19:42] <agronholm> which is probably one of the reasons it's not as popular in the enterprise as java is
[19:44] <hsaliak> agronholm: well it should not be too hard to get something liek tornado running on a cluster
[19:45] <agronholm> dunno why I would want to have anything to do with tornado...
[19:45] <agronholm> or why tornado in particular, or how the deployment would work
[19:52] <hsaliak> let me try jboss 6..
[20:00] * tristanbuckner (~tristan@38.99.42.113) Quit (*.net *.split)
[20:04] <hsaliak> deploying..
[20:04] * pigletto (~quassel@213.151.215.195) Quit (Remote host closed the connection)
[20:09] * thobe (~Adium@67.23.205.130) has joined #jython
[20:13] * thobe (~Adium@67.23.205.130) Quit (Ping timeout: 252 seconds)
[20:16] * thobe (~Adium@67.23.205.130) has joined #jython
[20:20] * lopex (lopex@chello089076044027.chello.pl) has joined #jython
[20:24] * jimbaker (~jbaker@c-24-8-34-253.hsd1.co.comcast.net) has joined #jython
[20:24] <hsaliak> fail.
[20:24] <hsaliak> so if you want to deploy django-jython, dont do it on jboss
[20:24] * hsaliak (~hsaliak@cm117.kappa220.maxonline.com.sg) Quit (Remote host closed the connection)
[20:25] <agronholm> damn, he should've tested it on plain tomcat
[20:30] <sabi> ohwell.
[20:43] * NottsMancs (~limeydrin@cpc2-salf4-0-0-cust701.manc.cable.ntl.com) Quit ()
[20:46] * thobe (~Adium@67.23.205.130) Quit (Quit: Leaving.)
[20:53] * jimbaker (~jbaker@c-24-8-34-253.hsd1.co.comcast.net) Quit (Quit: jimbaker)
[21:02] * jabley (~jabley@cpc1-farn4-0-0-cust318.glfd.cable.ntl.com) has joined #jython
[21:09] * lucian (~lucian@188-222-55-189.zone13.bethere.co.uk) Quit (Remote host closed the connection)
[21:23] <sabi> special-casing 1-char strings doesn't seem terribly obvious.
[21:23] <sabi> (ww)
[21:36] <agronholm> jython should have something like cast(value, JavaType)
[21:36] <agronholm> that'd eliminate the need to use reflection
[21:37] * sgithens (~sgithens@149-166-10-223.dhcp-in.iupui.edu) Quit (Read error: Operation timed out)
[22:09] * jabley (~jabley@cpc1-farn4-0-0-cust318.glfd.cable.ntl.com) Quit (Quit: jabley)
[22:35] * skay (~skay@pat1.orbitz.net) Quit (Quit: skay)
[22:39] * skay (~skay@pat1.orbitz.net) has joined #jython
[22:41] * jimbaker (~jbaker@64.134.124.132) has joined #jython
[22:49] <jimbaker> agronholm: maybe use org.python.core.Py.tojava(value, JavaType) ?
[22:50] <jimbaker> we probably should expose this better however. sounds like a job for clamp :)
[23:38] * AbstractBeliefs (~AbstractB@80.47.92.47) has joined #jython
[23:39] <AbstractBeliefs> id like to use jython to generate .class files from python code, but jythonc isnt included in the 2.5.1 release. how do i compile to .class now?
[23:43] <agronholm> jython -m compileall .
[23:43] <agronholm> that's the #1 FAQ around here
[23:43] <AbstractBeliefs> ahh, i must have missed it, im too busy reading stuff such as ReplaceJythonc
[23:44] <AbstractBeliefs> so the line for that is what? "jython -m compileall *.py"?
[23:46] <agronholm> jython -m compileall .
[23:47] <agronholm> . being the directory where to compile all .py files
[23:47] <AbstractBeliefs> and that compiles it to a .class file suitable for embedding into a web page?
[23:47] * jimbaker (~jbaker@64.134.124.132) Quit (Quit: jimbaker)
[23:47] <agronholm> embedding into a web page? eh?
[23:48] <agronholm> you don't embed class files to web pages
[23:48] <agronholm> the resulting class file still need jython to run
[23:48] <AbstractBeliefs> i see
[23:49] <AbstractBeliefs> im looking for some way to turn .py -> .class, suitable for embedding in a page, like here: http://www.htmlgoodies.com/beyond/java/article.php/3470731
[23:50] <AbstractBeliefs> or do i need to process the class file further?

Index

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