#jython IRC Log (v0.9)

Index

IRC Log for 2012-05-04

Timestamps are in GMT/BST.

[0:15] * makeawish (~makeawish@50-56-93-103.static.cloud-ips.com) Quit ()
[0:16] * makeawish (~makeawish@50-56-93-103.static.cloud-ips.com) has joined #jython
[0:40] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[1:51] * plankton (~peretto@187.54.50.176) has joined #jython
[1:52] <plankton> :)
[2:08] * fwierzbicki_ (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[2:08] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) Quit (Read error: Connection reset by peer)
[2:08] * fwierzbicki_ is now known as fwierzbicki
[2:12] * lheuer1 (~Adium@blfd-4db0f1ee.pool.mediaWays.net) has joined #jython
[2:14] * lheuer (~Adium@blfd-4db13569.pool.mediaWays.net) Quit (Ping timeout: 246 seconds)
[3:32] * plankton (~peretto@187.54.50.176) Quit ()
[3:58] * juneau001 (~juneau@50-103-20-165.dklb.il.frontiernet.net) Quit (Quit: juneau001)
[4:06] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) Quit (Read error: Connection reset by peer)
[4:06] * fwierzbicki_ (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[5:14] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[5:14] * fwierzbicki_ (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) Quit (Read error: Connection reset by peer)
[5:38] * fwierzbicki_ (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[5:38] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) Quit (Read error: Connection reset by peer)
[5:38] * fwierzbicki_ is now known as fwierzbicki
[6:11] * lheuer1 is now known as lheuer
[6:42] * Oti (~ohumbel@adsl-89-217-224-92.adslplus.ch) Quit (Quit: Oti)
[6:48] * fwierzbicki_ (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[6:48] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) Quit (Read error: Connection reset by peer)
[6:48] * fwierzbicki_ is now known as fwierzbicki
[7:41] * njoyce (~njoyce@109.203.113.22) Quit (Quit: Coyote finally caught me)
[8:35] * Oti (5390f2dc@gateway/web/freenode/ip.83.144.242.220) has joined #jython
[10:52] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 256 seconds)
[11:07] * juneau001 (~juneau@131.225.24.123) has joined #jython
[11:20] * juneau001 (~juneau@131.225.24.123) Quit (Read error: Connection reset by peer)
[11:24] * juneau001 (~juneau@131.225.24.123) has joined #jython
[12:18] * fwierzbicki_ (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[12:18] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) Quit (Read error: Connection reset by peer)
[12:18] * fwierzbicki_ is now known as fwierzbicki
[12:22] * ctismer_afk is now known as ctismer
[12:25] * wainersm (~wainersm@201-92-32-57.dsl.telesp.net.br) has joined #jython
[12:45] * fwierzbicki_ (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[12:45] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) Quit (Read error: Connection reset by peer)
[12:45] * fwierzbicki_ is now known as fwierzbicki
[13:29] * Cuga (1896ab3d@gateway/web/freenode/ip.24.150.171.61) has joined #jython
[13:32] <Cuga> Wondering if somebody could guide me a bit, I'm using a vendor API upon which I can write a small java program that basically just flips a bit to turn on some logging by passing it an object that is basically an extension of a Treemap. In Jython though, creating that exact same object and passing it in, the server at the other end doesn't recognize the keys coming out of the object. Are Treemaps implemented in some special way when cr
[14:18] * fwierzbicki_ (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[14:18] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) Quit (Read error: Connection reset by peer)
[14:18] * fwierzbicki_ is now known as fwierzbicki
[14:56] * seletz_ (~seletz@business-178-015-118-087.static.arcor-ip.net) Quit (Quit: seletz_)
[15:47] * Oti (5390f2dc@gateway/web/freenode/ip.83.144.242.220) Quit (Quit: Page closed)
[16:03] * ctismer is now known as ctismer_afk
[16:41] <saper> Cuga: how are you creating this TreeMap-derived instance?
[16:42] <Cuga> somename = ServerInfoMap()
[16:43] <Cuga> ServerInfoMap extends TreeMap
[16:43] <saper> I guess so, yes...
[16:43] <Cuga> then I put my key/values in as normally with put method
[16:44] <Cuga> The java and jython are almost identical from a code standpoint but one is accepted and the other isn't which is weird as when I inspect the objects they look identical to me
[16:44] <saper> can you get the key,value from jython back and check their types?
[16:49] <Cuga> Suer i'll check, one sec
[16:49] <Cuga> *sure
[16:52] <Cuga> on jython the key types come back as int
[16:52] <Cuga> the value i'm less concerned about as it's the key the app is complaining about
[16:53] <saper> I tried <treemap>.put(java.lang.String("a"), java.lang.String("b"))
[16:56] <Cuga> This is the jython snippet: http://pastebin.com/Hj0FSYJ5
[16:57] <Cuga> This is the java equivalent that works: http://pastebin.com/t9pzJE0r
[17:01] <Cuga> I think the issue is in java the keys for treemap are int even when I explicitly try and pass it in as java.lang.Integer cause in java when I check the type of the same key it's java.lang.Integer
[17:01] <Cuga> sorry in Jython the keys are int vs. java whos keys are java.lang.Integer
[17:03] <saper> is Value something special?
[17:03] <saper> well, TreeMap can be parametrized (TreeMap<K,V>)
[17:05] <Cuga> Value does have a meaning but not important in this test
[17:05] <saper> >>> t.put(java.lang.Integer(1), "asa")
[17:05] <saper> >>> print type(t.firstKey())
[17:05] <saper> <type 'int'>
[17:06] * ctismer_afk is now known as ctismer
[17:08] <Cuga> yeah, that is what I'm seeing, any reason why it's not keeping java.lang.Integer as the type?
[17:08] <saper> not sure, but maybe it all gets wrapped as PyObject?
[17:10] <saper> return tojava(getMap().put(Py.java2py(key), Py.java2py(value)));
[17:15] <saper> add(new NumberToPyInteger(Integer.class));
[17:16] <Cuga> where are you seeing that?
[17:16] <saper> jython source code
[17:16] <saper> the last one was from ./src/org/python/core/adapter/ClassicPyObjectAdapter.java
[17:17] <saper> and the previous from PyDictionary put() method
[17:17] <saper> so your keys are PyIntegers to Java, most probably
[17:18] <Cuga> Yeah, so that probably is my issue then. without mucking to much up, is there a way around this? My keys can't be PyIntegers it seems (atleast that is the only thing I can think of at this point)
[17:19] <saper> PyInteger as a __tojava__ method which should make it Integer for Java, but maybe that's not that easy in collections.
[17:19] <saper> I am not a Jython expert at all just poking around and I think I've had a similar problem
[17:24] <Cuga> This helps though, I appreciate the information. I'll keep digging based upon this information and see if I can come up with anything.
[17:34] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[17:35] * r0bby (~wakawaka@guifications/user/r0bby) has joined #jython
[17:36] * r0bby_ (~wakawaka@guifications/user/r0bby) has joined #jython
[17:38] * r0bby_ (~wakawaka@guifications/user/r0bby) Quit (Read error: Connection reset by peer)
[17:39] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 276 seconds)
[17:40] * r0bby (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 276 seconds)
[19:09] * fwierzbicki_ (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[19:09] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) Quit (Read error: Connection reset by peer)
[19:09] * fwierzbicki_ is now known as fwierzbicki
[19:11] * juneau001 (~juneau@131.225.24.123) Quit (Quit: juneau001)
[19:35] * fwierzbicki_ (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[19:35] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) Quit (Read error: Connection reset by peer)
[19:35] * fwierzbicki_ is now known as fwierzbicki
[19:58] * fwierzbicki_ (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) has joined #jython
[19:58] * fwierzbicki (~frank@99-106-170-105.lightspeed.sntcca.sbcglobal.net) Quit (Read error: Connection reset by peer)
[19:58] * fwierzbicki_ is now known as fwierzbicki
[21:21] * Arfrever (~Arfrever@apache/committer/Arfrever) Quit (Ping timeout: 272 seconds)
[22:24] * Cuga (1896ab3d@gateway/web/freenode/ip.24.150.171.61) Quit (Ping timeout: 245 seconds)
[22:44] <sabi> .j
[22:44] <sabi> oops.

Index

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