#jython IRC Log (v0.9)

Index

IRC Log for 2013-12-03

Timestamps are in GMT/BST.

[0:08] <jimbaker> webskipper, yes
[0:09] <jimbaker> since jython 2.5 for subprocess, re support for much longer
[0:27] <webskipper> k, ty
[0:35] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) Quit (Ping timeout: 260 seconds)
[0:47] * agronholm (~agronholm@2001:1bc8:102:6f29:6854:512e:87a9:355e) Quit (Ping timeout: 246 seconds)
[2:09] * lheuer1 (~Adium@82.113.98.176) Quit (Ping timeout: 252 seconds)
[2:38] * fwierzbicki (~Adium@99-106-170-162.lightspeed.sntcca.sbcglobal.net) Quit (Ping timeout: 246 seconds)
[2:39] * fwierzbicki (~Adium@99-106-170-162.lightspeed.sntcca.sbcglobal.net) has joined #jython
[3:01] * mcurve_ (~quassel@pop.nakinasystems.com) Quit (Remote host closed the connection)
[3:02] * mcurve (~quassel@pop.nakinasystems.com) has joined #jython
[4:21] * webskipper (~webskippe@91-64-7-0-dynip.superkabel.de) Quit (Ping timeout: 264 seconds)
[4:45] * webskipper (~webskippe@91-64-7-0-dynip.superkabel.de) has joined #jython
[5:36] * agronholm (~agronholm@2001:1bc8:102:6f29:e04c:c9d2:955b:95a2) has joined #jython
[5:36] * ChanServ sets mode +o agronholm
[7:46] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[7:48] * webskipper (~webskippe@91-64-7-0-dynip.superkabel.de) Quit (Ping timeout: 264 seconds)
[7:49] * webskipper (~webskippe@91-64-7-0-dynip.superkabel.de) has joined #jython
[8:27] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) has joined #jython
[9:10] * webskipper (~webskippe@91-64-7-0-dynip.superkabel.de) Quit (Ping timeout: 246 seconds)
[9:27] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[9:50] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 272 seconds)
[10:17] * webskipper (~webskippe@91-64-7-0-dynip.superkabel.de) has joined #jython
[11:42] * webskipper (~webskippe@91-64-7-0-dynip.superkabel.de) Quit (Ping timeout: 246 seconds)
[12:29] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 264 seconds)
[12:41] * clajo04 (~clajo04@pool-108-54-80-252.nycmny.fios.verizon.net) Quit (Quit: clajo04)
[13:01] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) Quit (Quit: oscar_toro)
[13:02] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) has joined #jython
[14:38] * leo-the-manic (~leo@rrcs-24-97-142-42.nys.biz.rr.com) has joined #jython
[15:28] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[15:31] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) Quit (Quit: oscar_toro)
[16:52] * Arfrever (~Arfrever@apache/committer/Arfrever) has joined #jython
[17:26] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[17:44] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[18:22] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[18:36] * clajo04 (~clajo04@pool-108-54-80-252.nycmny.fios.verizon.net) has joined #jython
[18:49] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[19:00] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) has joined #jython
[19:36] * lheuer1 (~Adium@82.113.99.9) has joined #jython
[19:39] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 252 seconds)
[20:13] * webskipper (~webskippe@91-64-7-0-dynip.superkabel.de) has joined #jython
[20:25] <topi`> jimbaker: last two weeks, I've just been working on various work related issues, a lot of childcare, and none of Jython stuff. sadly.
[20:27] <topi`> jimbaker: what was the main reason why asynchronous sockets need to be supported as well? did I understand correctly that CPython allows nonblocking sockets and many libs are actually perusing this facility?
[20:56] <jimbaker> topi`, no worries at all!
[20:57] <jimbaker> topi`, so we need to support sockets with the following properties: at any point they can switch from nonblocking, to blocked and w/ a possible timeout, and vice versa
[20:58] <jimbaker> that should be blocking, not blocked; we also want to be able select on any socket, blocking or not; currently jython has a hacked together version to support that functionality
[20:59] <jimbaker> so my feeling is that we start with something very general and nonblocking like AsynchronousSocketChannel, we can actually build any desired behavior on top of that
[20:59] <topi`> how would one select() on java? for CPython it's a nobrainer, since it just uses the C library.
[21:02] <jimbaker> topi`, yeah, i'm thinking of using some sort of map like this one to track, http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/collect/Multimaps.html#synchronizedListMultimap(com.google.common.collect.ListMultimap)
[21:03] <jimbaker> it's sort of ridiculous to throw so much firepower at this problem...
[21:03] <jimbaker> but at the very least it should be threadsafe and apparently two threads can select on the same socket
[21:04] <jimbaker> also use a BlockingQueue for the completion handlers in Async*Channel
[21:05] <topi`> there's a zillion classes and whatnot in java, I sometimes wonder how many years ppl have to learn these things to master them in any quantity...
[21:06] <jimbaker> topi`, yeah...
[21:06] <topi`> I read "Java tutorials - collections" but am nowhere near understanding it all
[21:06] <jimbaker> topi`, it took me a long time. and then there's the guava collections
[21:06] <topi`> at one point I was intimidated by the existence of so many Dict subclasses in python! Like OrderedDict and so on ;)
[21:06] <jimbaker> having said that, proper use of threadsafe collections is foundational to jython's runtime
[21:07] <topi`> jimbaker: I bet the guava collections are fairly popular? since that's something you'd use for a web back end and so on
[21:07] <jimbaker> topi`, well they're what apparently powers google's java usage
[21:08] <whg> Guava is probably underused
[21:08] <whg> But it's awesome
[21:09] <jimbaker> i rather like MapMaker, especially its support for setting up such things as say weak keys AND weak values
[21:09] <topi`> anyhow. about the SSLEngine, I think it's fairly straightforward as far as Engines go, but it does entail a lot of work, since you need to micromanage many aspects of the whole SSL trip
[21:09] <jimbaker> topi`, yes, that's for sure
[21:09] <sinistersnare> in random news: im going to my areas python user groups meeting tonnight!
[21:09] <jimbaker> sinistersnare, cool, going to demo any of your recent work?
[21:09] <topi`> sinistersnare: that's great :)
[21:10] <topi`> always bring in something to be demoed ;)
[21:10] <sinistersnare> i thought about it!
[21:10] <jimbaker> topi`, that's a huge reason why i think it makes sense to unify all of our socket stuff w/ Async*Channel
[21:10] <jimbaker> i cannot stand any more special casing
[21:10] <sinistersnare> maybe i can do a presentation :p it would definitely make me get off my butt and write some code :p
[21:11] <whg> If you have people who like to troll about the GIL, you can always show off Jython's lack thereof :-)
[21:11] <jimbaker> and of course i otherwise don't know how to change a SSL socket from blocking to nonblocking - and back
[21:11] <jimbaker> whg, funny thing is, i was talking about concurrency in my course today at univ of colorado
[21:12] <sinistersnare> jimbaker, you should talk to your office of undergrad admissions into giving me a full ride :=\
[21:12] <jimbaker> i was using python as an exemplar of low-level concurrency (locks, etc) vs say doing it functionally
[21:12] <topi`> jimbaker: fair enough. and SSL sockets are indeed more of a challenge than the "ordinary" ones - I mean in the sense of corner cases, etc
[21:12] <sinistersnare> my family makes enough money to not get Financial aid, but not enough for paying for out-of-state tuition :(
[21:12] <jimbaker> and one of my students asked about the GIL. naturally i had to demonstrate: from __future__ import GIL
[21:12] <whg> heh
[21:13] <jimbaker> which is a nice easter egg we added back in the 2.5 beta days
[21:13] <topi`> :)
[21:13] <sinistersnare> i always liked `from __future__ import braces` :)
[21:13] <topi`> haha, it gives me a syntax error :)
[21:13] <sinistersnare> yup
[21:13] <jimbaker> yeah, very much modeled from the braces easter egg
[21:13] <whg> jimbaker: Did you show off ThreadPoolExecutorService, too?
[21:14] <topi`> there's also a ThreadPoolExecutor in python3.3 these days, but I wonder how useful it is, with the GIL issue
[21:15] <topi`> for something that is not I/O bound
[21:15] <jimbaker> whg, i was just about to mention this, but class had to end. thur, it's futures (including working w/ executors), and then look at them in a higher-level fashion, eg as monads and applicatives (zip, or pairing, that is constructing a Future from a number of Future)
[21:15] <jimbaker> topi`, this would correspond to DeferredList in twisted
[21:15] <whg> jimbaker: If you understand monads, I need you to fly out to Atlanta and tutor me
[21:15] <topi`> jimbaker: indeed, and it would perform really well for highly I/O bound tasks
[21:16] <jimbaker> whg, i do understand monads, but sadly i have enough students ;)
[21:16] <whg> hehe
[21:16] <topi`> I did refresh my Haskell skills, and yet it seems impossible to understand what's going on with those monads
[21:16] <topi`> I can *use* them, but that's only because i've learned certain programming patterns
[21:17] <jimbaker> topi`, i think the best way to understand monads is the context of say something like do in haskell or scala's for expression
[21:17] <jimbaker> that is, here's a contract about myself which then allows rewriting code
[21:18] <topi`> ...or redefining the rules :)
[21:18] <jimbaker> so basically just like in middle school algebra i'm allowed to do certain things with an equation - i can add the same thing to both sides - i have similar expressiveness w/ something that is a monad
[21:18] <topi`> the Do statement is particuarly tricky for the Haskell acolyte, since it's so easy to be tricked into thinking in imperative terms
[21:19] <topi`> you see a "return" statement in the do, and think that now this is going to exit from the program flow - yet it's completely false :)
[21:20] <topi`> I did try to learn Scala, but it seemed very convoluted, even more so than Haskell
[21:20] <jimbaker> topi`, yeah that return thing is definitely not what you think it is ;)
[21:20] <topi`> and where Haskell really kicks ass, is the way it infers the types of your functions
[21:21] <topi`> whereas in Scala, you'll end up defining them manually more often than not
[21:21] <topi`> I wish I had more time to learn Haskell
[21:22] <topi`> I did try to implement JPEG decoding, using BitSyntax module :)
[21:22] <topi`> ran into trouble with the templates...
[21:23] <jimbaker> topi`, sure, scala's type inference is much weaker. i have not dug into it, but as i understand it, being object functional provides this limitation
[21:23] <topi`> I think Scala does have many practical uses, it really can be used for a wide range of problems, however there's a lot to learn there
[21:23] <jimbaker> on the other hand, i like to encourage documenting types for parameters and return type
[21:23] <topi`> I mean, the learning curve is deep
[21:24] <jimbaker> topi`, whg - so i teach scala for my course. but as expected, i'm a big fan of all things JVM
[21:24] <topi`> that's why I bought a Scala book in the first place :
[21:24] <topi`> :)
[21:24] <jimbaker> topi`, you might like this book, http://www.manning.com/bjarnason/
[21:24] <topi`> jimbaker: maybe your next book can be a Scala book ;)
[21:25] <jimbaker> that would be scary...
[21:25] <jimbaker> i rather update the jython book
[21:25] <topi`> hehe :)
[21:26] <topi`> I wish there'll be plenty of things to update! e.g. nonblocking sockets ;)
[21:26] <topi`> python 3 compatibility
[21:26] <topi`> it's a long list
[21:26] <jimbaker> let's focus on 2.7 first ;)
[21:26] <whg> jimbaker Scala, eh? The internet just exploded over Scala last week, didn't it?
[21:26] <jimbaker> but yes, nonblocking sockets
[21:26] <jimbaker> whg, how so?
[21:26] <sinistersnare> theres a lot of hate about compile times
[21:27] <sinistersnare> and how bad the compiler is at being a compiler (there was some talk by a former lead dev)
[21:27] <jimbaker> sinistersnare, yes, scala is not the fastest compiler
[21:27] <whg> jimbaker: Some dude wrote a rant about Scala and people doing "clever" things in libs; it went quasi-viral
[21:27] <sinistersnare> yeah scala syntax scares me, i think it was like scalaz (whatever that is) had some crazy operator stuff
[21:27] <whg> The reddit post http://www.reddit.com/r/programming/comments/1rvltx/scala_1_would_not_program_again/?sort=confidence
[21:28] <jimbaker> sinistersnare, i actually had dinner w/ paul phillips the day he quit from typesafe (at the jvm lang summit)
[21:28] <sinistersnare> oh really? he seems like a cool guy, a bit antsy :p
[21:28] <topi`> sinistersnare: my biggest gripe with scala syntax is that you can do many things, like leave out the parens () from a method, but in some other cases you can't
[21:29] <topi`> so it allows more liberties than, say, python, but then again python's simplicity is because of carving things in stone
[21:30] <jimbaker> topi`, scala tries to be too many things
[21:30] <topi`> jimbaker: also python tries to do that ;)
[21:30] <sinistersnare> i really like pythons operator overloading
[21:31] <jimbaker> python is just so much easier. i should say that there are times i want to do both scala and python. fortunately, i can
[21:31] <sinistersnare> fun!
[21:32] <jimbaker> re reddit post, i did sign up for the reactive course, but mostly to see how the material was presented
[21:32] <jimbaker> so i haven't looked at the homework one bit
[21:32] <jimbaker> coursera doesn't distinguish auditors from actual students
[21:33] * also (uid1186@gateway/web/irccloud.com/x-hhsdiqqzqgcjsajw) has left #jython
[21:34] <whg> Yeah, I didn't sign up for that one
[21:34] <whg> Might be a little over my head, since I don't speak monad
[21:34] <whg> (yet)
[21:38] <whg> I just finished some overview of Big Data & Web Intelligence, which showed me just how much I've forgotten from stats and linear algebra
[21:40] <topi`> I can't even remember how to multiply matrices by hand...
[21:40] <topi`> that was the 1st year in the univ
[21:40] <sinistersnare> isnt it each sector multiplied?
[21:41] <whg> topi`: Yeah, me either. Guess what I had to do by hand, then translate into a map-reduce job
[21:41] <topi`> whg: I ended up implementing the ops in python, using list comprehensions
[21:42] <topi`> using the list as the primitive data type for matrices (nesting)
[21:42] <sinistersnare> well jimbaker, do you think i should do a talk on jython/game-dev? it would be cool
[21:42] <jimbaker> i really like this package, https://github.com/twitter/algebird
[21:42] <jimbaker> it's an open question using it from jython
[21:42] <jimbaker> sinistersnare, yes, i think you should
[21:43] <sinistersnare> :) then i hope i can find some free time to make some cool stuff, and ill ask the people tonight about it
[21:43] <topi`> python is not functional, but there's a huge range of problems you can solve using list comprehensions and itertools
[21:43] <jimbaker> sinistersnare, i still haven't looked at this yet, https://gist.github.com/jimbaker/6984552
[21:44] <jimbaker> the missing piece (presumably) for android
[21:45] <sinistersnare> topi`, i think its ok that its not functional, but solving problems in a functional style can be quite useful
[21:45] <sinistersnare> the talk at DCPython tonight is about functional programming using python :p
[21:46] <topi`> regarding matrices, I'm not interested in an algorith that does FOO to BAR to produce FUBAR, but rather a concise description of the transformation A->B
[21:46] <jimbaker> sinistersnare, yes, i'm a big believer in that approach
[21:46] <topi`> think mathematics
[21:46] <topi`> imperative languages have their place, but not here.
[21:46] <jimbaker> sinistersnare, also if you look at the underlying scala implementation, it takes this approach, although scala does offer more robust hiding of nonfunctional internals
[21:47] <sinistersnare> that seems cool, i like scala as an idea, it lets you do what you want (functional/OO, non-restrictiveness), but sometimes it scares me :O
[21:48] <topi`> sinistersnare: it is scary because it tries to do *both* objects and functional well
[21:48] <sinistersnare> yeah, thats what i mean, it might be taking too much of a plate
[21:48] <topi`> python is simple, because... everything is an object! or actually, everything is a functin
[21:48] <topi`> even objects are functions
[21:48] <jimbaker> btw, here's one really cool tool i have seen recently. i should try running it on jython to see what it missing, if any - https://github.com/lihaoyi/macropy
[21:49] <topi`> case classes??
[21:49] <jimbaker> topi`, yeah, but i can make any object a function in python, even if it doesn't want to be :)
[21:49] <jimbaker> topi`, yeah, pretty cool stuff
[21:49] <jimbaker> in terms of macropy
[21:49] <sinistersnare> i saw macropy, it looked pretty interesting
[21:50] <topi`> it must do some voodoo at module import time in order to do any sort of tricks to actually implement case classes
[21:51] <whg> There's a brain-bender for you. I'm guessing it doesn't get a ton of votes for "Pythonic"
[21:51] * Oti (~ohumbel@adsl-178-39-161-89.adslplus.ch) has joined #jython
[21:51] <topi`> "MacroPy is tested to run on CPython 2.7.2 and PyPy 2.0, but not on Python 3.X or Jython."
[21:53] <sinistersnare> topi`, "tested"!
[21:56] <jimbaker> topi`, yes, it indeed does that voodoo
[21:57] <jimbaker> so it looks like it will take some work to get running, since it depends on pycrypto
[21:57] <jimbaker> at least the tests
[21:58] <jimbaker> but wait??? i almost forgot??? we just jyni to help
[21:59] <sinistersnare> is jyni going to be added to jython?
[22:05] <topi`> cool, there's a Pattern matching macro
[22:06] <sinistersnare> ok im off to the meetup, see yall later!
[22:06] * sinistersnare is now known as sinsnare|away
[22:08] * truk77 (~kurt@pool-108-18-130-169.washdc.fios.verizon.net) Quit (Ping timeout: 260 seconds)
[22:08] * truk77_ (~kurt@pool-108-18-130-169.washdc.fios.verizon.net) has joined #jython
[22:22] <topi`> this Li Haoyi guy seems interesting. He's also contributed to a scala-to-javascript compiler and several other interesting projects
[22:23] <topi`> let's say, interesting non-trivial projects
[22:23] <topi`> A JVM written in Scala???
[22:30] <whg> self-hosting ftw
[22:43] * whg is now known as zz_whg
[22:57] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) Quit (Ping timeout: 245 seconds)
[23:00] <jimbaker> sinsnare|away, no, jyni is GPL and really there's no reason for it not to just be in pypi
[23:01] <jimbaker> like python in general, we really want to move away from putting new stuff in stdlib
[23:06] * webskipper (~webskippe@91-64-7-0-dynip.superkabel.de) Quit (Ping timeout: 245 seconds)
[23:16] * webskipper (~webskippe@91-64-7-0-dynip.superkabel.de) has joined #jython

Index

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