#jython IRC Log


IRC Log for 2015-05-29

Timestamps are in GMT/BST.

[3:22] * gopar (~gopar@c-73-162-171-146.hsd1.ca.comcast.net) Quit (Remote host closed the connection)
[5:47] * gopar (~gopar@c-73-162-171-146.hsd1.ca.comcast.net) has joined #jython
[6:56] * gopar (~gopar@c-73-162-171-146.hsd1.ca.comcast.net) Quit (Quit: Leaving)
[7:44] * pdurbin (~pdurbin@server1.greptilian.com) Quit (Ping timeout: 240 seconds)
[7:45] * pdurbin (~pdurbin@server1.greptilian.com) has joined #jython
[8:18] * mbooth (~mbooth@redhat/mbooth) Quit (Ping timeout: 272 seconds)
[8:32] * mbooth (~mbooth@redhat/mbooth) has joined #jython
[8:56] * meme (0e8bf032@gateway/web/freenode/ip. has joined #jython
[9:07] * koo6 (~koo5@236.152.broadband3.iol.cz) has joined #jython
[9:11] * meme (0e8bf032@gateway/web/freenode/ip. Quit (Quit: Page closed)
[9:19] * Trundle (~andy@python/site-packages/trundle) has joined #jython
[10:23] * koo6 (~koo5@236.152.broadband3.iol.cz) Quit (Remote host closed the connection)
[11:31] <ztane> I still cannot build jython 3 from git :(
[11:32] <ztane> each ant invocation ends up with an error but with each invocation I get further, then I get the jython executable but even -S does not work
[11:35] <ztane> nvm, got it running.
[11:35] <ztane> haha :P I see that b'' is not yet implemented :d
[11:35] <ztane> well or even bytes for that matter
[11:36] <ztane> well ... and the futures are not on :D
[11:37] <ztane> I guess even enabling the "unicode_literals", "division", "print_function", "absolute_import" by default without removing any of the code...
[12:30] <agronholm> ztane: stop trying :)
[12:30] <agronholm> it's futile
[12:30] <agronholm> like I said, it's so broken right now there's no point
[12:31] <agronholm> b'' should be implemented
[12:31] <agronholm> right...b'' should produce bytes on python 3
[12:31] <agronholm> which might not be implemented yet
[13:35] * xemdetia (xemdetia@nat/ibm/x-uamlxvgovlraftnt) has joined #jython
[14:17] <ztane> agronholm: damnit I want to contribute :d
[14:17] <ztane> why can't it get to a point where I can contribute :D
[14:18] <agronholm> of course you can contribute -- but running it might be a bit difficult right now :)
[14:18] <ztane> I got it running...
[14:18] <agronholm> sort of
[14:18] <ztane> sort of, enough :P
[14:18] <agronholm> so what's stopping you?
[14:18] <agronholm> there's lots to do
[14:18] <ztane> my ide is eclipse :D because I am contributing lots of RCP code now
[14:19] <agronholm> one low hanging fruit is searching for jython specific modules (Lib/) and looking for uses of os._name
[14:19] <agronholm> os.name will be compatible with cpython from 3.x onwards so os._name will be gone
[14:20] <agronholm> so if there are altered modules where the only change is using os._name instead, they can be just deleted
[14:20] <agronholm> os._name should not be present anywhere anymore
[14:21] <agronholm> there are large scale structural changes that I'm too much of a n00b to do
[14:21] <ztane> .. anw my problem is I got the project imported to eclipse
[14:22] <ztane> but the lexer and parser is missing
[14:22] <agronholm> use ant to build the project
[14:22] <agronholm> then go back to eclipse
[14:22] <ztane> I did, but it still didn't find the
[14:22] <ztane> dunno how should I do it :d
[14:22] <ztane> 106 errors
[14:22] <agronholm> I'm perhaps not the right person to answer that question
[14:25] <xemdetia> I would assume that if the jython lexer and parser are generated by antlr there is a build step you are missing
[14:25] <xemdetia> it is common with compilers to have some of those autogenerated files not part of the main tree
[14:27] <ztane> what ide do ppl use (IntelliJ IDEA?)
[14:27] <agronholm> I use Eclipse for java stuff, pycharm for the rest
[14:28] <ztane> agronholm: so I gather you'd be interested in finding out the solution as well?
[14:29] <agronholm> I always use ant to build it so I've never really had a problem there
[14:29] <agronholm> years ago I tried to get eclipse to build it but gave up
[14:29] <ztane> build and build, it should be refactorable in the IDE
[14:30] <ztane> do you have it without errors in the ide?
[14:30] <agronholm> yes
[14:31] <agronholm> jython 2.x at least
[14:31] <agronholm> ah no
[14:31] <ztane> eclipse 4.3 can import ant projects, but it doesn't seem to understand the antlr stuff
[14:32] <agronholm> it's only complaining about missing ant libs
[14:32] <ztane> yeah that too
[14:32] <ztane> I don't want to build it in eclipse but it is very handy if there is no errors
[14:44] <ztane> ok, I just created an empty extra source folder and symlinked the gensrc over it
[14:51] <ztane> *ah, link source folder
[14:56] <ztane> and 0 errors
[15:15] <ztane> -if (os._name if sys.platform.startswith('java') else os.name) == 'nt':
[15:15] <ztane> +if os.name == 'nt':
[15:15] <ztane> guess only this one
[15:17] <ztane> urllib, everything else either has no changes or substantial changes
[15:17] <ztane> and urllib will be anew anw.
[15:23] <agronholm> ztane: I found at least 42 matches
[15:24] <agronholm> for os._name in Lib/
[15:27] <ztane> yes
[15:27] <ztane> but none of them was trivial beyond the urllib
[15:27] <ztane> I diffed the sources
[15:27] <ztane> all of them
[15:28] <agronholm> it would be a good start to at least replace the use of os._name
[15:28] <agronholm> that task should be trivial
[15:28] <agronholm> and only if there are no other differences to cpython's stdlib for that module, then delete it from our Lib/
[15:29] <ztane> as I said, it is only urllib
[15:29] <agronholm> what is?
[15:29] <ztane> there were countless files for which there was *no* change.
[15:29] <agronholm> huh?
[15:30] <ztane> so lib/python-2.7 I take is the unmodified python lib dir against which changes are in Lib
[15:30] <agronholm> yes
[15:30] <agronholm> well
[15:30] <ztane> there were countless files with no changes
[15:31] <agronholm> lib-python/3.5
[15:31] <ztane> zero diff, blank screen
[15:31] <ztane> ah :D
[15:31] <ztane> but the lib files are still python2.7 there
[15:31] <agronholm> yes...that will disappear shortly
[15:31] <agronholm> it could probably be deleted already
[15:32] <agronholm> are you saying there are modules in Lib/ that are verbatim copies of their cpython counterparts?
[15:32] * koo6 (~koo5@236.152.broadband3.iol.cz) has joined #jython
[15:32] <ztane> yes, there are verbatim copies of lib/python2.7 files in Lib
[15:33] <ztane> or someone is working on a branch that I am not :D
[15:33] <ztane> https://github.com/jython/jython3
[15:34] <agronholm> at least that is not the way I left it
[15:34] <agronholm> I only added modules that I could properly patch
[15:35] <ztane> i am on master of that
[15:36] <agronholm> See changeset 37facdb
[15:36] <agronholm> I deleted the majority of Lib/ there
[15:36] <fwierzbicki> agronholm: please don't delete the 2.7 lib - I use it still to do regrtest
[15:37] <agronholm> where did they come back?
[15:37] <ztane> ah can be my bad :D
[15:37] <agronholm> fwierzbicki: ok
[15:37] <fwierzbicki> it came in accidentally when I merged jythontools/jython
[15:37] <fwierzbicki> but it's convenient for me for a while longer
[15:37] <agronholm> fwierzbicki: so now it's a mess of 3.5 patched AND unpatched modules?
[15:38] <fwierzbicki> I don't change Lib/
[15:38] <agronholm> well something caused all those modules to come back
[15:38] <fwierzbicki> It's just to test compiler changes
[15:38] <agronholm> at least there's stdlib-patches/ which contains the still failing patches
[15:38] <fwierzbicki> oh - then that was probably me???
[15:38] <fwierzbicki> the merge was a pain - it might have been that
[15:39] <fwierzbicki> If it's really bad we could revert back before the merge
[15:39] <fwierzbicki> I don't want to stomp on your work
[15:39] <agronholm> there have been tons of changes
[15:39] <fwierzbicki> since the merge I did?
[15:39] <agronholm> when was that?
[15:40] <fwierzbicki> I'll look it up
[15:40] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[15:41] <fwierzbicki> https://github.com/jython/jython3/commit/9d80d697c4d9857f19eb7b40efd0b0c259a99c3d
[15:41] <fwierzbicki> about 3 commits back
[15:41] <ztane> lol
[15:42] <agronholm> hrm
[15:42] <ztane> I was trying to put on the python 3 futures :P
[15:42] <fwierzbicki> but it did pull in lots of commits from default
[15:42] <fwierzbicki> mainly from Jeff
[15:42] <ztane> what I end up with was that the futures were disabled permanently :d
[15:43] <fwierzbicki> but I could turn those into a diff, rollback the merge, and re-apply
[15:43] <fwierzbicki> I wanted to be able to just do "git pull" on jythontools/jython to get fixes in from 2.7
[15:43] <agronholm> fwierzbicki: as long as the already fixed Lib/ modules are not harmed
[15:43] <agronholm> we can still track progress via stdlib-patches/
[15:43] <fwierzbicki> I don't think those where touched
[15:44] <fwierzbicki> there where one or two that where touched by 2.7 changes
[15:44] <fwierzbicki> but I merged by hand - it looked ok
[15:44] <agronholm> the workflow is simple: fix a patch until it applies cleanly, then push a changeset that applies the patch and deletes it
[15:45] <agronholm> the work is all done when stdlib-patches/ is empty
[15:45] <fwierzbicki> sounds good
[15:46] <agronholm> ztane: so yeah there are many modules in Lib/ that need the os._name -> os.name fix
[15:46] <agronholm> just grep for os._name
[15:47] <agronholm> the internals need a renovation, preferably sooner rather than later
[15:47] <agronholm> we won't get another change for a long while
[15:48] <agronholm> so, PySystemState dies, the information goes to PyInterpreter instead
[15:48] <agronholm> and only a single superclass for built-in modules
[15:48] <agronholm> built-in modules and types in their respective packages
[15:48] <agronholm> that's my vision of it so far
[15:54] <ztane> agronholm: they need but they're the 2.7 libs :d
[15:55] <ztane> so are 2.7 libs patchable to 3.5 via git/hg repo?
[15:55] <agronholm> what does that mean
[15:55] <ztane> that the Lib modules are as far as I can see Python 2.7 modules, right?
[15:56] <ztane> not 3.5 standard library modules
[15:56] <agronholm> I would delete all the unpatched Lib/ modules but I dunno what fwierzbicki thinks
[15:57] <fwierzbicki> agronholm: go for it
[15:57] <agronholm> ztane: go for it
[15:58] <ztane> okie :d
[15:58] <agronholm> at some point we should upgrade the cpython stdlib too
[15:58] <agronholm> but I'm not in a hurry to do so yet
[15:58] <fwierzbicki> It's just convenient for now keeping lib-python/2.7 just for me - when lib-python/3.5 is at least able to run a regression test I might delete it then
[15:59] <agronholm> sure
[15:59] <ztane> must have been my bad, there is no non-modified files
[16:00] <ztane> oh well, at least urllib is now trivial change, can remove it
[16:00] <ztane> *urllib.py
[16:01] <agronholm> hm, urllib.py doesn't event exist on 3.5
[16:02] <agronholm> since it's a package
[16:02] <ztane> yes
[16:02] <ztane> but there were no other changes besides the _name
[16:02] <ztane> so no need to keep it around
[16:02] <agronholm> it should've been deleted regardless
[16:05] <ztane> yes, but if it was patched otherwise non-trivially...
[16:05] <agronholm> if it doesn't exist on cpython's stdlib, it shouldn't exist here, no matter how it was patched before
[16:15] * ELFrederich (~ELFrederi@ has joined #jython
[16:15] <ELFrederich> hey guys... I built jython from source. I just ran "ant". But I don't see pip in dist/bin. I thought 2.7 was supposed to include pip
[16:16] <agronholm> ELFrederich: you have to run jython -m ensurepip
[16:16] <agronholm> the installer does that automatically
[16:20] <ELFrederich> agronholm, thanks
[16:20] <ELFrederich> next question... gc.enable doesn't do anything, but gc.disable throws a NotImplementedError. Is there a reason it needs to throw this rather than silently doing nothing?
[16:21] <agronholm> ELFrederich: so as not to give the user a false impression of actually doing something
[16:25] <ELFrederich> hmm... I got pip installed but I cannot install stuff from it. I'm behind a proxy. With CPython setting http_proxy and https_proxy is enough to get pip working. I can see that jython is actually hitting the proxy but for some reason it doesn't work
[16:28] <ELFrederich> is there a way to pass -D java options when launching Jython?
[16:40] <ztane> hmm division future seems to be handled differently from print_function...
[16:40] * Trundle (~andy@python/site-packages/trundle) Quit (Remote host closed the connection)
[16:44] <ztane> agronholm: you have the unmodified jython3.5 jar there?
[16:44] <agronholm> what jython3.5 jar?
[16:45] <ztane> the main executable
[16:45] <agronholm> I'm confused
[16:45] <ztane> haha
[16:46] <agronholm> what do you mean?
[16:46] <agronholm> unmodified from what?
[16:46] <ztane> I am looking at future support - it looks as if
[16:46] <ztane> someone has ripped off the print_function and unicode_literals support already
[16:46] <agronholm> and?
[16:47] <agronholm> what do you need from me?
[16:47] <ztane> if you could try what print(2,3) prints before and after "from __future__ import print_function"
[16:47] <ztane> as I modified some stuff already :D
[16:48] <agronholm> I've never tried to compile jython 3.x
[16:48] <ztane> ah :D
[16:49] <ztane> agronholm: looks like someone had ripped off support for "print_function" and "unicode_literals"
[16:50] <ztane> in that now a print is compiled as a statement...
[16:50] <agronholm> eh?
[16:50] <agronholm> shouldn't it be the reverse?
[16:50] <agronholm> that the statement is ripped out
[16:50] <ztane> yes
[16:51] <ztane> now I am looking at the diff and I cannot see if I possibly caused it...
[16:51] <ztane> too lazy to revert
[16:52] <ztane> I will revert...
[17:02] * gopar (~gopar@c-73-162-171-146.hsd1.ca.comcast.net) has joined #jython
[17:02] <ztane> yeah, positive now, someone totally blew up the print_function
[17:03] <agronholm> well, I haven't touched it :)
[17:03] <ztane> http://paste.ofcode.org/anaeVky9V3Q2bANGSTiaaP
[17:04] <ELFrederich> when you pass a python list to a Java method which takes an array... that Java method can change the order of the elements in the array but this is not reflected in the Python list
[17:05] <agronholm> ELFrederich: in such case you should construct an actual array and see if it matters
[17:05] <agronholm> array.array(...)
[17:12] <ztane> haha
[17:12] <ztane> ok...
[17:23] * eatkin (~eatkin@ Quit (Quit: ZNC - http://znc.in)
[17:25] * eatkin (~eatkin@ has joined #jython
[17:27] <ztane> https://github.com/jython/jython3/pull/1
[17:27] * eatkin (~eatkin@ Quit (Client Quit)
[17:28] * koo6 (~koo5@236.152.broadband3.iol.cz) Quit (Ping timeout: 276 seconds)
[17:29] * guydreich (choochter@nat/ibm/x-tenkbahbcmrkjttm) Quit (Read error: Connection reset by peer)
[17:30] * eatkin (~eatkin@ has joined #jython
[17:30] <agronholm> merged
[17:31] * eatkin (~eatkin@ Quit (Client Quit)
[17:33] <ztane> yet you cannot build it :?
[17:33] <ztane> works nicely for me, I just execute twice ant build then execute with dist/bin/jython -S
[17:35] * eatkin (~eatkin@ has joined #jython
[17:36] <agronholm> who said I cannot build it?
[17:37] <agronholm> I only said I haven't built it yet
[17:37] <agronholm> bbl
[17:38] <ztane> hehe
[17:41] * koo6 (~koo5@236.152.broadband3.iol.cz) has joined #jython
[17:45] <ztane> how are the builtin docs generated?
[17:51] <jimbaker> ztane, yes, that's a bit crazy, but it does work in terms of the ant build. hopefully i will have a yield from implementation in soon, probably next week
[17:52] <jimbaker> re java docs, it's in the ant build.xml somewhere. i haven't really used, although our internal api has been getting better documented recently
[17:53] <ztane> the `bytes` will probably give some
[17:53] <ztane> headache, considering that byte[] in java is mutable, and there is no way of knowing if a function tries to mutate it or not
[17:53] <jimbaker> ztane, ?
[17:54] <ztane> the Python 3 bytes obviously should be using byte[]
[17:55] <ztane> but if one were to call a java method with a byte[]??argument, you'd always have to make a copy :D
[17:55] <jimbaker> sure. if you don't, use bytearray
[17:55] <fwierzbicki> The builtin docs are generated using Misc/make_pydocs.py against a checkout of CPython - haven't tried it for 3 yet
[17:56] * maxpowa (maxpowa@irc.everythingisawesome.us) Quit (Quit: Ahh! My head is on fire!)
[17:56] * maxpowa (maxpowa@irc.everythingisawesome.us) has joined #jython
[17:56] <fwierzbicki> heh - some fairly ugly python code of mine. It would need to be ported to 3 first
[17:57] <ztane> what I mean is that obviously one would want to use `bytes` constants and values to write into binary files
[17:57] <ztane> etc, now if I were to call com.ztane.foo.WhatEver.workOn(b'123')
[17:58] <ztane> and it suddenly happened to mutate the bytes argument, it could do some really nasty stuff
[17:59] <fwierzbicki> that answer is assuming you wanted to know about the builtin docs in the sense of what comes out if you ask help(str)
[18:00] <fwierzbicki> a trivial 2-> port though since it's so small
[18:00] <fwierzbicki> *2->3 port
[18:00] <jimbaker> yeah. so it sounds like __tojava__(byte[].class) should do a copy. even though the underlying PyString will be changed so it uses byte[] as well
[18:02] <jimbaker> ztane, it's an unfortunate extra cost. not certain what we could do different. but thanks for raising this question, certainly hadn't thought about it until now
[18:25] <ztane> well, it would still be possibly faster than using the PyString of Jython 2
[19:02] <ELFrederich> Think one of you Jython experts could chime in on this thread: This pull request made it stop working on Jython because it calls gc.disable() https://github.com/tomerfiliba/rpyc/pull/166
[19:09] * gopar (~gopar@c-73-162-171-146.hsd1.ca.comcast.net) Quit (Quit: Leaving)
[19:59] * gopar (~gopar@c-73-162-171-146.hsd1.ca.comcast.net) has joined #jython
[20:14] <jimbaker> ELFrederich, that's unfortunate - there's no way to disable GC on jython/java, as pointed out on the chat you posted from #java
[20:15] <jimbaker> i don't know the code, but in general it should be feasible to reorder. also, does it actually deadlock on jython?
[20:17] <jimbaker> using callbacks with weakrefs is a good strategy to do this reordering fwiw. i like weakrefs; https://www.youtube.com/watch?v=NknSssmLk4w
[20:34] <agronholm> I thought it was possible to disable gc on java, but maybe not during runtime?
[21:04] * maxpowa (maxpowa@irc.everythingisawesome.us) Quit (Quit: Ahh! My head is on fire!)
[21:05] * maxpowa (~m@xpw.us) has joined #jython
[21:08] * maxpowa (~m@xpw.us) Quit (Client Quit)
[21:09] * maxpowa (~m@xpw.us) has joined #jython
[21:23] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[21:41] * gopar (~gopar@c-73-162-171-146.hsd1.ca.comcast.net) Quit (Quit: Leaving)
[21:57] * KeigaPR (d13f92f4@gateway/web/freenode/ip. has joined #jython
[21:58] <KeigaPR> I am giving jython a try out and running into some problems. I am using sys.path.append to add jars (or classpath works too). It looks like it picks up my jars (say com.mycompany.stuff), but it isn't picking up dependencies which are including in /lib within the jar (such as org.apache....)
[21:58] <KeigaPR> Anything I am doing that is wrong?
[22:25] * xemdetia (xemdetia@nat/ibm/x-uamlxvgovlraftnt) Quit (Ping timeout: 256 seconds)
[22:29] * maxpowa (~m@xpw.us) Quit (Quit: Ahh! My head is on fire!)
[22:30] * maxpowa (m@irc.everythingisawesome.us) has joined #jython
[22:30] * gopar (~gopar@c-73-162-171-146.hsd1.ca.comcast.net) has joined #jython
[22:32] * maxpowa (m@irc.everythingisawesome.us) Quit (Client Quit)
[22:33] * maxpowa (~m@xpw.us) has joined #jython
[22:43] * maxpowa (~m@xpw.us) Quit (Quit: Ahh! My head is on fire!)
[22:44] * maxpowa (m@irc.everythingisawesome.us) has joined #jython
[22:57] * maxpowa (m@irc.everythingisawesome.us) Quit (Quit: Ahh! My head is on fire!)
[22:58] * maxpowa (~m@irc.everythingisawesome.us) has joined #jython
[23:17] * maxpowa (~m@irc.everythingisawesome.us) Quit (Quit: Ahh! My head is on fire!)
[23:17] * maxpowa (maxpowa@ipv6.everythingisawesome.us) has joined #jython
[23:20] * KeigaPR (d13f92f4@gateway/web/freenode/ip. Quit (Ping timeout: 246 seconds)
[23:44] * koo6 (~koo5@236.152.broadband3.iol.cz) Quit (Ping timeout: 276 seconds)


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