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

* bonniot joins12:56
* arjanb joins15:01
<bonniot>hello arjan16:35
<arjanb>hi17:18
<bonniot>have you done some testing?17:20
<arjanb>not yet17:23
<bonniot>the new compiler found a small bug in NiceSwing (duplicate functions) :-)
<arjanb>running the testsuite takes more than 10 minutes now18:06
<bonniot>was there a sudden change? or is it just because the number of tests is growing?18:08
<arjanb>no sudden change18:15
the number of testcases are growing quite fast18:16
<bonniot>:-)18:24
arjanb: what did you find about Icon. what did you like?19:38
<arjanb>i like the concept of generators in icon21:02
generators are quite similar to lazylists i think
i wonder why not many languages support generators21:04
<bonniot>i wondered how easy it would be to do something similar in a library for Nice21:06
using a parameterized class, and overloaded operators21:07
<arjanb>how would the usage be?21:09
<bonniot>that has to be designed
what is a typical example?
<arjanb>i don't know a typical example icon is just build around generators and goal directed evaluation21:17
<bonniot>So something like:21:18
class Generator<T>
<T> Generator<T> `||`(Generator<T>, Generator<T>);21:19
<T> Generator<T> gen(T value); // a simple generator with only one value
<T> T value(Generator<T>);21:20
<arjanb>a simple icon program:21:21
procedure main()
while write ( read ( ) );
end
<bonniot>That's no problem:21:26
Generator<String> readLines(Reader);
void write(Generator<String>);21:27
wait, one ca do better21:28
can
String readLine(Reader);
while(readLine, write);21:29
where
<T> while(()->T, T->());21:30
a "generator" function would throw some specific exception when there is no more value
<arjanb>yes21:31
in icon is write an ordinairy procedure
<bonniot>here too
while(readLine, println);21:32
while(readLine, String s => println(s));
while(readLine, String s => System.out.println(s));21:33
normal functions :-)
<arjanb>but this won't work in more complex cases21:34
<bonniot>like?
<arjanb>while input := read() & somecondition(input) & write(input)21:37
<bonniot>while(readLine & somecondition, write);21:38
where
<T> ()->T `&` (()-T gen, T->boolean condition)21:39
{
T res = gen();
while (! condition(res))21:40
res = gen();
return res;
}
well, after a () =>
<T> ()->T `&` (()-T gen, T->boolean condition) = () =>
{ T res;21:41
do res=gen(); until condition(res);
return res;
}
?
<arjanb>maybe21:42
but `&` doesn't loop over the second argument in icon21:43
i have to compare some language paradigms for some course21:44
<bonniot>wdym with the loop?
where is the difference? icon will backtrack to find a value that passes the condition21:45
<arjanb>if input := read() & somecondition(input) & write(input)
then only one read() is tried21:46
i will look for a larger example to express in different languages and then i will try if it's possible to take a similar approach in nice21:48
<bonniot>only one read if the condition succeeds21:49
my code does that too
i don't deny that generators/logic programming is a different paradigm21:50
but I think you can implement a rather good version in a Nice (or other powerfull enough language) in the form of a library21:51
<arjanb>maybe i will try the library form for nice when i have a concrete and large example implemented in icon21:54
<bonniot>ok, that can be interesting
btw, how does icon differ from, say, prolog?21:55
<arjanb>i think icon is halfway between imperative and logic language21:57
<bonniot>there is an implementation of prolog embeddable in Java21:59
http://gnuprologjava.sourceforge.net/
it could also be interesting to see if one could make a Nice library around this
i'm not sure how it would compare with a "pure" implementation, in terms of features and efficiency22:01
<arjanb>i never have used prolog but i will try it soon
yes the list of interesting things that could be done is quite long for me22:02
<bonniot>:-)
better than being bored ;-)22:03
if that sounds like fun to you, you can make experiements on such libraries22:04
<arjanb>i found this an interesting java extension:
<bonniot>have you seen the post on LtU recently
<arjanb>http://javalab.cs.uni-bonn.de/research/darwin/project.html#The%20Lava%20Language
<bonniot>it was about implementing such paradigms in a host language
<arjanb>it combines class based inheritance with delegation22:05
yes read LtU regularly
but i have no idea how delegation combines with multimethods22:07
<bonniot>i'm not convinced yet delegation is such an important concept22:08
is-a and has-a seem more fundamental22:09
<arjanb>dynamic delegation is something between is-a and has-a 22:15
<bonniot>yes22:16
<arjanb>there might be use in replacing a parent class at runtime22:17
<bonniot>i'm not such how much sense this makes, and how much it can be statically checked...22:18
<arjanb>the language of the link is statically checked22:20
<bonniot>what is the "language of the link"?22:21
<arjanb>http://javalab.cs.uni-bonn.de/research/darwin/project.html#The%20Lava%20Language
<bonniot>ah ok22:22
and do they replace parent classes at runtime?
or just delegates?22:23
<arjanb>they replace the delegates but delegates behave similar to a superclass22:24
<bonniot>well, not for typing, I think
i think i see what you meant22:25
do you know two classes in the JDK that have the same name (in different packages)?23:09
<arjanb>Date ?
<bonniot>in what pkgs?23:10
<arjanb>java.util and java.sql
<bonniot>ok, thanks
<arjanb>is there a problem with classes with the same name?23:28
<bonniot>no, i just want to improve the error reporting, and so I wanted a testcase23:29
(for ambiguities)
i will be away for two weeks23:47
<arjanb>you're going to france finishing the last bits of your dissertation?23:48
<bonniot>no, not yet...23:49
<arjanb>ok i will take care of new bugreports and answer on the mailinglist23:53
<bonniot>:-)
i'm hesitating about releasing 0.9.2 tonight23:54
<arjanb>because i don't know how much time i have the comings weeks i haven't planned bigger changes
<bonniot>you can try to make work on some "paradigm" library fit into your studying time ;)23:56
<arjanb>0.9.2 why not? it was a month ago
<bonniot>that much
?
yeah23:57
and some pretty big changes, especially functions
<arjanb>btw can i create the development version or happens that automaticly?23:58
<bonniot>that's done automatically, each time the bootstrap and testsuite succeed23:59
once a day, by sauternes
<arjanb>i see00:01
<bonniot>just now I have made some small changes, to provide an API for loading source without compiling it00:04
it could be useful for nicedoc, or for some advanced features in an editor plugin00:05
you said somebody might be interested in working on nicedoc?00:06
<arjanb>two months ago and i heard nothing after that00:07
<bonniot>maybe that can provide the start00:08
with this scheme, the parser and the frontend to find packages is completely reused
the only work to do is to get the wanted information from the objects representing the source and output it00:09
the loading API is in the compiler, in nice.tools.compiler/interface.nice00:10
i will probably upload the example frontend on the wiki page for NiceDoc
who was the person interested?00:14
<arjanb>Luc Perrin00:15
<bonniot>of course, implementing nicedoc will still need some other changes to the core00:18
for instance, you need a slightly modified parser that keeps the /** */ comments for toplevel definitions
there could be a boolean option for that00:20
or maybe it would be more generic if the parser itself was an option
<arjanb>a plugable/replacable parser?00:21
<bonniot>at the compilation API level
the API of the parser is:00:22
void open(Reader r, List definitions)
that is, given a reader, put all the definitions inside the list
so there could be an interface with this method, and the Compilation object would contain a reference to a Parser00:23

Generated by Sualtam