#jython IRC Log (v0.9)

Index

IRC Log for 2012-04-12

Timestamps are in GMT/BST.

[0:47] * fwierzbicki (~frank@c-98-223-65-215.hsd1.in.comcast.net) Quit (Quit: fwierzbicki)
[1:32] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[1:43] * lheuer1 (~Adium@blfd-4d083682.pool.mediaWays.net) has joined #jython
[1:45] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 246 seconds)
[2:13] * juneau001 (~juneau@50-103-3-12.dklb.il.frontiernet.net) has joined #jython
[3:26] * shashank1 (~shashank@71-218-17-191.hlrn.qwest.net) has joined #jython
[4:39] * juneau001 (~juneau@50-103-3-12.dklb.il.frontiernet.net) Quit (Quit: juneau001)
[4:57] * shashank1 (~shashank@71-218-17-191.hlrn.qwest.net) Quit (Ping timeout: 250 seconds)
[5:49] * lheuer1 is now known as lheuer
[8:06] * agronholm (~Demi-god@nblzone-211-37.nblnetworks.fi) Quit (Quit: KVIrc 4.1.1 Equilibrium http://www.kvirc.net/)
[10:29] * ctismer is now known as ctismer_afk
[10:58] * wainersm (~wainersm@189.61.204.85) Quit (Ping timeout: 252 seconds)
[11:12] * juneau001 (~juneau@131.225.24.88) has joined #jython
[11:23] * ctismer_afk is now known as ctismer
[12:02] * wainersm (wainersm@nat/ibm/x-fbrxvgdpceuxlazu) has joined #jython
[12:16] * agronholm (~Demi-god@nblzone-211-37.nblnetworks.fi) has joined #jython
[12:16] * ChanServ sets mode +o agronholm
[12:48] * enebo (~enebo@75-168-81-196.mpls.qwest.net) has joined #jython
[12:55] * jyinjava (b6b161e5@gateway/web/freenode/ip.182.177.97.229) has joined #jython
[12:58] <jyinjava> hi, I want to write my web applications core api in jython and use it in Java code e.g. servlets, rest interfaces etc. Is there a very simple way to do this, other than creating a java interface, implementing in jyhton and loading it back in Java through PythonInterpretor object?
[12:59] <jyinjava> jython is fairly advanced and very simple for using java in python. But is it also that much simple for using jython (python) in java??
[13:00] <agronholm> what do you mean
[13:03] <jyinjava> I will create a dozens of python modules as the core api of my application. Then I want to use its classes using jython, in Java servlets and REST interfaces (using Jersey). In the servlets, is there a simple way to create an instance of a Jython class e.g. MyCoreAPIUserLogin.py, in java e.g. MyCoreAPIUserLogin ulog = new MyCoreAPIUserLogin()??
[13:04] <agronholm> it doesn't work that way
[13:04] <agronholm> you have to create java interfaces for all classes you want to access, or use existing interfaces and have the classes implement them
[13:04] <agronholm> second, you can't instantiate such classes in Java
[13:05] <agronholm> you have to use an object factory
[13:05] <jyinjava> a long way for use in Java. :)
[13:05] <agronholm> the jython book has documentation on this
[13:06] <jyinjava> I have read that in the Jython book, and so was a bit uneasy to see the methods discussed.
[13:10] * jyinjava (b6b161e5@gateway/web/freenode/ip.182.177.97.229) Quit (Ping timeout: 245 seconds)
[13:14] * jyinjava (272fdbd2@gateway/web/freenode/ip.39.47.219.210) has joined #jython
[13:15] <jyinjava> was d/c, back again.
[13:15] <jyinjava> so, Can we have a more simpler method, more like native Java classes to use Jython, in a future version of Jython?? So that things look more simple for embedding Jython in Java.
[13:15] <agronholm> there are some improvements being planned
[13:15] <agronholm> but they won't be seen in the near future
[13:16] <jyinjava> hopefully by end of this year or more??
[13:16] <agronholm> I don't know
[13:17] <agronholm> the only visible milestone is 2.7 during this summer
[13:17] <agronholm> after that, nobody knows for sure what's next
[13:20] <jyinjava> I think this feature will be a great leap forward, especially for python. As Java apps will be seamlessly and simply use python libraries, when jython provides this ease. Highly recommended.
[13:31] <jyinjava> thanks for the great work so far. I hope to see this feature soon. Good Luck.
[13:34] * jyinjava (272fdbd2@gateway/web/freenode/ip.39.47.219.210) Quit (Quit: Page closed)
[13:48] * Arfrever (~Arfrever@apache/committer/Arfrever) has joined #jython
[13:59] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 260 seconds)
[14:01] * shashank1 (~shashank@71-218-17-191.hlrn.qwest.net) has joined #jython
[15:25] * shashank1 (~shashank@71-218-17-191.hlrn.qwest.net) Quit (Ping timeout: 252 seconds)
[16:07] <shashank> Hi all, I've been tracing this bug in the jython base that was introduced when I updated to asm4
[16:07] <shashank> It seems to break the posix modules' chmod call
[16:08] <shashank> I'm not sure what to do there, it seems that posix.chmod(...) returns -1 in very simple cases (posix coming from the jnr project)
[16:09] <sabi> might see if there's a newer version of it - otherwise just trace and see what breaks :)
[16:09] <shashank> pjenvey, I notice that you are working on the jnr project over at github, do you know why this might be happening, or where I should be looking
[16:10] <shashank> sabi, yeah that's going to be my next step, but the version in jython seems to be a couple of years old, I don't see why it should fail now
[16:10] <shashank> it seems to be failing in both Java6 and Java7, leaving me even more confused
[16:25] <sabi> yeah, no idea, though new hotspot versions do go into java 6
[16:26] <agronholm> shashank: have you checked with strace that the chmod call returns the correct value?
[16:26] <shashank> agronholm, no that's the thing, chmod returns -1 in this case
[16:27] <shashank> so somehow, the change of moving from asm3x to asm4 broke the jnr-posix library
[16:28] <agronholm> so even the system call returns the wrong value...?
[16:28] <shashank> well not the system call, the POSIXModule in Jython uses the jnr-posix apis
[16:28] <sabi> shashank: agronholm was saying that you should look at the system call
[16:29] <agronholm> see if the system call returns a different value than what jnr-posix does
[16:29] <sabi> it should be pretty obvious with strace or whatever other thing your OS has
[16:29] <sabi> you can often see the parameters, too
[16:29] <shashank> sabi, agronholm, ok i'll look at that
[16:30] <shashank> but i'd suspect that it'll work since cause if I revert jython to an older version which uses asm3x, it seems to be working fine
[16:30] <sabi> well, at least that gives you a baseline :)
[16:30] <shashank> but i'll still check if the system call is working
[16:30] <sabi> i imagine it doesn't actually successfully chmod?
[16:31] <shashank> sabi, i'll check that
[16:34] <sabi> ok. :)
[16:35] <sabi> it's annoying, but if you come at it from both the python/java end and the system call end, hopefully you'll get there
[16:36] <shashank> sabi, ok, thanks
[16:47] <shashank> sabi, agronholm, ok so I have some results, both the system-call and the java version of chmod work as expected
[16:47] <agronholm> so what doesn't?
[16:47] <shashank> only the jython version using the jnr-posix library is screwed up
[16:48] <agronholm> well, that narrows it down somewhat
[16:48] <shashank> and it has nothing to do with the ASM change too (which is even beter)
[16:48] <agronholm> I suspected as much
[16:48] <shashank> seems that older versions of jython too, chmod was broken
[16:48] <shashank> but it's only now that the errors are being correctly thrown
[16:48] <agronholm> heh.
[16:50] <shashank> I'm tempted to use the jnr-posix being developed over at github (https://github.com/jnr)
[16:50] <shashank> and see if that'd help
[16:51] <agronholm> not a bad idea
[16:51] <shashank> agronholm, ok cool, i'll try that and post back here
[17:57] * srcerer (~chatzilla@dns2.klsairexpress.com) Quit (Quit: ChatZilla 0.9.88.1 [Firefox 11.0/20120312181643])
[18:19] * enebo (~enebo@75-168-81-196.mpls.qwest.net) Quit (Quit: enebo)
[19:09] * shashank1 (~shashank@ucb-np2-177.colorado.edu) has joined #jython
[19:10] * juneau001 (~juneau@131.225.24.88) Quit (Quit: juneau001)
[20:24] * Oti (~ohumbel@adsl-84-227-92-215.adslplus.ch) has joined #jython
[20:39] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[20:53] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 246 seconds)
[20:57] * wainersm (wainersm@nat/ibm/x-fbrxvgdpceuxlazu) Quit (Quit: Ex-Chat)
[21:08] * pjenvey (~pjenvey@underboss.org) Quit (Read error: Operation timed out)
[21:09] * pjenvey (~pjenvey@underboss.org) has joined #jython
[21:18] * [Arfrever] (~Arfrever@apache/committer/Arfrever) Quit (Ping timeout: 252 seconds)
[21:20] * [Arfrever] (~Arfrever@apache/committer/Arfrever) has joined #jython
[22:28] * srcerer (~chatzilla@dns2.klsairexpress.com) has joined #jython
[23:20] * shashank1 (~shashank@ucb-np2-177.colorado.edu) Quit (Ping timeout: 240 seconds)

Index

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