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

Using timezone: Central European Time
* bonniot leaves01:56
* arjanb leaves03:51
* bonniot joins09:51
* arjanb joins13:15
<fcb>yes, thankyou daniel - simple as always :)14:18
<bonniot>:-)14:27
how is it going?
<fcb>yeah, not too bad
I've got some more problems if you have time14:28
<bonniot>sure
<fcb>its the same class as in the email - I seem to struggle with extending classes14:29
class UnStringTokenizer extends StringTokenizer {
List<String> tokens;
countTokens() {
return super + tokens.size();
}
hasMoreElements() {
return hasMoreTokens();
}
hasMoreTokens() {
if(!tokens.isEmpty())
return true;
else
return super;
}
}
Method hasMoreTokens expects parameters (nice.lang.StringTokenizer)
<bonniot>oh yes14:31
<fcb>but I am passing a StringTokenizer because UnStringTokenizer extends StringTokenizer
<bonniot>it's that 'this' cannot be left implicit in method calls at the moment
you need 'this.hasMoreTokens'14:32
it works for fields but not method calls...
<fcb>aah, ok14:33
thanks
I've been finding that I try and work on nicedoc and then I get stuck with something like that and I've got no idea what's going on
<bonniot>don't hesitate to ask by email or here14:34
<arjanb>i think either leaving this away for method calls should be allowed or the error message needs to be improved14:35
<bonniot>i agree, it should be allowed
<fcb>ok, I will be more proactive with my emails - I wasn't trying to struggle on myself because I don't want to pester you
<bonniot>(changing the error message would be basically the same work as allowing it)14:36
<fcb>yeah, in that case I think allowing it would be good
<bonniot>don't worry, we're happy to help
<fcb>:)
<bonniot>i was contacted by a french college teacher, who is planning to use Nice with his students next year14:38
one of his questions was how it's possible to know which methods are available in the standard library
so I hope we can soone use nicedoc to generate nice pages for that purpose :-)14:39
<fcb>I have just had a fairly busy period with other things (helping my wife with some code for her Masters degree, interview for a new job) but I am trying to devote more time to nicedoc now. I think we aren't too far away from a working (but basic) version.14:43
<bonniot>cool!
is it the doc comments that you are tokenizing?14:44
<fcb>yes14:45
is that ok?14:46
<bonniot>yes! :-)
<fcb>more problems:14:47
nextToken() {
if(!tokens.isEmpty())
return tokens.remove(tokens.size()-1);
else
return super;
}
No possible call for remove.
Arguments: (nice.lang.List<java.lang.String>, nice.lang.int)
<bonniot>that should be the main part where you need this kind of "low level" operations. the rest of the information is already processed by the compiler, but of course comment are ignored14:48
remoteAt ?
<fcb>sorry?
do you mean removeAt ?14:49
<bonniot>remove takes an element to remove
yes, sorry
<fcb>right, I presumed it was the same as the java api
do we have removeLast() in Nice?14:50
<bonniot>here is the comment from the standard library:
For List<int> there is an ambiguity between
remove(int) and remove(T) (since T=int).
Therefore we rename remove(int) into removeAt(int).
it's a special case14:51
but it's just a renaming
<fcb>interesting
that's why we need nicedoc :)
<bonniot>yes :-)
for removeLast, it depends if it's in java.util.List14:52
really we use the same methods (apart from the special case of removeAt)
of course we can also add new methods if we want :-)
<fcb>ok, that's cool14:54
how does nice work with constructors when you extend a java class?15:28
class PushBackTokenizer extends StringTokenizer {15:29
I'm extending StringTokenizer, and need to provide this constructor
StringTokenizer(String str, String delim, boolean returnDelims)
so I want to call the super class's constructor15:30
<bonniot>have you read http://nice.sourceforge.net/manual.html#subclassJavaInNice ?
<fcb>I did once. I'll read it again.
<bonniot>only the second paragraph15:31
does that answer your question?
<fcb>not really - that seems to tell me that the constructors of the super class are already there if I want them, but that doesn't seem to happen when I try to compile it15:33
No method with name new nice.tools.doc.PushBackTokenizer has 3 arguments15:34
<bonniot>it's not exactly the constructors of the super class, it's automatic constructors for the current class, which take care of calling the parent constructors
what fields does PushBackTokenizer have?15:35
<fcb>only one: List<String> tokens;15:36
<bonniot>so one of the automatic constructors is:15:37
PushBackTokenizer(String str, String delim, boolean returnDelims, List<String> tokens)
if you don't want to provide a value for tokens, the field should have a default value15:38
<fcb>fair enough.15:41
* fcb leaves15:44
* fcb joins15:45
<arjanb>some bloggers have many ideas where to use java 1.5 annnotions for: http://joust.kano.net/weblog/archives/000089.html15:46
<fcb>looks like java 1.5 is stealing your ideas15:49
<bonniot>this is different, since the typing would ignore it
it's just runtime checking
<fcb>runtime checking? so it will throw an exception if the thing is null? I thought it did that in 1.x15:51
<bonniot>first, this is nothing official, just an individual's ideas15:52
yes, is says design-by-contract, so i guess it would generate code to throw an exception
in 1.x there is an exception when you use a null value15:53
with a contract, you get get the exception a bit earlier, so it's a progress
<fcb>ok
<bonniot>but getting the error at compilation is still much better :-)15:54
<fcb>absolutely!
<bonniot>also, as somebody comments there, it's better idea to have non-null the default, but it's probably to big of a change to ever enter Java15:55
<fcb>how do I work out where this is? at nice.tools.doc.Comment.<init>(comment.nice:2)15:58
<arjanb><init> is the bytecode name for a constructor
<fcb>yep, but it tells me its line two of my source file, which its not15:59
<bonniot>is it an automatic constructor?16:00
<fcb>yep
<bonniot>so there is no real line to point to16:01
what's the full stack trace?
<fcb>Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 016:02
at java.lang.String.charAt(String.java:444)
at nice.tools.doc.fun.parse(fun.nice:314)
at nice.tools.doc.dispatch.parse(dispatch.nice)
at nice.tools.doc.Comment.<init>(comment.nice:2)
at nice.tools.doc.fun.write(fun.nice:135)
at nice.tools.doc.HTMLWriter.write(htmlwriter.nice)
at nice.tools.doc.fun$document.lambda9(fun.nice:1)
at nice.tools.doc.fun$document.apply1(fun.nice)
at gnu.expr.ModuleMethod.apply1(ModuleMethod.java:89)
at nice.lang.fun.foreach(fun.nice:776)
at nice.lang.dispatch.foreach(dispatch.nice)
at nice.tools.doc.fun.document(fun.nice:361)
at nice.tools.doc.Documenter.document(document.nice)
at nice.tools.doc.fun.document(fun.nice:599)
at nice.tools.doc.Documenter.document(document.nice)
at nice.tools.doc.fun$generate.lambda11(fun.nice:1)
at nice.tools.doc.fun$generate.apply1(fun.nice)
at gnu.expr.ModuleMethod.apply1(ModuleMethod.java:89)
at nice.lang.fun.foreach(fun.nice:776)
at nice.lang.dispatch.foreach(dispatch.nice)
at nice.tools.doc.fun.generate(fun.nice:649)
at bossa.modules.Compilation.generate(Compilation.nice)
at nice.tools.doc.fun.main(fun.nice:64)
<arjanb>daniel: i want to commit the first part of the conversion, is that ok?16:05
<bonniot>yes
<fcb>its ok - I found it the old fashioned way (println)
<bonniot>it looks like the stack trace is not printed in the Nice way. how do you start the program?16:07
<arjanb>it might take some time because i need multiple commits
<bonniot>why not a single commit?
<fcb>with the command "nicedoc"16:08
<arjanb>that's hard to do because i need to name removed and new files explicitly16:09
<fcb>I might call it a day now - hopefully I see you tomorrow or later on this week16:11
<bonniot>it's night for you right?16:14
about the stack trace: i see, nicedoc is not calling the right class to make the stack traces use Nice information16:15
are you on unix or windows?
<fcb>unix16:16
<bonniot>should call nice.tools.doc.dispatch and not nice.tools.doc.fun
i'll change the script, and you could do it locally to help your development :-)16:17
<fcb>sorry, another ideomatic expression. "call it a day" means "I'm going to stop now"
ok, I'll change it
<bonniot>yes, i know
<fcb>oh, sorry :(16:18
<bonniot>i was just wondering if that was because it was getting late in your part of the globe :-)
<fcb>yep, 10:30pm
<bonniot>good night then
<fcb>ok, see you later16:19
<bonniot>commited :-)
<CIA-2>03bonniot * 10Nice/bin/nicec:
Call 'dispatch' classes instead of 'fun', so that stack traces are printed
correctly.
* fcb leaves16:20
<CIA-2>03arjanb * 10Nice/src/bossa/ (28 files in 2 dirs): Conversion of some expression and statement classes in bossa.syntax to nice code.16:32
<arjanb>hmm not sure if that worked16:33
i don't saw it removing files16:34
*sigh*16:39
<CIA-2>03arjanb * 10Nice/src/bossa/syntax/AssignExp.java: Conversion of some expression and statement classes in bossa.syntax to nice code.16:40
<bonniot>any pb?16:41
<arjanb>i need to remove every file explicitly in a commit
<bonniot>with 'cvs remove' you mean?16:42
<arjanb>i have done that but now i need to do the same with cvs commit16:43
<bonniot>yes, you need to commit removals (like additions)16:44
but if you commit a directory, it should do everything16:45
<arjanb>*.nice works for addition but not for removals
i will try a complete directory16:46
<CIA-2>03arjanb * 10Nice/src/bossa/syntax/ (16 files): Conversion of some expression and statement classes in bossa.syntax to nice code.16:47
<bonniot>i think it's because *.nice means all the nice files in the directory, but since the files have been removed from the directory, it does not include them
<arjanb>that does the job :-)
can you check whether the committed code works at yours16:51
<bonniot>ok16:52
do you think it needs changes in the bootstrap?16:53
<arjanb>no16:55
<bonniot>here compilation fails at the second stage with:17:00
java.lang.NoClassDefFoundError: gnu/expr/LoopExp$ContinueExp
at bossa.syntax.dispatch.createReturnStmt(dispatch.nice)
at bossa.parser.Parser.ReturnStatement(Parser.java:5314)
<arjanb>hmm your bootstrap process is slightly different17:03
any idea what's the cause?17:07
<bonniot>I've not yet investigated17:09
LoopExp must be referenced only by Nice code now17:40
so it needs to be explicitely compiled at the begining of bootstrap17:41
<arjanb>ok :-)17:44
<bonniot>seems to be going on now...
btw, you should discuss with Bryn about how to provide a way to build on windows17:46
he mentioned an ant script, i'm not sure if he's working on it at the moment
ok, it started the testsuite phase ;-)17:47
<arjanb>i never used ant so i don't know how much an ant script could do17:48
<bonniot>should be possible...17:49
ok, i have to go17:50
<CIA-2>03bonniot * 10Nice/Makefile: Explicitely build gnu.expr.LoopExp, to fix the build after the Nice migration.
<bonniot>see you later...
* bonniot leaves
* CIA-2 leaves20:01
* CIA-3 joins20:02
03arjanb * 10Nice/src/bossa/syntax/ (analyse.nice funexp.nice return.nice typecheck.nice): Split up of ReturnStmt in ReturnStmt and VoidReturnStmt.22:40
03arjanb * 10Nice/src/bossa/parser/Parser.jj: Added warnings for using the old pattern syntax.23:15

Generated by Sualtam