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

Using timezone: Central European Time
* ChanServ leaves09:07
* ChanServ joins10:47
* ChanServ leaves11:10
* ChanServ joins11:14
* ChanServ leaves11:16
* ChanServ joins
* CIA-4 leaves11:32
* CIA-4 joins
* CIA-4 leaves11:33
* CIA-4 joins
* CIA-4 leaves11:34
* CIA-4 joins
* bonniot joins11:51
* ChanServ leaves11:59
* CIA-4 leaves12:00
* CIA-3 joins12:02
* ChanServ joins12:05
* arjanb joins12:17
<bonniot>hello arjan12:21
<arjanb>hi12:25
<bonniot>how are you doing?12:27
<arjanb>good but busy because it's the first week of an term12:28
<bonniot>did you pass your exams?12:30
i think i can handle two more cases of inference... ;-)12:42
<arjanb>it takes about a month to get results of exams so i have no idea12:46
so polymorpic typed variable are more complex than you thought?12:48
<bonniot>a bit :-)12:59
the tricky part is to handle them in cunjunction with overloading
but it's starting to work well now13:00
* rubber joins13:14
hello all together
I think I'm doing something wrong... Maybe you know how to circumvent the following error:13:15
Exception in thread "main" java.lang.IllegalAccessError: tried to access field java.io.FilterOutputStream.out from class testfieldaccess.fun
at testfieldaccess.fun.getOutput(fun.nice:4)13:16
at testfieldaccess.dispatch.getOutput(dispatch.nice)
at testfieldaccess.fun.main(fun.nice:3)
package testfieldaccess;
import java.io.*;
public class HTDataOutput extends DataOutputStream implements DataOutput {
?ByteArrayOutputStream getOutput() = (out instanceof ByteArrayOutputStream) ? cast(out) : null;
}
void main(String[] args) {
HTDataOutput htout = new HTDataOutput(new ByteArrayOutputStream());
?ByteArrayOutputStream bo = htout.getOutput();
}
<arjanb>it's a protected field maybe?13:26
<rubber>Yes.
Hello Arjan. :)13:27
But HTDataOutput should inherit all protected fields from DataOutputStream or not?
<bonniot>hi!13:28
<rubber>Hi Daniel.
:)
<bonniot>the pb is that the method is not implemented inside the class, so it does not have protected access13:29
there is no getter?
<rubber>in which class?
<bonniot>java.io.FilterOutputStream13:30
<rubber>No.
<bonniot>but you created the inside stream and passed it to the constructor, right?13:31
<rubber>In the example yes. I could think of a way to store the inside streams "twice", but would that be the solution?13:32
<bonniot>it's a workaround13:33
<rubber>ok.
<bonniot>if you create a subclass of FilterOutputStream, that would be quite clean
<rubber>But for the long turn it should be possible to access protoected fields, shouldn't it?
<bonniot>yes, it will
<rubber>Ok. :)13:34
Ok, I'm now using:13:43
new HTDataInput(InputStream in) {
this(lin: in, in);
}
public class HTDataInput extends DataInputStream implements DataInput {
InputStream lin;
?ByteArrayInputStream getInput() = (lin instanceof ByteArrayInputStream) ? cast(lin) : null;
}
new HTDataOutput(OutputStream out) {
this(lout: out, out);
}
public class HTDataOutput extends DataOutputStream implements DataOutput {
OutputStream lout;
?ByteArrayOutputStream getOutput() = (lout instanceof ByteArrayOutputStream) ? cast(lout) : null;
}
<bonniot>good use of custom constructors :-)13:44
why the instanceofs?
do you sometimes want something else than ByteArrays?13:45
<rubber>yes.
but I want only a specific handling for ByteArrays... So to check only if null...13:46
<bonniot>ok. so that's a helper method unrelated to the pb
<rubber>yes.
<bonniot>ok
<rubber>I would'nt even need the cast if written with if (cond) {...}{} I think, right?13:47
<bonniot>that's identical apart from the syntax
you need the cast because it's a field
<rubber>a, yes,... ok... no local variable.
<bonniot>(so it's not guaranteed it is still an instance when you use it ;-)13:48
<rubber>I need to implement threadsafety myself...
<bonniot>at the moment yes...13:49
<rubber>...you're working on it?13:50
<bonniot>not now, but it's something we will need to work on eventually
now i'm working on type inference13:51
<rubber>what in special?13:53
<bonniot>allowing you not to specify the type of local variables13:54
even if they involve type parameters:
let l = new ArrayList();
l.add("ABC");
l.add(0); // type error
<rubber>Great
* rubber leaves14:19
<Bluelive>argh, my ability to write paper seems reciprocal to writing code14:26
* rubber joins14:39
re
connection reset.. .(
<CIA-3>03bonniot * 10Nice/ (2 files in 2 dirs): 15:12
Handle typing checks that need rigidification while in existential mode
(by appropriate backtracking).
* soundas joins16:56
* soundas leaves16:59
<bonniot>arjan, still there?17:26
<rubber>Can I even reduce the following code?17:46
(String, String) getProxyInfo() {
}
Sorry, } was too early17:47
(?String ph, int pp) = c.getProxy();
return ((ph != null) ? ph : "", Integer.toString(pp));
}
<bonniot>you mean is there a shorter way to express this?17:59
return (ph || "", pp.toString());18:00
* ChanServ leaves18:20
* dopey_d joins18:22
* ChanServ joins
<dopey_d>hi18:23
does anyone here know nosica ?18:24
<arjanb>hi18:25
i have seen the website18:26
<bonniot>hi dopey_d
yes, i've seen some of their discussions too. why?18:27
<dopey_d>well
I was wondering if you also know if there is a project out there that is exactly inbetween nice and nosica
<arjanb>*away for meal*18:28
<dopey_d>all java syntax (and perhaps something more) but with a C intermediate language and ultra small binaries
as result
the problem with java/nice and gcj is that it still requires a ton of libs to get going
even if you write helloworld in it18:29
<bonniot>have you tried a jar shrinker?
<dopey_d>nope
the problem is libgcj c.s.
libgcj is required by everything gcj produces
and libgcj is 10MB18:30
I want to producse 100kB binaries
but in a java syntax
and only use libraries on a when-needed only
<bonniot>that's something that should be doable with gcj, no? split the libraries into smaller parts...18:31
<dopey_d>no, libgcj.so is one large blob
<bonniot>or using static linking, only link in what is really used
<dopey_d>that results in 800kByte HElloworld18:32
nosica is in intention ok
<bonniot>and aren't there tools that strip the statically linked binary?
<dopey_d>but the main coders have these weird thoughts about programming lanuages
and they change to change only
800kBytes was after 'strip'18:33
<bonniot>strip just removes debuging symbols, no?
i mean something that removes dead code
<dopey_d>don't know18:34
<bonniot>did you ask on the gcj mailing list?18:35
<dopey_d>hmm18:37
actually what I want is this: http://www.edg.com/jfe.html
but then opensource and under GPL18:38
<bonniot>you should really ask on the gcj list18:44
the difficulty is that with reflexion, it does not seem possible to know which code is dead...18:45
how does jfe handle that?
ah, i see there is discussion about this:18:47
http://gcc.gnu.org/ml/java/2002-02/msg00202.html
Helloworld=133kb gziped. that was is 2002, might have been progress since18:48
rubber: any experience with this question?18:51
<arjanb>*back*18:58
getting more programs work seems to be the priority of gcj now19:04
<bonniot>which is a good idea. but as long as anybody is interested in working on binariy sizes, it will happen19:10
it seems somebody is ;-)
http://gcc.gnu.org/ml/java/2004-02/msg00073.html
arjanb: did you notice the regression on flow4j?19:14
<arjanb>where can i get the current source?19:15
<bonniot>http://nice.sourceforge.net/tests/flow4j-src-latest.tar.gz
(in the test page, if you click on an error, it takes you to the relevant part of the logs. for flow4j that includes the download part, so the url can be found there)19:16
<CIA-3>03bonniot * 10Nice/src/bossa/syntax/ (typecheck.nice tools.nice): Use the known monomorphic type in assignments when possible.19:29
* bonniot is away: ...19:30
* dopey_d leaves19:31
* rubber leaves19:36
* rubber joins19:37
The binary sizes are a problem.
But I've read, that also the linker has got some problems, so that the binaries are too large. Don't know, if this was only for i386-mingw32 target...19:39
<arjanb>testcase for the flow4j problem:20:14
boolean b = false;
b = true;
});
});
hmm
boolean b = false;
[].foreach(int x => {
[].foreach(int y => {
if (true || false)
b = true;
});
});20:15
<rubber>Ok, I'll leave for today... CU20:44
* rubber leaves20:45
* CIA-3 leaves21:32
* Bluelive leaves21:35
* CIA-4 joins21:47
* ChanServ leaves22:20
* bonniot is back (gone 02:55:37)22:26
arjanb: thanks22:27
<arjanb>i have no idea why that code is broken now
* ChanServ joins
<bonniot>did you check when the pb appeared?
<arjanb>it works with 0.9.722:28
<bonniot>does it work just after the changes to put dispatch methods inside classes?22:40
<arjanb>no idea22:41
<CIA-4>03arjanb * 10Nice/testsuite/compiler/functions/clotures.testsuite: Testcase for bug in code generation.22:44
* Bluelive joins22:59
<bonniot>hi Bl23:02
<Bluelive>ellow23:03
working on this seriously annoying thing23:56
http://blue.student.utwente.nl/paper.txt
it is hosted on alpha :)
<bonniot>wdym hosted?00:03
<Bluelive>wdym ?00:04
<bonniot>waht do you mean?
<Bluelive>well the webserver is written in alpha00:05
it crashes all over the place because i just noticed that exceptions dont work correctly yet in constructors
<bonniot>ah ok. i thought it was about the content00:07
<Bluelive>yeah i need to write a paper on alpha
but my writing skills are nearly zero
<CIA-4>03bonniot * 10Nice/ (3 files in 3 dirs): 00:54
When checking polytype <: monotype, do not rigidify, since there are no need
type variables introduced before. This should be slightly faster, and most
importantly it allows existential type variables to be further constrained.
This also means that we should _not_ discard changes after the test.
* davidzee joins00:56
<bonniot>hi?01:00
* davidzee leaves
<bonniot>bye!
<CIA-4>03bonniot * 10Nice/stdlib/nice/lang/array.nice: The slice method on arrays overrides the slice method on Lists.01:12
<bonniot>i found the cause of the regression in flow4j01:24
it was indeed linked to the changes in compilation of dispatch
a one line fix is being tested ;-)
<arjanb>good night02:01
* arjanb leaves
<CIA-4>03bonniot * 10Nice/ (2 files in 2 dirs): Fix compilation of apply method for nested closures.02:49
* bonniot leaves02:57