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

Using timezone: Central European Time
<GummiEnte>l12:03
:-)))
Ok, it is working again....12:04
<bonniot>do you log an error when the timezone is not found?
<GummiEnte>But, please don't ask me, why such an script error causes that strange behaviour in jvm...
Hmmm, lets try.12:05
<bonniot>i do ask you :-)
* Gummi2_log joins
<bonniot>what happened is that the timezone and webprefix options had " in them
<GummiEnte>No... Then something else is used... I thought it must be ths hosts default timezone.
* Gummi2_log leaves12:06
<bonniot>so you should log at least a warning
it would have hinted at the problem
<GummiEnte>Ok, but if they have a " in them, isn't the behaviour wrong?12:07
If you look at timezone.getTimeZone() it is quite easy to try to use another timezone...12:08
But to check, whether a given timezone is defined is not that hard either...12:09
<bonniot>what is the behaviour of getTimeZone("FooBar") ?
<GummiEnte>It returns GMT12:10
and in the log file is noted that GMT is used instead of FooBar
Well, not instead of is noted...
value12:11
Using timezone: Central European Time
<bonniot>so there was this message in the log files?
<GummiEnte>No, not in the logfiles but the chat-log... :)
I should include it.
<bonniot>what is the chat-log?12:12
I agree the API of TimeZone is not very clean
<GummiEnte>http://confer09.condor-edv.com/nice@freenode/2003-12-16.html
that was/is one chat-log...
<bonniot>they should rather return null, and you can choose GMT if you wish
<GummiEnte>and the log is the "debug" output...
Yes.
<bonniot>it seems there is not even a method to check if a timezone exists12:13
you can get the list of TZs
<GummiEnte>No, you have to iteratate over all available timezones and look if the id matches.
<bonniot>not even that, because there are abbreviations12:14
<GummiEnte>Right.
<bonniot>the " was also in webprefix, and that's probably what was causing the bug, no?12:15
maybe it is possible to make that more robust12:16
<GummiEnte>Yes, it was in webprefix, but I'm not sure, where exactly the error occurs.12:17
What we noticed was, that some parts of the concatenation take place and some other didn't.12:18
<bonniot>the problem is that no error occured, it was just weird behaviour!
hum, i think if you look at the raw source you will see the concatenation allright
<GummiEnte>So it is Ok to have code, that "explodes" the code?
I'm not sure about that...
<bonniot>what do you mean explodes?12:19
<GummiEnte>Well, lets try a concrete example.
String foo = "fff"+variable+"..."+"......"12:20
<bonniot>there is no problem with Nice, look at the output HTML
<GummiEnte>You mean, the HTML file was corrupt
<bonniot>well, invalid HTML
"<a href="+url_prefix+fileFormat.format(date)+url_suffix+">"+day_display.format(date)+"</a>"12:21
if url_prefix has a " in it, the HTML will have an odd number of "
<GummiEnte>Ah... Ok.. Now I see. So, it completly my error. 12:22
<bonniot>i suppose it does not make sense to quote the ", because a url should probably not have " anyway
<GummiEnte>Yes12:23
<bonniot>but you could check webprefix once at startup
<GummiEnte>I'll have to leave for lunch now.
<bonniot>btw, why don't you use relative URLs?
<GummiEnte>I'll release a new version when I come back.
<bonniot>it would be simpler!
no need for prefix at all, I think
<GummiEnte>Yes, so you could use "." in the webprefix...
<bonniot>why?
just put the name of the file12:24
<GummiEnte>Only needed, if the storeage of the files is in a different directory than the index.html
<bonniot>without prefix, it is taken relatively to the current page
yes, but what's good in that?
we generate the files, so we can decide where to put them
<GummiEnte>I thought for later index.html's of more than one logger.
One direcotry for each logger...12:25
but maybe only one overview index.html...
all maybe's...
We could make prefix=null the defualt behaviour...12:26
<bonniot>actually, it would be good if the code of the calendar was independent of Sualtam12:27
<GummiEnte>it is.12:28
<bonniot>great12:29
so it could be released as a Nice package?
<GummiEnte>I assume yes.
You can have a look at it, after I commited this afternoon.?
I really have to go now. We'll see us.12:30
<bonniot>ok, i will when I find the time :-)
gutten appetit!
<GummiEnte>Dankeschoen.
Tschuess.
* GummiEnte leaves
* arjanb joins13:20
<bonniot>hello arjan13:31
<arjanb>hi
<bonniot>how are you?13:33
<arjanb>good but busy with other things at the moment13:34
<bonniot>ok. good to know :-)13:35
<arjanb>i have not tried it yet but Bryn has an improved version the makecomplete batch working13:37
Bryn: "Only thing I noticed that's a little bit worrisome is that each time I bootstrap the compiler, the generated compiler gets between 1 and 5 bytes bigger than the last time, though it doesn't seem to hurt anything..."13:39
<bonniot>i first read "1 and 5 _times_" !13:40
<arjanb>:-D
<bonniot>i suspect this has to do with an entry in the constant pool of a class file13:41
<arjanb>NPE in compiler: new String(int x) = this("xyz");13:43
<bonniot>ach yes, we cannot add a constructor to a class in the JDK :-/13:44
will need to test that
do you have the testcase?13:45
<arjanb>no
<bonniot>fixed13:57
* GummiEnte joins15:39
Hello again.
<arjanb>hello
<GummiEnte>Hello.
Arjan, did you include foreah for maps to the stdlib?15:40
stdlib
<Any T, Any U> void foreach(Map<T,U> m, (T, U) -> void f) {
Iterator<T> ks = m.keySet().iterator();
T key;
U value;
while (ks.hasNext()) {
key = ks.next();
value = notNull(m.get(key)); // notNull because we got the key
(f)(key, value);
}
}Something like that?
<arjanb>i don't think so
<GummiEnte>Or even with Any ?U15:41
(that was not correct nice syntax I think, but you know what I mean...)
<arjanb>why ?U ?
<GummiEnte><Any T, Any U> void foreach(Map<T,?U> m, (T, ?U) -> void f) { ...15:42
<arjanb>U is both ?U and !U
<bonniot>hello15:43
<GummiEnte>hello
<bonniot>yes, if you write U it can be any type, including an option type15:44
<GummiEnte>But I need <Any T, Any U> void foreach(Map<T,?U> m, (T, ?U) -> void f) { as well as <Any T, Any U> void foreach(Map<T,U> m, (T, U) -> void f) {15:45
<bonniot>it's the same
<GummiEnte>really?
<bonniot>U can be any type, for for instance U could be ?String
when you don't want that, you can write <!T> ...15:46
<!U> i mean :-)
<GummiEnte>Hmmm. why the hell, I wrote the second/first case then=15:47
<bonniot>you wrote two methods?
<GummiEnte>yes
Why the following does not work then?:15:48
<Any T, Any U> void foreach(Map<T,U> m, (T, U) -> void f) {
Iterator<T> ks = m.keySet().iterator();
T key;
U value;
while (ks.hasNext()) {
key = ks.next();
value = m.get(key);
(f)(key, value);
}
}
<bonniot>what does not work?
<GummiEnte>The value m.get(key) cannot be assigned to value because it might be null.
<bonniot>ok
<GummiEnte>Is now U !U ?
<arjanb>get can allways return null15:49
<bonniot>no, it is any type, which _could_ be String, so it is invalid to write null in it
<GummiEnte>Yes, but said, that Any U means it can be ?U or !U...
<bonniot>yes, and inside the function we don't know which one (because it can be used with both)15:50
<GummiEnte>So now I'm confused.
<bonniot>With <U>, so can _use_ the method with both a null and a non-null type
when the compiler checks the implementation of the method, it makes sure that the implementation is correct in both cases15:51
when using the method, you can choose the U you want
when implementing the method, you must suppose the worst15:52
does that make sense?
<GummiEnte>ok, so the U value; should also geet checked for both cases?
<bonniot>yes: the assignment should be valid in both cases
<GummiEnte>so, isn't this a bit like ?U...15:53
<bonniot>(the compiler is not actually checking twice, but that's the idea)
it's like ?U when checking the implementation yes
<GummiEnte>...cause ?U is the least "Schranke"....
<bonniot>translation?
<arjanb>i have just added foreach on Map to the stdlib before i forget again15:54
<GummiEnte>lower bound
<bonniot>ok
yes, that's the idea
does that make sense?
<arjanb>GummiEnte the type of Map.get is a bit unusual:15:55
<K, K0, V0, V | K <: K0, V <: ?V0> ?V0 get(java.util.Map<K, V>, K0)=
native Object java.util.Map.get(Object);
<GummiEnte>;-)))
<bonniot>yes, but you don't really need to know that. the important point is that get can return null, always, even if the element type is non-null
<GummiEnte>K <: K0, V <: ?V0 <-- why this?15:56
<bonniot>i think the surprise was not about the type of get, but about the typing of U
<GummiEnte>yes
<bonniot>because the result can be null
even if V is not null15:57
<GummiEnte> K <: K0 <--?15:58
<bonniot>that's arjan's favorite :-)15:59
<GummiEnte>:?
<bonniot>ok, if he's busy i can explain16:00
if you have a Map<Button, String> object,16:01
you might want to call get(myWidget) on it16:02
where myWidget is a Widget, and Button a subclass of Widget
normally you would call get on a button, but myWidget could be a button after all16:03
K is Button, and K0 is Widget
is that clear?
<GummiEnte>give me a moment .
ok; the other way round also works, right?16:04
<bonniot>yes
<GummiEnte>even without k016:05
?
<bonniot>yes. only this direction need K0
<GummiEnte>Ok.
Now I understand <:
<bonniot>the other direction is the "normal" case
wow, you're learning fast :-))16:06
<GummiEnte>Well, hopefully. Please don't ask me questions about !U now... I don't like the implementation test to the lower bound. 16:07
<bonniot>?16:08
you mean you would like it to be different?
<GummiEnte>Well, I don't now at the moment... Must think about the consequences.16:09
<bonniot>it would be unsafe, it can tell you!16:10
it can show, too :
<T> T foo(T x) = null;
if you said: well, T might be a null type, let's allow null as a result16:11
then you would have errors at runtime:
let String s = "...";
let String s2 = foo(s);
<GummiEnte>:/
<bonniot>We know that s2 is not null, because of the type: we give T = String, we get T = String16:12
only, that's not true anymore
convinced?
<GummiEnte>Ok, for what purpose we use U without ? and ! ?
<bonniot>to mean: any type at all
!U: any non-null type16:13
<GummiEnte>ok, any type ... but wouldnt it more conviend to say any .... maybe-null type?
<bonniot>why?16:14
<GummiEnte>please wait a moment16:15
Ok, convinced. A map(U,?V) does also work with foreah.16:19
<bonniot>yes, it's really any type :-)16:20
<GummiEnte>:)16:21
I just thought I have had some problems with it.
<arjanb>*away for 2 hours*16:24
<bonniot>christian, was is your schedule for today?16:32
<GummiEnte>I'm just tidying up some calendar code, maybe add some comments, so that it may be included in a nice package.16:33
Now comes the functions that generates the calendar layout:16:39
writer.print(dcal.format(year_header: (int i) => "<table><tr><th>"+i+"</th></tr><tr><td><table><tr><td>\n",16:40
year_end: "</td></tr></table></td></tr></table>\n",
month_header: (String m) => "<table><tr><th>"+m+"</th></tr><tr><td><table>\n",
month_end: "</table></td></tr></table>\n",
month_display_pattern: "MMMMM",
week_column_header: "<tr><th></th>",
week_column_entity: String s => "<th>"+s+"</th>",
week_column_end: "</tr>\n",
week_column_display_pattern: "E",
week_row_header: (int i) => "<tr><td>"+i+"</td>",
week_row_blank: (int i) => "<td>"+i+"</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>",
week_row_end: "</tr>\n",
day_prefix: "<td align=\"center\">",
day_translator: (Date date) => "<a href="+url_prefix+fileFormat.format(date)+url_suffix+">"+day_display.format(date)+"</a>",
day_empty: "-",
day_does_not_exist: " ",
day_postfix: "</td>"));
I hope you like it.16:42
<bonniot>good idea to tidy up :-)16:48
and format is a method you defined?16:49
<GummiEnte>Ok, just again commited some variable renamings, that make the usage more lear.
Yes: String format(Week|Month|Year).
<bonniot>dcal.format(...)16:50
<GummiEnte>yes
<bonniot>look pretty generic :-)
<GummiEnte>Hopefully.16:51
<bonniot>did you know that you can omit the + in string concatenation?16:52
"<th>"+s+"</th>"
<GummiEnte>Yes, but only with the latest compiler...
<bonniot>can be written
"<th>"s"</th>"
0.9.5
<GummiEnte>btw. I think in the cvs we are still compiling 0.9.5 prerelease version and not 0.9.6...16:53
Ok, since yesterday I should be able to use it.
<bonniot>./bin/nicec -e --version [04:32 16/12/03]
Nice compiler version 0.9.6 prerelease (build 2003.12.16, 11:53:44 UTC)
Compiled using JDK 1.4.1
<GummiEnte>ok...
<bonniot>sorry
this is because i have updated NEWS, but not commited it16:54
<GummiEnte>Ah, ok.
<bonniot>i will commit
<GummiEnte>rubber@psrv:~/Work/WorkingDirectory/Sualtam > 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 (build 2003.12.15, 11:50:51 UTC)
Compiled using JDK 1.3.0
Copyright (C) 2003 Daniel Bonniot
<bonniot>yep16:55
it's in CVS now
<GummiEnte>thnx.
<bonniot>how have the most strange directory namings for a Unix guy:
. /site.opt/, /2ndHDD/home, .... :-)16:56
<GummiEnte>2ndHome?
Where this comes from?
<bonniot>i saw that some time ago. approximately
no?
<GummiEnte>Ok, it is my installation, but where do you know from?
<bonniot>you posted a message with that somewhere16:57
(no, i haven't cracked your machine :-)
<GummiEnte>Ah, Ok... I just thought you've already hacked my firewall...
;)
Well, that strange they aren't...:16:58
* bonniot almost made a blunder
:-)
<GummiEnte>;=
;=)
<bonniot>i thought we should open a different project for storing user libraries, like the calendar16:59
<GummiEnte>\/site is my NFS installation for somethig you would normally place under /opt.... so /site.usr and /site.var
<bonniot>ok17:00
<GummiEnte> /2ndHdd is the symlinked location for some files... but if backreferenced /home resolves to /2ndHdd/home...17:01
So, my client all appear with a "quite" normal environment... some scripts in the site directories and a new client machine can be set up in 20 minutes with my current installation.17:02
That helps as long as the fileserver works... :)
If a hdd crashes I have another one. If that also crashes, I onl have some tapes...17:03
...but ok... /site was not my invention. I copied the ideas from the university network.17:04
Ok, I'll leave now. Maybe we'll se us tomorrow... Have a nice eveneing.17:22
cu17:23
* GummiEnte leaves
<arjanb>*back*17:59
where do you think that Bryn iterator lib should be placed?19:01
<bonniot>probably not in nice.lang19:03
<arjanb>does Nice automaticly imports subpackages?19:04
<bonniot>no
does any language do?
<arjanb>i don't know19:05
you have seen the nice.lang.iterator directory being committed accidentally19:07
<bonniot>yes19:09
that would be fine
or maybe a more general one: nice.lang.functional?
<arjanb>that depends on Bryn's goals19:10
*away again*
making a project for a collection of libraries written in Nice is a bit early but why not20:00
do you have a place in mind where to put that project?
<bonniot>there are libraries arriving, so I think it's time, or the risk is to loose track of their source code, ...20:09
as I said, not decided yet
it could be SF
only they don't have Subversion yet20:10
<arjanb>i don't care much about the versioning system20:11
<bonniot>you should read about Subversion, then :-)20:12
sorry, i have to restart X, and i'll be away
cu
<arjanb>cu
* bonniot leaves
* bonniot joins21:40
hello again21:46
<arjanb>i just tried the modified batch files from Bryn and building is now almost as easy as using the makefile21:50
<bonniot>:-)
<arjanb>what about adding a default version of dateBuild.nice and MainClass to cvs21:52
<bonniot>why? they would not have acurate information21:57
<arjanb>because they can't be generated easily with a batch file21:58
<bonniot>complain to miscrosoft ;-)22:00
whatever their name is...
how do you do it? you could just keep a local version of those files22:01
<arjanb>now the batch copies just an default file to the correct location
<bonniot>and where is the default file?22:02
<arjanb>in the same dir as the the batch file
<bonniot>which is not \Nice ?22:03
<arjanb>in \Nice22:04
<bonniot>isn't that fine?22:05
<arjanb>if you are ok with having these files in the cvs22:07
<bonniot>i don't like that: CVS is for storing source material for history purposes. Those files should be automatically generated22:08
couldn't the batch file use 'echo' to write a default content, redirected to those files?22:12
<arjanb>maybe or i could add just some small txt file that explains how to build on win32 and what should be in these files22:14
<bonniot>you could add it there: https://sourceforge.net/docman/display_doc.php?docid=10738&group_id=1278822:15
or in a separate document for win32
but actually, a wiki page in Dev would probably be better
it's better not to accumulate different systems for documentation/dvelopment22:16
Wiki is better that those sourceforge docs
<arjanb>yes a doc on wiki for this would be good22:19
<bonniot>you are the win32 specialist22:22
and bryn can participate...
<arjanb>so i have 2 batch files now that could be added to cvs22:39
<bonniot>what do they do? why 2?22:45
<arjanb>makecomplete and maketest
<bonniot>what about putting them in bin/ ?22:46
<arjanb>that's possible but then i need to make some changes first22:51
<bonniot>ok22:52

Generated by Sualtam