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

Using timezone: Central European Time
* fcb joins05:41
<CIA-4>03fbarber * 10Nice/src/nice/tools/doc/htmlwriter.nice: 06:12
Added more information to the method names in the package index.
Rather than just having the method name, it now displays
<a>foo</a>: (String, int)->String, for example.
* ChanServ leaves09:30
* fcb leaves09:33
* ChanServ joins09:39
* bonniot joins12:23
* arjanb joins12:24
<CIA-4>03arjanb * 10Nice/stdlib/nice/lang/ (array.nice collections.nice strings.nice): Minor update to stdlib (made some overrides explicit, more precise type for filter).12:35
default arguments are another problem of overrides12:38
<arjanb>for example the slice methods in stdlib12:42
<bonniot>what is the pb?12:43
<arjanb>the default values are different
<bonniot>the default values will be chosen at the call site12:46
i don't see the pb
<arjanb> List<int> list = [1,2,3,4];13:01
let res = list.slice(from: 2);
<bonniot>the 'int to = -1' for lists was just a workaround when default values could not refer to previous arguments13:18
it should be fixed now13:19
<arjanb>right but it shows how easy you can get bugs with this13:21
<bonniot>if the base implementation can have a certain value (e.g. -1), it means that it's part of the contract to handle that value13:22
so the specialization should properly handle that value too
<arjanb>i think overrides shouldn't 'override' the default value13:24
<CIA-4>03bonniot * 10Nice/stdlib/nice/lang/collections.nice: Use a default value refering to previous arguments.13:29
<bonniot>it can happen that the default value is different in a special case, so that can be useful13:39
<Bluelive>oeh thats nice13:48
<arjanb>and what about overrides taking the default values from the method it overrides
so you can write <T> T[] slice(T[] array, int from = 0, int to = array.length - 1) =
as <T> T[] slice(T[] array, int from, int to) =13:49
<bonniot>that seems ok13:51
<Bluelive>where do you resolve defaults then ?14:06
before calling, during or after ?14:07
* fcb joins14:29
<bonniot>hello Frank!
<fcb>hi Daniel
<bonniot>how are you doing?14:30
do you still have problems with 'make nicedoc'?
<fcb>yeah, very well thanks. you?
<bonniot>great too :-)
<fcb>hang on - I'm just checking my email to see what you had to say14:32
<fcb>before we move on to the make file, can I ask a different question?14:36
<fcb>No possible call for +.14:37
Arguments: (bossa.syntax.LocatedString, nice.lang.int)
<bonniot>a LocatedString is not a String...
<bonniot>you should probably do:
ls.toString() + x
sorry, i have to go for ~10 minutes, i'm sure arjan can help in the mean time...14:38
<fcb>would the following work?
"" + s + x
<arjanb>+ for strings works if one of the arguments is a String14:41
<fcb>but is "" a String or a LocatedString?14:43
<arjanb>"" is a String
any thoughts on this:
<arjanb>LocatedString is only used inside the compiler so we can give the location of error messages
<fcb>htmlwriter.nice:34:48: warning - cannot convert literal (of type gnu.mapping.Values) to java.lang.String
oh, ok14:45
<arjanb>you can ignore that warning
<fcb>cool - I like warnings like that :)14:46
<arjanb>it's a warning of the bytecode generation library so it's something the compiler does wrong14:49
you wanted to see the output from my "make nicedoc"?14:52
<fcb>Building nicedoc...14:55
JAVA="java" /home/frank/Nice/bin/nicec --exclude-runtime -d "/home/frank/Nice/classes" --sourcepath="/home/frank/Nice/stdlib:/home/frank/Nice/src" nice.tools.doc
nice.lang: parsing
nice.getopt: parsing
nice.doc: parsing
mlsub.compilation: parsing
bossa.modules: parsing
nice.tools.compiler: parsing
nice.tools.compiler.console: parsing
nice.tools.doc: parsing
~/Nice/stdlib/nice/lang/array.nice: line 86, column 9:
This method overrides <T> nice.lang.List<T> slice(nice.lang.List<T> list, int from = 0, int to =
[nice.lang.int `-`(int, int)
|nice.lang.long `-`(long, long)
|nice.lang.float `-`(float, float)
|nice.lang.double `-`(double, double)
|nice.lang.int `-`(int)
|nice.lang.long `-`(long)14:56
|nice.lang.float `-`(float)
|nice.lang.double `-`(double)
|java.math.BigInteger `-`(BigInteger, BigInteger)
|java.math.BigInteger `-`(BigInteger)](list.
[nice.lang.int size(java.io.ByteArrayOutputStream)
|<K, V> nice.lang.int size(nice.lang.Map<K, V>)
|<T> nice.lang.int size(nice.lang.Collection<T>)](), 1))
You should make this explicit by using the 'override' keyword
nice.lang: typechecking
nice.lang: generating code
nice.getopt: typechecking
nice.getopt: generating code
nice.doc: typechecking
nice.doc: generating code
mlsub.compilation: typechecking
mlsub.compilation: generating code
bossa.modules: typechecking
bossa.modules: generating code
nice.tools.compiler: typechecking
nice.tools.compiler: generating code
nice.tools.compiler.console: typechecking
nice.tools.compiler.console: generating code
nice.tools.doc: typechecking
~/Nice/src/nice/tools/doc/document.nice: line 46, column 9:
Comparing a non-null value with null
~/Nice/src/nice/tools/doc/main.nice: line 17, column 11:
Unused local variable classpath
nice.tools.doc: generating code14:57
nice.tools.doc: linking
htmlwriter.nice:34:48: warning - cannot convert literal (of type gnu.mapping.Values) to java.lang.String
that's it
<bonniot>how do you start nicedoc?14:58
<fcb>I run (via a symbolic link) the file Nice/bin/nicedoc14:59
<bonniot>make archive
<fcb>I need to 'make nicedoc' then 'make archive'?15:00
make nicedoc archive
<fcb>I will give it a try15:02
now I can compile in a matter of second :D
<fcb>I have (yet another) question if that's ok
<bonniot>the thing is that nicedoc compiles into the 'classes' dir, and 'archive' puts everything in the jar15:07
<fcb>I would like to access a static variable: namely java.io.File.separator15:08
Nice doesn't seem to like this
<bonniot>should work
what's the error?
<fcb>Ambiguity for symbol File. Possibilities are :15:09
java.io.File File(?String, String)
java.io.File File(?File, String)
<bonniot>strange, this works for me:15:10
what is your code presicely?
<bonniot>(it prints /)15:11
<arjanb>that looks like an constructor you call there
<fcb>this is what i'm trying to do:15:12
try again15:13
File dir = new File(outdir, packageName.replace('.', '/'));
doesn't work:
File dir = new File(outdir, packageName.replace('.', File.separator));
<bonniot>File.separator is a String15:14
File.separatorChar is a char
the error msg is strange though15:15
given the column of the error, what does it refer to?15:16
<fcb>but this works:
File dir = new File(outdir, packageName.replace('.', "/"));
and it says column 58, which is where File.separator starts15:17
<bonniot>ok, i can reproduce that
java.io.File.separator works around this pb, at least15:18
(i.e. full qualification)
<fcb>hmm, strange
I'll just go with full qualification for now then15:19
<bonniot>yes. that should be fixed still
<bonniot>i won't be looking at it right now, i'm eating... ;-)15:28
arjan, tell me if you do, so we don't duplicate efforts...15:29
<CIA-4>03bonniot * 10Nice/testsuite/compiler/native/fields.testsuite: Access to static field without context information for the expected type.15:30
<bonniot>in nice.lang java-io.nice there is:16:17
File File(?File, String) = native new File(File, String);
File File(?String, String) = native new File(String, String);
so the compiler sees16:18
as an operation on these methods
that could be handled differently, but for the moment I will simply rename those retypings16:30
<CIA-4>03bonniot * 10Nice/ (2 files in 2 dirs): Renamed retyped constructors for File to avoid clash with static field access.16:35
03bonniot * 10Nice/ (9 files in 6 dirs): 16:58
Compile dispatch methods as member methods whenever possible, to make
integration with Java tools and code easier.
<bonniot>frank, did you know that instead of:17:08
writer.write("<li><a href='" + m.getName() + ".html'>" + m.getName() + "</a>"
you can write:
writer.write("<li><a href='" m.getName() ".html'>" m.getName() "</a>"
simpler to read i think (especially with syntax highlighting)17:09
<fcb>oh, excellent - I will use that in future17:11
cheerio everyone - time for sleep17:12
* fcb leaves
<CIA-4>03bonniot * 10Nice/NEWS: 17:33
Compile dispatch methods as member methods whenever possible, to make
integration with Java tools and code easier.
<arjanb>hmm bootstrapping isn't working for me anymore18:07
F:\Nice>javac -classpath classes -sourcepath nice\src;nice\classes; -d classes -O -g src\bossa\synta18:08
src\bossa\syntax\TypeMaper.java:46: cannot resolve symbol
symbol : method get (java.lang.String)
location: class nice.tools.ast.SymbolTable
TypeSymbol res = (TypeSymbol) inner.get(name);
* bonniot leaves18:24
* bonniot joins19:28
<arjanb>you noticed the bootstrap problems?19:46
* arjanb_ joins19:53
* arjanb leaves20:11
daniel do you know what is the problem?20:48
* CIA-4 leaves22:01
* CIA-4 joins
* daniel_ joins22:04
<arjanb>daniel can you upload a bootstrappable dev version?22:11
* daniel__ joins22:14
sorry, i forgot to upload the new bootstrap compiler22:15
doing now...
<arjanb>connection probs?
<daniel__>yes, sort of...
ok, it's there22:16
* bonniot leaves22:19
D:\Nice>nicec --version22:21
Nice compiler version 0.9.7 (build 2004.03.20, 15:14:50 UTC)
<daniel__>as usual
yes, that must be it
<arjanb>doesn't seem to work22:23
<daniel__>what error do you get?22:37
<arjanb>the same as before
src\bossa\syntax\TypeMaper.java:46: cannot resolve symbol22:38
symbol : method get (java.lang.String)
location: class nice.tools.ast.SymbolTable
TypeSymbol res = (TypeSymbol) inner.get(name);
<daniel__>i see, it should be:
Nice compiler version 0.9.7 (build 2004.03.19, 10:04:04 UTC)
probably you got one version from the cache
<arjanb>i need an older one?22:39
<daniel__>time is not linear ;-)
it was built earlier, but from a different branch
<arjanb>i see22:40
<daniel__>i'm not sure how you force a refresh when downloading from a browser (maybe shift+reload?)22:41
i can do it with wget --cache=off, and then the cache should be updated on sf22:42
it should be ok now22:44
<arjanb>hmmm maybe it's some cache at my side22:46
<daniel__>i just downloaded, and got the right one22:47
otherwise, you can simply revert that line to the old dispatch style, compile, and put that version as bootstrap compiler
<arjanb>i'll try that22:48
the download goes too fast here for getting the right version
<daniel__>can't you do a refresh?
or use wget --cache=off22:49
<arjanb>i have it now22:53
if a browser recognises it as binary file it popups the download screen and then you can't refresh22:57
* arjanb leaves23:25
* arjanb joins23:27
<daniel__>good night23:55
<arjanb>good night
* daniel__ leaves
* arjanb leaves00:29
* daniel_ leaves00:48

Generated by Sualtam