#jython IRC Log (v0.9)

Index

IRC Log for 2014-01-08

Timestamps are in GMT/BST.

[0:14] * arctansusan (~susantan@173-11-98-81-SFBA.hfc.comcastbusiness.net) Quit (Quit: arctansusan)
[0:33] * arctansusan (~susantan@173-11-98-81-SFBA.hfc.comcastbusiness.net) has joined #jython
[0:46] <arctansusan> Description of virtualenv-on-jython error: http://pastebin.com/yvKS4FL7 :(
[0:56] <jimbaker> arctansusan, virtualenv 1.10 dropped support for python 2.5, per the changelog listed here, https://pypi.python.org/pypi/virtualenv
[1:03] <arctansusan> I'm using python 2.7..!
[1:03] <arctansusan> why does jython think I'm using python 2.5?
[1:04] <jimbaker> arctansusan, it's just not reporting correctly
[1:05] <arctansusan> :(
[1:48] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) Quit (Ping timeout: 265 seconds)
[1:51] <arctansusan> I downgraded to a lower version of virtualenv. http://stackoverflow.com/questions/20984986/how-do-you-solve-this-virtualenv-running-on-jython-error/20985185?noredirect=1#20985185
[1:53] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) has joined #jython
[2:17] * indra (cbb0652a@gateway/web/freenode/ip.203.176.101.42) has joined #jython
[2:18] * indra (cbb0652a@gateway/web/freenode/ip.203.176.101.42) Quit (Client Quit)
[2:19] * indratalip (cbb0652a@gateway/web/freenode/ip.203.176.101.42) has joined #jython
[2:20] * lheuer (~Adium@unaffiliated/lheuer) Quit (Quit: Leaving.)
[2:36] * arctansusan (~susantan@173-11-98-81-SFBA.hfc.comcastbusiness.net) Quit (Quit: arctansusan)
[5:28] * sinistersnare is now known as sinsnare|zzZZzz
[5:38] * indratalip (cbb0652a@gateway/web/freenode/ip.203.176.101.42) Quit (Ping timeout: 272 seconds)
[6:10] * diametric (~diametric@2604:3400:dc1:43:216:3eff:fe27:bf9d) Quit (Ping timeout: 240 seconds)
[6:27] * lheuer (~Adium@f048032024.adsl.alicedsl.de) has joined #jython
[6:27] * lheuer (~Adium@f048032024.adsl.alicedsl.de) Quit (Changing host)
[6:27] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[7:03] * diametric (~diametric@2604:3400:dc1:43:216:3eff:fe27:bf9d) has joined #jython
[7:05] * fwierzbicki (~Adium@99-106-170-162.lightspeed.sntcca.sbcglobal.net) Quit (Quit: Leaving.)
[7:41] * lheuer1 (~Adium@f049202004.adsl.alicedsl.de) has joined #jython
[7:43] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 260 seconds)
[8:01] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) has joined #jython
[8:29] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) Quit (Ping timeout: 260 seconds)
[11:50] * fluxdude (~fluxdude@unaffiliated/fluxdude) has joined #jython
[13:14] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Quit: Konversation terminated!)
[13:14] * r0bby_ (~wakawaka@guifications/user/r0bby) has joined #jython
[13:17] * zz_whg is now known as whg
[13:21] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) has joined #jython
[13:22] <whg> jimbaker https://github.com/gthank/patois has landed. I already have the RTFD project set up, looking to get Travis CI before I clock in, if possible
[13:29] * mantovani (~mantovani@li74-187.members.linode.com) has joined #jython
[13:29] <mantovani> good afternoon
[13:29] <mantovani> sorry for this stupid quesiton
[13:29] <mantovani> but I didn't find in google
[13:29] <mantovani> how do I convert array to associative array ?
[13:30] <mantovani> oh crap
[13:30] <mantovani> I found
[13:30] <mantovani> is manually
[13:30] <mantovani> is not cool like perl
[13:30] <mantovani> %hash = @array
[13:32] <whg> mantovani I'll probably regret asking this, but why would you want to?
[13:33] <mantovani> because I'm using an API from IBM Websphere Application Server
[13:33] <mantovani> and I'm doing something and it returns a list (array)
[13:34] <mantovani> and the first item is a key and the second the value, and it repeat for all array.
[13:36] <whg> And that's the default way to translate it in Perl?
[13:36] <mantovani> @hash = @array
[13:36] <mantovani> ops
[13:36] <mantovani> %hash = @array
[13:36] <mantovani> very simple and clean
[13:36] <whg> And it says odd indexes are keys, and even indexes are values?
[13:36] <whg> Rather than, say, index is the key and value is the value?
[13:37] <mantovani> yes, !
[13:37] <mantovani> odd are keys and even are values
[13:37] <whg> Well, I guess you learns omething new every day
[13:37] <whg> I would never have guessed that was the defined conversion
[13:38] <whg> As you say, there's no implicit conversion in Python
[13:38] <mantovani> Python is a very nice language.
[13:38] <whg> I'd recommend making it a named function
[13:38] <mantovani> I'll just use it once in my code.
[13:39] <whg> ok
[14:01] * r0bby_ is now known as robbyoconnor
[14:08] * vext01 (~edd@host-92-20-137-68.as13285.net) has joined #jython
[14:08] <vext01> hello
[14:11] <vext01> jimbaker: about?
[14:39] * clajo04 (~clajo04@pool-108-54-80-252.nycmny.fios.verizon.net) has joined #jython
[14:42] * diametric (~diametric@2604:3400:dc1:43:216:3eff:fe27:bf9d) Quit (*.net *.split)
[14:45] * diametric (~diametric@2604:3400:dc1:43:216:3eff:fe27:bf9d) has joined #jython
[14:51] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[15:27] <topi`> is there any way of automating these getters/setters in jython? I'm trying to use a java reporting library from within jython, and the example has stuff like public Integer getQuantity() {
[15:27] <topi`> return quantity; }
[15:27] <topi`> which, in my eyes, is such a waste of lines.
[15:28] <whg> Are you trying to wrap it or something?
[15:28] <topi`> no, just trying out the example code in interactive jython
[15:29] <whg> If you're using the Java object, I think you're stuck using it
[15:30] <whg> You could probably write a Python class that used bean introspection to automatically wrap arbitrary Java objects and "Python-ize" the properties, though
[15:31] <whg> Basically, use introspection to find things that obey the bean naming conventions and then use http://docs.python.org/2/library/functions.html?highlight=property#property on them
[15:31] <whg> But I'm not sure about using that from Java
[15:31] <whg> Possibly clamped could help you out there
[15:34] <topi`> I'll translate the java code to python
[16:09] <jimbaker> vext01, i'm here
[16:09] <jimbaker> topi`, well jython knows about bean conventions, so if you getX and setX defined for some foo, you can just say foo.x and foo.x = ...
[16:11] <vext01> jimbaker: i was just wondering about the ssl stuff -- looks like it has not merged yet?
[16:11] <vext01> and -- happy new year ;)
[16:12] <jimbaker> and of course you can add methods at any time to the java class from python
[16:12] <jimbaker> vext01, no, because we need nonblocking ssl
[16:12] <jimbaker> so i went and designed that
[16:13] <jimbaker> vext01, https://github.com/jimbaker/socket-reboot
[16:13] <jimbaker> i need to mail jython-dev mailing list to see if there's any final thoughts, but i've been also circulating it w/ a few experts on the subject matter
[16:14] <vext01> nice one
[16:14] <jimbaker> (they don't know netty, but they do know low-level python networking...)
[16:15] <vext01> ok, i look forward ;)
[16:16] <jimbaker> vext01, so i never merged jython-ssl because i disliked its integration w/ existing socket support. just a bad code smell imho. anyway, socket-reboot is clean & spiffy
[16:16] <jimbaker> and more importantly, it allows us to support pip
[16:17] <vext01> \o/
[16:17] <vext01> is this something that will become part of jython eventually?
[16:20] <jimbaker> whg, topi`, here's what you can do on any java class as it's imported to python, although there are some restrictions i don't show: https://gist.github.com/jimbaker/8319447
[16:21] <jimbaker> vext01, yes, this will be part of 2.7 beta 2
[16:21] <jimbaker> we've been blocking it on pip, since otherwise what's the point of a 2.7?
[16:22] <jimbaker> it either supports the python ecosystem, or it doesn't
[16:26] <jimbaker> pjenvey, btw, i did get a patch together for getting java classes/interfaces to participate as a bases for code using metaclasses, so we will soon see if we can make clamp that much nicer
[16:26] <whg> jimbaker: Out of curiosity, does 2.7 know about wheels, yet?
[16:27] <vext01> jimbaker: nice
[16:27] <vext01> this will make my life easier
[16:28] <jimbaker> whg, i don't know of anyone working on it; i'm not certain if wheels actually requires anything but pure python however
[16:28] <jimbaker> (http://www.python.org/dev/peps/pep-0427/)
[16:28] <jimbaker> so we should certainly test it asap
[16:29] <jimbaker> this might be the sort of thing that we need patois for
[16:29] <jimbaker> vext01, metaclass support OR pip OR both?
[16:30] <whg> Oh, I got travis-ci up and running on patois, too.
[16:31] <whg> I'll update the readme to include the little badge when I get a chance
[16:31] <whg> So now I need to get down to the business of figuring out what to put in it
[16:35] <jimbaker> for those interested in metaclass support - https://gist.github.com/jimbaker/8319678
[16:35] <jimbaker> assuming this looks good, this should be in trunk shortly
[16:36] <vext01> jimbaker: pip
[16:37] <vext01> jimbaker: we have three separate test suites all testing the same thing under various different test frameworks
[16:37] <vext01> we want to unify them
[16:37] <jimbaker> vext01, no worries, it did seem that metaclasses might be of interest to you as well given your work
[16:37] <jimbaker> but pip, for sure
[16:37] <vext01> that too yes
[16:37] <vext01> remember the __new__ stuff?
[16:37] <vext01> last year some time
[16:37] <vext01> perhaps i don't need to do voodoo there anymore
[16:46] <jimbaker> vext01, i don't recall specifics re __new__, except in a discussion re clamp w/ someone (https://github.com/jythontools/clamp#known-issues)
[16:46] <vext01> we concluded that it isnt really supported
[16:46] <vext01> thats all i remember
[16:48] <jimbaker> vext01, just see if that known issue i mentioned in the link is what you were interested in
[16:48] <jimbaker> (i like to capture these subtleties to the extent i can)
[16:49] <vext01> jimbaker: i have never used clamp, so it wouldn't be a clamp bug
[16:49] <vext01> i thnk i was overriding __new__ and getting weird errors
[16:49] <vext01> in vanilla jython
[16:50] <vext01> i dont really remember, sorry
[16:50] <jimbaker> vext01, no worries
[17:27] * clajo04 (~clajo04@pool-108-54-80-252.nycmny.fios.verizon.net) Quit (Quit: clajo04)
[17:37] <jimbaker> giving my first talk on clamp itself: http://www.meetup.com/frpythoneers/events/159409072/
[18:17] * lheuer1 (~Adium@f049202004.adsl.alicedsl.de) Quit (Quit: Leaving.)
[18:30] * fluxdude (~fluxdude@unaffiliated/fluxdude) Quit (Read error: Operation timed out)
[18:44] * arctansusan (~susantan@173-11-98-81-SFBA.hfc.comcastbusiness.net) has joined #jython
[19:21] * Oti (~ohumbel@adsl-84-227-97-139.adslplus.ch) has joined #jython
[19:24] * lheuer (~Adium@f049202004.adsl.alicedsl.de) has joined #jython
[19:24] * lheuer (~Adium@f049202004.adsl.alicedsl.de) Quit (Changing host)
[19:24] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[19:26] <Oti> jimbaker: will the clamp talk be recorded?
[19:27] <jimbaker> Oti, not the one in denver; but i can certainly post slides
[19:27] <jimbaker> i might be doing one at rackspace the following week
[19:27] <jimbaker> if so, i can probably get that recorded
[19:27] <jimbaker> also i think this is just the sort of thing that might be of interest at europython
[19:27] <arctansusan> hi ! I've decided to install + setup jython 2.7beta1, which has better support for CPython 2.7 and virtualenv. I ran into a problem installing virtualenv: http://www.jython.org/jythonbook/en/1.0/appendixA.html#virtualenv The command 'jython easy_install.py virtualenv" --> easy_install.py isn't found in the project directory. do I need to wget this file somewhere?
[19:27] <Oti> jimbaker, I'll be happy with slides
[19:28] <jimbaker> Oti, cool - it will be an expansion of what i have documented here, https://github.com/jimbaker/clamped
[19:28] <jimbaker> btw, darjus and i are look at redoing the api that users see so they just work w/ a metaclass base we provide
[19:29] <Oti> jimbaker, and regarding europython - my family is not blocking at first sight (summer vacation...), so I might make it to Berlin, hopefully!
[19:29] <jimbaker> not to mention more of the functionality in the todo, https://github.com/jythontools/clamp#todo
[19:29] <jimbaker> Oti, fantastic!
[19:30] <Oti> I definitely need more clamp insight, this is also important for my daily work :-)
[19:30] <arctansusan> ahh. i found the problem. the instructions should instead say "jython ez_setup.py virtualenv".
[19:30] <jimbaker> yeah, i need to schedule summer stuff for kids, not to mention the family, too - it will be the usual complex summer plans for us ;)
[19:31] <jimbaker> arctansusan, if you run into any problems w/ that, i have a temporary branch to make ssl work, it's documented in the clamped branch i just referenced
[19:32] <jimbaker> *only works w/ easy_install however, not pip*
[19:36] <arctansusan> I have virtualenv installed, but creating a jython virtualenv is problematic: http://pastebin.com/rYcQr62s
[19:42] <jimbaker> arctansusan, not certain what's going on there - i haven't looked at virtualenv yet w/ 2.7, since pip is the usual dependency. presumably ez_setup.py would install setuptools on your behalf
[19:42] <jimbaker> but it looks like we need to dig into the specifics
[19:44] <arctansusan> Ive used ez_setup.py to install setuptools already
[19:46] <arctansusan> also i ran into a problem installing pip: http://pastebin.com/WTSujaKc am i missing a step?
[20:17] <arctansusan> I have a somewhat silly question -- how do I get the jar "org.python.util.PythonInterpreter"? Im trying to embed Jython into Java by following this example: https://wiki.python.org/jython/UserGuide#embedding-jython
[21:17] <agronholm> arctansusan: um, that's the fully qualified class name for the PythonInterpreter class
[21:17] <agronholm> you probably mean jython.jar
[21:20] * clajo04 (~clajo04@pool-108-54-80-252.nycmny.fios.verizon.net) has joined #jython
[21:36] <arctansusan> yes
[21:36] <arctansusan> nvm, i got the jar added.
[22:04] * indratalip (cbb0652a@gateway/web/freenode/ip.203.176.101.42) has joined #jython
[22:42] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) Quit (Ping timeout: 252 seconds)
[23:10] * arctansusan (~susantan@173-11-98-81-SFBA.hfc.comcastbusiness.net) Quit (Ping timeout: 260 seconds)
[23:46] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)

Index

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