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

Using timezone: Central European Time
* CIA-5 leaves00:33
* CIA-3 joins
* arjanb leaves00:48
* CIA-3 leaves00:55
* CIA-5 joins00:56
* CIA-5 leaves00:58
* CIA-3 joins00:59
* CIA-3 leaves
* CIA-5 joins01:00
* CIA-5 leaves01:55
* CIA-3 joins
* CIA-3 leaves
* CIA-5 joins
* CIA-5 leaves
* CIA-3 joins01:56
* CIA-3 leaves03:10
* CIA-5 joins
* CIA-5 leaves03:59
* CIA-3 joins
* CIA-3 leaves04:01
* CIA-5 joins
* CIA-5 leaves04:18
* CIA-3 joins
* CIA-3 leaves04:25
* CIA-5 joins
* CIA-5 leaves
* CIA-3 joins
* CIA-3 leaves04:29
* CIA-3 joins04:30
* arjanb joins11:17
* bonniot joins11:19
* CIA-3 leaves11:43
* CIA-5 joins
* CIA-5 leaves14:15
* CIA-5 joins14:16
* CIA-5 leaves14:32
* CIA-5 joins
* CIA-5 leaves15:05
* CIA-5 joins15:06
03bonniot * 10Nice/ (2 files in 2 dirs): 15:09
Only allow an existing class to implement a non-abstract interface if the class
is defined in Nice.
* CIA-5 leaves15:59
* CIA-2 joins
<arjanb>working on something?17:42
<bonniot>dissertation ;-)17:43
for Nice, I started the repository thing
what about you?
<arjanb>well i'm reluctant to code atm because my ideas are changing too fast17:45
<bonniot>ideas in what domain?17:46
<arjanb>how to do code generation and macro like things
the current idea is to make macros just functions (which might be inlined) that have ast elements as argument17:52
<bonniot>and are executed at compile time17:53
(so I don't see the point of inlining)
<arjanb>they don't have to be executed at compile time17:54
<bonniot>you would have asts during runtime?17:55
do you have an example?
<arjanb>macro is probably a wrong name17:56
void assert(Expression<boolean> cond, Expression<String> msg) {17:58
if (assertionsEnabled)
if (cond)
throw new AssertionFailed(msg);
<bonniot>that would only work in an interpreter, I think18:01
<arjanb>it wouldn't possible to inspect the ast elements you can only use them18:02
<bonniot>i see. but you would still need to generate code for the expressions, you cannot have the ast at runtime18:07
<arjanb>it's some sort of autoboxing18:08
a call to assert would become assert(new Expression(value: ()=> theCondition), new Expression(value: ()=> theMessage));18:09
<arjanb>and inside assert if(cond.getValue()) throw new AssertionFailed(msg.getValue());18:11
<bonniot>then actually you could write:
void assert(boolean cond, Expression<String> msg) ...18:12
<arjanb>no the condition would only be evaluated when they turned on18:13
<bonniot>ah ok
<arjanb>the codegenerator needs to find out that's better to inline the call to assert so that no boxing would be needed18:14
<bonniot>but still this is something purely syntactic, and it does not involve ast
<arjanb>it does not use the ast but has some abstraction for each kind of ast node18:16
<bonniot>what for?
* bonniot is away: back in 10mn18:18
<arjanb>i want to write most builtin functions just in Nice code and allow user extensions18:24
* bonniot is back (gone 00:14:47)18:32
that's a worthy goal18:33
but i don't see what you mean by the abstraction for each kind of node, and how you use it18:34
<arjanb>i mean Expression , Function, VarSymbol, TypeExpression and maybe some more18:36
<bonniot>and you would have that at runtime?18:39
<bonniot>I don't see how that could work18:40
for instance a local variable, how do you represent it?18:41
<arjanb>that would be some class implementing VarSymbol18:42
just like there is a class representing closures now18:44
most of the time the class for a local variable will be optimized away18:45
<bonniot>why not execute the macro at compile time?18:47
<arjanb>that does happen but only at code generation and invisible for the user18:49
<bonniot>but then it's less poweful18:52
for instance you cannot implement the interaction of || with typechecking
<arjanb>it's less powerfull and less complex i think18:55
for typechecking there could be hints in preconditions or attributes
* CIA-2 leaves18:59
* CIA-5 joins
* CIA-5 leaves
* CIA-2 joins19:00
<bonniot>it's quite complex: it needs both the wrapping, and then the inlining
<arjanb>less complex for the user i mean19:01
but then we could look at making the generic system easier in these cases19:03
<arjanb>the 'macros' itself can be typechecked instead of at each usage
*away for meal*
<bonniot>for instance you could accept:19:11
void assert(boolean cond, String msg) = inline {19:12
if (assertsEnabled)
if (cond)
and there could be pseudo-methods to indicate how to evaluate the arguments (once or each time)19:17
* CIA-2 leaves19:30
* CIA-6 joins
wdym with the generic system?19:44
<bonniot>like Macro at the moment19:58
something executed at compile time, that knows about the AST
<arjanb>i see20:09
the new bug has the same stacktrace as #96613820:21
<bonniot>so there's a chance they will be fixed together ;-)20:26
<arjanb>btw has the problem of number of type params limit already been solved?20:31
<bonniot>you mean in theory?20:46
<arjanb>yes i remember you said something about that a year ago20:57
<bonniot>i know somebody who thought about it, but i don't know if he published anything21:06
<arjanb>ah and your dissertation is in another direction?21:09
-direction +topic21:14