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

Using timezone: Central European Time
<magnus-->why is bonniot working on another language, does he think nice is not nice?:)00:33
magnus: i guess you mean bluelive where you said bonniot ?00:35
<magnus-->oh, yes i guess so:)
what is the language you are working on?00:36
<Bluelive>well two main reasons i guess, i dont want to have bytecode flying about, and im not really into the functional/dynamic thing nice some times looks like
<bonniot>it's also the you just started alpha independently long time ago, and discovered Nice recently, so working on Nice would mean giving up your own language00:38
<Bluelive>well actually ive known about nice before starting, altough vaguely00:39
<magnus-->do you have any webpage for it?00:41
<Bluelive>i do have an ancient wiki00:42
<Bluelive>altough i did get some weird reponses from a few americans about it being unreachable or something00:43
<magnus-->it works here
<Bluelive>basicly a personal take on java and c++, with a part of the 'new' things, like parametrics and such00:46
<Bluelive>it actually started breathing this month00:48
<magnus-->There is an error in nicec.bat
C:\program files\nice should be "C:\program files\nice"00:49
<Bluelive>some big things missing though, statics, access modifiers, exceptions, delegates
<magnus-->(same with D:)
I see...
I will experiment a bit with Nice first
<Bluelive>ow alpha hasnt been released into the wild yet ;)00:50
<bonniot>magnus--: line 18?
<magnus-->set NICE="c:\Program Files\nice"00:55
if exist %NICE%\nice.jar goto gotNice
set NICE="d:\Program Files\nice"
if exist %NICE%\nice.jar goto gotNice
<Bluelive>wont that extend to something like ...\nice"\nice.jar ?00:57
<CIA-3>03bonniot * 10Nice/bin/nicec.bat: Fixed directories with spaces in them, thanks to magnus.00:58
<bonniot>arjanb: what unexpected behaviour?01:01
<magnus-->bluelive: yeah, but that's okay it seems01:02
now i have another problem01:03
I'm doing the "hello" example
<bonniot>from the Wiki examples?01:04
E:\Code\nice>type hello\hello.nice
void main(String[] args){
println("hello world");
E:\Code\nice>nicec hello
Exception in thread "main" java.lang.NoClassDefFoundError: nice/tools/compiler/c
<bonniot>that's a pb with nicec.bar
that's a pb with nicec.bat
nice.jar is not put on the classpath01:05
<magnus-->aah, okay
<bonniot>nice.tools.compiler.console is the root package of the command line compiler01:06
<magnus-->then it's the space in the path that causes trouble
<bonniot>could it be that you need:01:07
java -classpath "%NICE%"\nice.jar;... ?
you would in Unix shell scripts
but i'm no batch file guru...01:08
<magnus-->I will investigate a bit
the problem was that the first time it didn't work because "" was lacking, and then %NICE% was still in the environment vars01:10
even though it pointed to the wrong place
<bonniot>hum, if NICE is set in the env the script should still check it01:12
that would give a better error message
<bonniot>could you test this? (I'm under linux):01:16
rem -- do we have a nice environment variable?
if "%NICE%" == "" goto noNice
if exist %NICE%\nice.jar goto gotNice
echo The NICE environment variable does not point to an installation of Nice.
goto end
rem -- try some standard places
the rest is unchanged
<magnus-->yes, works01:18
<bonniot>and can you use the compiler with a space in NICE?01:21
<magnus-->hhm, it only works to run once now
<bonniot>what happens?
<magnus-->E:\Code\nice>nicec hello01:22
nice.lang: parsing
hello: parsing
E:\Code\nice>nicec hello
Files\nice"" was unexpected at this time.
and NICE="d:\Program Files\nice"
it works if i clear nice, but only once01:23
<bonniot>the script could clear NICE
but do you understand why it fails?01:24
<magnus-->no, i'm trying to figure out
<bonniot>i'm not sure batch script semantics is any close to sanity...01:25
<magnus-->no it's a horror...
I think it gets confused since %NICE% contains "01:27
so it expands to ""D:\program files\nice\"" == "" or something
<magnus-->maybe it's better to check with exists
<bonniot>let's just clean NICE at the end, no?01:28
instead of exist ?
oh no, i see
but then, it would silently ignore a misconfigured NICE var, which could be confusing01:29
<magnus-->exist may not work either :/
if NICE is not set then it becomes if exist goto ...01:30
spaces in file names don't go well with bat files it seems...
<bonniot>can you try unsetting NICE at then end
is that 'unset NICE' ?
<magnus-->set NICE=01:31
<bonniot>or 'set NICE=' M
<magnus-->the compiler should emit an error if it was unable to run "javac"01:51
<bonniot>there is no usage of javac01:52
Nice compiles directly to bytecodes
why do you say that?01:54
<magnus-->hm okay, because i get no .jar out01:57
<bonniot>nicec -a out.jar ...01:59
by default it simply generates the .class files
<magnus-->sorry, I missed that part when i looked at the example02:00
<bonniot>it would probably make sense to generate a jar in all cases, not just sure what the name should be
no pb
<magnus-->alright, it's working now:)02:01
<bonniot>magnus--: so what should we change to nicec.bat?02:17
add set NICE= before :end ?
rather after...
<magnus-->that's okay, but then it shouldn't check for a NICE variable present from the start02:30
just let the user configure the .bat file themselves with a set NICE=...
<bonniot>the idea is that you might want to set NICE in your system / autoexec.bat
but then, unsetting is wrong02:31
should use another var name internally
that's a good solution
is there a chance of Nice being compiled to native code in the future?02:32
<arjanb>it possible with gcj
<bonniot>nicec -o out ...
you need gcj in your PATH
<arjanb>magnus--: can you get to old situation back where the batch file didn't work?02:39
<magnus-->actually i just simplified my nicec.bat to have a SET NICE=...02:40
<arjanb>i have changed the batchfile so that it could work02:41
<magnus-->nope, that one doesn't work02:43
the problem is the first line
since %NICE% has a space in it,02:44
it expands to if exists ""xxxx xxxxx"" == "" goto...
and it thinks the xxxx"" is unexpected
if ""xxxx xxxxx"" == "" goto...
(no exists)
<bonniot>dunno what arjan changed, it was me who commited to CVS02:45
<magnus-->arjan sent me a .bat02:46
arjanb: another problem, you need to add "" around paths that have spaces in them02:47
<arjanb>why haven't they updated batch file interpreter for at least 10 years :-(02:48
i think a set NICE= should be added before reporting that it can find the path02:50
magnus--: have you tried the new cvs version of the batch?02:51
<magnus-->no, i haven't02:52
where in cvs?02:53
<arjanb>not in anonymous cvs yet 02:54
i will send you
i can tell from looking at it that it won't work if there are spaces in the file name02:55
I have hacked up one that works now i think03:13
abusing the FOR command to check if %NICE% is empty
<arjanb>that's creative :-)03:17
<magnus-->hehe, i saw some trick in some .bat online03:18
tho it was not for the same problem
Dcc send doesn't work here. How can i give it to you?03:21
gotta go to sleep now
see you!
<arjanb>thanks and good night03:24
thx for the fix
* magnus-- leaves
<arjanb>it works with user defined path too03:27
<CIA-3>03arjanb * 10Nice/bin/nicec.bat: Use magnus fix to handle white spaces in directory name correctly.
<arjanb>daniel: working on something?03:41
<bonniot>i investigated bytecode shrinkers03:44
reduce the size of a jar, for instance, by removing unused code, optimizing, ...03:45
I found ProGuard to be quite good
for instance swing helloworld goes 231kb -> 36 kb03:46
<arjanb>not bad03:47
but what use it has for nice?03:51
<bonniot>it means you can run it on the generated code, and get much smaller jars03:53
it was a bit worrying that nice-swing was adding so much bloat
<arjanb>the completed library included?03:55
<bonniot>the compiled version, yes03:56
it's non trivial to find what code to include, and to extract it03:57
the good thing is that existing tools can already do it, so there is no need to duplicate that functionality03:58
<arjanb>in this case the .nicei file is quite big03:59
<bonniot>yes, but it compresses very well too04:00
so it doesn't take that much in the jar
ok, good night04:02
<arjanb>good night
* bonniot leaves04:04
* Bluelive leaves11:34
* Bluelive joins11:45
* CIA-3 leaves19:03
* CIA-3 joins
* CIA-3 leaves19:56
* CIA-3 joins
* magnus-- joins21:04
<arjanb>magnus--: have you encountered other problems using n22:32
* bonniot joins22:42
<arjanb>any idea what's the problem with the latest bug that isaac reported?22:53
<bonniot>no, i did not investigate yet22:59
i don't see why he is speaking about recursive type, do you?
<arjanb>me neither23:00
simplified testcase:23:01
abstract class Shape<T> {}
<S,T> class Translated<T> extends Shape {
T someShape;
* bonniot leaves23:23
* bonniot joins23:24
* bonniot leaves23:28
* bonniot joins23:29
<magnus-->arjanb: no problem so far.. haven't done anything more since yesterday:)23:32
it would be interesting to see where nicec ends up in http://dada.perl.it/shootout/index.html if gjc was used23:33
<arjanb>i have no idea but probably just a little slower as java with gjc23:34
<magnus-->java ends up higher up in the list than nice somehow
perhaps it doesn't take into account expressiveness23:35
* bonniot leaves23:37
<arjanb>we are happy with a performance that is a small percentage slower than java23:38
<magnus-->that makes sense23:39
java and nice are very much the same on memory usage (high)23:40
<arjanb>mostly caused by the virtual machine i think23:46

Generated by Sualtam