#jogamp @ irc.freenode.net - 20141124 05:06:29 (UTC)
20141124 05:06:29 -jogamp- Previous @ http://jogamp.org/log/irc/jogamp_20141123050629.html
20141124 05:06:29 -jogamp- This channel is logged @ http://jogamp.org/log/irc/jogamp_20141124050629.html
20141124 05:31:01 * [Mike] (~Mike]@anon) has joined #jogamp
20141124 07:24:31 * phao (~phao@anon) Quit (Ping timeout: 258 seconds)
20141124 07:37:13 * eclesia (~husky@anon) has joined #jogamp
20141124 07:37:19 <eclesia> good morning
20141124 07:49:39 * monsieur_max (~maxime@anon) has joined #jogamp
20141124 07:54:59 <monsieur_max> Hi people
20141124 08:04:25 <[Mike]> morning!
20141124 08:05:10 * [Mike] (~Mike]@anon) Quit (Read error: Connection reset by peer)
20141124 08:13:47 * zzuegg (~zzuegg@anon) Quit (Read error: Connection reset by peer)
20141124 08:14:58 * zzuegg (~zzuegg@anon) has joined #jogamp
20141124 08:23:41 * zzuegg (~zzuegg@anon) Quit (Ping timeout: 244 seconds)
20141124 08:23:43 * zzuegg2 (~zzuegg@anon) has joined #jogamp
20141124 08:42:31 * zzuegg2 (~zzuegg@anon) Quit (Read error: Connection reset by peer)
20141124 08:43:43 * zzuegg (~zzuegg@anon) has joined #jogamp
20141124 08:49:18 * hija (~hija@anon) has joined #jogamp
20141124 08:50:43 * hija (~hija@anon) Quit (Client Quit)
20141124 08:57:25 * gouessej (5ee4b442@anon) has joined #jogamp
20141124 08:57:30 <gouessej> Hi
20141124 09:00:32 * gouessej (5ee4b442@anon) has left #jogamp
20141124 09:04:52 * zzuegg (~zzuegg@anon) Quit (Read error: Connection reset by peer)
20141124 09:07:32 * zzuegg (~zzuegg@anon) has joined #jogamp
20141124 10:09:59 * jvanek (jvanek@anon) has joined #jogamp
20141124 10:10:12 * hija (~hija@anon) has joined #jogamp
20141124 10:14:00 * zzuegg (~zzuegg@anon) Quit (Read error: Connection reset by peer)
20141124 10:54:02 * zzuegg (~zzuegg@anon) has joined #jogamp
20141124 11:38:46 * xranby (~xranby@anon) has left #jogamp
20141124 13:22:38 * phao (~phao@anon) has joined #jogamp
20141124 13:25:29 * phao (~phao@anon) has left #jogamp
20141124 14:53:09 <eclesia> I'm getting addicted to function reference in java 8 ^^
20141124 14:53:25 <rmk0> ?
20141124 14:53:44 <eclesia> stuff like : map.getCanvas()::repaint
20141124 14:54:06 <rmk0> not used that stuff yet
20141124 14:54:52 <rmk0> what's the type of x in x = map.getCanvas()::repaint ?
20141124 14:56:04 <zubzub> a function reference is just a single method interface that implements a single function
20141124 14:56:06 <eclesia> hard to say, not a method, not function. depends on the parameters
20141124 14:56:21 <monsieur_max> eclesia: oh, never heard of this one before ... but like rmk0, not used to lambda yet
20141124 14:56:27 <rmk0> zubzub: that's why i'm curious as to what you get if you assign the result to a variable...
20141124 14:56:33 <rmk0> there are any number of valid types it could have
20141124 14:56:48 <monsieur_max> even if IntelliJ modifies all my callback / listener method to lambda automagically
20141124 14:57:01 <rmk0> i'm stuck with java 6 for bit
20141124 14:57:08 <rmk0> will move to 7 sooner or later
20141124 14:57:27 <rmk0> it's probably safe to move now, really
20141124 14:59:00 <monsieur_max> 7 does not bring much ... diamond operator is the best feature ;)
20141124 14:59:28 <zubzub> rmk0: whatever the type of your lambda is
20141124 15:00:07 <zubzub> a function ref in java8 is just a lambda that calls a single function
20141124 15:00:13 <eclesia> it's like a reduced method signature where only parameters and return value type is important
20141124 15:01:59 <rmk0> not sure my question is clear... am aware how lambdas are represented in java - "functional interface"
20141124 15:02:10 <rmk0> but i'm curious as to what sort of type inference it does, if any
20141124 15:02:36 <rmk0> like, if i were to type x = () -> System.out.println("hello") in eclipse, without giving a type for x
20141124 15:02:46 <rmk0> there are any number of interfaces that could be appropriate
20141124 15:03:21 <rmk0> it could infer x to be of type Runnable, or it could infer Function<Void, Void>
20141124 15:03:21 <rmk0> etc
20141124 15:03:35 <rmk0> am not familiar with its behaviour as i've not been able to use it yet
20141124 15:05:17 <eclesia> well the first use I have is to kick out small listeners. mybutton.setOnAction(this::startWork);
20141124 15:06:22 <rmk0> eclesia: surprised you're using java 8 features!
20141124 15:06:45 <eclesia> work != personal project :)
20141124 15:06:50 <rmk0> oh
20141124 15:07:06 <eclesia> using java8, javafx, and all new stuffs at work
20141124 15:07:13 <rmk0> /o\
20141124 15:08:35 <zubzub> 16:02 < rmk0> like, if i were to type x = () -> System.out.println("hello") in eclipse, without giving a type for x
20141124 15:08:41 <zubzub> you have to provide a type
20141124 15:08:45 <zubzub> if not javac will complain
20141124 15:08:48 <eclesia> rmk0: know your enemy to fight it ^^
20141124 15:08:52 <zubzub> say you have a method
20141124 15:08:59 <zubzub> foo(A a) and foo(B b)
20141124 15:09:16 <zubzub> and you do foo(()-> Bar());
20141124 15:09:18 <zubzub> you must cast it
20141124 15:09:23 <zubzub> (the lambda)
20141124 15:09:28 <zubzub> so javac knows what method you want to call
20141124 15:10:21 <rmk0> right
20141124 15:13:19 <rmk0> mildly surprised they didn't try wildly inferring everywhere
20141124 15:13:42 <rmk0> is... not good in a language with subtyping
20141124 15:17:20 <rmk0> there's new type inference stuff planned for 9
20141124 15:17:51 <rmk0> ...
20141124 15:17:56 <rmk0> looks like they already put it in 8!
20141124 15:18:07 <rmk0> http://openjdk.java.net/jeps/101
20141124 15:23:37 <zubzub> yup
20141124 15:23:43 <zubzub> java 8 is quite nice actually
20141124 15:23:59 <zubzub> although javafx is quite shitty under the hood
20141124 15:24:08 <zubzub> but still it's *something*
20141124 15:24:40 <rmk0> am most interested in value types
20141124 15:24:49 <rmk0> .net already has them
20141124 15:25:08 <rmk0> dislike creating whole new objects just because i want to make two integers type incompatible
20141124 15:25:41 <rmk0> they're still a draft
20141124 15:27:07 <zubzub> afaik java 9 plans on removing primitives
20141124 15:27:33 <rmk0> where's this?
20141124 15:27:44 <rmk0> i saw a jep on unifying them
20141124 15:27:57 <rmk0> like... it'll aim to give you primitives for efficiency, but it'll box where necessary
20141124 15:28:07 <zubzub> http://www.javaworld.com/article/2071283/java-se/oracle-lays-out-long-range-java-intentions.html
20141124 15:28:22 <zubzub> "JDK (Java Development Kit) 10 and releases beyond it are intended to have a unified type system, in which everything would be made into objects, with no more primitives, according to an Oracle slide presentation entitled "To Java SE 8 and Beyond!" posted on the QCon conference website. "
20141124 15:28:51 <rmk0> that sounds like a misunderstanding
20141124 15:28:54 <rmk0> at least the way it's phrased
20141124 15:29:16 <zubzub> yeah probably
20141124 15:29:16 <rmk0> it's phrased like "you won't get machine integers anymore"
20141124 15:29:32 <rmk0> but i think it's more like "the machine integers will be able to be used in contexts that only objects could have been previously"
20141124 15:30:00 <rmk0> http://openjdk.java.net/jeps/218
20141124 15:30:01 <rmk0> like that
20141124 15:31:40 <zubzub> I dream of the day I can embed native code in java
20141124 15:31:49 <zubzub> like you can embed javascript in gwt java code
20141124 15:31:56 <rmk0> yeah, i'd like that, ideally without having to produce binaries for each platform
20141124 15:32:02 <zubzub> idd
20141124 15:32:09 <zubzub> just let the compiler extract the native code into a source file
20141124 15:32:15 <zubzub> and let the build system deal with it
20141124 15:32:26 <zubzub> theoretically it could be done
20141124 15:32:31 <zubzub> quite simple actually
20141124 15:32:49 <zubzub> in fact it's on my TODO list
20141124 15:32:56 <zubzub> java8 now has compiler plugin support
20141124 15:33:07 <zubzub> so *I think* it should be doable
20141124 15:34:39 <zubzub> just put a /*-{ #include ... }-*/ block above your class to define your .c includes
20141124 15:35:03 <zubzub> put a /*-{ ...}-*/ under your class to define your global vars
20141124 15:35:27 <monsieur_max> zubzub: nice dream :)
20141124 15:35:28 <zubzub> put a /*-{ ...}-*/ under a method with the native keyword to define the implemetnation
20141124 15:35:47 <zubzub> then the compiler extracts those blocks and put them in a .c file
20141124 15:35:54 <rmk0> not sure which problem this is trying to solve
20141124 15:35:57 <rmk0> keeping everything in sync?
20141124 15:38:08 <rmk0> have written hundreds of thousands of lines of Ada → C bindings, so i can appreciate the value of enforcing consistency
20141124 15:41:00 <zubzub> well I like it when I can see what the native implemeentation is
20141124 15:41:03 <zubzub> in the java source
20141124 15:41:16 <zubzub> instead of manally trying to find where in the c code it's implmeented
20141124 15:41:23 <rmk0> urhur
20141124 15:41:43 <rmk0> eclipse doesn't seem to be able to step into native code half the time, either
20141124 15:42:03 <zubzub> no fcrs not
20141124 15:42:09 <zubzub> you have to use gdb debugger for native code
20141124 15:42:20 <zubzub> with eclipse if you want
20141124 15:42:25 <zubzub> java debugger cant debug native code
20141124 15:42:26 <zubzub> afaik
20141124 15:42:26 <rmk0> seem to remember there being something else if you install all the native development tools
20141124 15:47:24 <zubzub> another advantage is that if you have the java source
20141124 15:47:26 <zubzub> you have the native source
20141124 15:48:05 <zubzub> sure you might not be able to use it for stepping while debugging
20141124 15:48:16 <zubzub> but it's handy to know what is happening on the native side
20141124 16:04:20 * eclesia (~husky@anon) has left #jogamp
20141124 16:50:42 * monsieur_max (~maxime@anon) Quit (Quit: Leaving.)
20141124 17:22:39 * doev (~doev@anon) has joined #jogamp
20141124 17:34:49 * monsieur_max (~maxime@anon) has joined #jogamp
20141124 18:24:30 * jvanek (jvanek@anon) Quit (Quit: Leaving)
20141124 19:00:04 * [Mike] (~Mike]@anon) has joined #jogamp
20141124 19:05:22 * monsieur_max (~maxime@anon) Quit (Quit: Leaving.)
20141124 19:06:20 * monsieur_max (~maxime@anon) has joined #jogamp
20141124 19:16:08 * hija (~hija@anon) Quit (Quit: hija)
20141124 19:42:10 * doev (~doev@anon) Quit (Quit: Verlassend)
20141124 20:22:54 * monsieur_max (~maxime@anon) Quit (Quit: Leaving.)
20141124 20:24:04 * monsieur_max (~maxime@anon) has joined #jogamp
20141124 20:40:10 * hija (~hija@anon) has joined #jogamp
20141124 21:01:59 * hija (~hija@anon) Quit (Quit: hija)
20141124 21:15:24 * hija (~hija@anon) has joined #jogamp
20141124 21:31:05 * rmk0 (~rmk0@anon) Quit (Ping timeout: 264 seconds)
20141124 21:31:37 * rmk0 (~rmk0@anon) has joined #jogamp
20141124 21:31:37 * rmk0 (~rmk0@anon) Quit (Changing host)
20141124 21:31:37 * rmk0 (~rmk0@anon) has joined #jogamp
20141124 21:54:48 * monsieur_max (~maxime@anon) Quit (Quit: Leaving.)
20141124 22:03:32 * hija (~hija@anon) Quit (Quit: hija)
20141124 22:14:37 * hija (~hija@anon) has joined #jogamp
20141125 03:17:07 * [Mike] (~Mike]@anon) Quit ()
20141125 05:06:30 -jogamp- Continue @ http://jogamp.org/log/irc/jogamp_20141125050630.html