#jython IRC Log (v0.9)

Index

IRC Log for 2012-10-29

Timestamps are in GMT/BST.

[0:28] * Rondom (~rondom@2a01:488:66:1000:b24d:4f2f:0:1) Quit (Disconnected by services)
[0:28] * Rondom (~rondom@2a01:488:66:1000:b24d:4f2f:0:1) has joined #jython
[0:29] * maxb (~maxb@jabberwock.vm.bytemark.co.uk) Quit (Remote host closed the connection)
[0:30] * maxb (~maxb@jabberwock.vm.bytemark.co.uk) has joined #jython
[0:49] <agronholm> okay, one more bug left in the decimals tests
[0:49] <agronholm> apparently pow() calculates the modulo incorrectly
[1:47] <agronholm> and now that I fixed *that*, another one pops up
[1:47] <agronholm> typical
[2:36] <gColossus> agronholm: hmm, what's the difference between hashlib.sha1() in jython and sha1sum on linux?
[2:36] <agronholm> nothing
[2:37] <gColossus> agronholm: hmm, i have 2 copies of "a.txt" under 2 different folders, identical
[2:37] <gColossus> hashlib.sha1().hexdigest() gives me 2 different hash values
[2:37] <gColossus> while sha1sum on linux gives me the same hash for both files
[2:38] <agronholm> does either of the first sums match with the sha1sum value?
[2:38] <gColossus> nope
[2:38] <agronholm> show me exactly how you're calculating the hashes then
[2:38] <gColossus> well
[2:39] <gColossus> hashlib.sha1("a.txt").hexdigest()
[2:39] <agronholm> so you're calculating a hash of the string "a.txt"
[2:39] <agronholm> and expect that to be the same as the contents of some file? :)
[2:39] <gColossus> hah!!!
[2:40] <gColossus> silly me
[2:40] <gColossus> :D
[2:40] <agronholm> :)
[2:41] * lheuer1 (~Adium@blfd-4d08ef26.pool.mediaWays.net) has joined #jython
[2:43] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 240 seconds)
[2:52] <gColossus> agronholm: hmm, but then, if you have a file, for example, 3GB, how do you calculate the checksum of that file?
[2:52] <gColossus> agronholm: given that you have only 1 GB of RAM
[2:52] <agronholm> read it piece by piece
[2:52] <agronholm> and use update() on the hash
[2:52] <gColossus> agronholm: ohh
[2:52] <gColossus> agronholm: any example?
[2:53] <agronholm> the stdlib docs should have
[2:54] <agronholm> basically you do hash = hashlib.sha1()
[2:54] <gColossus> agronholm: okay, so if you have a big file, do you read it block by block and then update the hash?
[2:54] <agronholm> then read data from the file
[2:54] <agronholm> hash.update(data)
[2:54] <agronholm> then finally hash.hexdigest()
[2:55] <agronholm> yes, that is what I said.
[2:57] <gColossus> agronholm: OverflowError: requested number of bytes is more than a Python string can hold
[2:57] <gColossus> agronholm: what's the maximum number of bytes that Python string can hold?
[2:57] <agronholm> I don't know
[2:57] <agronholm> how many did you try?
[2:59] <gColossus> agronholm: read(x) requires x to be an integer
[2:59] <agronholm> yes?
[2:59] <gColossus> I guess I can only do MAX_SIZE of int?
[2:59] <agronholm> don't even try that much at once
[3:00] <agronholm> the memory requirements of your app will blow up
[3:00] <gColossus> yep, it just did
[3:00] <agronholm> besides
[3:00] <gColossus> haha
[3:00] <agronholm> on cpython, maxint is something like 2**63-1
[3:00] <agronholm> nobody has that much ram :)
[3:00] <gColossus> agronholm: hmm, my JVM doesn't have that much heap space
[3:01] <agronholm> the blocks you read should be measured in kilobytes
[3:01] <gColossus> agronholm: i guess I will just skip the hash check
[3:01] <gColossus> because I know that it works
[3:01] <agronholm> giving up already?
[3:01] <gColossus> that the hash values match
[3:01] <gColossus> agronholm: no, it's just added func that is not required
[3:01] <agronholm> this is easy as pie.
[3:02] <agronholm> ok then
[3:02] <gColossus> agronholm: I know
[3:06] <gColossus> agronholm: gahh, okay, i will implement it
[3:06] <gColossus> it's just a while loop over while (len(fd.read(16777216)) != 0)
[3:06] <gColossus> and then update the hash
[3:07] <agronholm> errr
[3:07] <agronholm> that doesn't look right
[3:08] <gColossus> agronholm: err?
[3:08] <gColossus> well
[3:08] <agronholm> if you don't store the read value before doing len() on it, you lose it
[3:08] <gColossus> agronholm: and I realized
[3:09] <gColossus> so: content = fd.read(buff_size); while (len(content) != 0): hash.update(content); content = fd.read(buff_size)
[3:10] <agronholm> yup, looks right now
[3:24] <gColossus> agronholm: you are still fixing your library?
[3:24] <agronholm> my library?
[3:24] <agronholm> I'm fixing Jython
[3:24] <gColossus> agronholm: ... you write jython?
[3:24] <agronholm> I'm a Jython core developer
[3:25] <gColossus> awesome!
[3:25] <gColossus> i am impressed
[3:25] <agronholm> why? someone's got to be :)
[3:26] <gColossus> agronholm: well, yeah ... how old are you? (if you don't find that offensive)
[3:26] <agronholm> 32
[3:27] <agronholm> there are at least two other core devs on the channel right now
[3:27] <agronholm> and I'm the new recruit (from last February)
[3:27] <gColossus> agronholm: i see, how many core devs do you guys have?
[3:28] <agronholm> I don't know the exact count
[3:28] <agronholm> but less than 10
[3:39] <agronholm> yeah! decimal tests pass now.
[4:48] <pjenvey> need moar core devs
[5:11] <gColossus> agronholm: great job!
[5:40] * gColossus (~tahoang@unaffiliated/gcolossus) Quit (Ping timeout: 252 seconds)
[7:06] * lheuer1 is now known as lheuer
[7:11] * sera (~sera@gentoo/developer/sera) Quit (Read error: Connection reset by peer)
[7:12] * sera (~sera@gentoo/developer/sera) has joined #jython
[7:31] * jlwestsr (~jlwestsr@2602:306:2472:6d49:c1e9:f330:e71e:1200) Quit (Ping timeout: 246 seconds)
[8:10] * Arfrever (~Arfrever@apache/committer/Arfrever) Quit (Quit: Ex??re)
[9:38] * varialus (~varialus@199.192.96.200) Quit (Ping timeout: 246 seconds)
[9:39] * varialus (~varialus@199.192.96.200) has joined #jython
[10:23] * msavy (~msavy@redhat/jboss/msavy) has joined #jython
[12:12] * jlwestsr (~jlwestsr@2602:306:2472:6d49:e09f:28fb:f74a:d6d4) has joined #jython
[14:07] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[15:07] * catmtking (~catmtking@dhcp-138-23-59-162.dyn.ucr.edu) has joined #jython
[15:49] * jlwestsr (~jlwestsr@2602:306:2472:6d49:e09f:28fb:f74a:d6d4) Quit (Ping timeout: 246 seconds)
[15:56] <agronholm> pjenvey: who would best know why code = BytecodeLoader.makeCode(name + "$py", data, sourceName); adds that $py in the name? it's breaking unittest discovery, but if I remove it, three jython specific import tests fail
[16:03] * jlwestsr (~jlwestsr@2602:306:2472:9ee9:e09f:28fb:f74a:d6d4) has joined #jython
[16:07] <pjenvey> good question
[16:10] <agronholm> damn, I wish frank was here
[16:11] <pjenvey> does that refer to co_filename
[16:12] <pjenvey> how does it break unittest discovery
[16:12] <agronholm> http://bugs.jython.org/issue1887
[16:14] <pjenvey> i think name $py is for the java 'class' named embedded
[16:14] <pjenvey> so it's needed
[16:14] <pjenvey> the unittest discovery functionality is new
[16:14] <pjenvey> i wonder if it need some work around maybe
[16:14] <pjenvey> i'll bbiab
[16:20] * sera (~sera@gentoo/developer/sera) Quit (Read error: Connection reset by peer)
[16:38] * sera (~sera@gentoo/developer/sera) has joined #jython
[17:21] <pjenvey> agronholm - it's highly suspect anyway, especially with an error message like that
[17:21] <agronholm> pjenvey: I already pushed a proper workaround
[17:23] <pjenvey> agronholm - i think you checked in some tabs
[17:23] <pjenvey> no tabs please
[17:23] <agronholm> in java code?
[17:23] <pjenvey> yea
[17:24] <agronholm> damn
[17:24] <pjenvey> and python too, for that matter
[17:24] <agronholm> I don't think there should be any in python code
[17:24] <pjenvey> also always surround one line blocks with { }
[17:24] <pjenvey> that's just our coding standard
[17:24] <agronholm> well it's not being followed everywhere so I couldnt' tell
[17:24] <agronholm> are these coding standards documented somewhere?
[17:25] <pjenvey> yea, I hear ya. http://wiki.python.org/jython/CodingStandards and the java stdlib standards
[17:28] <agronholm> I did a search for \t and found tons of tabs in the java code
[17:28] <agronholm> but I adjusted my workspace settings so it will insert spaces instead of tabs for indent now
[17:29] <agronholm> pjenvey: where did I put tabs in the code?
[17:29] <agronholm> ah, PyFloat
[17:31] <agronholm> should I replace them in all java source files while I'm at it?
[17:35] <pjenvey> that would be nice, though you might want to do it on 2.5 and merge
[17:35] <pjenvey> which is a little mor eannoying
[17:35] <pjenvey> (to avoid future conflicts)
[18:10] <pjenvey> thanks agronholm
[18:11] * agronholm (~agronholm@2001:1bc8:102:6f29:b8c2:1118:cfe5:e40c) Quit (Ping timeout: 268 seconds)
[18:15] * agronholm (~agronholm@2001:1bc8:102:6f29:3c13:997a:ac5e:751d) has joined #jython
[18:15] * ChanServ sets mode +o agronholm
[18:25] * gColossus (~tahoang@unaffiliated/gcolossus) has joined #jython
[18:25] * gColossus (~tahoang@unaffiliated/gcolossus) has left #jython
[18:25] * gColossus (~tahoang@unaffiliated/gcolossus) has joined #jython
[18:27] <gColossus> agronholm: morning
[18:27] <gColossus> !
[18:27] <agronholm> morning
[18:29] <gColossus> brb
[18:29] <gColossus> agronholm: have you tried the key?
[18:29] <agronholm> not yet
[18:30] <agronholm> I don't even have the install disc
[18:33] * gColossus (~tahoang@unaffiliated/gcolossus) has left #jython
[18:40] * gColossus (~tahoang@unaffiliated/gcolossus) has joined #jython
[18:58] <gColossus> agronholm: what distro do you use for your workstation?
[18:59] <agronholm> kubuntu 12.10 currently
[19:16] <agronholm> and NOW the decimal tests started acting up?!?
[19:16] <agronholm> what the heck changed
[19:18] <agronholm> where is this test_extra? can't find it in test_decimal.py
[19:45] * jlwestsr (~jlwestsr@2602:306:2472:9ee9:e09f:28fb:f74a:d6d4) Quit (Remote host closed the connection)
[19:47] <gColossus> agronholm: can I be a dev for jython? :P
[19:48] <pjenvey> gColossus - submit a few patches first, then we can think about that
[19:48] <gColossus> pjenvey: will do :)
[19:49] <gColossus> agronholm: do you think buffer of this size is too small? given that I am reading off a socket stream: https://gist.github.com/3976095
[20:00] * jlwestsr (~jlwestsr@2602:306:2472:9ee9:edcf:cd8a:85f1:6fd3) has joined #jython
[20:29] <agronholm> gColossus: it should be larger than the MTU or it will cause extra work for the app
[20:29] <agronholm> (and kernel)
[20:29] <gColossus> agronholm: yeah, i figured
[20:29] <gColossus> agronholm: it would also result in way too many writes as well
[20:29] <gColossus> agronholm: now it's 16MB
[20:30] <agronholm> that's overblown
[20:30] <agronholm> a 2kb buffer should be enough
[20:30] <gColossus> agronholm: hmm, what would be the correct size? and you mean should not be larger right?
[20:35] <gColossus> agronholm: is there any negative impacts of a buffer that is too big?
[20:35] <agronholm> too much memory used and no benefits
[21:11] * gColossus (~tahoang@unaffiliated/gcolossus) Quit (Remote host closed the connection)
[22:17] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[23:06] * msavy (~msavy@redhat/jboss/msavy) Quit (Remote host closed the connection)

Index

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