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

Using timezone: Greenwich Mean Time
<arjanb>so you found the memory leak?00:27
<bonniot>yes, mostly00:29
running the whole testsuite took 111MB, now 10MB :-)
<arjanb>:-)00:30
<bonniot>these are the final consumption. the peaks were 148 and 35, respectively
unfortunately, this does not provide a speed-up (unless your are low on memory, I suppose)00:32
<arjanb>have increased the max heap site when running the testsuite and it saved 20% in time00:33
site=size00:34
<bonniot>with the old code or the new one?00:37
<arjanb>with the old code
<bonniot>and what were the two settings (default and yours?)00:38
<arjanb>default max heapsize seems to be 64m and i doubled that00:39
<bonniot>ok, interesting00:40
so GC time is quite significant00:41
<arjanb>only when you're very low on free heap mem 00:42
<bonniot>so with the new code, 64 and 128 might give you less difference00:43
<arjanb>probably no difference i think, max system mem used running the testsuite was 50M00:44
the testsuite running time has increased a little00:48
<bonniot>yes00:53
<arjanb>why haven't you closed the bug report for the parametric tuples?00:55
<bonniot>i'm not sure it made it to the dev version yet
i'm testing an intermediate solution, that would keep a bit more memory but hopefully not loose any time compared to before01:07
<arjanb>chaching only nice.lang things?01:12
<bonniot>not discarding classes loaded by reflexion01:21
with the improvements to typechecking closures, is the change you made to Swing still needed?01:49
<arjanb>yes01:53
<bonniot>yes, since fill is not handled specially. your version is much nicer, anyway :-)01:57
<arjanb>it does an additional arraycopy01:58
<bonniot>i don't think they are in a critical section :-)02:02
<bonniot>good night02:20
* bonniot leaves02:21
* arjanb leaves02:26
* GummiEnte joins10:45
hello10:47
<Bluelive>hi11:10
* bonniot joins11:19
<GummiEnte>Hi Daniel11:24
Hi Blue
<Bluelive>going to some c++ documentation to studie up for a solicitation11:27
supprising how fast the details fade from mind11:28
that reminds me
does nice have some thing like implicit conversion operators ?
<GummiEnte>what is an implicit conversion operator...? 11:29
<Bluelive>say that if you do a = b11:30
<bonniot>hi
<Bluelive>and b cant implicitly be cast to a, then check if a has a conversion method taking a b type, call that on b which returns something a typed and assign that to a
<bonniot>there are no user defined conversions (can be powerful, but also very misleading)11:31
<GummiEnte>Ah, Ok.
<bonniot>there are automatic conversions in the bytecode, but it is always to respect the type hierarchy
(boxing of primitives, an array is a List)11:32
<GummiEnte>Ok, I'm out for lunch... CU in about an hoer...
<Bluelive>:))
what do you think about that in c++ sometimes a varaible definition includes an instantiation?11:35
int a(50);
<bonniot>int a = 50?11:36
<Bluelive>yes
<bonniot>so waht's the benefit?
<Bluelive>well its closer to the idea of the no NPE thought because int a; would implicitly be an int a(0); for example
ehmz11:37
int a();
<bonniot>no, in Java and Nice int a; declares a but marks it as uninitialized, and the compiler will check you assign to it before use11:40
(what is ehmz, btw?)
<Bluelive>just something i say when im having a thought/opinion/thinking11:41
did you implement tuples via an implicit conversion to somthing like pair en triple classes and such ?11:53
<bonniot>as arrays11:55
<Bluelive>no i mean in the type system11:56
<bonniot>in the TS, tuples have their own type constructor, which has an arbitrary arity and is covariant11:58
so (int,String) is a type11:59
<Bluelive>ah
<bonniot>(int,int,boolean) too, etc...
<Bluelive>i was thinking about using classes to get tuples for free without changing the type system
<bonniot>+ syn sugar?12:00
<Bluelive>Tuple3<int,int,boolean>
for example
yeah im just not sure how to read the values from the tuple
<bonniot>ok, but can you make them covariant?
<Bluelive>example ?12:01
you mean assign to a double int boolean for example ?
yeah
<bonniot>yes. are your classes covariant? i thought you changed that12:02
<Bluelive>hmz
the change for int to double is something that doesnt work in any case right now
ehmz
<bonniot>ok, what about for class types?
<Bluelive>it would have to go through an explicit method call12:03
hmz12:04
damn :)
time for some paper
<bonniot>you can use more sugar... :-)12:05
<Bluelive>hmz12:07
this should work
:= wont work because its an assignment to a variable
so an explicit call is needed
http://cal018000.student.utwente.nl/wakka/wakka.php?wakka=Example212:08
something like that i guess
if int extended double anyways
:)12:09
neh wont be very powerfull if it isnt put into the type engine
maybe i should make an assignment operator for this such trouble12:19
<bonniot>GummiEnte: how are you doing with finding a testcase?12:51
<GummiEnte>I'm working on it... 12:53
<bonniot>from the message, it should have to do with an anonymous function12:54
<GummiEnte>Yes... I think I found something else... a java.lang.verify error.
<bonniot>also an initializer of the class Env12:55
<GummiEnte>No...
es, I'll send now something:12:56
package test8.A;12:57
class FOO<T> {}
class TestA {
{
this.foo((FOO<TestA> l) => {
System.out.println("ff");
return this;
});
}
void foo((FOO<TestA>) -> TestA f) {
(f)(cast(null));
}
}
void main(String[] args) {
TestA a = new TestA();
}
That doesn't make much sense...
...but it causes:12:58
Exception in thread "main" java.lang.VerifyError: (class: test8/A/dispatch, method: lambda1 signature: (Ltest8/A/FOO;)Ltest8/A/TestA;) Wrong return type in function
at test8.A.TestA.<init>(test.nice:1)
at test8.A.fun.main(~/Work/WorkingDirectory/e3m/src/test8/A:1)
at runtime
<bonniot>ok, reproduced here12:59
do you think it is related to the first case?13:00
<GummiEnte>Well, I don't think so...
... it was just some playing around...13:01
<bonniot>simplified it to:13:05
// PASS
TestA a = new TestA();
/// Toplevel
class TestA
{
{
let f = (String l) => this;
}
}
the compiler wrongly interprets 'this' inside an anon function inside an initializer...13:06
<GummiEnte>Ok...
In my complex environment I'm not using this in an anonymous function.13:07
So it must be something else.
I'm close to the second error...13:18
Ok, here the thing:13:30
package test8.A;13:31
class FOO<T> {
int getSize() = 1;
}
class TestA {
{
this.foo((FOO<TestA> l) => {
System.out.println(l.getSize());
});
}
void foo((FOO<TestA>) -> void f) {
(f)(new FOO());
}
}
void main(String[] args) {
TestA a = new TestA();
* arjanb joins
<GummiEnte>}
package test8.B;
import test8.A;
class TestB {
TestA a = cast(null);
{
a = new TestA();
}
}
void main(String[] args) {
TestB b = new TestB();
}
Ok, now compile test.A13:32
Then you might let it run... with test8.A.fun...
Hello arjan.
Then you can compile test8.B
The try to run test8.A.fun or test8.B.fun... Causes errors like:
Exception in thread "main" java.lang.NoSuchFieldError: lambda$Fn1
at test8.A.TestA.<init>(test.nice:1)
at test8.A.fun.main(~/Work/WorkingDirectory/e3m/src/test8/A:1)
<arjanb>hi
<GummiEnte>Please please let it be reproducable...13:34
<Bluelive>arjanb: what does my inspector show when viewing something written in nice ?13:36
<GummiEnte>Daniel, are you still on?13:37
<bonniot>yes, i'm here13:38
<GummiEnte>Ok...
<arjanb>Bluelive: that doesn't make difference with java13:39
<bonniot>i was looking at the other case
i might be close to a solution, but otherwise i will switch
<GummiEnte>:)
<arjanb>i will try reproducing the second case
GummiEnte: why do you have a main inside the class?13:41
<GummiEnte>Just to verify that it runnable...
... it is...
And, how it goes arjan?13:45
<arjanb>it's reproducable
<GummiEnte>Ok... puuh.
<bonniot>arjan, did you try to simplify it? do you have it in testcase format?13:53
<arjanb>not yet
what goes wrong here is that is that anymous function in the initializer is compile into package a.dispatch13:55
and when compiling package b and recompiling package a the anonymous function is lost
<bonniot>it could be in a.fun instead, i think 13:56
<arjanb>it isn't in a.fun13:57
<bonniot>it know, i'm saying we could change to make it there14:00
<arjanb>./// PASS14:08
. /// package a
. /// Toplevel
class TestA {
{
this.foo((String s) => {});
}
void foo(String->void f) {
(f)("xyz");
}
}
. /// package b import a
let x = new TestA();
<bonniot>yes, that works14:16
arjan, can you commit the testcase? (in compiler/classes/initializer.testsuite)14:17
<arjanb>committed14:22
<bonniot>thanks
everything seems to work well14:30
ok, the fix is commited14:56
<GummiEnte>I'll create a new compiler and test it... :)15:03
...seems to work :)15:09
<bonniot>:-)15:11
by letting AST and compiled code to be collected earlier, memory usage is again divided by 2 :-)15:22
so Christian, no problem anymore with current CVS, right?15:26
<GummiEnte>No, I'm quite pleased. :-) 15:33
<bonniot>great15:39
sorry for all the trouble
<GummiEnte>No problem.15:42
Ok, I'll leave for today. Thnx for all your support...16:48
bye
* GummiEnte leaves
<arjanb> java.lang.Error: Message not understood17:24
at nice.lang.dispatch.family(F:\Nice\classes\nice\lang)
at nice.lang.fun.readResolve(F:\Nice\stdlib\nice\lang:183)
at nice.lang.Enum.readResolve(enum.nice)
any idea what could cause this?
Method public static family (nice/lang/Enum ) -> java/util/List17:25
0 aload_0
1 invokestatic #127 <Method defaultpackage2/fun.family (Ljava/lang/Object;)Ljava/util/List;>
4 areturn
* arjanb leaves19:12
* Bluelive leaves
* arjanb joins19:16
* Bluelive joins
<bonniot>this message means that there is no matching implementation (which should never happen, unless you did not compile all packages together)19:46
can you show self contained source?
<arjanb>the matching implementation exist
see the diff i send by mail19:47
<bonniot>does the family method has a catch section in bytecode?19:48
from the part you show, it does not seem it can throw Error19:49
<arjanb>there is no catch19:50
<bonniot>what you showed is dispatch.family?
<arjanb>yes19:51
well the local dispatch.family19:52
the one in nice\classes:
Method public static family (nice/lang/Enum ) -> java/util/List
0 new #330 <Class java/lang/Error>
3 dup
4 ldc_w #332 <String "Message not understood">
7 invokenonvirtual #333 <Method java/lang/Error.<init> (Ljava/lang/String;)V>
10 athrow
<bonniot>so it's that one called19:53
why do you have two? what do you mean by local?19:54
<arjanb>in the nice\lang dir belonging to the test code19:55
<bonniot>what is the source code?19:56
<arjanb>just the testcases included in that diff19:57
it could be something wrong in my bootstrap process20:02
have you tried to apply the diff?20:26
<bonniot>not yet, i am in the middle of fixing the capture of this20:27
and i don't work to mix up the two :-)
but it's almost OK tnow
does the family testcase work?20:33
<arjanb>no same error
<bonniot>there was already a testcase with a capture of this in an initializer, and that's fixed now :-)20:35
i'll apply your patch
ok, i sent the changes21:02
i'm recompiling with your patch
btw, it's a good idea to serialize to memory rather than to a file :-)21:04
ok, it seems to be only a classpath problem. the default nice.lang.dispatch.family appears before the newly generated one21:09
did you try compiling to jar, outside the testsuite engine?
<arjanb>no21:10
<bonniot>i just tried the family case, and it does not fail
so I think this is something to fix in the testengine
i think no other test requires overriding a nice.lang method21:11
* bonniot is away: for diner
<arjanb>i can't fix it by changing the command line of the testsuite21:25
<bonniot>no, it's the part that loads the compiled code that needs changes21:42
is it working outside the testsuite?21:43
<arjanb>yes21:46
is it difficult to fix that?
<bonniot>i don't think so
<arjanb>i could workaround using an abstract java super class for Enum21:47
<bonniot>no need to complexify Enum21:49
i can get it working (except a cast in serialization.testsuite, but that might be a bug in the implementation)22:23
however it requires setting -runtime22:24
maybe i should default -runtime to "classes" if absent, since this is the normal case
(btw, you can remove let filename... in serialzation.testsuite)22:26
<arjanb>a cast in serialization.testsuite why?22:33
<bonniot>is it working for you?22:34
<arjanb>outside the testsuite yes
<bonniot>ok, i was a problem with the classloader caching an old version of the class, I think22:40
it's working now
<arjanb>:-)22:42
<bonniot>commited22:44
got rid of the custom classloader in the process :-)
<arjanb>could you commit my diff?22:48
<bonniot>i think you should do it22:49
there is at least one empty line change that is useless
<arjanb>well i have mixed my own tree
<bonniot>it seems that line should be removed completely
mixed with what?22:50
<arjanb>with the cvs tree
<bonniot>?
<arjanb>something went wrong with copiing things from cvs tree to mine so i can't compile right now22:52
<bonniot>what do you mean copying from cvs tree? you mean a cvs update?
<arjanb>i don't use cvs update for that22:53
<bonniot>so how do you do it?
<arjanb>just copy some dirs by hand22:54
<bonniot>from where?
<arjanb>from a local copied of the cvs tree22:55
<bonniot>well, mistakes can always happen when you do things by hand. why don't you use cvs update?22:56
<arjanb>i'm not sure about merging things23:00
and i want to start with a clean tree often23:01
<bonniot>cvs will report you if it found any conflict, while if you copy by hand you can erase your work by accident
if you want a clean tree, you can checkout one from CVS. you can have more than one CVS tree in different directories23:02
it's actually a good idea, if you work on different tasks at the same time
<arjanb>for multiple trees it would need to make another build script and i mostly work on a single thing23:07
<bonniot>can't your build script be relative to the current directory?23:08
<arjanb>i'm not a batch file expert23:10
<bonniot>isn't it enough to use relative names for directories/files?23:13
<arjanb>maybe23:15
but i have it working again
<bonniot>i don't see your point of no using cvs update, i just see the risk of erasing your work23:17
was is the problem with merging?
<arjanb>i forgot a file23:18
<bonniot>in your copy by hand?23:19
<arjanb>yes23:23
<bonniot>i see. i mean: what is the problem with letting cvs merge the sources?23:25
<arjanb>well maybe i'm just too stubborn to change how i do things after spend too much time getting it work23:30
<bonniot>what would you need to change?
<arjanb>a few scripts and myself23:33
<bonniot>what scripts fo you have?23:36
do
<arjanb>just a few batch files for building and doing cvs things
<bonniot>for building I understand. what cvs actions do they do?23:37
<arjanb>update diff commit23:39
<bonniot>why not just 'cvs update' by hand?23:40
<arjanb>because i have to use ssh23:41
<bonniot>yes, me too
but that works by hand
<arjanb>but that's a little easier in a linux than in a windows commmand prompt23:42
<bonniot>maybe23:43
my CVS/Root looks like: :ext:bonniot@cvs.nice.sourceforge.net:/cvsroot/nice
that's all it takes, it seems23:44
<arjanb>there something strange when running the testsuite now00:25
<bonniot>it hangs? :-)
<arjanb>yes
<bonniot>i know, working on it00:26
it's the contracts that get lost during recompiles
and ** has a contract that the param is positive. it loops otherwise
<arjanb>but right from start the jvm does strange that it use no cpu for a few seconds than continues again00:28
<bonniot>on what testcase?00:29
<arjanb>it happens all the time running the testsuite00:30
i don't understand why this can happen to a single threaded program00:40
<bonniot>why would it happen more to multi-threaded prg?00:45
<arjanb>because they often need to wait for something and threads can block each other00:49
<bonniot>how long does the jvm stop each time?00:51
<arjanb>that varies between .5 and 5 secs00:55
<bonniot>!00:56
<arjanb>even 10s
<bonniot>is this a consequence of the classloader change?
<arjanb>probably00:57
i haven't noticed it before
<bonniot>can you make sure?
<arjanb>the only change didn't have in my tree before is capture of this and the testsuite change00:58
<bonniot>the best way to make sure is to undo the changes, and try again01:00
cvs update -D "3 hours ago" :-)01:02
<arjanb>it's testsuite change01:04
<bonniot>do you see lots of disk activity?01:09
<arjanb>i can't see that
<bonniot>could you trace the stack when the activity stops?01:10
<arjanb>how?01:11
<bonniot>in windows, I think it's keys ctrl+break01:13
<arjanb>wtf01:17
<bonniot>sorry?
<arjanb> at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
* arjanb leaves
* arjanb joins01:18
at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)01:19
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:718)
at java.net.InetAddress.getAddressFromNameService(InetAddress.java:996
at java.net.InetAddress.getAllByName0(InetAddress.java:946)
at java.net.InetAddress.getAllByName0(InetAddress.java:918)
at java.net.InetAddress.getAllByName(InetAddress.java:912)
at java.net.InetAddress.getByName(InetAddress.java:832)
at java.net.URLStreamHandler.getHostAddress(URLStreamHandler.java:377)
- locked <033E1458> (a sun.net.www.protocol.file.Handler)
at java.net.URLStreamHandler.hashCode(URLStreamHandler.java:296)
at java.net.URL.hashCode(URL.java:872)
- locked <02A57B30> (a java.net.URL)
at java.util.HashMap.hash(HashMap.java:257)
at java.util.HashMap.containsKey(HashMap.java:335)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:279)
- locked <02A58420> (a sun.misc.URLClassPath)
at sun.misc.URLClassPath.getResource(URLClassPath.java:155)
at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
at java.security.AccessController.doPrivileged(Native Met
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)01:20
- locked <02A58160> (a java.net.URLClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
- locked <02A58160> (a java.net.URLClassLoader)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:217)
at nice.tools.testsuite.TestCase.runMain(TestCase.java:359)
at nice.tools.testsuite.PassTestCase.performTest(PassTestCase.java:46)
at nice.tools.testsuite.TestSuite.performTests(TestSuite.java:216)
at nice.tools.testsuite.TestSuite.<init>(TestSuite.java:85)
at nice.tools.testsuite.TestNice.performTests(TestNice.java:367)
at nice.tools.testsuite.TestNice.main(TestNice.java:193)
why does the classloader think that it should look on the internet? :-(01:21
i don't like programs doing this without asking
<bonniot>your machine is a part of the internet :-)
I used URLClassLoader with a list of file:// urls, so this is not surprising01:23
now, that the system takes so much time to resolve a local file URL is more01:24
although, given it is windows, sane behaviour is surely too much to ask ;-)01:25
could you make a full run of the testsuite?01:46
<arjanb>only that ** testcase is problem01:54
<bonniot>and if you disable that? i wonder what performace hit you get with the classloader change01:55
<arjanb>about twice as much time as far i can see on the cpu usage graph01:57
<bonniot>incredible02:01
it makes no difference on Linux02:08