#jython IRC Log

Index

IRC Log for 2016-06-30

Timestamps are in GMT/BST.

[2:28] * stewori (~stefan@5.146.129.241) Quit (Ping timeout: 240 seconds)
[6:15] * ohumbel (5390f784@gateway/web/freenode/ip.83.144.247.132) Quit (Quit: Page closed)
[7:18] * ohumbel (5390f784@gateway/web/freenode/ip.83.144.247.132) has joined #jython
[9:33] * dyce_ (~otr@ns3290920.ip-5-135-184.eu) Quit (*.net *.split)
[9:41] * dyce_ (~otr@ns3290920.ip-5-135-184.eu) has joined #jython
[13:30] * TomA (~TomA@c-68-32-46-223.hsd1.mi.comcast.net) has joined #jython
[14:26] * pizzaman (~pm@mary008-0301-dhcp-153.bu.edu) has joined #jython
[14:47] * xemdetia (xemdetia@nat/ibm/x-lsbujnfkwinsfwju) has joined #jython
[15:02] * lazybear (~lazybear@radium.atom.fi) Quit (Max SendQ exceeded)
[15:02] * stewori (~stefan@ip-95-223-156-6.hsi16.unitymediagroup.de) has joined #jython
[15:03] * lazybear (~lazybear@radium.atom.fi) has joined #jython
[15:05] * lazybear (~lazybear@radium.atom.fi) Quit (Max SendQ exceeded)
[15:08] * lazybear (~lazybear@radium.atom.fi) has joined #jython
[15:10] * lazybear (~lazybear@radium.atom.fi) Quit (Max SendQ exceeded)
[15:11] * xemdetia (xemdetia@nat/ibm/x-lsbujnfkwinsfwju) Quit (Remote host closed the connection)
[15:11] * xemdetia (xemdetia@nat/ibm/x-vdzdrmkfaylkgjzg) has joined #jython
[15:14] * lazybear (~lazybear@radium.atom.fi) has joined #jython
[15:22] * lazybear (~lazybear@radium.atom.fi) Quit (Max SendQ exceeded)
[15:23] * lazybear (~lazybear@radium.atom.fi) has joined #jython
[15:29] * lazybear (~lazybear@radium.atom.fi) Quit (Max SendQ exceeded)
[15:30] * lazybear (~lazybear@radium.atom.fi) has joined #jython
[15:37] * lazybear (~lazybear@radium.atom.fi) Quit (Ping timeout: 252 seconds)
[15:41] * lazybear (~lazybear@radium.atom.fi) has joined #jython
[15:44] * lazybear (~lazybear@radium.atom.fi) Quit (Max SendQ exceeded)
[15:45] * lazybear (~lazybear@radium.atom.fi) has joined #jython
[16:00] * siel (~siel@unaffiliated/motley) Quit (Ping timeout: 250 seconds)
[16:04] * siel (~siel@unaffiliated/motley) has joined #jython
[17:07] * pizzaman (~pm@mary008-0301-dhcp-153.bu.edu) Quit (Ping timeout: 240 seconds)
[18:05] * stewori (~stefan@ip-95-223-156-6.hsi16.unitymediagroup.de) Quit (Quit: Leaving.)
[18:20] * pizzaman (~pm@wireless1x-168-122-5-192.bu.edu) has joined #jython
[18:38] * pizzaman (~pm@wireless1x-168-122-5-192.bu.edu) Quit (Ping timeout: 264 seconds)
[18:42] * pizzaman (~pm@wireless1x-168-122-5-192.bu.edu) has joined #jython
[18:57] * pizzaman (~pm@wireless1x-168-122-5-192.bu.edu) Quit (Read error: Connection reset by peer)
[19:00] * pizzaman (~pm@wireless1x-168-122-5-192.bu.edu) has joined #jython
[19:02] * pizzaman (~pm@wireless1x-168-122-5-192.bu.edu) Quit (Read error: Connection reset by peer)
[19:10] * pizzaman (~pm@wireless1x-168-122-5-192.bu.edu) has joined #jython
[19:10] * pizzaman (~pm@wireless1x-168-122-5-192.bu.edu) Quit (Read error: Connection reset by peer)
[19:12] * pizzaman (~pm@wireless1x-168-122-5-192.bu.edu) has joined #jython
[19:23] * pizzaman (~pm@wireless1x-168-122-5-192.bu.edu) Quit (Read error: Connection reset by peer)
[19:47] * pizzaman (~pm@wireless1x-168-122-3-65.bu.edu) has joined #jython
[20:06] * stewori (~stefan@ip-95-223-156-6.hsi16.unitymediagroup.de) has joined #jython
[20:13] <stewori> B R E A K I N G N E W S:
[20:13] <stewori> With the latest commit I am able to run "import numpy" using Jython and JyNI without error on my system.
[20:14] <stewori> This is the very first time that this thing passes properly in Jython and getting there was a long and rocky road.
[20:15] <stewori> Not so very much else is currently working though. I can do:
[20:15] <stewori> a = numpy.array([[1, 2, 3]])
[20:15] <stewori> b = numpy.array([-12, -32, -13])
[20:15] <stewori> print a
[20:15] <stewori> print b
[20:15] <stewori> print numpy.dot(a, b)
[20:15] <stewori> print numpy.outer(a, b)
[20:15] <stewori> print a.T
[20:15] <stewori> output is like in CPython
[20:15] <stewori> However:
[20:15] <stewori> print (a*b) #TypeError: unsupported operand type(s) for *: 'numpy.ndarray' and 'numpy.ndarray'
[20:16] <stewori> #print (2.0*a) #AttributeError: 'FloatFormat' object has no attribute 'special_fmt'
[20:17] <stewori> So still much work to do. For the pioneers here: Let me know if you'd like to get into testing or for instructions to reproduce
[20:19] <stewori> It currently works only on linux; OSX not yet tested, but "historically" it usually required some involved bug-fixing to make major updates work on OSX properly too
[20:20] <stewori> Tested with numpy 1.12, current github version.
[20:20] <stewori> Still fails with 1.11 (latest release) and 1.8 (native numpy on my system from package manager)
[20:21] <stewori> (other versions not tested)
[20:22] <stewori> However I most likely won't invest work into supporting older numpy but instead will try to keep up with numpy 1.12+ commit by commit
[20:51] <stewori> To get an impression take a look at https://github.com/Stewori/JyNI/issues/2#issuecomment-229777752
[21:13] * pizzaman (~pm@wireless1x-168-122-3-65.bu.edu) Quit (Ping timeout: 260 seconds)
[21:19] * TomA (~TomA@c-68-32-46-223.hsd1.mi.comcast.net) Quit (Remote host closed the connection)
[21:24] * pizzaman (~pm@wireless1x-168-122-3-65.bu.edu) has joined #jython
[22:07] <pizzaman> how can I use a Java primitive type in jython? e.g., a byte or a short
[22:07] * teletubbie_ (~T.T@151.ip-158-69-207.net) has joined #jython
[22:08] <pizzaman> types that have a correspondence in python (e.g., int, long, or float) just work
[22:08] <pizzaman> but jython is unhappy with e.g., a short
[22:10] <pizzaman> here's an example of what I mean: http://pastebin.com/xjM9V3L6
[22:10] * stewori (~stefan@ip-95-223-156-6.hsi16.unitymediagroup.de) Quit (*.net *.split)
[22:10] * teletubbie (~T.T@unaffiliated/teletubbie) Quit (*.net *.split)
[22:10] * srcerer (~chatzilla@dns2.klsairexpress.com) Quit (*.net *.split)
[22:37] <deepy> pizzaman: have you seen http://www.jython.org/jythonbook/en/1.0/JythonAndJavaIntegration.html ?
[22:39] <pizzaman> deepy: I'm pretty sure that's where I started
[22:40] <deepy> See the table at the top?
[22:40] <pizzaman> btw. isinstance(<type 'char'> <type 'java.lang.Object'>) evaluates to true
[22:40] <pizzaman> yes
[22:41] <pizzaman> however, I have a hard time understanding that a String of length 1 should be the same as a char
[22:41] <deepy> Do you know how autoboxing in Java works?
[22:42] <pizzaman> I think I have somewhat of an understanding
[22:42] <pizzaman> however that's not my problem ;-)
[22:42] <pizzaman> I want to find all methods in a class where all parameters are primitive
[22:43] <pizzaman> however in the python side I cannot create primitive types for the comparison
[22:44] <pizzaman> and the fact that <type 'char'> == <type 'java.lang.Object'>, just blows my mind ;-)
[22:44] <deepy> Well if there's autoboxing then any ints will be turned to Integers and Integers are Objects
[22:45] <deepy> And I'm not quite sure how isinstance would work with primitives, I mean, you're literally asking if it's an instance of foo
[22:46] <pizzaman> hm good point, maybe isinstance is not the right way to compare the types
[22:46] <pizzaman> much better, just using ==
[22:47] <pizzaman> however, I still can't get something that corresponds to a 'char'
[22:48] <deepy> What does type() return?
[22:48] <pizzaman> type() of what?
[22:48] <deepy> If you give type a char
[22:49] <pizzaman> m(char)
[22:49] <pizzaman> <type 'char'> <type 'java.lang.Class'>
[22:49] <pizzaman> the 2nd line is basically the argument and type(argument)
[22:49] <pizzaman> as returned from method.getParameterTypes()
[22:50] <pizzaman> so it knows that it's a 'char' I just don't have anything to compare it against ;-)
[23:04] <deepy> I don't know how much this helpts, but when testing a 'char' returns true on isinstance str but a Java String does not
[23:06] <deepy> and a Character returns true when asked if it's an instance of java.lang.Object but a char does not
[23:08] <deepy> pizzaman: also where did you get that <type 'char'> == <type 'java.lang.Object'>?
[23:30] * stewori (~stefan@ip-95-223-156-6.hsi16.unitymediagroup.de) has joined #jython
[23:40] * pizzaman (~pm@wireless1x-168-122-3-65.bu.edu) Quit (Ping timeout: 258 seconds)
[23:48] * xemdetia (xemdetia@nat/ibm/x-vdzdrmkfaylkgjzg) Quit (Ping timeout: 264 seconds)

Index

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