#jython IRC Log (v0.9)

Index

IRC Log for 2014-01-07

Timestamps are in GMT/BST.

[0:04] * ivan` (~ivan@unaffiliated/ivan/x-000001) Quit (*.net *.split)
[0:04] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) Quit (*.net *.split)
[0:04] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) Quit (*.net *.split)
[0:04] * oscar_toro1 (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) has joined #jython
[0:06] * ivan` (~ivan@unaffiliated/ivan/x-000001) has joined #jython
[0:08] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) has joined #jython
[0:44] * oscar_toro1 (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) Quit (Ping timeout: 246 seconds)
[1:05] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 260 seconds)
[1:05] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[2:01] <jimbaker> sinistersnare, so for android - in general we can use DynamicProxy in jython for any python class that extends java interface(s). this means we only need to clamp classes for python classes that extend java classes, because that requires generating bytecode (due to limitations on the jvm)
[2:25] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Read error: Connection reset by peer)
[2:29] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[2:59] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Read error: Connection reset by peer)
[3:00] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[3:21] * ohumbel (5390f2dc@gateway/web/freenode/ip.83.144.242.220) Quit (Ping timeout: 272 seconds)
[4:12] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Read error: Operation timed out)
[4:12] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[4:13] * lheuer (~Adium@unaffiliated/lheuer) Quit (Quit: Leaving.)
[5:30] * mcurve_ (~quassel@pop.nakinasystems.com) has joined #jython
[5:31] * mcurve (~quassel@pop.nakinasystems.com) Quit (Write error: Broken pipe)
[5:31] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Write error: Broken pipe)
[5:32] * r0bby_ (~wakawaka@guifications/user/r0bby) has joined #jython
[5:41] * JStoker (jstoker@unaffiliated/jstoker) Quit (*.net *.split)
[5:42] * JStoker (jstoker@claire.jcs.me.uk) has joined #jython
[5:42] * JStoker (jstoker@claire.jcs.me.uk) Quit (Changing host)
[5:42] * JStoker (jstoker@unaffiliated/jstoker) has joined #jython
[5:54] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) Quit (*.net *.split)
[5:59] * thereisnospoon (~thereisno@113-61-86-28.static.qld.dsl.net.au) has joined #jython
[7:09] * lheuer (~Adium@f049075078.adsl.alicedsl.de) has joined #jython
[7:09] * lheuer (~Adium@f049075078.adsl.alicedsl.de) Quit (Changing host)
[7:09] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[7:14] * Oti (~ohumbel@adsl-84-227-117-139.adslplus.ch) Quit (Quit: Oti)
[7:41] * lheuer1 (~Adium@f048032024.adsl.alicedsl.de) has joined #jython
[7:44] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 260 seconds)
[7:59] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) has joined #jython
[8:01] * ohumbel (5390f2dc@gateway/web/freenode/ip.83.144.242.220) has joined #jython
[8:37] * fwierzbicki (~Adium@99-106-170-162.lightspeed.sntcca.sbcglobal.net) Quit (Ping timeout: 264 seconds)
[8:41] * fwierzbicki (~Adium@99-106-170-162.lightspeed.sntcca.sbcglobal.net) has joined #jython
[8:57] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) Quit (Ping timeout: 246 seconds)
[9:18] * lheuer1 is now known as lheuer
[9:18] * lheuer (~Adium@f048032024.adsl.alicedsl.de) Quit (Changing host)
[9:18] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[10:26] <peke> mitsuhiko: agreed. thanks for making an issue about getting u'' back in py3.3! i doubt i would even consider porting my projects to py3 without it.
[10:29] <peke> ooops, wrong channel. interesting discussion on #python2.8 btw.
[10:37] * r0bby_ (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 264 seconds)
[10:42] <agronholm> peke: I used a simple u() to replace that before 3.3
[11:17] <peke> agronholm: in a large code base u() is fugly.
[11:18] <peke> anyway, python3 usage is so low that i don't think i ever need to care about 3.2.
[12:07] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) has joined #jython
[13:27] * r0bby_ (~wakawaka@guifications/user/r0bby) has joined #jython
[13:31] * r0bby_ is now known as robbyoconnor
[13:59] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Read error: Operation timed out)
[14:28] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[17:30] * verterok (~ggonzalez@unaffiliated/verterok) Quit (Ping timeout: 246 seconds)
[17:36] * verterok` (~ggonzalez@162.213.35.11) has joined #jython
[17:44] * verterok` is now known as verterok
[17:45] * verterok (~ggonzalez@162.213.35.11) Quit (Changing host)
[17:45] * verterok (~ggonzalez@unaffiliated/verterok) has joined #jython
[17:50] * willvw_ (sid20852@gateway/web/irccloud.com/x-nqkiobgafddsamer) has joined #jython
[17:51] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[17:52] * willvw (sid20852@gateway/web/irccloud.com/x-mezvxweezelfafca) Quit (Ping timeout: 240 seconds)
[17:52] * diametric (~diametric@2604:3400:dc1:43:216:3eff:fe27:bf9d) Quit (Ping timeout: 240 seconds)
[17:52] * Oti (~ohumbel@adsl-84-227-97-139.adslplus.ch) has joined #jython
[17:53] * willvw_ is now known as willvw
[17:54] * diametric (~diametric@2604:3400:dc1:43:216:3eff:fe27:bf9d) has joined #jython
[18:11] * Oti (~ohumbel@adsl-84-227-97-139.adslplus.ch) Quit (Ping timeout: 240 seconds)
[18:11] * diametric (~diametric@2604:3400:dc1:43:216:3eff:fe27:bf9d) Quit (Ping timeout: 240 seconds)
[18:11] * diametric (~diametric@2604:3400:dc1:43:216:3eff:fe27:bf9d) has joined #jython
[18:31] * xymox (lechuck@unaffiliated/contempt) Quit (Ping timeout: 264 seconds)
[18:33] * xymox (lechuck@unaffiliated/contempt) has joined #jython
[18:56] * xymox (lechuck@unaffiliated/contempt) Quit (Disconnected by services)
[18:57] * xymox (lechuck@unaffiliated/contempt) has joined #jython
[19:00] <whg> OK, I finally got the all-clear from my boss to do that "patois" project that is like six but for different VMs instead of different versions of CPython
[19:00] <whg> Any suggestions for what should go in there?
[19:01] <whg> I seem to recall a problem with unittest2 and Jython (because it was making bad assumptions about translating the name of the compiled class back to .py? or some such?)
[19:03] * diametric (~diametric@2604:3400:dc1:43:216:3eff:fe27:bf9d) Quit (Ping timeout: 240 seconds)
[19:08] * diametric (~diametric@2604:3400:dc1:43:216:3eff:fe27:bf9d) has joined #jython
[19:24] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[19:56] * arctansusan (~susantan@173-11-98-81-SFBA.hfc.comcastbusiness.net) has joined #jython
[19:57] <arctansusan> Hi All, what is the latest version of Jython? is it 2.5.2?
[19:57] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[19:59] <sinistersnare> arctansusan , the latest fully released version is 2.5.3, however 2.7b1 is out
[19:59] <arctansusan> thanks sinistersnare
[19:59] <sinistersnare> whg, interesting, but i have no suggestions :p
[20:01] <sinistersnare> im installing linux on my new laptop so i can build my presentation!
[20:06] <whg> sinistersnare: Did you look at any of the bsds?
[20:06] <arctansusan> I've just installed the jython jar, but when I type "jython" in command terminal, i get error message: "command not found". How do I fix this?
[20:07] <arctansusan> how do I make jython in my standard path?
[20:07] <whg> add the location to your path
[20:07] <sinistersnare> i tried to install OpenBSD a couple years back (before i really got into programming) and there was no WM and it scared me. Maybe I should try again soon
[20:07] <sinistersnare> arctansusan, what OS?
[20:08] <arctansusan> sinistersnare: maxOS 10.9.1
[20:08] <whg> sinistersnare: I use a Mac, but I like to monitor the BSDs, especially FreeBSD
[20:09] <arctansusan> "sudo find sudo find / -name jython" gives me some paths where "jython" is found
[20:09] <sinistersnare> arctansusan, i assume you mean Mac? google how to add a program to the mac osx path
[20:09] <whg> arctansusan You should change your PATH environment variable
[20:10] <arctansusan> to point to the system-wide installation of Jython?
[20:10] <sinistersnare> `export PATH=$PATH:/path/to/jython` i think is the command
[20:10] <sinistersnare> where /path/to/jython is jython.jar
[20:10] <sinistersnare> bu thatll only work in the current terminal session
[20:11] <arctansusan> i'll put that in my ~/bash_profile.
[20:11] <arctansusan> for permanence
[20:11] <sinistersnare> yes
[20:12] <whg> Actually, you want to add the "bin" directory you got from the installer
[20:12] <whg> Something like export PATH=$HOME/jython2.5.4rc1/bin:$PATH
[20:13] <sinistersnare> oh whoops! my bad
[20:13] <sinistersnare> i have gotten used to adding the jar to my PyDev profile, so i just forgot :
[20:19] <arctansusan> "jython" on command terminal finally Worked now! Thanks whg and sinistersnare
[20:20] <sinistersnare> great
[20:21] <arctansusan> Now i can start to compiling my python project into .class files. I work in a java shop.
[20:23] <whg> yw
[20:24] <jimbaker> whg, one thing we need to put in patois is support for working with utf16 vs ucs2/ucs4
[20:25] <jimbaker> there are also things around os.name, os._name, platform.python_implementation()
[20:26] <jimbaker> re utf16, this is specifically doing the sort of stuff that one sees in projects like requests which works w/ surrogates explicitly, which cannot be encoded in jython
[20:29] <whg> wha?
[20:29] <whg> requests is explicitly using surrogates?
[20:29] <whg> What on earth for?
[20:31] <jimbaker> requests uses it to determine invalid unicode. actually i might have that mixed up w/ pip
[20:31] <jimbaker> but same diff
[20:33] <whg> So as some sort of weird correctness test, it creates psycho-crazy-insane Unicode?
[20:34] <whg> (I realize surrogates are totally valid, they just always seemed extraneous and wasteful to me)
[20:35] <whg> OK, either way it's something to work on
[20:36] <whg> I'll try to get the project boilerplate straightened out tonight or the morning, depending on whether the kids cooperate by actually going to sleep
[20:36] <whg> And we can start tracking todos as issues on bitbucket
[20:37] <jimbaker> whg, fantastic!
[20:37] <jimbaker> although maybe github would be easier - it's good either way for me
[20:37] <whg> Well, I already started it in hg, but if you prefer git it's no big deal
[20:37] <jimbaker> basically at this point in jython we are only tracking jython proper in bitbucket, and even then it's clumsy because it's really on hg.python.org
[20:38] <whg> So far the commit history is "initial project creation"
[20:38] <whg> I thought I would have it done this morning, but then one of the kids woke up early and I discovered the furnace was out
[20:38] <whg> On the coldest day on record in my neck of the woods
[20:38] <jimbaker> whg, i know the feeling
[20:39] <jimbaker> we had a problem w/ our furnace back in december - our humidifier line froze up, back into the furnace fan
[20:39] <whg> jimbaker: Ouch.
[20:39] <whg> jimbaker: I imagine that's kind of a big deal in Colorado
[20:39] <jimbaker> fortunately, i was able to thaw out w/ portable electric heaters
[20:40] <jimbaker> right, we want a humidifier - and it can get go from really cold to warm in a day
[20:41] <jimbaker> whg, so i think in general we will get more contributors if we use github at this point
[20:41] <whg> jimbaker Cool beans
[20:42] <jimbaker> whg, cool - i will look back at pip/requests to pull out this piece
[20:42] <jimbaker> i need to post to jython-dev the work i have done on https://github.com/jimbaker/socket-reboot
[20:42] <jimbaker> as one of my colleagues pointed out, it's been a fair amount of yak shaving. but this time, the yak had to be shaved :)
[20:43] <whg> Well, at least now there's an awesome sweater
[20:43] <jimbaker> once this is done, i can get back to the minor remaining pip fixes, then we can release jython 2.7 beta 2
[20:44] <whg> Can't wait
[20:44] <jimbaker> whg, exactly - i think putting jython networking on this solid foundation is long term a huge benefit
[21:05] <arctansusan> hi again, i have another question -- how do I compile .py files into .class files? I've read that jythonc is deprecated. Should I instead use the compileall python library?
[21:06] <jimbaker> arctansusan, yes, use compileall
[21:06] <jimbaker> the most straightforward to use compileall is with setup.py
[21:07] <jimbaker> arctansusan, if you're looking for a jythonc replacement, you probably are interested in the clamp project, as documented here: https://github.com/jimbaker/clamped
[21:07] <jimbaker> it's under active development and does such things as jar construction
[21:07] <jimbaker> it's also integrated w/ setup.py and setuptools
[21:55] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Excess Flood)
[21:55] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[22:06] <arctansusan> thanks for the advice jimbaker
[22:40] <jimbaker> pjenvey, any reason why type(java.io.Serializable), etc, is not type (it's <type 'java.lang.Class'>?
[22:40] <jimbaker> it would seem nice if we could mix java types in w/ metaclasses
[22:41] <jimbaker> (this is to improve the clamp user experience by having a metaclass handle __proxymaker__ setup)
[22:49] <pjenvey> do you want to use a java type as a metaclass?
[22:50] <jimbaker> pjenvey, i want to do something like the following: class ClampSerializable(Serializable, ClampMetaClass): ...
[22:50] <jimbaker> but doing that directly results in metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
[22:51] <jimbaker> now if instead i have a empty pass-through class, it seems fine: class MySerializable(Serializable): pass, but that's not as nice
[22:52] * whg is now known as zz_whg
[22:53] <jimbaker> it's fairly explicit in the code, https://bitbucket.org/jython/jython/src/b2890af7a5e817e30f6ca2325f6dcdb14a59f32b/src/org/python/core/PyType.java?at=default#cl-181, that at least the case above, type(MySerializable) == type
[22:53] <jimbaker> but i would like type(Serializable) == type as well, unless this is ridiculous for some reason i'm not seeing
[22:55] <jimbaker> pjenvey, so no on a java type as a metaclass, just participating as a base of a class using a metaclass
[22:55] <pjenvey> what's ClampMetaClass exactly?
[22:56] <jimbaker> something i just made up for this example, but it's to be a metaclass that constructs the type as desired
[22:57] <jimbaker> in particular, because we can construct the type, we can do all sorts of fun stuff. like type inference
[22:57] <jimbaker> (darjus and i have been chatting about this privately)
[22:58] <pjenvey> I guess I'm confused why ClampSerializable would subclass it
[22:58] <jimbaker> one other thing it can do is insert the __proxymaker__ attribute, so this will disappear. so again, just want to the usual with metaclass support - i want to intercept name, bases, dict before going to type construction :)
[23:00] <jimbaker> pjenvey, sorry what i called ClampSerializable should be something like this: ArbitraryClampedClass(Serializable, Clamped("bar")): pass
[23:01] <pjenvey> it sounds like it would be a mixin type thing
[23:01] <pjenvey> that would give you the metaclass for free
[23:01] <pjenvey> is that right
[23:01] <jimbaker> so the user wants to construct a clamped class (let's call it ArbitraryClampedClass), using some bases, including java interfaces/classes (eg Serializable), and get it to clamp with Clamped(...)
[23:01] <jimbaker> right Clamped(???) is the mixin that pulls in the necessary metaclass
[23:02] <jimbaker> so the user of clamp doesn't have to set __metaclass__ either
[23:03] <pjenvey> ah ok
[23:03] <jimbaker> it still would be necessary to do this odd thing that the user is actually calling a class factory, eg Clamped(X), so we can put in enough info
[23:05] <jimbaker> but then it's also possible for the user to say ArbitraryClampedClass(Serializable, Clamped("bar")): serialVersionUID = clamp.CONST(Long(42))
[23:05] <jimbaker> and we can pick up the constant definition at type construction
[23:07] * oscar_toro (~Thunderbi@80-62-162-242-static.dk.customer.tdc.net) Quit (Ping timeout: 264 seconds)
[23:11] <pjenvey> jimbaker - what actual __metaclass__ does Clamped() provide you?
[23:14] <jimbaker> it will be some constructed type such that it is __metaclass__ = MetaClamped("bar") - and other attributes as necessary to construct the actual clamped type
[23:15] <jimbaker> although i suppose those instead could be attributes of the clamped class
[23:15] <jimbaker> so again, it's more about fixing that TypeError, then we can figure out specific api design
[23:16] <jimbaker> unless there's a good reason for the TypeError - which i don't see
[23:16] <pjenvey> i probably don't grasp everything here yet but I'm wondering if the __metaclass__ could be a plain function in this case
[23:16] <jimbaker> pjenvey, it certainly could be a plain function
[23:16] <pjenvey> I think that could avoid the problem
[23:18] <jimbaker> pjenvey, but we still need to ensure that all bases have the same metaclass for their ancestor
[23:21] <pjenvey> ok
[23:22] <pjenvey> I'm not sure, feels like this should work, but there be dragons in the details
[23:22] <pjenvey> we (groves) probably didn't consider metaclassery too much when doing the new PyJavaType
[23:22] <jimbaker> right, it boils down to, any good reason why type(Serializable) == type shouldn't be True? i think it just becomes details
[23:22] <pjenvey> as evidenced by no metaclass tests in test_java_* =]
[23:23] <jimbaker> pjenvey, right, it's something i have essentially never used. until now. because darjus made a convincing case in an email to me
[23:23] <jimbaker> pjenvey, anyway, it's a good thing to explore in a branch :)
[23:23] <pjenvey> what would that entail exactly, would it still be a PyJavaType underneath?
[23:24] <jimbaker> pjenvey, yes
[23:24] <arctansusan> hey again! I have a question on virtualenv + jython setup, which I got stuck on. I installed virtualenv in jython, according to http://www.jython.org/jythonbook/en/1.0/appendixA.html#virtualenv. Then I ran the 2nd command in the instructions and got the error: "ERROR: None ERROR: this script requires Python 2.6 or greater."
[23:24] <jimbaker> arctansusan, hmmm, i assume you are running jython 2.5 right now?
[23:25] <arctansusan> yes. jython --version --> Jython 2.5.2
[23:25] <pjenvey> I'd say I don't know and definitely needs exploration =]
[23:25] <jimbaker> i haven't worked w/ 2.5 recently, focusing on 2.7 - but one of the goals of 2.7 beta 2 is full support of pip/virtualenv. which has been a lot of work :(
[23:25] <arctansusan> so, are you recommend i use jython 2.7 instead?
[23:26] <arctansusan> i like pip/virtualenv, because so many dependencies to manage.
[23:26] <jimbaker> arctansusan, agreed. that's why we are blocking 2.7 on that support :)
[23:28] <arctansusan> i don't understand the error "this script requires Python 2.6 or greater.". Im using python 2.7
[23:28] <jimbaker> arctansusan, so i don't have a great answer for you, except to see if there's a version of virtualenv that still works w/ 2.5. we will have virtualenv working real soon now, but it requires finishing the socket/ssl/select refactoring detailed in https://github.com/jimbaker/socket-reboot
[23:29] <jimbaker> pjenvey, btw, if you have any comments on https://github.com/jimbaker/socket-reboot, that'd be great - i do plan to post to jython-dev shortly however, and as far as i can tell, it hits all client cases at least, which is my big concern for now
[23:38] <jimbaker> arctansusan, more on what you just stated: some scripts don't actually check the python version. instead they check the namespace of an imported module (or do an import of a say a 2.7 only module), and use that to figure out if they are running on 2.7
[23:38] <jimbaker> so if foo.bar is in 2.6+, but not in 2.5, it might report that error
[23:39] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[23:39] <arctansusan> ah i see; that seems silly.
[23:41] <jimbaker> arctansusan, again this is just a conjecture - but i will see once i work on virtualenv for 2.7. right now, we know it's busted :(
[23:42] <jimbaker> fortunately rackspace needs virtualenv + pip for jython 2.7, so we are working on it :)
[23:42] <arctansusan> okie.!

Index

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