#jython IRC Log (v0.9)

Index

IRC Log for 2011-02-19

Timestamps are in GMT/BST.

[0:01] * headius (~headius@c-71-193-89-86.hsd1.mn.comcast.net) Quit (Quit: headius)
[0:46] * juneau001 (~juneau@pool-70-106-161-146.chi01.dsl-w.verizon.net) has joined #jython
[2:34] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) Quit (Ping timeout: 240 seconds)
[2:58] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) has joined #jython
[3:30] * lopex (lopex@89-76-44-27.dynamic.chello.pl) Quit ()
[3:38] * JStoker (jstoker@unaffiliated/jstoker) Quit (Excess Flood)
[3:42] * JStoker (jstoker@unaffiliated/jstoker) has joined #jython
[3:54] * natlus (~simon@transgaming.de) Quit (Ping timeout: 255 seconds)
[3:59] * natlus (~simon@transgaming.de) has joined #jython
[4:32] * natlus (~simon@transgaming.de) Quit (Ping timeout: 255 seconds)
[4:32] * natlus (~simon@transgaming.de) has joined #jython
[4:42] * natlus (~simon@transgaming.de) Quit (Ping timeout: 255 seconds)
[4:42] * shanka1 (~shashank@c-98-245-87-8.hsd1.co.comcast.net) has joined #jython
[4:46] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) Quit (Quit: Leaving.)
[4:47] * natlus (~simon@transgaming.de) has joined #jython
[5:29] * cschneid (~cschneid@c-76-120-122-74.hsd1.co.comcast.net) Quit (Remote host closed the connection)
[6:21] * shanka1 (~shashank@c-98-245-87-8.hsd1.co.comcast.net) Quit (Quit: Leaving.)
[8:49] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) has joined #jython
[9:22] * MarderIII (~marderii@enneman.demon.nl) has joined #jython
[10:24] * lucian_ (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[10:26] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Ping timeout: 272 seconds)
[10:32] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) Quit (Ping timeout: 260 seconds)
[10:44] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[10:45] * lucian_ (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Ping timeout: 240 seconds)
[10:46] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Read error: Operation timed out)
[10:53] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[12:00] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Ping timeout: 240 seconds)
[12:02] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[12:25] * MarderIII (~marderii@enneman.demon.nl) Quit (Quit: [IRSSI] Life is a banquet and most people are starving to death)
[12:50] * juneau001_ (~juneau@pool-70-106-161-12.chi01.dsl-w.verizon.net) has joined #jython
[12:52] * juneau001 (~juneau@pool-70-106-161-146.chi01.dsl-w.verizon.net) Quit (Ping timeout: 240 seconds)
[12:52] * juneau001_ is now known as juneau001
[12:59] * lucian_ (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[13:00] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Ping timeout: 240 seconds)
[13:01] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[13:03] * lucian_ (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Ping timeout: 240 seconds)
[13:09] * jimbaker_ (~jbaker@c-24-8-39-78.hsd1.co.comcast.net) has joined #jython
[13:09] * maxb_ (~maxb@jabberwock.vm.bytemark.co.uk) has joined #jython
[13:12] * apexi200sx1 (~bhicking@78.149.108.180) has joined #jython
[13:13] * maxb (~maxb@jabberwock.vm.bytemark.co.uk) Quit (Ping timeout: 246 seconds)
[13:13] * jimbaker (~jbaker@c-24-8-39-78.hsd1.co.comcast.net) Quit (Ping timeout: 246 seconds)
[13:14] * juneau001_ (~juneau@pool-70-105-70-228.chi.dsl-w.verizon.net) has joined #jython
[13:16] * juneau001 (~juneau@pool-70-106-161-12.chi01.dsl-w.verizon.net) Quit (Ping timeout: 240 seconds)
[13:16] * juneau001_ is now known as juneau001
[13:19] * apexi200sx1 (~bhicking@78.149.108.180) Quit (Read error: Connection reset by peer)
[14:05] * lopex (lopex@89-76-44-27.dynamic.chello.pl) has joined #jython
[14:09] * lolsuper_ (~super_@pool-173-65-48-189.tampfl.fios.verizon.net) has joined #jython
[14:09] * lolsuper_ (~super_@pool-173-65-48-189.tampfl.fios.verizon.net) Quit (Changing host)
[14:09] * lolsuper_ (~super_@unaffiliated/lolsuper-/x-9881387) has joined #jython
[15:56] * maxb_ is now known as maxb
[17:59] * acdha (~acdha@pool-151-200-35-114.washdc.btas.verizon.net) has joined #jython
[18:00] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) has joined #jython
[18:07] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Read error: Connection reset by peer)
[18:07] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[18:10] <acdha> It's been awhile since I last did anything serious with Jython and I'm apparently failing at searching the docs
[18:11] <acdha> Is there a convenient way to convert a Python file (e.g. open("foo")'s result) to a java.io.File?
[18:38] * shanka1 (~shashank@c-98-245-87-8.hsd1.co.comcast.net) has joined #jython
[18:38] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) Quit (Ping timeout: 276 seconds)
[18:39] * shanka1 (~shashank@c-98-245-87-8.hsd1.co.comcast.net) Quit (Client Quit)
[18:40] * MarderIII (~marderii@enneman.demon.nl) has joined #jython
[18:41] * shanka (~shashank@c-98-245-87-8.hsd1.co.comcast.net) has joined #jython
[19:20] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) Quit (Ping timeout: 240 seconds)
[19:27] * lucian (~lucian@78-86-217-168.zone2.bethere.co.uk) has joined #jython
[19:35] <agronholm> there may be a way to get the underlying File, but I don't know if you should
[19:36] <lucian> acdha: why not use File directly?
[19:37] <acdha> My goal is to be compatible with existing Python code which can simply pass a file() in
[19:37] <acdha> I guess I could do something like java.io.File(f.name)
[19:38] <acdha> I'm working on a PIL-like drop-in for Jython
[19:38] <acdha> The idea being that you could use JavaImage instead of Image and otherwise not have to monkey with your existing image processing code
[19:39] <acdha> I guess the alternative might be using a stream interface and just read/write on the Python site
[19:39] <acdha> s/site/side/
[19:41] * MarderIII (~marderii@enneman.demon.nl) Quit (Quit: [IRSSI] Game over, please insert coin.)
[19:43] <lucian> acdha: i see
[19:43] <lucian> you'll have to check types inside that PIL-like library
[19:44] <acdha> Yes: I have a block which basically checks inputs for string (i.e. filename), normal files or file-like objects.
[19:45] <acdha> I'll try to read/write to a buffer in the latter two cases
[19:46] <lucian> acdha: you could wrap the File in a python file, i think
[19:47] <acdha> Not sure I follow your meaning
[19:47] <acdha> Is there a way to turn a File into a Python file even if the reverse isn't possible?
[19:48] <lucian> acdha: i think there is. have you tried file() on it?
[19:48] <acdha> No - I was busy trying the reverse and didn't think to
[19:48] <acdha> Hrm, no
[19:49] <acdha> >>> file(java.io.File("tests/samples/m83_hst_big.jpg"))
[19:49] <acdha> Traceback (most recent call last):
[19:49] <acdha> File "<stdin>", line 1, in <module>
[19:49] <acdha> TypeError: coercing to Unicode: need string, 'java.io.File' type found
[19:49] <lucian> acdha: no, doesn't work
[19:50] <lucian> acdha: you can write a wrapper for java.io.File
[19:50] <acdha> I noticed the base IO stuff when searching - is there a plan to make Jython's IO more Java-interchangeable?
[19:50] <lucian> to make it follow the file protocol in python
[19:50] <acdha> That's what I was afraid of ;)
[19:50] <acdha> Not that big of a deal
[19:50] <lucian> i do see how annoying that is
[19:51] <lucian> i don't think you can make things more interchangeable with java without changing semantics
[19:51] <acdha> I think it'd be tricky without some magic to recognize the context
[19:52] <acdha> What might work would be something like the way ctypes users can call PyFile_as_File when they need to cross boundaries
[19:52] <lucian> i don't think it's worth it
[19:52] <lucian> acdha: so have a jython module with some utils?
[19:52] <acdha> Right
[19:52] <acdha> Granted, that might be painful
[19:53] <acdha> The ctypes stuff works because it's all POSIX file I/O underneath; I'm not sure how you'd handle, say, a file which has already been partially read
[19:53] <lucian> if you look at clojure, significant semantics forced by the closeness to the jvm
[19:53] <lucian> s//are/
[19:54] <acdha> True - and given how painful Java file processing is compared to Python's there's a cost to embracing it that closely
[19:54] <lucian> acdha: that too
[19:54] <lucian> i don't know if you've seen swing-utils
[19:54] <lucian> something similar for more general jvm interaction might be useful
[19:54] <acdha> Well, if I get done with this I'll go see whether jRuby has come up with something interesting
[19:54] <acdha> I haven't
[19:55] <acdha> It's been awhile since I've used Jython seriously (changed jobs)
[19:55] <lucian> right
[19:55] <lucian> there's an interesting project related to jruby, mirah
[19:56] <acdha> I've followed that casually
[19:58] <lucian> so a pythonic mirah might be interesting for issues like this
[20:06] <acdha> Yes
[20:06] <acdha> Okay, so now I just need to figure out how to read() into a byte[] array and I should be set with a ByteArraySeekableStream
[21:07] * acdha (~acdha@pool-151-200-35-114.washdc.btas.verizon.net) Quit (Quit: Computer has gone to sleep.)
[22:08] * MarderIII (~marderii@enneman.demon.nl) has joined #jython
[22:09] * acdha (~acdha@pool-151-200-35-114.washdc.btas.verizon.net) has joined #jython
[22:18] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) Quit (Quit: Ex-Chat)
[23:29] * MarderIII (~marderii@enneman.demon.nl) Quit (Quit: [IRSSI] Sorry, this packet is not a winner. Please reconnect!)
[23:30] * cschneid (~cschneid@c-76-120-122-74.hsd1.co.comcast.net) 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).