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

Using timezone: Central European Time
<arjanb>grmbl retyping...02:21
i want the unknowntype feature02:22
writing a retyping for a function used only once because it needs typeparams is annoying02:27
<lucp>i wonder how difficult it would be to integrate the unknown type into nice02:28
<arjanb>it exist already but isn't used yet for retypings02:30
atm methods with typeparams are ignored unless a retyping is provided02:32
but if the comiler make such arguments as List<UnknownType> then it turns up in error message and could even use cast on them02:35
<lucp>i see..02:41
<arjanb>what issues with nicec did you find during conversion?02:54
<lucp>hmm.. one issue appears to be that if a field is declared in a java class, extended by another java class, extended by a nice class, then that field wont be visible in the nice class.02:58
PolySymbol, FunSymbol, and MethodDeclaration.Symbol are converted.. i will send you a patch soon.. MonoSymbol cannot be converted any time soon.. too many references.03:02
<arjanb>i remember fixing finding of static fields in java super classes but i didn't realize the problem was more general :(03:10
<lucp>it appears to be. i haven't made a test case. i just made a quick work around.03:12
<lucp>i've sent the patch by email.03:17
<arjanb>got it
do you have any idea for a testcase using the java libraries?03:27
<lucp>most of the java libraries don't let you touch their fields directly.03:28
<arjanb>and the testsuite doesn't support testcases with java code03:29
<lucp>i have put a comment in my code where i was unable to access the field in the java super class.03:33
<arjanb>good, that code will stay for while03:35
there's no need for reflection04:16
<lucp>the needed class is not compiled yet..04:32
<arjanb>yes but you can use same trick as with that get method04:33
just adding boolean isFunSymbol() in VarSymbol04:38
<lucp>that will work too.. feel free to change it.04:39
<arjanb>my conversion of enumdefinition broke something, too tired to track down..04:40
your patch has to wait till tomorrow
<lucp>okay, goodnight
<arjanb>g'night04:41
* arjanb leaves04:42
* lucp leaves08:05
* Bluelive joins14:06
* arjanb joins14:26
* Bluelive leaves14:58
* cm_ joins15:08
* bonniot joins16:28
hi
<cm_>guten tag16:33
<arjanb>hello daniel16:45
<bonniot>hi16:53
i'm checking through the bug reports
didn't your log message in the fix to ClassDefinition have the wrong bug number?16:54
<arjanb>indeed
<bonniot>ok
btw, why are you using all lowercase for nice source filenames?17:01
<arjanb>it looks a little nicer to me than java style filenames17:05
<bonniot>it's harder to parse17:06
hum, the swtich of JavaClass to Nice breaks the bootstrap17:09
switch
unless I need to update other files17:10
<arjanb>i thought that conversion was ok since it works for me an Luc uses the makefile..17:11
<bonniot>ok, that's the change in AbstractInterfaceImplementation. you mentioned it changes the semantics. is it correct? does it fix testcases?
it works if you applay that change in AII.java17:12
<arjanb>it's correct17:13
<bonniot>what about testcases?17:14
<arjanb>oh i forgot to commit the testcase..
<CIA-10>03bonniot * 10Nice/src/gnu/bytecode/Access.java: Cleanup.17:20
03arjanb * 10Nice/testsuite/compiler/abstractInterfaces/existingClass.testsuite: Testcase for primitives implementing an interface.17:26
* lucp joins17:37
<arjanb>hello luc17:38
<lucp>good morning
<bonniot>hi luc
<lucp>hi Daniel.17:39
<bonniot>it's great to see you active on Nice!
<lucp>:)17:40
i like working on it.
<bonniot>then it's perfect ;-)
real open-source
<lucp>i have sent arjan several patches already.17:41
<bonniot>ok, and what's the status? they were applied?17:43
<lucp>a few of them have been applied.. i sent him another last night.. one has not been applied because it doesn't work completely: the one for the protected java methods, which you can obtain on the bug report.17:44
<arjanb>luc: i have soem problem to solve first before i can apply your patch of last night, i hope it's not blocking you18:24
<cm_>I can't find my physics reference book. Do any of you happens to know the moment of inertia for a rectangular block? A long shot I guess :-)
<lucp>arjan: no problem18:27
<arjanb>cm_: which one do you need? there's a list of them in my book..18:30
<cm_>arjanb: Along the center point of an arbitrary side.18:31
I could tranform it from to another point using the parallell axis theorem later18:32
<arjanb>1/12 * m * (a^2 + b^2)18:33
<cm_>arjanb: Great, thansk!
thanks
<arjanb>i thought you did bioinformatics...18:34
<cm_>arjanb: Yes I do but I was recommended for a job. (Game developing company). They wants me to impl. a physics engine - a test.18:36
<arjanb>sounds interresting18:37
<cm_>Yes, they are going to impl. a new platform for PS3 among others18:38
<arjanb>luc: there is no problem with finding java fields as long as they have no generic type19:04
<cm_>Is there a pattern to create mutable classes of boxed primitives in Java? (Integer, Double, etc mutable)19:05
<arjanb>no idea19:06
<cm_>Something similar to void f(out int x)
<lucp>arjan: right.. that would make sense.. in that case, the workaround is good.19:07
<bonniot>cm_: what about Ref<int>?
<arjanb>luc: no workaround is needed only a retyping of that field19:08
<lucp>how do you retype fields?
<arjanb>daniel: this show it would be good to have default retypings with UnknowType for typeparams19:09
<bonniot>isn't it already the case?
<arjanb>luc: see some on the top of the list retyping in tools.nice
<cm_>bonniot: Is that a nice class? I'm working in Java unfortionately. 19:10
<bonniot>cm_: yes it's Nice ;-)
<arjanb>daniel: no you only planned to implement that19:11
<cm_>bonniot: Too bad. I wrote my 3d-framework/editor before Nice was invented :)19:12
<bonniot>arjanb: I think it's done in some cases, but maybe not this one19:13
<cm_>bonniot: Btw, how is it going with the eclipse plug-in? 19:14
<bonniot>martin said he was starting on it
<arjanb>daniel: i think the unknowntype feature is only used with Class<T> things19:15
<cm_>bonniot: Ok, but not in CVS?19:16
<bonniot>i think he has just started19:17
<cm_>You get rather lazy when used to the superior Java support in eclipse. Starting emacs in nowadays out of the question when it comes to Java.19:19
<lucp>i use eclipse to work on nice :)19:23
<cm_>heh19:25
bonniot: Has he any experience with the eclipse API? I'm not a wiz but I have written 4-5 small plug-ins.19:28
<CIA-10>03arjanb * 10Nice/src/bossa/ (9 files in 2 dirs): Converted EnumDefinition.19:33
<arjanb>does anyone have java 1.5 installed? to check if bug #1070443 is reproducable..19:38
<bonniot>cm_: you want to contribute?19:39
<cm_>bonniot: I could at least support him.19:45
<lucp>i have it installed on my other OS...19:46
<bonniot>cm_: ok that's good20:04
it look like we should have a nice-eclipse mailing list, what do you guys think?
<cm_>bonniot: I could do API research and testing
good idea20:05
imo20:06
<lucp>can someone explain me the difference between var and let?20:23
<arjanb>let is final20:24
<lucp>ok thanks
<cm_>bonniot: I might have asked this before but is the nice compiler embeddable in its current state? (I'm thinking about the eclipse plug-in and error and warning annotation in the source code)20:39
<bonniot>cm_: partly. there is some API, but it can be refined20:40
<cm_>bonniot: Ok, things like syntax/semantic error correction is also very much dependent on the compiler API I would guess.20:42
eg, stub all non-impl. methods conforming the interface X.20:43
s/the/to
Among other features20:44
So logic already present in the compiler doesn't have to be re-implemented in the plug-in.20:45
<bonniot>yes, that's the idea20:56
so it's doable, obviously that needs some work
<cm_>Have you looked at the Java compiler API in eclipse?20:57
<bonniot>nope
<cm_>I reckon that the compiler was written specifically for eclipse20:58
bonniot: If you are interested the source could be browsed here: http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/21:02
<bonniot>yes. waste of resources ;-)
<cm_>Their ast design might be of interest21:03
<bonniot>i'm afraid I won't have much time to analyse it just now ;-)21:04
<cm_>heh, the lack of time is often (read always) a problem :-)21:05
You could perhaps guide martin to take a look21:06
<bonniot>that's the kind of things that can be discussed on nice-eclipse21:10
<arjanb>hmm closures in customconstructors are broken..21:22
<cm_>Certainly the best forum. The list will be set up at sourceforge?21:29
<arjanb>there is an older bug with that but the fix doesn't seem to work when capturing variables..21:30
daniel: any idea what's wrong?21:31
<bonniot>arjanb: what fix?21:44
cm_: yes21:45
<arjanb>of bug #96977721:46
<bonniot>yeah, it's a related but different bug21:49
btw, 'customconstructors': you do it in plain english too ;-)
<arjanb>i guess this one is for you to fix21:58
yeah maybe it's a reaction caused my annoyance at errors due to wrong casing21:59
<bonniot>wrong casing?22:00
<arjanb>upper/lower characters22:01
<CIA-10>03arjanb * 10Nice/testsuite/compiler/classes/constructors/custom.testsuite: Testcase for bug #1070579.22:15
03arjanb * 10Nice/src/bossa/syntax/enum.nice: Removed debugging statement.23:37
<arjanb>luc: do you use the testsuite?23:39
<lucp>yes.. each time i make major changes.23:43
<arjanb>with assertions enabled? i got a assertionfailed on a notNull you added23:46
daniel: why is make check not with assertions enabled in the makefile?23:49
<lucp>did not know assertions were not enabled.
<arjanb>it disabled by default in Sun's jvm :(23:51
<lucp>can you correct the problem? which test is failing?00:02
<arjanb>it was a very simple problem00:03
<lucp>ok00:04
<CIA-10>03arjanb * 10Nice/src/bossa/syntax/ (16 files): Converted PolySymbol and subclasses. (patch by Luc Perrin)00:24
<arjanb>your patches seem to contain tabs, can't your editor convert them?00:34
<lucp>i'll check.. i don't make a habit of using tabs.00:36
<arjanb>hmm what did i want to do today..01:27
<lucp>i have been converting ClassDefinition01:30
<arjanb>isn't that class used in a lot of places?01:32
<lucp>yes... i am leaving an abstract java class for it.01:33
<arjanb>that could work
what about calling AbstractClassDefinition TypeDefinition instead?01:36
<lucp>i simplified this.. there will be ClassDefinition and InterfaceDefinition, which extends the former.01:39
the toArray() method in collections yields a strange type.01:42
<U' | mlsub.typing.TypeSymbol < U'> ?U'[]01:44
<arjanb>the printing of types is odd sometimes..01:48
it returns maybe null array, you can use toArray without an array argument instead01:50
<lucp>ok01:51
<arjanb>i'm not sure having InterfaceDefinition extends ClassDefinition is a good idea..01:52
or if you need efficiency then use <T, U | U <: T> U[] fillWith(T[] array, Collection<U> collection)01:53
<lucp>there is only a few differences between class and interface. i have isolated those differences.01:56
<arjanb>i have no problems with moving more to a common base class but class and interface are conceptually different to me..02:00
<lucp>there can be separate classes.. in any cases, most of the functionality is now in the base class.02:04
how do you write a retyping for a constructor?02:09
<arjanb>for example: TypeParameters TypeParameters(List<Monotype>) = native new bossa.syntax.TypeParameters(List);02:11
<lucp>thank you
the only problem is that i cannot write it because the type i need is an inner class.02:16
<arjanb>what do you have now?02:17
does using ClassName$InnerClass help?02:19
<lucp>nevermind. i got it.. i had to write it like this:
MethodContainer.Constraint Constraint(TypeSymbol[], List<AtomicConstraint>, mlsub.typing.Monotype[], Location ) = native new MethodContainer.Constraint(TypeSymbol[], List, mlsub.typing.Monotype[], Location );
<arjanb>i see02:22
why do you put a space before ) ? i have never seen that before..02:23
<lucp>because i am a strange canadian! :)
it works better as MethodContainer$Constraint02:25
can that be fixed in the parser?02:26
<arjanb>the $ or using . ?02:27
<lucp>. should be allowed02:29
<arjanb>having no nasty inner classes in nice and we still need special cases handling them :(02:30
it's easy to add in the parser but i don't think the rest of the code can handle the dot02:31
<lucp>well, as long as a note about it is placed in the manual...02:33
<arjanb>no nicec should handle it eventually02:34
<lucp>toArray() without an argument is not working.02:35
<arjanb>what's the error?02:36
<lucp>nevermind, it is okay, however the type is even stranger than before.02:42
hmm... i'm having trouble with the implementation test.03:11
<arjanb>which test03:14