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

Using timezone: Central European Time
<CIA-5>03arjanb * 10Nice/testsuite/compiler/typing/dti.testsuite: Additional testcases for nullness inference.00:03
<arjanb>no regression00:06
and no real merging00:07
<bonniot>ok, testcases look good00:15
http://www.theserverside.com/news/thread.tss?thread_id=3239001:57
i would leave a comment, if I got my registration confirmation email...
* zzorn_afk leaves02:06
<bonniot>good night02:51
<arjanb>g'night02:52
* bonniot leaves02:53
* bonniot joins08:18
hi arjan, stayed up all night? ;-)08:20
* zzorn joins08:46
* bonniot leaves08:47
* bonniot joins08:50
<CIA-5>03bonniot * 10Nice/src/bossa/syntax/niceMethod.nice: Factored checkOverride out to simplify the logics of findSpecializedMethods.10:49
* arjanb_ joins10:56
<bonniot>hi11:01
<arjanb_>hi
my monitor stopped working :(11:02
<bonniot>dead?11:03
<arjanb_>yeah
<bonniot>bad luck
* arjanb leaves11:07
<CIA-5>03bonniot * 10Nice/src/bossa/syntax/niceMethod.nice: Further refactoring for simplification.11:11
* ArtemGr joins11:33
<bonniot>hey11:35
<ArtemGr>greetings
have to go.11:36
please, check
http://bizlink.ru/Nice/merge1/
http://bizlink.ru/Nice/merge1bug/
good luck
mail me, if anything. artem@bizlink.ru
* ArtemGr leaves11:37
<bonniot>this looks like a bug in the marge method11:38
i'll finish what I'm doing now...11:39
<CIA-5>03bonniot * 10Nice/src/bossa/syntax/niceMethod.nice: 11:51
Factored out the specialization predicates. Finally under one pagefull.
Hopefully the logics is clear now.
<bonniot>ok let's see...11:59
hu, i don't get failures12:04
ah, it's that I did not have the latest tests12:13
good that you added them, arjan ;-)
silly mistake12:15
yay, 2 fixes!12:21
is it supposed to fix more?12:22
http://rafb.net/paste/results/aSdBDn68.nln.html12:26
<arjanb>no others have to do with loops, captured variables
<bonniot>great then
<arjanb>i see no testcases for merging with instanceof though
<bonniot>maybe merging would need more testcases12:27
could you see to that?
<arjanb>now?12:31
<bonniot>when do you have the time?12:32
<arjanb>the whole afternoon though i need to shop for a new monitor12:33
<bonniot>perfect. i don't know when artem will be back anyway
nice is getting a surge of popularity in Japan:12:36
http://blog.csdn.net/java_editor/archive/2005/03/08/314823.aspx
http://d.hatena.ne.jp/k_ahiru/20050308#p412:37
the babel fish translation is hilarious, as usual
Takata method (multi-methods)
i wonder if that would be a good rename ;-)
Nice: Basis ? Java surface direction? Elephant new? Word Nice right one? Basis ? Java surface direction? Elephant new? Word. ? dice? Ryo it comes, our functional system? About mark one ? quality, ? military officer institute group? About? Word research molten entrance? ? . Under ? including line important quality: ? type, anonymous function, Takata method (multi-methods), origin? (Tuple) Methodological support yes? The quantit12:38
y of going/participating, ?? Formula? ? (Design by contract), ?? Large mark? ? Period? ? ? ? (? ? right thought? Arriving at? Type? ? Harmony empty quotation) and the like. ? Mark writer? ? Nice meeting right one ? ? tool chart? Ability and ? adding model/imitation? Conversion and ? adding? Type safety? Word. Nice? Word ? ? right: Http: //nice.sourceforge.net/. ? Main right 0.9.10 of immediate edition. Edition? Decla
ration: Main Blog receptacle tube clothes of CSDN right? Offer trade. ? text? ? Edition? ? ? CSDN non- acceptance bearing phase? ? Duty? Edition? ? The possession person directly the giving composition writer? Type solution ?. [ Point? ?? ? ? text ]
i wonder how elephants come into the picture!12:39
wow, xchat even prints the kanjis(?) correctly!12:40
<CIA-5>03arjanb * 10Nice/testsuite/compiler/typing/dti.testsuite: Additional testcases for merging and instanceof type inference.13:46
<arjanb>i think it's not complete yet but i can't find what's missing13:47
notnull by assignment needs to be generalized to subtype by assignment13:59
<bonniot>isn't that what merge is doing?15:21
(well, partially, but more than just nullness)
all your new tests pass?15:22
<arjanb>most are marked bug because it isn't implemented yet15:36
<bonniot>did you try it with artem's patch?15:40
i now have 3 fixes, up from 2 before15:41
<arjanb>no15:46
* arjanb leaves15:47
* arjanb joins16:02
<bonniot>wb16:03
<arjanb>this is way better than a 14 inch16:04
<bonniot>what did you get?
yeah, 14 is tiny16:05
<arjanb>just a 17 crt
it's not big but a high end 17 cost half of a decent tft or 19 crt16:08
<bonniot>btw, i got very interesting feedback from steeve16:11
he wrote a sokoban game in many jvm languages16:12
<arjanb>feedback off the list?16:17
<bonniot>yep
<arjanb>new or good ideas?16:18
<bonniot>his biggest difficulty was with constructors16:20
so probably we should improve the manual on those
it's necessary because they are so different from Java
and it's one of those things we _have_ do to differently (better ;-)16:21
although it will help if we could use the field assignment syntax
other small differences with Java make it harder for new users, and might discourage them
<arjanb>i noticed that constructors cost a lot of work to convert from java16:22
<bonniot>like he said on the list about nullness
yeah, not surprising
improving the nullness analysis should help here
steeve was a radical as saying the N?1 priority should be becoming a pure superset of Java (or at least almost)16:23
i disagree to go that far16:24
but when it poses no problem we should try
that's why the generics syntax would be a good thing
<arjanb>being a pure superset is the biggest problem of java 1.516:25
<bonniot>yeah. and even worse for C++ with C16:27
it looks like interesting in Nice is booming just now. I see more and more people refering to it16:30
the 'theserverside' post is bringing crowds. number of its per day:
2005.03.01: 148
2005.03.02: 160
2005.03.03: 169
2005.03.04: 126
2005.03.05: 96
2005.03.06: 99
2005.03.07: 1355
2005.03.08: 2649
(and today is not over!)
do you think implementating the generics syntax would be hard?16:55
<CIA-5>03bonniot * 10Nice/ (3 files in 3 dirs): Handle methods that are partly specialized by existing imported methods.17:03
<arjanb>i can try some17:16
<bonniot>that would be great17:21
<T extends Foo> should be exactly the same as <Foo T> now, so I guess that's parser only17:22
oh, one of his good remarks:17:33
- Nice is blazingly fast. Smokes all the other languages, except
(possibly) Java. Close enough, though.
;-)
I suppose he compared mostly with expressive but dynamic languages like Jython, who take a big performance hit17:34
<arjanb>yeah Jython and Groovy need many lookups at runtime17:35
only a typeIdent allowed now as Foo in <Foo T>17:36
<bonniot>yeah, at parse time17:38
but when it is resolved it can be a TC, and AI, ...
<arjanb>why not allow things like <T, List<T> X>?17:39
<bonniot><T, X extends List<T>>, yes!
atm i guess you had to use the complex notation for that case17:40
<arjanb>yes but i see no parsing problem in <T, List<T> X>?17:41
while you're looking at specialization, the maybe type specialization needs fixing17:44
* Atomixx joins17:45
<arjanb>hi17:46
<Atomixx>hi there17:51
<bonniot>hi17:53
what's new?
<Atomixx>anyone knows this site http://www.99-bottles-of-beer.net//??17:54
<bonniot>yeah, saw it once
<Atomixx>i've written a nice version
<bonniot>:-)17:55
<Atomixx>but before submitting it
i'd like to know if it could be written better, or if it is ok
<bonniot>fire up!17:56
<Atomixx>one moment. just uploading ;-)
http://www.stud.uni-karlsruhe.de/~utaue/programme/beer.nice17:57
personally i don't like the 99 - i thing too much17:58
<bonniot>what about handling 1 too
?
<Atomixx>you mean case 1 up to 9 ?17:59
<bonniot>to avoid the (s)
<Atomixx>yes. thought about that too18:00
<bonniot>you could also use """, that may be more readable
and concatenation without +
<Atomixx>but this will get 9 new 'functions'
<arjanb>bah the wiki spammer is back
<bonniot>?
why 9?18:01
<Atomixx>oh
i thought to much
i'll fix that at once
<bonniot>otherwise it's a good idea to make use of ..18:02
<Atomixx>can i use variables inside the """?
you mean (..) instead of (n)
<bonniot>"""...18:03
..."""n"""...
..."""
not sure about that one
i meant, define beer(1)
.. was for 0..99
<Atomixx>new version -> http.....18:05
<bonniot>beer(1) is not closed properly I think
<Atomixx>yes18:06
<bonniot>""n""" bottles of beer on the wall,18:07
"""n""" bottles of beer.
Take one down, pass it around,
""" + (n - 1) + " bottles of beer on the wall.\n";
?
does that work?
<arjanb>i think it's ugly18:08
<Atomixx>this was my idea too18:09
<bonniot>ok, matter of taste
<Atomixx>i did try something like that but it didn't work
the compiler expected something different than i had written ;-)18:10
<bonniot>to me it's clearer, because it's like the output, without extra symbols like \n and +, with """n""" for inserting a variable18:11
<Atomixx>it didn't work as i tried it, just a few moments ago18:12
<bonniot>yeah, it looks like omitting + only works after ", not after """18:14
doesn't matter much
it's good for beer(1) ;-)
<Atomixx>yes
something like 99..1 would be nice in this situation18:15
but i don't know if it would be useful somewhere else
<bonniot>the probem is that often you want x..y to be empty when y < x18:17
<Atomixx>this is true18:18
just a question18:22
is there a plugin or something available for emacs that restores the last open session and opens the files that were open?18:23
<bonniot>yes18:24
but i don't know it ;-/
the answer to "is there a plugin or something available for emacs that ...?" is always yes ;-)
<Atomixx>hehe
<bonniot>tried google? freshmeat?18:25
<Atomixx>yes18:26
but i didn't find what i wanted
ok, i'll send the version that is now on my site18:35
i added a few comments now.18:51
shall i send it like it is now?
<bonniot>looks fine
<Atomixx>on the way :-)19:03
* ArtemGr joins19:21
<bonniot>wb19:22
i fixed merge, and it seems to work well ;-)
<ArtemGr>great
will check the cvs now19:23
<Atomixx>bonniot, is anywhere a list available of the packages that can be included from nice.jar?19:24
<arjanb>it isn't in cvs yet right?
<bonniot><bonniot> http://rafb.net/paste/results/aSdBDn68.nln.html19:31
Atomixx: what do you mean, included from nice.jar?19:32
the list of standard libraries?
ArtemGr: there are changes in CVS, but they are unrelated
<Atomixx>bonniot, something like nice.functional or similar19:33
<bonniot>have a look at http://nice.sourceforge.net/nicedoc/
<Atomixx>thanks, this was what i was looking for19:35
* arjanb struggles with javaCC's lookahead19:36
<bonniot>hu19:37
what's the ambiguity?
<arjanb> LOOKAHEAD(2)19:38
ti=typeIdent()
|
m2=monotype()
<bonniot>isn't a typeident a monotype in the grammar?
why not typeIdent() "extends" monotype()19:40
<arjanb>yes but it's seem to use the second token in the lookahead at all
is that correct for all T extends Foo?19:41
<bonniot>typeIdent() "extends" monotype() ?
monotype() includes typeIdent as a subcase19:42
<arjanb>i know19:43
but T extends Foo isn't always a MonotypeLeqCst
<bonniot>syntactically it can be19:50
see the current definition of binder()
only during resolution, we can discover what Foo really is, and create the appropriate mlsub.typing constraint19:51
does that make sense?19:52
<Atomixx>i'm going to go now19:56
bye
* Atomixx leaves
<arjanb>a little but i only want to change the parser now20:00
<bonniot>exactly20:01
you don't need to change anything else, since it already works
i think you can pretty much reuse binder() as it is, just adding a LOOKAHEAD( typeconstructor() "extends" ) for the new case, and do the same thing as in the current first case20:03
<CIA-5>03arjanb * 10Nice/src/bossa/parser/Parser.jj: Make 'extends' an alternative for '<:' and allow <T extends Foo> constraints.20:13
<bonniot>testcase? ;-)20:14
* zzorn joins20:25
<bonniot>you already accept <T extends List<String>> ?
<arjanb>yes but that doesn't work yet
<bonniot>ok20:26
and it is really needed to repack the typeident as a typeconstructor?20:27
oh, it's for the second case?20:30
monotype
but why did you change the typeIdent() typeConstructor() case?20:31
<CIA-5>03artemgr * 10Nice/ (4 files in 3 dirs): Type merging works (for IfExp).20:33
<bonniot>3 fixes?20:35
<ArtemGr>yes
<bonniot>very cool
there should be a few notNulls in the compiler source that are not needed anymore ;-)20:36
away for dinner
<CIA-5>03artemgr * 10Nice/src/bossa/modules/DirectoryCompiledContent.java: Wrap FileInputStream with BufferedInputStream.21:11
<bonniot>wasn't there buffering already?21:26
<ArtemGr>no21:27
<bonniot>ah, for the compiled classes, right21:29
any benchmark?
<ArtemGr>seems a bit faster, 24 minutes on full bootstrap with testsuite instead of 26. it was 5% in Borland OptimizeIt.21:31
i'm going to configure rsync and test my changes on a server (should be a few times faster than at my workstation)21:34
<bonniot>good catch. 5% is not bad for a one liner ;-)22:00
<ArtemGr>made a testing setup on a FreeBSD server. full bootstrap with testsuite took 9 minutes (using the ant build)22:16
now i can test faster : )
<bonniot>wow22:17
what hardware is that?
<arjanb>btw why isn't there an automated test for the 1.5 jvm?22:18
<bonniot>didn't bother to configure it yet
but I suspect we don't bootstrap yet on 1.5
some minor ambiguity22:19
<ArtemGr>bonniot: just a single Intel(R) Pentium(R) 4 CPU 2.80GHz22:20
<bonniot>i have just 1GHz here22:21
<ArtemGr>can land you a login if you want : )22:23
<bonniot>thanks22:24
i actually have access to a remote Intel(R) Pentium(R) 4 CPU 2.00GHz
that's the machine running the automated tests
and building the dev version
it's just more a bit practical to work locally22:25
although I prefer not to hear the CPU fan speeding up ;-)22:26
so you did some profiling?
<ArtemGr>on a testsuite run
<bonniot>what did you find?
<ArtemGr>it is possible to combine both rsync-ing and compilation into one shell scrypt (the compilation and testing would be done via ssh remove command execution), so it's just one command to compile and test on the server. i'll do such a setup now for myself.22:28
<bonniot>yeah, makes sense22:29
<ArtemGr>with profiling, couldn't find a single place with too much cpu, everything is spreaded between methods. most time that spent in a single place is spent in the parser.22:30
<bonniot>interesting22:32
with --bench, i'm seeing about 1.5s/8s on parsing22:36
<ArtemGr>i remeber 15% being spent in a Parser-generated method with a big switch in it.22:39
could be mistaken, though
<arjanb>i don't think much can be improved in the lowlevel methods22:40
<bonniot>arjanb: you mean the typing?
ArtemGr: that's consistent with 1.5/8
<arjanb>typing and parsing22:41
<bonniot>i don't think parsing is very efficient atm22:43
not sure if this is because of our grammar, or because of JavaCC22:44
<arjanb>both i think and that is hard to improve
<bonniot>yeah, it's not urgent
compiler optimization is not a priority before we stabilize the features for 1.022:45
if there are obvious optims, they are welcome though ;-)
i think i made a mistake to make visibility return Lists on lookups22:54
ordering is not relevant, but we want to guarantee one symbol is returned only once22:55
so it should rather be Set I think
<ArtemGr>am i right, that nicec compilation is not currently synchronized? having package variables like stack, it shouldn't be safe for me to invoke Nice compilation simultaneously?22:56
<bonniot>you mean in the same JVM?22:58
<ArtemGr>yes
<bonniot>right
<ArtemGr>ok
<bonniot>it's reentrant, but not thread safe
if that's the correct terminology22:59
that is, once a compilation is over everything should be clean so you can start another one
testsuite is doing that, eclipse plugin too, ...
getting rid of staticness would be a good thing23:00
<ArtemGr>reentrant is rather complicated term, but its not what you described, imo. : )
<bonniot>i think visibility will get rid of one or too statics
oh. is there a term for what I described?
i reentrant the same as thread safe then?
s/i/is/23:01
<arjanb>if files and packages get both some container classes we lose most statics i think
<bonniot>is this an issue for NiceTee?23:02
<ArtemGr>no problem, i'll just synchronize around Nice compilation. not sure if this is the best solution, since theoretically something else could be using nice too, not knowing about the NiceTee.23:04
<bonniot>theoretically
heopfully this will be fixed before this gets a practical problem ;-)23:05
is compilation speed an issue in your domain? i guess it could be if you compile on demand
<ArtemGr>http://en.wikipedia.org/wiki/Reentrant
<bonniot>i see23:07
reentrant is the efficient implementation of thread safety, to put it simply
<ArtemGr>i compile when the template is edited, not when it is executed. old version of the template is working when the new is being compiled (and the old version will continue working if there are problems compiling the new one), so it seems not to be a problem. slow testsuite is a usual problem of TDD, though
from C++ gotw and such i remember that reentrant and thread-safety are almost the same, but not the same. rather complicated. : )23:08
<bonniot>thread safety is the property. reentrant a technique to achieve it23:09
the other technique is mutual exclusion
<ArtemGr>right23:10
<bonniot>what is g in gotw?23:11
<ArtemGr>"guru of the week" contest
very nice info there
the book "Exceptional C++" is just a collection of those23:12
<bonniot>ok
i once looked into splitting nice.lang into nice.lang.core + nice.lang23:13
<arjanb>why didn't that work?
<bonniot>core would have only stuff needing special compiler support (like boolean, int)23:14
nice.lang a normal package, just imported by default
<ArtemGr>http://cpptips.hyperformix.com/cpptips.html had a lot of gotw articles categorized
<bonniot>it can work, I just did not get around to finish it
then the idea is that testcases would not import nice.lang by default (they can do it explicitely)23:15
it makes them more self-contained when possible
and speedup is large
don't remember precisely, but something like x2 to x423:16
<ArtemGr>great
have now a single-command script, which rsyncs, compiles 'compiler1' and do the tests.23:23
works much faster than what i had on local machine.23:24
<bonniot>:-)
<arjanb>rfe #1090883 and #1124210 seem requesting the same23:29
<bonniot> for ((int x, int y) : listOfCouples)23:32
that doesn't work either, right?
<arjanb>yeah23:33
<bonniot>so there are a few constructs with tuples that are not accepted yet23:34
steeve has been mentioning that too
* zzorn leaves23:35
* zzorn_away leaves
<bonniot>arjanb: what's the status on generics syntax? what works and what doesn't?23:36
<arjanb>what previous was Foo T works as T extends Foo the monotype case doesn't23:38
<bonniot>ok
what's the pb with that?
* zzorn joins23:39
* zzorn_away joins
* zzorn_ joins23:40
<arjanb>Exception in thread "main" bossa.util.InternalError: Unable to print the constraint in a parsable fo23:42
rm because of T
at bossa.util.Internal.error(Internal.java:86)
at bossa.syntax.fun.toString$64(constraint.nice:108)
* ArtemGr leaves23:45
<bonniot>who is calling toString?23:46
<arjanb> at bossa.syntax.Constraint.toString(constraint.nice)23:47
at bossa.syntax.fun.createDefaultMethodImplementation(defaultMethod.nice:127)
at bossa.syntax.dispatch.createDefaultMethodImplementation(Unknown Source)
at bossa.syntax.fun.createMethodWithDefault(defaultMethod.nice:58)
at bossa.syntax.dispatch.createMethodWithDefault(Unknown Source)
at bossa.parser.Parser.methodDeclaration(Parser.java:2126)
<bonniot>ok23:48
that with the CVS code?
<arjanb>yes
<bonniot>ok23:49
could you commit testcases?
<arjanb>where?23:50
<bonniot>compiler/syntax/generics ?23:51
<CIA-5>03arjanb * 10Nice/testsuite/compiler/syntax/generics.testsuite: New generics syntax tests.00:08
<bonniot>thx00:11
http://nice.sourceforge.net/tmp/nice-sokoban.zip ;-)00:13
* zzorn leaves00:21
* zzorn_away leaves
* zzorn_ leaves00:22
<bonniot>next step of visibility is working now00:28
there's one regression with polymorphic type inference, but I think it's a random consequence of getting symbols in a different orders, so I'll let that regress for this time00:29
and this time there will be progress in avoiding leaking of methods to packages that don't import them00:30
i guess i'll commit tomorrow, because i'm too tired to to a clean job tonight00:31
good night01:14
<arjanb>this is strange, i implemented option instanceof and it doesn't get used while the new inline class is in the jar01:17
maybe i'm too tired too01:20
<bonniot>yeah ;-)
are you using the nice.inline(?) property01:21
<arjanb>g'night
no
<bonniot>ok, let's see tomorrow ;-)
* arjanb leaves02:05
* bonniot leaves02:13