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

<bonniot>i fixed the links00:28
have you seen the slowness of the mailing lists reported anywhere?
i wonder if it is a known problem
<arjanb>i don't have seen any report00:40
strange the web archive of the commit list is almost up to date but i still get messages of today00:41
maybe has the downtime of my connection something to do with00:43
<bonniot>i also get message quite late00:59
<arjanb>about the documentation of the stdlib how do think of something like: http://www.cs.uu.nl/~afie/haskell/tourofprelude.html#abs01:04
i have been experimenting with using exceptions for breaking in things like foreach01:18
and the runtime overhead of throwing an exception can be reduced by a factor 10
the trick is to place the new exception once in some final static variable01:21
some code using that idea:01:22
<bonniot>how much is the overhead in both cases?
<arjanb>class EndOfList extends Exception {}
let EndOfList endoflist = new EndOfList();
<T> ()->T takewhile(()->T gen, T->boolean cond) = ()=>
{
let x = gen();
if (cond(x)) return x;
throw endoflist;
};
<T> T foldl(()->T gen, (T,T)->T fun, T init) {
T res = init;
try {
while (true) res = fun(res,gen());
} catch(EndOfList eol) {}
return res;
}
int fac(int n) = (int i=>()=>i++)(1).takewhile(int i=>i<=n).foldl((int i,int j)=>i*j,1);
using new exceptions is about 65 time slower than using a return value01:26
that is when used in a simple recursive function of 10 depth01:27
<bonniot>is there any drawback to reusing the exception? the stacktrace won't be valid01:30
but for for it would not matter, since it is the library function that catches, and it does not need the trace01:31
<arjanb>that's true and the reason of the speed difference
<bonniot>did you write any testcase for the float literals?01:34
<arjanb>no
i can't use regtest01:35
<bonniot>why don't you install cygwin?01:37
<arjanb>because my windows system is running stable now and i want to take time for learning another os in once01:40
<bonniot>it's not another os01:41
cygwin is a set of programs for windows
it provides tools that are common in unix system, but it is not unix!01:42
<arjanb>yes but i have to learn the shell and the tools
<bonniot>you don't have to01:44
you can just use them to run regtest, which would be rather simpler
simple
that is:01:45
cd Nice
make test
that's all01:46
<arjanb>it tried once cygwin but never got the jvm running
i planned for year to put up a little server running something else but i still haven't done that01:47
the mailing is fast again01:50
goodnight02:13
* arjanb leaves
* bonniot leaves02:50
* arjanb joins11:34
* bonniot joins13:17
hello arjan
<arjanb>hi
it seems integer literal need some change too
if integer literals are of type int by default then makes var x = 0; more sense13:22
but i don't want to write byte y = 0; as byte y = byte(0);
<bonniot>one can simply write int x = 0 instead of var x = 013:26
<arjanb>i have no problem with doing that different as in java13:32
<bonniot>wdym?13:37
<arjanb>refering to last mail of isaac to nice-info13:38
<bonniot>which part?13:40
<arjanb>that java considers all integer literal as type int13:42
<bonniot>yes, i don't see why java does it that way13:44
could you reproduce 790976 ?
<arjanb>i haven't tried yet a moment13:45
i get a different error13:52
D:\Nice\.\my\testbug\test.nice: line 6, column 1:13:54
Method new testbug.BB expects parameters (?testbug.B)
<bonniot>can you write it as a testcase?13:55
<arjanb>no i haven't found a way to reproduce it without a jar file13:57
<bonniot>does the jar includes package.nicei?13:59
<arjanb>yes but why doesn't get the field override in package.nicei
<bonniot>i think that is not implemented14:01
only I think it should be the same when compiling the packages separately
<arjanb>it could be the cause
<bonniot>your error looks like it does not want to name of the field14:02
can you check that?
<arjanb>yes without name it compiles14:03
<bonniot>that is as if the class is treated as a Java one
what is the content of the package.nicei inside the jar?14:04
<arjanb>abstract class A {14:05
}
class B extends testbug.A {
}
abstract class AA {
final testbug.A val;
}
class BB extends testbug.AA {
}
<bonniot>when I do14:07
nicec -r -a a.jar a
nicec --classpath=a.jar:. b
i don't get the bug
how do you reproduce it?
<arjanb>i have removed the compiled files in the first package14:10
<bonniot>when i renamed a to a.old it still get no error14:11
removing does not do it either14:13
can you list exactly what you do?
<arjanb>i think i did something strange14:17
can't reproduce it any more from a clean start14:19
<bonniot>!14:21
can't you go up the history of your shell to find out what you did?14:37
<arjanb>yes but i don't have the files that might have been hanging around 14:39
<bonniot>but at first it must have been a clean tree, with only the source files that you wrote14:56
so you could start again from a new directory
<arjanb>have bought 2 book and it costed 100 eur for about 500 page in total :-((15:31
<bonniot>what books?15:34
<arjanb>computer science book need for some courses15:37
i think the bookproducer have to much an monopoly15:38
i didn't start with a clean because reuse some for testing bug15:41
clean tree
<bonniot>and you think some classes had the same name?15:45
<arjanb>probably15:46
<bonniot>that could explain Method new testbug.BB expects parameters (?testbug.B)15:49
i emphasized in the bug report page that people should specify the ouput of nicec --version. it would simplify reproducing in a few cases like this one16:26
(the demand was already there, i just added bold to emphasize it)16:28
<arjanb>do you think 791630 is a bug?
i thought about doing coverage test when there is one implementation even if there are no concrete class but that's not always what you want16:32
<bonniot>it's not exactly a bug, as this is the behaviour I expect, given that a class is loaded dynamically, and no implementation is provided for it16:33
it might be possible to modify the semantics of coverage to prevent this from happening, but as you say it is not straightforward to define precisely how16:35
why "one implementation" ?
<arjanb>at least one i mean16:36
<bonniot>but the problem can also happen when there is no implementation16:52
<arjanb>yes but then it's probably meant as abstract method16:55
i believe the multijava project is trying to solve the dynamic class loading problem by using a modified classloader16:57
<bonniot>and what do they do if an implementation is missing?17:04
<arjanb>trhow a exception at classloading17:05
they are trading in static checking for dynamic checking and a bit more flexibility17:06
<bonniot>failing at classloading is not much better than failing when calling the method17:09
in both cases it is a runtime error
<arjanb>yes but they at classloading gives an error immidiately and they issue warnings at compile time for possible runtime errors17:12
<bonniot>When do they give a warning exactly?18:23
I would think it needs to be done for every method that is not implemented for an abstract class18:24
doesn't that kill the nature of an abstract class, if you need to implement all methods for them?18:25
<arjanb>i don't know18:34
i only have taken a quick look at many java extension to see if there was something interresting 18:36
they make a difference between internal and external methods18:47
* bonniot leaves20:48
* bonniot joins23:35
arjan, could you write changelog entries for your recent changes?23:44
floating point literals (and others?)23:45
<arjanb>yes
done23:59
as for the documentation of the stdlib what do you of this style: http://www.cs.uu.nl/~afie/haskell/tourofprelude.html#abs00:00
<bonniot>it's interesting00:02
maybe a bit verbose to have the definition inside the doc...
I think that it should be easy to have several backends to produce different kinds of outputs00:03
a first step would be to implement an API to parse some package, and return the AST (instead of compiling)00:04
maybe a boolean could decide if you want the doc comments or not
in the AST00:05
<arjanb>because nobody has started on nicedoc yet so i was thinking about a temporaly solution to have the stdlib documented
is that thing you use for the manual an option?00:11
<bonniot>i'm going to bed. tell me about that temporary solution by email00:20
what thing?
<arjanb>docbook
<bonniot>it's a format for texts00:21
<arjanb>the temporary solution is that i write the documentation in some usefull format by hand
<bonniot>i think it would be more efficient to write a tool00:22
it's not that difficult
i have to go. good night!00:23
<arjanb>goodnight
* bonniot leaves
* arjanb leaves

Generated by Sualtam