Log of the #nice channel on irc.freenode.net

Using timezone: Central European Time
* CIA-2 leaves09:17
* CIA-2 joins09:18
* CIA-2 leaves10:40
* CIA-2 joins
* CIA-2 leaves11:04
* CIA-2 joins11:05
* CIA-2 leaves11:22
* CIA-4 joins
* bonniot joins13:33
<CIA-4>03bonniot * 10Nice/src/bossa/syntax/tools.nice: Removed duplicate retyping.14:03
* bonniot leaves16:24
* bonniot joins16:25
* arjanb joins17:18
* CIA-4 leaves17:26
how are you doing?17:35
<arjanb>good though struggling with writing17:39
<bonniot>about what?17:42
<arjanb>the compilation of a lazy functional language to java i'm working on17:43
<bonniot>it works well?17:44
<arjanb>yes but i haven't done real performance tests yet17:45
* CIA-2 joins21:22
* CIA-2 leaves
* CIA-2 joins21:23
* CIA-2 leaves
* CIA-11 joins21:24
* CIA-11 leaves
* CIA-2 joins21:25
* CIA-2 leaves21:33
* CIA-2 joins
* CIA-2 leaves
* CIA-7 joins
* CIA-7 leaves21:35
* CIA-2 joins
* CIA-2 leaves21:40
* CIA-7 joins
* CIA-7 leaves21:41
* CIA-2 joins
* CIA-2 leaves
* CIA-2 joins
* CIA-2 leaves21:42
* CIA-1 joins
* CIA-1 leaves
* CIA-1 joins21:43
* CIA-1 leaves
* CIA-2 joins
* CIA-2 leaves
* CIA-2 joins21:44
* CIA-2 leaves21:52
* CIA-1 joins
* CIA-1 leaves21:54
* CIA-2 joins
* CIA-2 leaves21:57
* CIA-1 joins
* CIA-1 leaves21:58
* CIA-2 joins
* bonniot leaves22:07
* CIA-2 leaves22:13
* CIA-1 joins
* CIA-1 leaves22:30
* CIA-2 joins
* CIA-2 leaves22:31
* CIA-1 joins
* CIA-1 leaves22:32
* CIA-2 joins
* CIA-2 leaves
* CIA-1 joins22:33
* bonniot joins22:41
* CIA-1 leaves22:55
* CIA-2 joins
* jcowan joins23:06
Is there an explanation anywhere about how Nice is compiled to the JVM model of doing things?
<arjanb>afaik there's no documentation on that23:10
do you have any specific question?23:11
<jcowan>Basically how the non-class methods are compiled.23:13
And whether the parametric polymorphism and the non-null types are done with type erasure.
<arjanb>type erasure is used as it's the only way on the jvm23:15
for each package two static classes are generated: fun and dispatch23:16
So what do abstract interfaces erase to?23:17
<arjanb>the fun class contains the method bodies and the dispatch class the code that select the matching alternative
abstract interfaces become normal interfaces but i don't know the details23:18
<jcowan>The fact that an abstract interface can be applied to an existing Java class is especially striking.23:19
I smell reflection here.
<arjanb>afaik no reflection is used23:20
bonniot: are you there?23:23
<jcowan>I guess not.23:38
<bonniot>i'M here now ;-)23:56
abstract interfaces are completely absent at runtime23:57
so there is no need for reflexion (which is slow), but there are of course casts
<jcowan>If they are absent, what do they erase to?00:21
btw, why do you ask?00:28
<jcowan>Because you can't use invokevirtual AFAIK on a method if the class is not stated to implement the interface.
It won't pass JVM validation.
And on Objects you can only invoke Object methods, not methods that the object happens dynamically to implement.00:29
<arjanb>but you can pass that Object to a static dispatch method00:32
So if you say that String implements CharAtable, then calling aCharAtAble.charAt sends you to a method that does its own dispatch to String.charAt.
By casting the pseudo-this to String first.00:34
I'm thinking about my own language and how to make it implementable on the JVM.00:37
Are the multimethods done with double dispatching, or with if instanceof ... else if instanceof ...00:39
<arjanb>atm with if instanceof ... but it should be optimized sometime00:40
<jcowan>Double (triple, etc.) dispatching is the approach used by the Smalltalk multimethods people; it has real advantages.
In particular, the faster ordinary Java method dispatch works, the better off you are.00:41
<arjanb>it can be faster in some cases
the just in time compiler makes it hard to predict fastest way00:42
<jcowan>Also you can exploit ordinary Java method overloading if you notice that the arguments are type disjoint.00:43
<arjanb>yes that happens now for methods defined in java00:44
<jcowan>Ah, good.
Well, thanks for the insight.
Gotta run.
* jcowan leaves

Generated by Sualtam