#jython IRC Log


IRC Log for 2013-12-20

Timestamps are in GMT/BST.

[0:00] <topi`> I wonder what the Twisted guys mean with "mixins", basically python does not have or use the concept of a mixin.
[0:00] <topi`> it's familiar to me from Scala, though
[0:26] * Diggty (~zsmith@monkeydev.ucsd.edu) Quit (Ping timeout: 246 seconds)
[0:33] <jimbaker> topi`, well you can create such a concept thanks to python's new style classes
[0:33] <jimbaker> but i don't know twisted specifics
[0:47] <jimbaker> topi`, there may be other robust ways of waking the event loop for a netty-based reactor. certainly posixbase.py is the starting point for any such work
[0:47] <agronholm> I'm still pretty proud of my homegrown Enum implementation
[0:48] <agronholm> when you declare the class, you can declare class variables that will end up instances of the class itself
[0:48] <jimbaker> agronholm, no surprise there - you write great code!
[0:48] <agronholm> thanks :)
[0:49] <jimbaker> ok, it's been a great day - i'm going to wrap up now, got some christmas events to go to tonight. tomorrow, i'm playing w/ cassandra jython integration for our hack day - it will be a good chance to use clamp in anger :)
[0:50] <jimbaker> http://www.datastax.com/dev/blog/whats-new-in-cassandra-2-0-prototype-triggers-support
[1:07] <pjenvey> agronholm - sounds similar to the new python 3.4 enum
[1:11] * lheuer (~Adium@unaffiliated/lheuer) Quit (Quit: Leaving.)
[1:14] <agronholm> yeah but python 3.4 are much more primitive
[1:14] <agronholm> *enums in python 3.4
[1:14] <agronholm> last I checked you can't put arbitrary data in them
[1:16] * oscar_toro (~Thunderbi@190-22-153-33.baf.movistar.cl) has joined #jython
[1:16] <agronholm> hm
[1:17] <agronholm> I may be wrong about that
[1:18] <agronholm> oh I see
[1:18] <agronholm> http://docs.python.org/3.4/library/enum.html#planet
[1:19] <agronholm> this looks just like my first attempt at enums
[1:19] <agronholm> until I realized it was better to do it with a helper class, allowing me to use keyword args for defining enum instances
[1:19] <agronholm> actually it was zzzeek that slapped me around for that :)
[1:35] <pjenvey> kwargs?
[1:47] <agronholm> pjenvey: ?
[1:48] <agronholm> pjenvey: the example in 3.4 docs implies that only positional constructor arguments are supported
[1:54] <pjenvey> wondering what you mean by allowing keywords for defining them
[1:55] <pjenvey> i should take a look at your package if you have it somewhere
[1:56] <agronholm> pjenvey: keyword arguments for constructors
[1:56] <agronholm> if you look at the planet example I just linked to
[1:57] <agronholm> there is no way to do MERCURY = {'mass': 3.303e+23, 'radius': 2.4397e6}
[1:57] <agronholm> for example
[1:57] <agronholm> or, heaven forbid, mix positional and keyword arguments like in any normal constructor invocation
[1:57] <agronholm> let me dig up my enum implementation
[1:58] <agronholm> http://paste.ofcode.org/nupcmHTtnZU5P28XCdVFKG
[1:59] <agronholm> that has some sqlalchemy stuff in it but you can ignore that part
[2:02] <pjenvey> gotya
[2:02] <pjenvey> so you'd do EnumSymbol(mass=3.303, radius=2.4)
[2:02] <agronholm> indeed
[2:02] <pjenvey> a little more verbose though
[2:02] <agronholm> a little
[2:02] <agronholm> but I actually need the ability to mix positional and keyword arguments
[2:03] <agronholm> those two styles aren't mutually exclusive though
[2:22] * zz_whg_away is now known as whg
[2:27] * oscar_toro (~Thunderbi@190-22-153-33.baf.movistar.cl) Quit (Ping timeout: 246 seconds)
[2:45] * whg is now known as zz_whg
[3:14] * sinsnare|awaay is now known as sinistersnare
[3:14] <sinistersnare> jimbaker, it was AMAZING
[3:14] <sinistersnare> so hilarious
[3:15] <sinistersnare> but yeah, im super excited to see lots of talk on sockets :)
[3:16] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[3:56] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Max SendQ exceeded)
[4:58] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[5:12] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Read error: Connection reset by peer)
[5:12] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[6:57] * lheuer (~Adium@f048141189.adsl.alicedsl.de) has joined #jython
[6:57] * lheuer (~Adium@f048141189.adsl.alicedsl.de) Quit (Changing host)
[6:57] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[7:38] * lheuer1 (~Adium@f049040156.adsl.alicedsl.de) has joined #jython
[7:40] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 250 seconds)
[7:43] * lheuer1 is now known as lheuer
[7:43] * lheuer (~Adium@f049040156.adsl.alicedsl.de) Quit (Changing host)
[7:43] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[8:23] <grey_> ok. Long backlog about sockets. What's this about?
[8:41] <topi`> grey_: about sockets that would not suck. Jython 2.7b2 is still a ways off, because of somewhat broken socket support.
[8:46] <topi`> hmm, jython2.7b+ seems to be using apache bzip2 code:
[8:46] <topi`> java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream
[8:46] <topi`> looks like that is not packaged inside jython.jar, after all...
[9:24] <peke> topi`: jimbaker: netty seems to support jdk 1.5 so most likely they don't use java 7 nio. notice that i know about nothing about netty or low level socket stuff, just noticed that on http://netty.io/ when i looked at it.
[9:35] * fluxdude (~fluxdude@unaffiliated/fluxdude) has joined #jython
[9:54] * lheuer1 (~Adium@f049040156.adsl.alicedsl.de) has joined #jython
[9:58] <grey_> peke: Netty supports blocking IO (io.netty.channel.oio, java 1.5) and Nonblocking IO (io.netty.channel.nio)
[9:58] <grey_> As for aio http://stackoverflow.com/questions/17614408/aio-in-netty-4-0-0-cr9
[10:00] <grey_> they also have a channel on freenode, #netty
[10:24] <peke> grey_: ok. apparently "No additional dependencies but JDK 1.5 (or above)" statement at http://netty.io/ isn't all correct.
[10:25] <peke> i'm all for jython 2.7 requiring java 7 so don't see any problems with netty using java 7 nio.
[10:50] <grey_> JSR 51 (NIO) has been in Java since 1.4.
[10:51] <grey_> To my knowledge, Netty should run on JDK 1.5. Of course, you will not be able to use the features added in JSR 203
[10:56] <topi`> so NIO is not asyncronous IO but just "new IO"?
[10:56] <topi`> I shudder to think what the "old IO" is like...
[10:56] <grey_> blocking
[10:58] <grey_> InputStreams and OutputStreams
[10:59] * lheuer1 (~Adium@f049040156.adsl.alicedsl.de) Quit (Quit: Leaving.)
[10:59] * lheuer1 (~Adium@f049040156.adsl.alicedsl.de) has joined #jython
[11:01] * lheuer1 (~Adium@f049040156.adsl.alicedsl.de) Quit (Client Quit)
[11:10] * dktyph (~dk@xor.k.vu) has joined #jython
[11:20] * lheuer1 (~Adium@f049040156.adsl.alicedsl.de) has joined #jython
[11:30] * lheuer1 (~Adium@f049040156.adsl.alicedsl.de) Quit (Quit: Leaving.)
[11:32] * oscar_toro (~Thunderbi@186-79-2-221.baf.movistar.cl) has joined #jython
[11:59] * oscar_toro (~Thunderbi@186-79-2-221.baf.movistar.cl) Quit (Ping timeout: 245 seconds)
[12:04] * Thev00d00 (~v00d00@gentoo/developer/TheV00d00) Quit (Quit: No Ping reply in 120 seconds.)
[12:04] * Thev00d00 (~v00d00@ has joined #jython
[12:04] * Thev00d00 (~v00d00@ Quit (Changing host)
[12:04] * Thev00d00 (~v00d00@gentoo/developer/TheV00d00) has joined #jython
[12:06] * Thev00d00 (~v00d00@gentoo/developer/TheV00d00) Quit (Excess Flood)
[12:06] * Thev00d00 (~v00d00@ has joined #jython
[12:06] * Thev00d00 (~v00d00@ Quit (Changing host)
[12:06] * Thev00d00 (~v00d00@gentoo/developer/TheV00d00) has joined #jython
[13:03] * oscar_toro (~Thunderbi@186-79-2-221.baf.movistar.cl) has joined #jython
[13:09] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 240 seconds)
[13:11] * zz_whg is now known as whg
[13:20] * oscar_toro (~Thunderbi@186-79-2-221.baf.movistar.cl) Quit (Ping timeout: 252 seconds)
[13:25] * oscar_toro (~Thunderbi@186-79-2-221.baf.movistar.cl) has joined #jython
[13:51] <whg> topi` NIO was a lot of stuff https://en.wikipedia.org/wiki/New_I/O
[13:51] <whg> Some of it was async
[13:52] * oscar_toro (~Thunderbi@186-79-2-221.baf.movistar.cl) Quit (Ping timeout: 252 seconds)
[13:53] <whg> NIO2 was an additional round of changes
[13:53] <whg> A lot of NIO2 was actually focused on making filesystem stuff suck less
[13:54] * oscar_toro (~Thunderbi@186-79-2-221.baf.movistar.cl) has joined #jython
[13:56] <whg> My understanding is that the big async win of NIO2 was creating an async version of the Channel abstraction that NIO introduced
[13:57] <whg> (I was more interested in the filesystem stuff, because I usually work higher up the abstraction stack than Channels)
[14:02] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[14:14] * r0bby_ (~wakawaka@guifications/user/r0bby) has joined #jython
[14:14] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 250 seconds)
[14:47] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[14:48] * r0bby_ (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 272 seconds)
[14:49] * oscar_toro (~Thunderbi@186-79-2-221.baf.movistar.cl) Quit (Ping timeout: 252 seconds)
[15:03] <whg> jimbaker: I just grabbed your jython-ssl branch; should I manually install setuptools and pip?
[15:05] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 250 seconds)
[15:36] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[16:02] * lheuer (~Adium@unaffiliated/lheuer) Quit (Quit: Leaving.)
[16:12] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Quit: Konversation terminated!)
[16:24] * lheuer (~Adium@f049040156.adsl.alicedsl.de) has joined #jython
[16:24] * lheuer (~Adium@f049040156.adsl.alicedsl.de) Quit (Changing host)
[16:24] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[17:44] <jimbaker> whg, that jython-ssl branch only works with easy_install
[17:45] <jimbaker> pip requires nonblocking ssl
[17:46] <whg> jimbaker: ok
[17:47] <whg> jimbaker: how do install setuptools?
[17:47] <whg> jython setup.py install errors out
[17:47] <whg> needs a parsing module?
[17:48] <jimbaker> whg, just use ez_setup.py to set it up, https://pypi.python.org/pypi/setuptools#unix-based-systems-including-mac-os-x
[17:49] <jimbaker> (this is often bundled in a package, to prevent the problem you observed)
[17:50] <whg> jimbaker: Thanks. I was hoping it would actually be *easier* to just run a stock install rather than messing with scripts. Oh well.
[17:51] <jimbaker> whg, i think we can do that near term
[17:51] <jimbaker> and bundle pip with jython 2.7; there's a pep for that in python 3.x
[17:51] <whg> Nice
[17:51] <jimbaker> http://www.python.org/dev/peps/pep-0453/
[17:52] <whg> Now to see if the wheel format can live up to everyone's hopes and dreams
[17:56] <jimbaker> whg, yeah, i don't really know the implications for jython. where possible i have tried to avoid getting into these types of packaging issues
[17:56] <jimbaker> hoping someone else might do them ;)
[17:57] <jimbaker> packaging is very bikesheddable. i personally would prefer to work on clamp, gradual typing, or better compilation for jython :)
[18:05] <whg> jimbaker: I'm just waiting to see if it makes numpy and friends not suck on OS X
[18:05] <whg> Right now, you pretty much can't put them in an isolated venv
[18:07] <jimbaker> whg, interesting. the other thing is, this surely has some interaction with the jyni project - jyni simply provides suitable entry points that look like cpython, but the code is the same
[18:07] <jimbaker> in terms of code like numy etc
[18:07] <jimbaker> numpy
[18:08] <whg> That should definitely be intersting
[18:08] <whg> bblunch
[18:42] <whg> btw, ez_setup.py fails as well
[18:42] <whg> It seems they went 2.0 on the project about 2 weeks ago or so
[18:48] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[18:50] <peke> <3 pep 453. shame it wasn't accepted for cpython 2.7, although i understand adding it in a minor release would have been a bit odd. possible cpython 2.7 windows installar with bundled pip would cover the platform where installing pip is the biggest task, though.
[18:59] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 252 seconds)
[19:12] * fluxdude (~fluxdude@unaffiliated/fluxdude) Quit (Read error: Operation timed out)
[19:32] <jimbaker> whg, oh that is interesting news about ez_setup.py
[19:34] <jimbaker> currently feeling like we're in a red queen race
[19:35] <jimbaker> but i assume progress will be made :)
[19:43] <whg> jimbaker: Thanks, I'm lost in a twisty maze of Wikipeda articles, all alike.
[20:06] * tjd (~tjd@ has joined #jython
[20:08] <tjd> okay, so running ez_setup.py with jython 2.7b1 is miserably broken, because the setuptools egg is an HTTPS link, and jython 2.7b1 does not support HTTPS (at least through urllib2)... incidentally this means that if I get setuptools installed manually (like i did), easy_install itself is broken most of the time because packages it needs to fetch are over https
[20:08] <tjd> i get that we are encouraged to use java-land stuff for HTTPS
[20:08] <tjd> but most of useful python is broken because of this
[20:08] <tjd> is there some kind of wrapper for java http functions that monkey patches urllib2?
[20:19] <jimbaker> tjd, we were just discussing this topic, jython 2.7b1 is known to be broken, and now apparently my earlier fix, https://bitbucket.org/jimbaker/jython-ssl, is also broken
[20:19] <jimbaker> whg, i assume you're seeing some sort of bz2 error?
[20:20] <whg> jimbaker: https://gist.github.com/gthank/8060790
[20:20] <whg> global name 'parser' is not defined
[20:21] <jimbaker> seriously, parser?
[20:21] <whg> So it would seem
[20:21] <whg> return cls.interpret(parser.expr(text).totuple(1)[1])
[20:22] <jimbaker> this is ridiculous if it is
[20:22] <pjenvey> seriously, seriously?
[20:22] <Arfrever> whg: It is a regression in setuptools 2.0.1. Use setuptools 2.0.0 in the meantime.
[20:23] * oscar_toro (~Thunderbi@186-79-2-221.baf.movistar.cl) has joined #jython
[20:23] <whg> Arfrever: So does that mean it's being worked on?
[20:26] <Arfrever> whg: I noticed this exception 4 days ago, but I had not time to work on a fix yet...
[20:26] <jimbaker> wow, i hope so. we cannot go back and implement legacy stuff like parser
[20:26] <whg> Thanks for the pointer, Arfrever
[20:27] <whg> You mean just because they said it was a bad idea starting back in the 2.5 days, we shouldn't use it in new code?
[20:28] <jimbaker> whg, our assumption has been that we did not need to implement parser; we did implement a robust version of the ast and _ast modules
[20:28] <whg> jimbaker: Sorry, that last was sarcasm
[20:29] <jimbaker> whg, i'm a little to annoyed to notice unfortunately right now :(
[20:29] <whg> I favor a "we delete deprecated stuff in the next release" policy, so I hate it when I see new code using stuff that was The Wrong Way a decade ago
[20:29] <jimbaker> whg, right
[20:30] <Arfrever> Technically parser module is not yet deprecated in 3.4 :( . (http://docs.python.org/3.4/library/parser.html)
[20:30] <jimbaker> so i'm reasonably ok supporting nonblocking SSL - and fixing other nonblocking issues in the process. i just don't want to keep on a treadmill
[20:30] <whg> I have friends who professionally maintain a Django 1.1 codebase because they didn't want to rock the boat when 1.2 came out, and now they're so far behind they'll never catc up
[20:31] <whg> Arfrever: Why on earth would it have a huge disclaimer on it saying to use something different for years and they *not* remove it during a backwards-incompatible upgrade?
[20:32] <Arfrever> whg: Nobody noticed it during work on Python 3.0.
[20:33] <whg> Arfrever: You're mellowing my harsh with your logic and reasonable discourse
[20:36] <jimbaker> so iirc, parser does allow potentially interesting parses, specifically being able to preserve whitespace tokens in the parse, such as INDENT/DEDENT. the advantage of concrete syntax. but it's hard to see what setuptools could gain by that
[20:37] <jimbaker> anyway, i'm glad Arfrever that you're helping out here
[20:38] <whg> On a totally different subject, how's PEP 0435 look from an implementer's point of view?
[20:39] <jimbaker> since we have a decent quorum of people here, can i suggest that we plug into the dev process of pip, virtualenv, easy_install, and setuptools just to make sure there's nothing more that will catch us off guard in their dev cycles?
[20:39] <jimbaker> i am personally spread way too thin to help do that, i would just like to focus on getting the nonblocking ssl support done asap
[20:42] <jimbaker> pjenvey and Arfrever, i see you as potentially good liaisons, but this would be extremely helpful if we someone on those channels being advocates for us. this is also a very good reason for why i need to attend the lang summit at pycon this coming year
[20:42] <jimbaker> and anyone else here who happens to be in montreal
[20:42] <jimbaker> fot that
[20:58] * oscar_toro (~Thunderbi@186-79-2-221.baf.movistar.cl) Quit (Ping timeout: 252 seconds)
[21:03] <pjenvey> I don't think parser was ever formally deprecated. the compiler module was
[21:03] <pjenvey> they just recommend you use ast instead
[21:04] * tjd (~tjd@ Quit (Quit: Leaving...)
[21:12] <Arfrever> whg, jimbaker, pjenvey: Fix: https://bitbucket.org/pypa/setuptools/commits/5b1b03dc68cef0aa62a6e88b28c62ce840c76035
[21:12] <whg> Arfrever: Thanks
[21:12] <Arfrever> (https://bitbucket.org/pypa/setuptools/commits/57db46ef8d1774d23dbaa292f64829540914065d introduced this problem.)
[21:13] <jimbaker> Arfrever, thanks for helping here on this problem!
[21:22] <jimbaker> Arfrever, so i'm not certain how you release here, when can we expect https://pypi.python.org/packages/source/s/setuptools/setuptools-2.0.2.tar.gz to be available?
[21:24] * whg is now known as zz_whg
[21:25] <Arfrever> jimbaker: No idea. I will ping jaraco when I see him.
[21:25] <jimbaker> Arfrever, thanks!
[21:31] <jimbaker> Arfrever, another question - i'm getting this failure - https://gist.github.com/jimbaker/8061856
[21:31] <jimbaker> so i'm afraid i don't know what "wt" mode is
[21:33] <Arfrever> jimbaker: open("/tmp/test_file", "wt") works for me in Jython 2.7.
[21:34] <jimbaker> hmmm, wonder why i get that failure then. it's possible i'm running in a dev branch :)
[21:35] <jimbaker> i was playing around w/ open modes earlier. from what i can tell, reading docs, "wt" should mean open in text mode, vs i suppose "wb"
[21:36] <jimbaker> yeah, it must be something in my branch, trunk jython 27 is fine
[21:36] <jimbaker> let me try trunk jython-ssl as well
[21:41] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[21:42] <jimbaker> Arfrever, hah, looks like there has been a recent change in *actual* jython trunk re support for "wt" mode
[21:45] * Arfrever (~Arfrever@apache/committer/Arfrever) Quit (Ping timeout: 248 seconds)
[21:47] <jimbaker> ok, https://bitbucket.org/jython/jython/commits/4c2a46a387eca9c29e271f4d51bf2aed5cc91516 changed the parsing we do of the open mode; looks like "t" was quietly ignored in the past
[22:20] * oscar_toro (~Thunderbi@186-79-2-221.baf.movistar.cl) has joined #jython
[22:23] <topi`> ooh, lots of discussion here today
[22:23] <topi`> i'm a bit drunk, sorry cannot follow.
[22:35] <jimbaker> topi`, no worries, it's that time of year
[22:55] <pjenvey> yea IIRC I had to make open ignore any flag
[22:55] <pjenvey> except for the leading mode flag i believe it was actually strict about
[22:56] <pjenvey> http://paste.ofcode.org/hc68GR2gwB7xY3BnKdaKhq
[22:56] <pjenvey> yep =]
[23:14] * oscar_toro (~Thunderbi@186-79-2-221.baf.movistar.cl) Quit (Ping timeout: 250 seconds)
[23:26] * Diggty (~zsmith@monkeydev.ucsd.edu) has joined #jython
[23:33] <topi`> jimbaker: our company paid for the drinks ;)
[23:35] <topi`> yeah, open(foo, "wt") is the same as open(foo, "w") ... in text mode, linefeeds get turned to natives (LF on unix, CRLF on windows)


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