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

Using timezone: Central European Time
* CIA-6 leaves00:32
* CIA-6 joins00:33
* CIA-6 leaves00:36
* CIA-6 joins00:37
* CIA-6 leaves00:39
* CIA-6 joins
* CIA-6 leaves01:52
* CIA-6 joins01:53
* CIA-6 leaves02:00
* CIA-6 joins02:01
* arjanb leaves02:21
* CIA-6 leaves02:42
* CIA-6 joins02:43
* CIA-6 leaves02:48
* CIA-6 joins02:49
* CIA-6 leaves03:00
* CIA-2 joins03:01
* cm_ joins09:44
* d-bug joins13:03
* arjanb joins13:21
hello d-bug13:22
<d-bug>hello arjanb 13:32
<arjanb>any questions about Nice?13:33
<d-bug>no, not yet13:34
I've read about Nice and it looks just what I would use instead of Java
<arjanb>:-)13:36
it would be interesting to hear how Nice looks from a scheme/lisp point of view
<d-bug>I see that Nice has a more relaxed view of the class concept, just like CLOS13:37
Java's view of it feels so dogmatic
<arjanb>yes Nice has multimethods like CLOS13:39
<d-bug>other interesting things from CLOS are after/before/around method and method combinations13:40
<arjanb>what are methods combinations?
<d-bug>however, I've used too much C++/Java etc to think in terms of those
i'm not sure it fits in in Nice13:45
I don't know of any really good example of method combination except for a simple one from a book13:46
let's say we have a generic function "price"
and the classes pants, jacket, shoes etc
you could the define a method combination "+" for suit or another part that sums the price of subparts13:47
http://www.gigamonkeys.com/book/object-reorientation-generic-functions.html13:48
Section "Other method combinations"
<arjanb>thanks
that feature looks a bit too exotic for Nice13:58
<d-bug>how about lisp'ish macros?13:59
<cm_>arjanb: I have a problem with tuples. foreach on collections doesn't work when the type is a tuple.14:01
List<(double, double)> list2= new LinkedList();
list2.foreach((double x,double y) => println(x+","+y));
<T> nice.lang.void foreach(nice.lang.Collection<T> collection, (T)->void action) is a candidate...14:02
<arjanb>list2.foreach(((double x,double y)) => println(x+","+y));
you need extra parentheses to distinguish between an anonymous function with multiple arguments14:03
<cm_>Any particular reason why can't define an anonymous function with multiple arguments without parentheses?14:05
<arjanb>d-bug: macros in a staticly typed language are tricky but template haskell and meta o'caml look promising14:06
cm_: never thought of that but i think it's inconsistent with the rest of the syntax14:08
hmm these double parentheses could be avoid when (X,Y)->U would be a subtype of T->U14:13
<cm_>A bit confusing then....14:52
<arjanb>indeed functions in Nice have type in the form of (X, Y, ...) -> Z while functional languages have X->Y->Z14:57
for overloading and named/optional arguments is the first form more convenient14:58
<cm_>What about enforcing exception handling in Nice. Have that been discussed? 15:20
<arjanb>you mean checked exceptions? that's a controversial topic15:31
it looks a good idea at first but it hurts expressivity more in the end15:32
C# took many features from Java but they dropped checked exceptions15:35
http://www.mindview.net/Etc/Discussions/CheckedExceptions15:38
<cm_>Yes, checked exceptions. Checked exception make some things "impossible" to express, eg. Iterator.next() can't be defined to throw IOException
<arjanb>another reason is typing of checked exception in combination with hof's is problematic15:43
<d-bug>i read about common lisp's condition system yesterday, it's so much more than just error handling15:44
<cm_>Are functions declared in Nice marked as "throws XYZ"?15:47
<arjanb>no15:49
<cm_>Doesn't that break the Java semantics?15:54
<arjanb>checked exceptions aren't enforced in bytecode15:55
<cm_>Would it be possible to "mark" the methods?15:56
Hmm, the exception to throw isn't explict though...
<arjanb>we could allow throw marks on Nice methods for use in Java code but that has a low priority i think15:58
<cm_>arjanb: Do you know why this is ambiguis?16:45
List<double> l= new LinkedList();
l.foreach(println);
As this works: l.foreach(double x => println(x))16:46
<arjanb>because the arguments are resolved before the functions16:47
<cm_>Limitations in the type resolving?16:49
<arjanb>this is annoying when using overloaded functions as arguments, it will be improved before 1.0
resolving types works from innermost to outer atm16:50
<cm_>Isn't type resolving a graph type of problem?
<arjanb>how do you mean?16:52
<cm_>A functional program could be reprecented as a graph. (data driven evaluation). I thought hence that the type resolving was performed by traversing this graph.17:11
Anyway, what about defining foreach, map, filter, etc for streams?17:17
eg. Reader filter(Reader reader, char -> char func)17:18
<arjanb>in a functional program has each subgraph only a single type but in Nice it can have multiple type because of the overloading of function symbols17:36
every standard java library could use some Nice additions using hof's and other features17:38
what about putting your library ideas on a wiki page?
<cm_>I could put together a list. I'm writing functions as a need them for my testprogram.17:42
What does !T means? Arguments (T) do not fit:18:14
<T> java.lang.String toString(!T)
Something with reference and primitive types?18:18
<arjanb>! is notnull for type variables
improving error messages for nullness errors is on the todolist18:22
<cm_>Ok, are java primitive types reference types in Nice?18:23
<arjanb>they are autoboxed if you use them as an Object18:24
<cm_>And methods in object are defined for them as well. eg. toString(), clone, etc?18:25
<arjanb>yes
<cm_>What about getClass()?18:26
<arjanb>i'm not sure
*away for meal
*back18:45
getClass() return the boxed class like Integer, Byte18:46
<cm_>ok, got to go. 18:47
* cm_ leaves
* d-bug leaves20:39
* cm joins20:48
<CIA-2>03arjanb * 10Nice/ (2 files in 2 dirs): Take in account nullness test in asserts.21:56
03arjanb * 10Nice/src/bossa/syntax/dispatch.java.bootstrap: Removed superfluous signatures from dispatch.java22:48
* CIA-2 leaves23:58
* CIA-6 joins23:59
* cm leaves00:21
* cm joins00:24
* cm leaves00:26
* cm joins00:27
* cm leaves00:30
* cm joins00:31
<arjanb>heh comparing nice with haskell?01:26
* arjanb leaves01:59

Generated by Sualtam