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

Using timezone: Central European Time
<bonniot>from the jvm spec: The length of field and method names, field and method descriptors, and other constant string values is limited to 65535 characters by the 16-bit unsigned length item of the CONSTANT_Utf8_info structure00:26
i think this applies to bytecode attributes
<arjanb>it's nowhere mentioned
<bonniot>that sounds like a severe limitation in the case of SourceDebugExtension00:27
"other constant string values"
<arjanb>attributes have 4 bytes for their length00:29
what does jsr 45 say? what is the format for a SDE attribute?
does it contain the string itself, or the index of the string?
<arjanb>jsr 45 doesn't mention a limit00:31
<bonniot>does it contain the string itself, or the index of the string?
<arjanb>string itself00:33
<arjanb>putting things in constantpool makes no sense if sharing doesn't happen00:35
so it still looks like a JVM bug
<arjanb>it's surely a jvm bug00:37
using -Xdebug on nicec.jar in windows make the jvm crash00:39
<bonniot>did you see Bryn created stdlib/nice/io ?00:50
only the dir
<bonniot>i think he created it by accident :-)00:53
but that means he's working on it...
* PW joins01:21
<PW>Must say, I like Nice design. How does muti-argument dispatch affect execution speed?01:23
NickServ IDENTIFY01:24
<arjanb>well that depends on how much they are used, in general Nice is less than 20% slower than Java01:26
<PW>Good enough
Does the jar file built by Eclispe need all those extra classes - could they not be put into a separate runtime jar?01:28
<arjanb>which extra classes? (i'm not an Eclipse user)01:30
<PW>About 46 classes e.g. Procedure1-N classes - looks like the extracts from Nice.jar sufficient to run the HelloWorld example.01:33
<arjanb>these for representing anonymous functions01:35
and other things01:36
<PW>Ah! I have a main method, so the package contains the extra classes to get it going. I bet if I had a package without a main it would be much smaller.
<arjanb>i think these classes are included in all jar's that nicec creates01:38
<PW>This could be an issue for web page download. (Assuming a browser allowed direct linking from events to Nice code).01:44
<bonniot>if you are concerned with the jar size, you can use a shrinker01:46
i experienced high reduction rates last time I tried
one example: http://proguard.sourceforge.net/01:47
<PW>I've been developing an IDE for Mozilla using XUL and Javascript. I have reached an impass due to speed and the mixed object models of c++, XPCOM, and Javascript. (As part of editor development, I wrote a lexer for Javascript which takes a rediculous 12 seconds to process a 20k file.) I have been contemplating converting the Mozilla Gecko engine into Java(or Nice) to get rid of this...02:00
...mismatch. XUL pages could then link to compiled Nice jars for event processing - big speed up 100x at least. Huge amount of work - very scary! Other avenues like Jazilla are not going anywhere.
* zzorn_sleep leaves02:03
<bonniot>did you consider compiling the nice parts with gcj?02:04
that should make it easier to integrate with a C/C++ library like Gecko02:05
(or just use JNI)
<PW>All good approaches but having c/c++ mixed in, is the source of all the problems. I think it is time for a pure Java/Nice approach. Enough reference counting already! Anyway thanks for the input - goto go.02:08
<bonniot>good luck!02:09
keep us informed, and let us know if you have other questions
* PW leaves02:28
<CIA-1>03bonniot * 10Nice/ (3 files in 3 dirs): 02:39
Correctly compare possibly null values with primitive values by unwrapping
the possibly null value and performing a native comparison. Wrapping the
primitive value and performing reference comparison could return false even
with identical values. (fixes #1090679)
<bonniot>good night03:12
* bonniot leaves03:27
* arjanb leaves03:45
* zzorn joins07:46
* bonniot joins10:24
* ArtemGr joins10:32
<bonniot>about the error with -Xdebug: can you simply find out the value of symbolOopDesc::max_length() ?11:04
I wouldn't be surprised if it was 65535
<ArtemGr>In http://sourceforge.net/tracker/index.php?func=detail&aid=1118782&group_id=12788&atid=112788 I've provided the whole "name" string and mentioned that it's length is 81 596.11:06
IMHO, this is line source information _of the compiler_, and to fix it we need just cut source debug information from the bossa.syntax.fun class.11:07
<bonniot>yes. i wanted to understand why this causes a crash at the moment. attributes can have a 32bit long length per the JVM spec11:10
if it's indeed a JVM bug, somebody should report the bug to Sun11:11
<ArtemGr>That I forgot to mention in the bug report, although it was in http://confer09.condor-edv.com/nice@freenode/2005-02-07.html11:14
max_symbol_length = (1 << 16) -1
Both the method max_length() and the "(1 << 16) -1" enum are defined in "hotspot/src/share/vm/oops/symbolOop.hpp".11:16
So you're right, it seems to be 65535.11:17
I doubt they will fix it in 1.4.2 though. It would be good to check against 1.5, and if still there, report against 1.5.11:20
* arjanb joins12:49
<bonniot>i'M going to report the bug to Sun13:25
<ArtemGr>good luck : J13:26
<bonniot>so we know it happens on both linux and win32, right?13:27
i would need a windows version code13:28
arg, it seems i only have a beta 1.5.013:29
did someone confirm the bug on the final version?
<ArtemGr>I've just tested it with recent Nice compiler on Windows.13:30
Windows: 1.4.2_06; Linux: 1.4.2_06; FreeBSD: 1.4.2 (freebsd patch level 7)
What do you mean by final version?
Nicec just tested on Windows: build 2005.02.11.13:31
<bonniot>1.5.0 final
<ArtemGr>I don't have 1.5.0.
* ArtemGr leaves13:43
<bonniot>arjanb: you said it also crashes windows? which version of windows? how does the crash look like?13:51
<arjanb>on 1.4.1_01 it generates a memory access error13:54
<bonniot>which version of windows?13:57
<bonniot>i found a way to avoid the duplication of compileJump and compileJumpNot in ReferenceOp15:05
<bonniot> if (not ^ kind == Eq)15:20
not is false for Jump and true for JumpNot
* fcb joins15:39
<bonniot>hey Frank!15:41
<fcb>daniel, hello!
so you've finished your PhD?
I need some help - I've been struggling a bit15:42
<bonniot>not finished, but getting close ;-)15:43
<fcb>I won't ask many questions today, but it's good to see that you are back15:44
don't hesitate to ask!
<fcb>firstly, does anyone know about cm_?15:45
he appears in this conversation: http://confer09.condor-edv.com/nice@freenode/2004-09-16.html15:47
<bonniot>i met him many times here, but I don't think I have his email15:48
<fcb>ok. he(?) was going to help with nicedoc but I don't think I handled the situation very well. I basically told him to do whatever he felt was appropriate but I think I needed to give him more guidance15:49
I didn't have the time to sit down with him and explain what I was trying to acheive, how he could help, etc, etc15:50
if you see him on here again perhaps you could ask him to send me an email?
<bonniot>i can try to find him on the mailing list subscriptions15:56
<fcb>that would be great
tomorrow is Saturday - are you likely to be on here on the weekend15:58
<bonniot>i can't find "cm" in the list. any idea about his name?15:59
<fcb>I don't know - I think he was from Scandinavia somewhere...
<bonniot>i'm not sure yet, but most likely some part of the day
we have a finnish student and a swedish one ;-)16:00
<fcb>I will try to come on because there a couple of problems I would like to sort out. sometimes hard with screaming baby (our baby is good at screaming)16:01
you don't have the time now?
<fcb>ok, lets make a start16:02
swedish is more likely
the first problem is that issue with the make complete vs make nicedoc
do you recall the emails I send you?16:04
<bonniot>i remember an issue about the order in which you call them, right?16:06
<fcb>yes, that's right16:07
If I do "make complete" there are no errors
<bonniot>sorry about the incovenience
if I then run nicedoc (I use it to document nice.tools.doc) it reports two errors:
~/workspace/Nice/src/bossa/modules/Compilation.nice: line 58, column 8:
warning: This method overrides nice.lang.void setMainPackage(bossa.modules.Compilation, ?java.lang.String)
You should make this explicit, either by omitting the return type
or by using the 'override' keyword
~/workspace/Nice/src/nice/tools/doc/api.nice: line 24, column 6:
warning: This method overrides nice.lang.void generate(bossa.modules.Compilation, ?java.lang.String, ?java.io.File)
You should make this explicit, either by omitting the return type
or by using the 'override' keyword
<bonniot>could you print the header of the setMainPackage method you are defining?16:09
<fcb>(hang on, I'm going to change computer)16:10
* fcb leaves
* fcb joins16:11
I'm not defining that method - that error comes from bossa.modules.Compilation16:13
<bonniot>what about the other one?16:15
in the first case, it looks like a bug because i see only one setMainPackage method. you can ignore that warning16:17
<fcb>void generate(Compilation compilation, String mainPackage, ?File outDirectory)16:18
<bonniot>where does nice.lang.void generate(bossa.modules.Compilation, ?java.lang.String, ?java.io.File) comes from? note that String has a ? in this one16:19
<fcb>that is in nice.tools.doc.api.nice (I think you wrote that method ;))
or rather nice/tools/doc/api.nice
<bonniot>and void generate(Compilation compilation, String mainPackage, ?File outDirectory) ? where is it?16:20
in api.nice, String does not have a ?
it looks like there is only one method, doesn't it?16:21
<fcb>nice.lang.void generate(bossa.modules.Compilation, ?java.lang.String, ?java.io.File)
oh, yes, sorry16:22
<bonniot>if there is only one method, then it must be the same problem as in the first case16:23
<fcb>yep. the thing is, if I do a make complete I don't get these two errors16:24
<bonniot>warnings ;-)
but when I subsequently try to a "make nicedoc" I get 1 error and 1 warning
<bonniot>np. you are right: something's not right here. but you can ignore those warnings for now16:28
then it must be a different error
<fcb>~/workspace/Nice/src/nice/tools/doc/api.nice: line 24, column 6:
The implementation test failed for method nice.lang.void generate(Compilation compilation, String mainPackage, ?File outDirectory):
no alternative matches (bossa.modules.Compilation, java.lang.String, null)
seems to be quite related though
that happens if you do "make nicedoc" again without touching the sources?16:30
<fcb>then it all works16:31
but if I do, for eg, touch src/nice/tools/doc/htmlwriter.nice then I get the error
<bonniot>in which case does it work?
<fcb>if I do a make complete followed directly by a make nicedoc16:32
in that case both builds work
<bonniot>could you try adding the -r flag in the nicedoc target? then it will always recompile the main package
<fcb>I'll try16:33
<bonniot>also, instead of a make complete, you can try a simple 'make'. it would at least be a bit faster16:34
@echo "Building nicedoc..."
$(NICEC1) nice.tools.doc
where abouts is the -r needed?
<bonniot>$(NICEC1) -r nice.tools.doc16:36
<fcb>interestingly, adding -r causes "make nicedoc" to fail every time
<CIA-1>03bonniot * 10Nice/stdlib/nice/lang/inline/ReferenceOp.java:
Factored compileJump and compileJumpNot by xoring the conditions with a
flag representing whether we do "Not", or not.
<bonniot>but that's consistent with the fact that it fails if you touch a file
<bonniot>what about the simple make?
arjanb: maybe the same technique could be applied to simplify other operators that have Jump and JumpNot, if their logic is perfectly the opposite of the other16:39
<fcb>"make" worked fine before and after I touch16:41
<bonniot>so you can use it instead of "make complete"? that would save you some time ;-)16:42
<fcb>I might call it a day now - thanks for your help
yes, its a good start
<bonniot>i'll try to reproduce this behaviour, and then I can really investigate
<fcb>ok, thanks
<bonniot>i also have to leave now ;-)
<fcb>ok - see you later :)
<bonniot>good night!
* fcb leaves
<arjanb>except for BitOp.Get i see no exact opposites17:04
* Bluelive joins23:22
great example of syntax extensions that use the typing and parsetree 23:23
<bonniot>hello BL!00:03
<Bluelive>hi bonniot00:05
still busy with nice ?00:07
* zzorn joins00:09
* zzorn_afk leaves00:12
<bonniot>yes, of course ;-)00:15
<Bluelive>personally thinking of yet another language
just not sure yet on which prinicples00:16
got a few ideas for bigwig00:17
i guess i can make the syntax description part of the source code00:18
so that i dont nee to rewrite the compiler if i want different syntax
<arjanb>i don't see interesting things in that paper00:43
* bonniot leaves01:04
* arjanb leaves01:29
* zzorn_sleep leaves02:10