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

Using timezone: Greenwich Mean Time
<bonniot>good night01:06
<arjanb>goodnight
* bonniot leaves
* arjanb leaves01:09
* bonniot joins09:27
* GummiEnte joins11:00
hi
using a quite old compiler:11:01
ubber@tower:~/Work/WorkingDirectory/e3m > nicec --version
java nice.tools.compiler.console.fun --runtime=/site.usr/local/share/java/nice.jar --native-compiler=/site.opt/gcc-3.4/bin/gcj --version
Nice compiler version 0.9.5 prerelease (build 2003.11.27, 15:05:00 UTC)
Compiled using JDK 1.3.0
But it gives me for the following classe some errors in packacge.nicei while recompiling without force to recompile all classes (and so without removing the package.nicei)...:11:02
package com.condor_edv.e3m.util.db;
public class ForceInclude {
private final Class class1 = gnu.java.locale.Calendar.class;
private final Class class2 = gnu.java.locale.LocaleInformation.class;
private final Class class3 = com.mysql.jdbc.Driver.class;
//private final Class class4 = org.hsqldb.jdbcDriver.class;
}
[nicec] ~/Work/WorkingDirectory/e3m/targets/com/condor_edv/e3m/util/db/package.nicei: line 11, column 40:11:03
[nicec] Expression expected
package com.condor_edv.e3m.util.db;
import nice.lang;
import com.condor_edv.e3m.util.db.*;
import java.util.*;
import nice.lang.*;
import java.lang.*;
class ForceInclude {
final java.lang.Class class1 = `class`(gnu.java.locale.Calendar);
final java.lang.Class class2 = `class`(gnu.java.locale.LocaleInformation);
final java.lang.Class class3 = `class`(com.mysql.jdbc.Driver);
}
Sorry, not that much time, just joined to report the error...
<bonniot>looking at it11:04
<GummiEnte>No errror if recompiling all or compileing the first time. Should I upgrade to a more recent compielr?
Hello Daniel
:=)
<bonniot>hi!
i don't think a newer compiler will make a difference11:05
<GummiEnte>Ok.
<bonniot>are you sure putting a field in a class will force the refered class to be included?11:06
doesn't it need to be static?
<GummiEnte>It was so in a java class...
isn't a final field of a class something very similar to a static field, no it isnt... Ok.11:07
<bonniot>the equivalent in Nice is a package constant
let Class class1 = ...;
<GummiEnte>Yes, but at runtime then the class will get loaded?11:08
<bonniot>i'm not sure, did you test?
<GummiEnte>No... That was the first hurdle.
<bonniot>what is the goal?
<GummiEnte>Include the references, so that the native compiler links to this objects.11:09
that is mainly the mysql.driver at the moment...
<bonniot>in static compilation mode?
<GummiEnte>Not only staic compilation mode, it doesn't work either in dynamic linking (native) cause, the compiler does not resolve the refernces to the mysql.driver, as it is "normaly" due to the design loaded through Class.forName("...");...11:10
<bonniot>is that a bug of gcj?11:12
<GummiEnte>No, it is by design. How should they otherwise do?
<bonniot>in static mode, I understand. In dynamic mode, I don't see the problem11:13
<GummiEnte>I read something about thoughts of how to eliminate that... But it is not implemented at the moment. (with that I mean, dynamic "relinking" to missing (not already linked) classes...
Well, I think it mainly has to do with exception handling....11:14
The references are currently not included... there was something on the mailinglist...11:15
<bonniot>it seems that if you use package constants the parsing works
and I think that's what you need to do
(this is still a bug for class fields, i could reproduce it)11:16
<GummiEnte>Ok, then I'll do so...11:17
I'll have to leave again... Have a nice day... We'll see us ...
Bye.
<bonniot>bye!
* GummiEnte leaves
* arjanb joins12:00
<bonniot>hello arjan16:02
<arjanb>hi17:35
<bonniot>how do you spot unused methods?17:38
<arjanb>that's easy for static and private methods17:39
and i have looked at the coverage test
<Bluelive>wouldnt that scew reflection ?17:42
<arjanb>reflection is not used on the compiler itself17:43
i found a little difference with integer literals compared to java17:44
int i = 0xFFAAFFAA;
valid in java but not in nice17:45
<bonniot>there is some reflexion used to find 'inlined' methods, but for the rest it's valid17:48
why is it rejected in nice?17:49
<arjanb>because it's too big for an int
<bonniot>i see17:53
for hex literals, i think it makes sense to consider it as a bit representation (so take it modulo 2^^32, like Java)17:54
what happens if you assign it to a long in Java, it is still negative?
<arjanb>still negative17:59
*away for dinner*
<bonniot>i think we should stick to Java on such minor issues18:08
<arjanb>*back*18:17
<bonniot>arjan, are you going to look at the int literal thing, or would you like me to?18:19
<arjanb>i will do that18:20
<bonniot>ok
the new retypings in java-io make the compilation quite longer, didn't you find?19:35
<arjanb>i haven't noticed a big difference19:36
but various performance related changes were made in the same time so i don't know the difference of retypings alone19:38
<bonniot>with only this change, it went for me from 600s to 918s19:46
(wall clock time: from 16m to 22m50s)19:47
<arjanb>that's quite much :-(19:52
using jdk 1.4 right?19:54
<bonniot>yes19:58
<arjanb>java.io has dependancies on both java.nio and java.net20:00
<bonniot>you can make tests in your environment by reverting specific files at a past date20:02
<arjanb>i know but don't want to try it now too20:04
is there anything you working on now?21:59
<bonniot>why don't you want to try it?22:37
no, i was not working tonight. I think 0.9.5 is ready, i might release it tomorrow22:38
<arjanb>how much the speed difference doesn't matter much and i don't know how to that easily22:45
<bonniot>the precise times do not matter much, true, but it's always nice to double check using different environments22:49
on unix, you can prefix a coomand with 'time ...' and it will run that command, and then print how much time it took, plus how much processor time it took, and other infos22:51
you can probably do that on windows too with cygwin installed22:52
<arjanb>i can measure cpu usage but not automatic22:57
i have a similar difference in time here23:25
<bonniot>can you mesure a difference for a compilation of a small program?23:35
<arjanb>i can't do precise measurements23:36
i can't find a clear cause of the time difference using a simple profiler23:54
<bonniot>i think it's just that the retypings force much more classes to be loaded23:56
<arjanb>i guess most user won't noticed the difference because it's a small overhead at every compilation00:03
btw has the work on nicedoc started?00:23
<bonniot>i think Frank did some preliminary work, together with learning Nice, but he left on honeymoon, so there is a small delay :-)00:34
<arjanb>i see00:40
good night00:42
* arjanb leaves00:44