#jython IRC Log (v0.9)

Index

IRC Log for 2010-12-10

Timestamps are in GMT/BST.

[0:06] * yacc (~andreas@84.113.164.165) Quit (Ping timeout: 240 seconds)
[0:19] * yacc (~andreas@84.113.164.165) has joined #jython
[0:19] * verterok (~ggonzalez@unaffiliated/verterok) Quit (Ping timeout: 265 seconds)
[0:31] * jimbaker (~jimbaker@184-96-38-253.hlrn.qwest.net) Quit (Quit: jimbaker)
[0:45] * jabley (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) Quit (Quit: jabley)
[0:47] * verterok (~ggonzalez@190.188.244.241) has joined #jython
[0:47] * verterok (~ggonzalez@190.188.244.241) Quit (Changing host)
[0:47] * verterok (~ggonzalez@unaffiliated/verterok) has joined #jython
[1:29] <diegao> How can I in a servlet, call another page to show the results? without using the println to write the html page...
[1:31] * verterok (~ggonzalez@unaffiliated/verterok) Quit (Ping timeout: 260 seconds)
[1:42] * lopex (lopex@89-76-44-27.dynamic.chello.pl) Quit ()
[1:43] <diegao> agronholm: do you know?
[1:44] <agronholm> I haven't done servlets with jython
[1:44] <agronholm> I've only ever written one servlet
[1:44] <diegao> hmm
[1:45] <diegao> ok
[1:47] * verterok (~ggonzalez@190.188.244.241) has joined #jython
[1:47] * verterok (~ggonzalez@190.188.244.241) Quit (Changing host)
[1:47] * verterok (~ggonzalez@unaffiliated/verterok) has joined #jython
[1:50] * jimbaker (~jimbaker@c-24-8-39-78.hsd1.co.comcast.net) has joined #jython
[1:53] <diegao> response.sendRedirect("ptah/to/page/page2.html")
[1:54] <diegao> *path
[2:06] * verterok (~ggonzalez@unaffiliated/verterok) Quit (Ping timeout: 265 seconds)
[2:40] * thijstriemstra (~thijstrie@i219160.upc-i.chello.nl) Quit (Quit: thijstriemstra)
[2:48] * headius (~headius@216.160.3.79) has joined #jython
[2:50] <pr3d4t0r> diegao: Short answer: if you're using Jython, use WSGI for your "servlets" instead of the Java servlet API.
[2:51] <pr3d4t0r> diegao: Take a look at CherryPy.
[2:56] <diegao> pr3d4t0r: thanks, I'll take a look
[3:02] * headius (~headius@216.160.3.79) Quit (Quit: headius)
[3:04] <pr3d4t0r> diegao: Would you like to discuss the "long answer"?
[3:05] <diegao> yes, I would like
[3:06] <pr3d4t0r> diegao: OKi.
[3:07] <pr3d4t0r> diegao: Jython lets you run what is mostly standard Python on a JVM. You lose speed but you gain portability and access to enterprises that otherwise may be reluctant to deal with Python.
[3:07] <pr3d4t0r> diegao: While Jython lets you call Java code, in many cases it makes no sense.
[3:08] <pr3d4t0r> diegao: Let's look at Python and Java. When it comes to libraries and standard API, they're neck-to-neck in terms of functionality.
[3:09] <pr3d4t0r> diegao: And, from a Python perspective, the Pythonic libraries are cleaner and easier to use than the Java versions. A typical example is Suds vs Jersey for SOAP clients.
[3:10] <diegao> yes, much more cleaner, and other good thing is that jython compiles at runtime
[3:11] <pr3d4t0r> diegao: Or Suds vs CFX, I meant.
[3:11] <pr3d4t0r> diegao: Heh. That last one isn't a reason.
[3:12] <pr3d4t0r> diegao: You gain very little advantage from running the compiled code because the Python compiler isn't optimized at all.
[3:12] <diegao> hmm
[3:12] <pr3d4t0r> diegao: The ideal setup for using Python on JVM is when you want to leverage some enterprise framework (Mule, Spring, etc.) that runs some Java stuff, and that you want to enhance with new features very quickly.
[3:13] <pr3d4t0r> diegao: You gain development speed in Python (assuming that you're more or less as proficient in it as in Java).
[3:14] <pr3d4t0r> diegao: For non-computational application code, functional equivalent implementations in Python are about 25% the size (source code) of the one written in Java.
[3:14] <pr3d4t0r> diegao: So you can code faster, and you can experiment on the fly, and so on.
[3:14] <pr3d4t0r> diegao: Speed of execution, though, will be 5 to 100 times slower than Java, even for compiled code, because of the lack of optimizations.
[3:15] <pr3d4t0r> diegao: In a real world scenario, continuing with our example, Python is awesome when your application involves significant I/O (e.g. HTTP requests) with servers in a separate LAN segment or across a WAN.
[3:17] <diegao> great ^^
[3:19] <diegao> i liked your opinion about the "ideal setup"
[3:20] <pr3d4t0r> diegao: The reason is that although the application logic will be significantly slower than the Java equivalent, there's no real advantage in it for many applications since the server will be I/O bound. Network times are measured in tenths of a second to seconds. Computational speeds are dealing with nano- to millisecond ranges.
[3:20] <pr3d4t0r> diegao: Thus, a servlet engine will be mostly waiting for connections, run the servlet quickly, then feed the data out.
[3:21] <pr3d4t0r> diegao: I've rolled out quite a bit of Python code on JVMs this year.
[3:21] <pr3d4t0r> diegao: For big shops.
[3:23] <diegao> and what's the feedback you had about it?
[3:23] <pr3d4t0r> diegao: Great.
[3:23] <pr3d4t0r> diegao: My team did a gig with a major insurance company in the US; top 3 firm.
[3:24] <diegao> huhu ^^
[3:24] <pr3d4t0r> diegao: There was a need for some non-application code required by ops; it had to be scriptable. The framework they were using supported any JSR-223 language.
[3:25] <pr3d4t0r> diegao: Not knowing any better, the devs and a consultant were dicking about with Groovy. The QA and ops guys were pissed off.
[3:25] <pr3d4t0r> diegao: The Groovy implementation didn't work out, and there were additional issues with access to some resources, coding, and so on.
[3:25] <pr3d4t0r> diegao: So my guys and I swooped in and suggested using Jython instead. Instant joy.
[3:26] <pr3d4t0r> diegao: All of a sudden the QA and ops guys can run this stuff, extend it, etc. as they see fit because it's Python. They were able to recycle some of their own modules, originally written for CPython and so on.
[3:26] <pr3d4t0r> diegao: Then we showed the devs how to use Python in the servlet container. More joy for the ones who weren't Java bigots.
[3:27] <pr3d4t0r> diegao: Here's a little write up I made that describes some of this.
[3:28] <pr3d4t0r> diegao: http://is.gd/8ZpwZ
[3:28] <pr3d4t0r> diegao: When you're done with that, I'll give you a link to my top-rated presentation at various conference worldwide about Jython.
[3:28] <pr3d4t0r> diegao: I had a full house at JavaZone, Java2Days, TSSJS on that one.
[3:31] <pr3d4t0r> diegao: If you're on that page, click on the top link to go to my blog. I have an analysis there of Hadoop streaming API (Python, awk) vs Java. Very educational.
[3:31] <pr3d4t0r> diegao: In that case, though, it was CPython.
[3:31] <pr3d4t0r> diegao: I should repeat the exercise running PyPy.
[3:32] <diegao> it's impossible don't get enjoy developing in python, your team tryed other things and so was more clear to see de difference of class between python and others languages..
[3:41] <diegao> pr3d4t0r: nice blog
[3:42] <pr3d4t0r> diegao: Gracias.
[3:57] <diegao> pr3d4t0r: that post about mule realy showed me, many things in the practice that you told me... thanks, it's so good to expand my knowledge about the better ways to use jython, and how, this is the most important
[3:59] <pr3d4t0r> diegao: I just suggested something crazy to niallo on Tweeter along these lines.
[4:01] <pr3d4t0r> diegao: http://twitter.com/ciurana
[4:04] <diegao> great
[4:05] <diegao> pr3d4t0r: do you use tdd?
[4:05] <diegao> test driven development
[4:08] * verterok (~ggonzalez@190.188.244.241) has joined #jython
[4:08] * verterok (~ggonzalez@190.188.244.241) Quit (Changing host)
[4:08] * verterok (~ggonzalez@unaffiliated/verterok) has joined #jython
[4:11] <pr3d4t0r> diegao: Yeah.
[5:28] * diegao (~diegao@189.12.5.66) Quit (Remote host closed the connection)
[5:48] * thobe (~Adium@212-162-171-110.skbbip.com) has joined #jython
[6:34] * Oti (~ohumbel@adsl-89-217-2-196.adslplus.ch) Quit (Quit: Oti)
[6:54] * eldragon (~eldragon@84.79.67.254) Quit (Ping timeout: 245 seconds)
[6:56] * eldragon (~eldragon@84.79.67.254) has joined #jython
[7:08] * verterok (~ggonzalez@unaffiliated/verterok) Quit (Ping timeout: 260 seconds)
[7:14] * headius (~headius@216.160.3.79) has joined #jython
[7:35] * jabley (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) has joined #jython
[7:37] * headius (~headius@216.160.3.79) Quit (Quit: headius)
[7:41] * jabley (~jabley@cpc1-farn4-0-0-cust318.6-2.cable.virginmedia.com) Quit (Quit: jabley)
[7:45] * Soteric_ (d5f7da92@gateway/web/freenode/ip.213.247.218.146) has joined #jython
[7:56] * Oti (5390f2dc@gateway/web/freenode/ip.83.144.242.220) has joined #jython
[8:14] * njoyce (~njoyce@124-150-101-166.dyn.iinet.net.au) Quit (Quit: Leaving...)
[8:58] * mds (~seiler@131.220.126.195) has joined #jython
[9:01] * mds (~seiler@131.220.126.195) has left #jython
[9:28] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) Quit (Ping timeout: 264 seconds)
[10:34] * Oti (5390f2dc@gateway/web/freenode/ip.83.144.242.220) Quit (Quit: Page closed)
[10:35] * lucian_ (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[10:45] * Oti (5390f2dc@gateway/web/freenode/ip.83.144.242.220) has joined #jython
[10:55] * jabley (~jabley@nat-124-248.guardian.co.uk) has joined #jython
[11:00] * yacc (~andreas@84.113.164.165) Quit (Ping timeout: 276 seconds)
[11:00] * jabley (~jabley@nat-124-248.guardian.co.uk) Quit (Ping timeout: 255 seconds)
[11:14] * yacc (~andreas@194.48.133.8) has joined #jython
[11:14] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 240 seconds)
[11:14] * adiroiban (~adiroiban@h194-54-129-79.teleson.ro) has joined #jython
[11:20] * lucian_ is now known as lucian
[11:22] * yacc (~andreas@194.48.133.8) Quit (Ping timeout: 240 seconds)
[11:27] * njoyce (~njoyce@124-150-101-166.dyn.iinet.net.au) has joined #jython
[11:40] * yacc (~andreas@194.48.133.8) has joined #jython
[12:05] * njoyce (~njoyce@124-150-101-166.dyn.iinet.net.au) Quit (Quit: Leaving...)
[12:17] * juneau001 (~juneau@fess-116326.dhcp.fnal.gov) has joined #jython
[12:20] * juneau001_ (~juneau@131.225.174.132) has joined #jython
[12:20] * juneau001_ (~juneau@131.225.174.132) Quit (Remote host closed the connection)
[12:20] * juneau001 (~juneau@fess-116326.dhcp.fnal.gov) Quit (Read error: Connection reset by peer)
[12:21] * juneau001 (~juneau@fess-116326.dhcp.fnal.gov) has joined #jython
[12:31] * adiroiban (~adiroiban@h194-54-129-79.teleson.ro) Quit (Read error: No route to host)
[13:00] * seberg (~sebastian@134.76.218.194) has joined #jython
[13:10] * adiroiban (~adiroiban@h194-54-129-79.teleson.ro) has joined #jython
[13:19] * verterok (~ggonzalez@unaffiliated/verterok) has joined #jython
[13:27] * yacc_ (~andreas@84.113.164.165) has joined #jython
[13:28] * yacc (~andreas@194.48.133.8) Quit (Ping timeout: 245 seconds)
[13:50] * jbaker_ (~jimbaker@c-24-8-39-78.hsd1.co.comcast.net) has joined #jython
[13:50] * jimbaker (~jimbaker@c-24-8-39-78.hsd1.co.comcast.net) Quit (Read error: Connection reset by peer)
[13:50] * adiroiban (~adiroiban@h194-54-129-79.teleson.ro) has left #jython
[14:02] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) has joined #jython
[14:07] * verterok (~ggonzalez@unaffiliated/verterok) Quit (Ping timeout: 245 seconds)
[14:09] * verterok (~ggonzalez@190.188.244.241) has joined #jython
[14:09] * verterok (~ggonzalez@190.188.244.241) Quit (Changing host)
[14:09] * verterok (~ggonzalez@unaffiliated/verterok) has joined #jython
[14:21] * thijstriemstra (~thijstrie@i219160.upc-i.chello.nl) has joined #jython
[14:48] * luckman212 (~quassel@pool-96-246-172-198.nwrknj.fios.verizon.net) has joined #jython
[14:51] * diegao (~diegao@189.83.226.133) has joined #jython
[14:53] * jabley (~jabley@212.183.140.37) has joined #jython
[14:53] * diegao (~diegao@189.83.226.133) Quit (Remote host closed the connection)
[14:53] * diegao (~quassel@189.83.226.133) has joined #jython
[14:55] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Remote host closed the connection)
[14:58] * seberg (~sebastian@134.76.218.194) Quit (Read error: Connection reset by peer)
[15:22] * seberg (~sebastian@134.76.218.194) has joined #jython
[15:25] * jabley (~jabley@212.183.140.37) Quit (Quit: jabley)
[15:27] * seberg (~sebastian@134.76.218.194) Quit (Client Quit)
[16:18] * taps (~taps@external.algorithmics.com) has joined #jython
[16:18] * juneau001 (~juneau@fess-116326.dhcp.fnal.gov) Quit (Quit: juneau001)
[16:20] <taps> help a newie please... I am an 'old' programmer, but new to Jython. Is there a way in a jython file to get the name of the current file? Something like: print 'I am file ', somemethod()
[16:25] * enebo (~enebo@184-97-205-152.mpls.qwest.net) has joined #jython
[16:38] * thobe (~Adium@212-162-171-110.skbbip.com) Quit (Quit: Leaving.)
[16:45] <diegao> taps: look at sys.argv
[16:50] * jbaker_ (~jimbaker@c-24-8-39-78.hsd1.co.comcast.net) Quit (Read error: Connection reset by peer)
[16:50] * jimbaker (~jimbaker@c-24-8-39-78.hsd1.co.comcast.net) has joined #jython
[17:22] * thobe (~Adium@c83-249-247-186.bredband.comhem.se) has joined #jython
[17:45] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) Quit (Ping timeout: 265 seconds)
[17:50] * Oti (5390f2dc@gateway/web/freenode/ip.83.144.242.220) Quit (Quit: Page closed)
[18:43] * enebo (~enebo@184-97-205-152.mpls.qwest.net) Quit (Read error: Connection reset by peer)
[18:43] * enebo (~enebo@184-97-205-152.mpls.qwest.net) has joined #jython
[19:36] * jimbaker (~jimbaker@c-24-8-39-78.hsd1.co.comcast.net) Quit (Quit: jimbaker)
[19:38] * shanka (~shashank@ucb-np1-230.colorado.edu) has joined #jython
[19:51] * DanC (~dconnolly@user1.kumc.edu) has joined #jython
[19:51] <DanC> it's been a while since I used jython; I seem to recall that doctest didn't work. Does it work now?
[19:51] * DanC tries it out...
[19:52] * headius (~headius@216.160.3.79) has joined #jython
[19:53] <DanC> hmm... Ubuntu offers Candidate: 2.2.1-2.1ubuntu1; I guess I don't want that
[19:56] <agronholm> taps, you want __file__
[20:00] * shanka (~shashank@ucb-np1-230.colorado.edu) Quit (Ping timeout: 240 seconds)
[20:01] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[20:08] * shanka (~shashank@ucb-np1-230.colorado.edu) has joined #jython
[20:25] <pjenvey_> DanC - it def works in 2.5. you just might run into doctests that assume CPython dict ordering, but they're broken anyway
[20:43] * enebo (~enebo@184-97-205-152.mpls.qwest.net) Quit (Read error: Connection reset by peer)
[20:43] * enebo (~enebo@184-97-205-152.mpls.qwest.net) has joined #jython
[20:45] * shanka (~shashank@ucb-np1-230.colorado.edu) Quit (Ping timeout: 265 seconds)
[21:03] * diegao (~quassel@189.83.226.133) Quit (Remote host closed the connection)
[21:07] * jimbaker (~jimbaker@71.33.237.102) has joined #jython
[21:26] * luckman212 (~quassel@pool-96-246-172-198.nwrknj.fios.verizon.net) Quit (Read error: Connection reset by peer)
[21:33] <DanC> thanks, pjenvey_
[21:39] * pjenvey_ (~pjenvey@underboss.org) Quit (Quit: ZNC - http://znc.sourceforge.net)
[21:40] * pjenvey (~pjenvey@underboss.org) has joined #jython
[21:43] * enebo (~enebo@184-97-205-152.mpls.qwest.net) Quit (Read error: Connection reset by peer)
[21:43] * enebo_ (~enebo@184-97-205-152.mpls.qwest.net) has joined #jython
[21:46] <pr3d4t0r> pjenvey: Hej.
[21:48] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Remote host closed the connection)
[21:49] * MarderIII (~marderii@enneman.demon.nl) has joined #jython
[21:51] <DanC> I'd like to be able to run 'hg archive ...' by pushing a button in eclipse. Suggestions? Is a plug-in the smallest unit of customization?
[21:52] <agronholm> danc, you can define external commands
[21:53] <agronholm> check the "external tool configurations"
[21:54] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[22:00] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) has joined #jython
[22:16] <DanC> ok, thanks for the clue, agronholm
[22:34] * jimbaker (~jimbaker@71.33.237.102) Quit (Ping timeout: 240 seconds)
[22:35] * MarderIII (~marderii@enneman.demon.nl) Quit (Quit: leaving)
[22:39] * jimbaker (~jimbaker@71.33.237.102) has joined #jython
[22:43] * lopex (lopex@89-76-44-27.dynamic.chello.pl) has joined #jython
[22:43] * enebo_ (~enebo@184-97-205-152.mpls.qwest.net) Quit (Read error: Connection reset by peer)
[22:44] * enebo (~enebo@184-97-205-152.mpls.qwest.net) has joined #jython
[22:53] * njoyce (~njoyce@203-214-100-43.dyn.iinet.net.au) has joined #jython
[23:07] * njoyce (~njoyce@203-214-100-43.dyn.iinet.net.au) Quit (Quit: Leaving...)
[23:08] * jimbaker (~jimbaker@71.33.237.102) Quit (Quit: jimbaker)
[23:08] * njoyce (~njoyce@203-214-100-43.dyn.iinet.net.au) has joined #jython
[23:10] * nick_ (~njoyce@203-214-100-43.dyn.iinet.net.au) has joined #jython
[23:10] * njoyce (~njoyce@203-214-100-43.dyn.iinet.net.au) Quit (Read error: Connection reset by peer)
[23:10] * nick_ is now known as Guest8617
[23:14] * Guest8617 (~njoyce@203-214-100-43.dyn.iinet.net.au) Quit (Ping timeout: 260 seconds)
[23:34] * lopex (lopex@89-76-44-27.dynamic.chello.pl) Quit ()
[23:40] * njoyce (~njoyce@203-214-100-43.dyn.iinet.net.au) 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).