#jython IRC Log


IRC Log for 2014-04-04

Timestamps are in GMT/BST.

[2:30] * agronholm (~agronholm@2001:1bc8:102:6f29:496b:8717:22ea:4dc8) Quit (Ping timeout: 264 seconds)
[2:34] * agronholm (~agronholm@2001:1bc8:102:6f29:ed04:2157:d96b:e17e) has joined #jython
[2:34] * ChanServ sets mode +o agronholm
[3:00] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[4:23] * lheuer (~Adium@f048048066.adsl.alicedsl.de) has joined #jython
[4:23] * lheuer (~Adium@f048048066.adsl.alicedsl.de) Quit (Changing host)
[4:23] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[5:45] * int3__ (~int3__@vlan425-58.subnet-224.amherst.edu) has joined #jython
[5:56] * Tycale (~Tycale@tycale.be) Quit (Ping timeout: 240 seconds)
[5:57] * Tycale (~Tycale@tycale.be) has joined #jython
[8:36] * int3__ (~int3__@vlan425-58.subnet-224.amherst.edu) Quit (Ping timeout: 255 seconds)
[8:57] <topi`> whg: our company is also doing backend stuff with Spring now, and I'd like to peruse my jython modules with that
[8:57] <topi`> my problem is that I know next to nothing about Spring tools
[10:00] <topi`> jimbaker: I see Cython as a stopgap measure, the future lies somewhere between the bytecode and JIT engines...
[10:00] <topi`> PyPy is definitely doing good work in shaking the C foundations of Python
[10:00] <topi`> which is a good thing IMHO
[10:01] <topi`> recently I burned my fingers with the stdlib time library, which is a direct binding to underlying C apis ... I used mktime() to reconstruct UNIX timestamps from datetimes, but it broke after switching to daylight saving
[10:02] <topi`> I think the libc time stuff ought to be buried, and buried deep
[10:33] * Arfrever (~Arfrever@apache/committer/Arfrever) has joined #jython
[10:44] * [Arfrever] (~Arfrever@apache/committer/Arfrever) has joined #jython
[10:45] <whg> topi`: Spring is a complicated beast, but if you're doing simple things, it's not *so* bad.
[10:46] <topi`> whg: yeah, I guess google will find a bunch of tutorials to get you started with a regular hibernate-based project
[10:46] <topi`> storing data in and out of SQL
[10:46] <topi`> but I wasn't very impressed by Spring's offerings
[10:46] <topi`> I guess I'm always slightly put off by excess complexity :)
[10:47] <topi`> but it seems Spring is very popular right now, although there are lots of competent frameworks out there
[10:47] <topi`> and my work mates actually thing Groovy/Grails (which is almost entirely a Spring thing) is such a cool tool
[12:21] <whg> I haven't used Groovy & Grails in a long time, but back in the day it was aspiring to be Rails (this was before JRuby became so popular)
[12:25] <topi`> yeah, JRuby kinda offers everything you need - bring in your Rails stuff and bind to your Java classes and stuff
[12:25] <whg> topi`: My favorite part of Spring is the transactional stuff to make testing against a DB safe and easy, and the JMX helpers
[12:25] <topi`> I just feel Groovy is kind of pointless; if you need that kind of syntax, use Ruby
[12:25] <whg> topi`: I agree, that's why I haven't used it in a long time
[12:26] <topi`> whg: I always test against a DB by providing "fake" db handlers that have dummy methods :)
[12:26] <whg> topi`: We have some fairly strong business-level constraints in the DB, so we need the actual implementation
[12:26] <topi`> whg: that's a valid reason
[12:26] <agronholm> I always test against a real db
[12:26] <whg> topi`: No less irritating when I'm hoping to get away with a simple unit test, though :-)
[12:26] <topi`> my projects use the DB in a fairly sloppy way, but the use cases are indeed simple
[12:27] <agronholm> I've even blogged a couple times about it :)
[12:27] <topi`> I guess there are also good ways to test against real DBs in the python world?
[12:27] <whg> agronholm: Where's your blog?
[12:27] <topi`> yeah, reveal your blog!
[12:28] <whg> topi`: I usually test against a throw-away sqlite instance in my Python projects
[12:29] <agronholm> http://alextechrants.blogspot.fi/
[12:29] <topi`> whg: that works as long as you have something in the middle that hides away differences between e.g. mysql and sqlite
[12:30] <topi`> I'm using twisted & twistar, which does exactly that
[12:30] <agronholm> whg: http://alextechrants.blogspot.com/2013/08/unit-testing-sqlalchemy-apps.html <- explains why you shouldn't be doing that
[12:31] <whg> topi`: SQLAlchemy
[12:31] <whg> agronholm: on my to-read list now
[12:31] <topi`> agronholm: it seems you do a lot of SQL wrangling in your day-to-day job
[12:32] <agronholm> indeed
[12:32] <topi`> for me, it's enough to understand something about transactions and that's it :)
[12:33] <whg> agronholm: Have any good ideas for load testing? Right now we have an Oracle dump we restore from after they're done
[12:33] <whg> But that is lame
[12:33] <whg> Yet I need the millions of records to get realistic performance info
[12:34] <agronholm> whg: I still haven't done that...load testing is a great idea but I have no experience with that
[12:35] <whg> If you get enough revenue riding on it, eventually the company will probably spring for it
[12:38] <whg> probably
[12:38] <whg> tammikuu??? is that Finnish?
[12:39] <agronholm> yes
[12:39] <topi`> localized blogs is a terrible idea
[12:39] <agronholm> try replacing .fi with .com, see what happens
[12:40] * lheuer (~Adium@unaffiliated/lheuer) has left #jython
[12:40] <topi`> agronholm: for me, it redirects back to .fi
[12:40] <agronholm> for you obviously
[12:40] <agronholm> but what about whg
[12:41] <whg> no redirect
[12:41] <whg> But I think I'm still getting the localized labels
[12:41] <whg> Let me get a different session
[12:41] <whg> In case it's cached
[12:41] <agronholm> I don't think I can do anything about that
[12:42] <topi`> yeah
[12:42] <topi`> too clever web code sucks :)
[12:42] <topi`> the browser ought to give out some flag that says "give me stuff fi.FI localized"
[12:42] <whg> OK, no redirect
[12:42] <whg> topi`: The browser does
[12:43] <whg> topi`: Unfortunately, most browsers suck at it
[12:43] <agronholm> ha!
[12:43] <whg> So web sites have been trained to ignore it
[12:43] <topi`> ...and here we are again, the same kind of mess as with Nescape 4.0 times
[12:43] <topi`> I mean HTML4
[12:43] <whg> More or less
[12:43] <agronholm> try reloading
[12:43] <topi`> duh, I just received a changed requirement for a customer...
[12:44] <topi`> let's see how long it takes for me to implement a new class (subclassing my previous work) and testing and getting that into production :) time starts now.
[12:44] <whg> Basically, there are so many mass installs of Windows that are misconfigured that the headers almost have to be ignored in favor of geolocation with a preference to override
[12:44] <agronholm> I did find a language option in the blog settings
[12:44] <whg> .com is in English now
[12:44] <whg> (the labels)
[12:45] <whg> Of course, so is .fi now
[12:45] <whg> Maybe you could localize in JS on the client side
[12:45] <whg> (if you want to spend that much effort on it)
[12:45] <agronholm> I don't
[12:45] <whg> :-)
[12:45] <agronholm> pointless
[12:45] <agronholm> every .fi techie knows English
[12:47] <topi`> if they don't, they're in the wrong business
[13:27] <topi`> agronholm: do you have any suggestions for a company in .FI that would have some sensible work for a python junkie like me, I'd like to avoid shops who worship Spring / Grails gods
[13:27] <topi`> also pure java shops, who just value java jockeys
[13:28] <agronholm> I have one startup that is looking for a pythonista
[13:28] <topi`> if my work is going to be reduced into a java/Spring jockey, then I should look for some alternatives
[13:28] <topi`> agronholm: any idea if they value python/java integration skills? :)
[13:28] <agronholm> unlikely
[13:28] <topi`> I guess my experience is more on the asynchronous programming side, twisted and stuff
[13:28] <agronholm> doesn't hurt to ask
[13:28] <topi`> right :)
[13:28] <agronholm> shall I give you the contact info?
[13:29] <topi`> worth a try.
[13:29] <topi`> it wouldn't be the first job that I got because of IRC connections ;)
[13:33] <whg> topi`: If you like async, you should check out some of the goodies Java has added over the past few releases
[13:33] <whg> ExecutorPools and streams and spliterators, etc.
[13:33] <agronholm> I think async is overrated
[13:33] <whg> They're largely targeted at concurrency vs. async for the sake of it
[13:33] <whg> But async is often used because of concurrency, so??? might inerest you
[13:33] <whg> agronholm: I'm interested to see how Tulip plays out
[13:33] <agronholm> on the web side this is handily solved by asynchronous middle layers like uwsgi
[13:34] <agronholm> so your app still gets to be threaded
[13:34] <agronholm> but without every idle connection taking up a thread
[13:35] <agronholm> you only really need async for push notifications and there are many solutions for that
[13:35] <agronholm> although uwsgi's websocket support currently sucks balls
[13:36] <whg> From a web perspective, sure, but there are plenty of things you don't want to do in a process that is blocking the UI
[13:36] <whg> Hence Celery, etc.
[13:37] <agronholm> celery is probably overkill for most tasks
[13:38] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[13:41] <whg> agronholm: I agree it's complicated to set up in a "never lose a message" fashion, but I'm not sure it's really avoidable
[13:41] <whg> That level of guarantee in a massively concurrent system is complicated
[13:42] <topi`> agronholm: async as a kind of magic bullet is overrated, but async as in a way to avoid threads is a useful programming paradigm
[13:42] <topi`> I have 0 thread-related bugs in my code
[13:42] <agronholm> as do I :)
[13:42] <agronholm> but yeah, async does have its applications
[13:42] <topi`> speaking of experience, threads are difficult to get right. They're difficult in python, and I bet they're just as difficult in java.
[13:43] <agronholm> took me many years to understand how to use them properly
[13:43] <whg> topi`: Threads in Java are easy: you never use them directly
[13:44] <agronholm> no, threads are no easier in Java
[13:44] <whg> topi`: You use something like a ThreadPoolExecutor and just hand it jobs
[13:44] <agronholm> you can do the same in Python
[13:44] <agronholm> but you can also use threads directly in java
[13:44] <whg> agronholm: I know. For some reason, that's never the first thing that comes up
[13:44] <whg> agronholm: Also, I know you can do that in Java, but they suck so hard in Java people don't do that (that I've seen)
[13:45] <whg> Except people like Doug Lea (I think that's his name) who build all the awesome abstractions in the SDK
[13:45] <agronholm> it's more or less the same in Python
[13:45] <agronholm> there are no major differences in how threads are used in Java/Python
[13:46] <whg> agronholm: It appears to be cultural. I basically *never* see people write raw Thread code in Java, but I see Python people trying it a lot
[13:46] <whg> agronholm: Maybe because more Python people are used to C ?
[13:47] <agronholm> ThreadPoolExecutor is rather new in Python
[13:47] <topi`> the only places where I actually create real threads in python, is when I call deferToThread() from my twisted projects
[13:47] <topi`> agronholm: true, that, but some old skool projects, like twisted, have had thread management for ages
[13:47] <agronholm> I'm not really fond of twisted's api
[13:47] <agronholm> or documentation
[13:47] <agronholm> if I want async stuff I use tornado
[13:48] <agronholm> though today I would look into asyncio instead
[13:48] <topi`> our use cases have been mainly outside of web serving
[13:48] <topi`> the only bad thing I can say about twisted is the steep learning curve
[13:48] <agronholm> tornado works fine for non-web stuff too
[13:48] <agronholm> and the api is much cleaner than that of twisted
[13:49] <agronholm> I have a zeromq based RPC server running on top of tornado
[13:49] <agronholm> in production
[13:55] <topi`> zeromq was something I wanted to have in our architecture
[13:55] <topi`> but there was resistance; so restful HTTP was used
[13:55] <topi`> between the system components
[13:56] <topi`> agronholm: where does jython come into picture in your production stuff?
[13:56] <agronholm> I have an ERP client that has a java/swing based GUI
[13:57] <agronholm> and I use jython there
[13:57] <topi`> oh, ERP stuff... I hope you fetch decent hourly rates from them :)
[13:58] <agronholm> I developed the ERP system as part of my master's thesis
[13:58] <agronholm> back in 2007
[13:58] <topi`> ouch
[13:58] <topi`> ERP is something that makes the hair rise in my skin
[13:58] <agronholm> heh
[13:58] <agronholm> it's not for the faint of heart, that's for sure
[13:58] <topi`> I guess because there are so many sucky and complex solutions out there
[13:58] <agronholm> but it's been very rewarding
[13:59] <topi`> I hope it wasn't you who developed the Swing GUI ;)
[13:59] * int3___ (~int3__@vlan425-58.subnet-224.amherst.edu) has joined #jython
[13:59] <agronholm> of course it was
[13:59] <topi`> haha
[13:59] <agronholm> why?
[14:00] <topi`> Swing is a bit... um, outmoded?
[14:00] <agronholm> outmoded = ?
[14:00] <topi`> it's like making a gui with Tcl/tk
[14:00] <agronholm> um no?
[14:00] <agronholm> every java GUI these days uses Swing
[14:00] <agronholm> almost every
[14:00] <agronholm> eclipse and azureus are the two exceptions
[14:00] <topi`> ok, I haven't really tried using Swing more than a simple hello world class app
[14:00] <agronholm> :)
[14:00] <topi`> so basically I'm talking out of my ass here
[14:01] <agronholm> yep :)
[14:01] <agronholm> swing is tremendously flexible
[14:01] <agronholm> one of the better toolkits out there
[14:01] <agronholm> I dare to claim it's more flexible than Qt
[14:01] <topi`> sorry, I was thinking of Java/Awt
[14:02] <topi`> of swing I have no experience
[14:02] <whg> topi`: Swing is the replacement for AWT
[14:03] <agronholm> well to be precise it's built on top of AWT
[14:03] <whg> I haven't done a fat client in Java in 10+ years, so I don't know if it sucks less these days
[14:03] <whg> Back then, it was reliable, but really pretty ugly
[14:03] <agronholm> I introduced jython to the app because the java language was so awful and clumsy
[14:03] <agronholm> but jython made it a lot slower
[14:03] <agronholm> I would love to turn it into a web app but I can't
[14:04] <agronholm> because there are certain critical functions that won't work from a web app
[14:04] <agronholm> like opening a network folder
[14:04] <agronholm> and composing a new email message with an attachment
[14:05] <agronholm> so my only way out seems to be to make it a fat client with an HTML UI
[14:05] <agronholm> I'll have to take a better look at QML to see if it fits my purposes
[15:08] * Thev00d00 (~v00d00@gentoo/developer/TheV00d00) Quit (Ping timeout: 255 seconds)
[15:15] * Thev00d00 (~v00d00@gentoo/developer/TheV00d00) has joined #jython
[15:17] * Thev00d00 (~v00d00@gentoo/developer/TheV00d00) has left #jython
[15:35] <whg> Which build do I need to generate maven artifacts?
[15:35] <whg> dev-build or full-build?
[16:36] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 240 seconds)
[17:31] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[17:52] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[18:04] * mike_af (~mike_af@50-77-49-46-static.hfc.comcastbusiness.net) has joined #jython
[18:18] <jimbaker> whg, i would assume full-build
[18:19] <whg> jimbaker: That seems to be the case
[18:19] <jimbaker> btw, looked at build.xml earlier today - looks like i will need to add the jar jar dependencies for full-build for ibm icu for what's in trunk; and netty/bouncycastle for socket-reboot dependencies
[18:20] <whg> So??? no pretty mvn artifacts for me, eh?
[18:20] <jimbaker> this explains the problem with using idna and presumably unicodedata as a whole
[18:20] <jimbaker> whg, not yet :)
[18:20] <whg> Heh, OK
[18:21] <jimbaker> i'm pretty certain anyone who wants to set that up so it's maven oriented vs monolithic, we would appreciate it
[18:23] <whg> What, the build file?
[18:23] <whg> Because that's a scary-looking beast
[18:24] <whg> Maybe if I can get some company-sponsored time
[18:24] <whg> Would you guys be opposed
[18:24] <whg> to a newer tool?
[18:25] <whg> (for dependencies)
[18:27] <whg> Oh, and I noticed that MapMaker.makeComputingMap() is being used somewhere in there
[18:27] <whg> (while troubleshooting my full build, which failed due to Informix not being around?)
[18:27] <whg> Guava got rid of that (at least, as a publicly accessible thing).
[18:28] <whg> I just got done patching that for a couple of projects at work
[18:46] <whg> jimbaker: So looking at my build-file comments, that was kind of non-sensical. I was trying to say if I could get some time on the company's dime to work on Jython, I could look at the build file, but it's so involved it might be easier to use something like Ivy (which just bolts dependency management onto Ant) than jump all the way to maven in one go, because maven is highly particular about how a project is structured.
[18:47] <whg> And then I mentioned another thing I'd spotted that would likely become an issue eventually.
[18:47] <whg> I know the solution to that one, so I could try to get approval to contribute to Jython and just fix it in my free time.
[18:47] <jimbaker> whg, i think it's going to be hard to move away from build.xml - but presumably it can be broken uo
[18:47] <jimbaker> up
[18:48] <whg> jimbaker: Right. That's why I was thinking Ivy???you get to have a tool do the dependency management (like mvn) without having to give up all the logic embedded in the build file. Just change the parts that use svn to check out specific dependencies or whatever.
[18:49] <whg> My ant-fu is not to the point where I'd be comfortable trying to get rid of that build file entirely
[18:57] <whg> BTW, requested permission from my manager to contribute to Jython proper.
[18:58] <whg> Do I need to sign a contributor agreement or anything before submitting a pull request?
[19:11] <jimbaker> whg, certainly we would appreciate your help here. it's not going to be something over night, but should be at least quite interesting
[19:11] <whg> I figure the first thing I'd look at is the Guava thing
[19:11] * srcerer (~chatzilla@dns2.klsairexpress.com) Quit (Quit: ChatZilla [Firefox 27.0.1/20140212131424])
[19:11] <whg> Get my feet wet with something I understand already
[19:12] <jimbaker> whg, right - that's something need to be fixed
[19:12] <whg> Did you run into the issue where Guava was broken by the latest Java7 update?
[19:12] <jimbaker> the guava team deprecated one of their apis in guava
[19:12] <jimbaker> that we are still using
[19:12] <jimbaker> whg, it has not arisen
[19:13] * srcerer (~chatzilla@dns2.klsairexpress.com) has joined #jython
[19:13] <jimbaker> maybe because we are using an old release
[19:13] <whg> jimbaker: Yeah. They finally dumped it in the latest. When I upgraded Guava to get around the JDK7 issue so we could update to the secure JDK at work, it broke a helper library
[19:13] <whg> whoops
[19:13] <whg> That was a fun time tracking it down
[19:13] * siel (~siel@unaffiliated/motley) Quit (Ping timeout: 264 seconds)
[19:13] <jimbaker> http://bugs.jython.org/issue2087
[19:13] <whg> Now there's some crazed cachebuilder thing
[19:14] <jimbaker> exactly, no longer supports Map directly
[19:14] <jimbaker> so just need to figure this out
[19:14] <jimbaker> whg, btw - you might be interested in this project i have (minimally) outlined - https://github.com/jythontools/guava
[19:15] <jimbaker> it would be super nice if one could use one's choice of Map implementation in jython, but with the same overhead as normal dict
[19:15] <jimbaker> for example
[19:16] <whg> overhead as in "amount of typing to use it" or in some other sense?
[19:16] <jimbaker> internally jython uses this whole expose mechanism, which we should make available. ideally through a python api to set up
[19:16] <jimbaker> whg, it's the whole box/unbox stuff
[19:16] <jimbaker> and mixes w/ reflection as well
[19:16] <whg> Hmm??? I'll have to dig in a little more to fully understand that, I think
[19:17] <jimbaker> so if you use something that directly inherits from PyObject, it's much much faster in jython
[19:17] <whg> I know you probably have to do some wrapping to get all the Python machinery in place
[19:17] <whg> Just not sure what that looks like
[19:17] <jimbaker> whg, probably best seen by some code, let me dig it up an example for you
[19:18] <jimbaker> https://bitbucket.org/jython/jython/src/6e438088c0e3e624465cc0747761650da3eb280f/src/org/python/core/PyDictionary.java?at=default#cl-60
[19:19] * int3__ (~int3__@vlan425-58.subnet-224.amherst.edu) has joined #jython
[19:20] * siel (~siel@unaffiliated/motley) has joined #jython
[19:21] <whg> Can you @Expose multiple implementations with the same name?
[19:21] * int3___ (~int3__@vlan425-58.subnet-224.amherst.edu) Quit (Ping timeout: 255 seconds)
[19:23] <whg> Assuming you can, the straightforward implementation of the Guava stuff is to do a delegation, right?
[21:08] * whg is now known as zz_whg
[21:10] * mike_af (~mike_af@50-77-49-46-static.hfc.comcastbusiness.net) Quit (Quit: Leaving...)
[22:09] * Arfrever (~Arfrever@apache/committer/Arfrever) Quit (Ping timeout: 255 seconds)
[22:15] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[23:14] <jimbaker> whg, sorry, flying right now, so just back on line
[23:18] <jimbaker> zz_whg, in general, you would want to do a delegation. upon reflection, i should be able to use a guava-based map, possibly other types, if we ensured that we can always support using a backing type
[23:19] <jimbaker> right now, we just copy


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