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

Using timezone: Central European Time
* ArtemGr joins04:38
* Artem joins05:03
<CIA-3>03artemgr * 10Nice/src/bossa/ (util/Location.java parser/Parser.jj): Use short source path in automatic assertion message.05:05
* ArtemGr leaves05:09
* Artem leaves05:15
* ArtemGr joins05:16
<CIA-3>03artemgr * 10tester/Project: Fixed issue with "exit 0" after the Ant build.05:30
* Artem joins08:05
* ArtemGr leaves08:10
* Artem leaves08:36
* ArtemGr joins
* Artem joins10:21
* ArtemGr leaves10:26
* Artem leaves10:28
* ArtemGr joins
* bonniot leaves10:52
* bonniot joins11:00
hi11:32
<ArtemGr>salute
<raboof>morning
<bonniot>ArtemGr: it looks like /bin/echo does *not* support escapes by default (without -e) on linux
(although the builtin zsh echo does)11:33
the advice is to used printf instead, as that should be portable
/usr/bin/printf11:34
<ArtemGr>have that one.
<bonniot>good11:35
could you please make the change?
<ArtemGr>all right11:36
just in case: http://www.freebsd.org/cgi/man.cgi?query=printf&apropos=0&sektion=0&manpath=FreeBSD+5.3-RELEASE+and+Ports&format=html
and echo : ) http://www.freebsd.org/cgi/man.cgi?query=echo&apropos=0&sektion=0&manpath=FreeBSD+5.3-RELEASE+and+Ports&format=html11:37
<bonniot>the story was that freebsd has the posix behavior, but not bash and /bin/echo on linux, for historical reasons... :-(11:39
<CIA-3>03bonniot * 10Nice/src/nice/tools/compiler/load.nice: 11:40
Do not report a compiler bug in load mode (nicedoc, ...) when the compilation
normally fails.
03bonniot * 10Nice/src/nice/tools/doc/api.nice: 11:45
Added explicit message when nicedoc generation failed because of errors in the
source code.
<ArtemGr>i had a curios scenario today: my program uses URLClassLoader to load the entire app into security sandbox; the loader has been written recently in Nice. Application uses Nice to compile templates at runtime. The problem is: some of the Nice classes are loaded using bootstrap classloader, in particular, the nice.lang.rawArray is. Then "Class.forName" used in nice.lang.rawArray doesn't see classes 11:47
from the main Nice jar when later it is used under URLClassLoader during nicec compilation. Workaround currently is to include "Class-Path: nice.jar" into the loader Manifest, so that entire nice.jar is visible to the bootstrap classloader.
<bonniot>hum
interesting
do you think you could write a short testcase that reproduces this?11:48
<ArtemGr>sure
Solution to this problem would be to replace Class.forName() with Thread.getCurrentThread().getContextClassLoader().loadClass().
<bonniot>ok. any downside to that?11:49
<ArtemGr>not that i know of; getContextClassLoader does a different security check, but that hardly matters; performance shouldn't be worse; should write a convenient method for this (for example, Jetty has 'Loader.loadClass()' method for this)11:52
* Artem joins11:56
* ArtemGr leaves12:02
* Artem leaves12:03
* ArtemGr joins12:04
<CIA-3>03artemgr * 10Nice/regtest/regtest: Use /usr/bin/printf for escape sequences.12:40
* inigo joins15:34
Hi15:36
<ArtemGr>salute
<inigo>I joined the channel to ask about the list slicing syntax [1..4] etc.
But I think I've just found out what I was doing wrong anyway
I was trying to do [1..10] as a list of the numbers [1,2,3,4,5,6,7,8,9,10]15:37
But, I see, that would only work if I'd defined a list of those numbers already, and was slicing it
Right?
<ArtemGr>[1..10] should generate a pseudo-list wich generates numbers from 1 to 1015:38
for( num : [1..10] ) println( num )
<inigo>Oh... I was doing something that should work, then
Is that in the 0.9.10 release?15:39
<ArtemGr>yes
<inigo>For (num : [1..7]) println("Num is " num);15:42
gives me "Num is nice.lang.Range@31c89c"
<ArtemGr>sorry.15:44
for( num : 1..10 ) println( num );
[1..10] is a List<List<int>> ...
<inigo>Ah - got it working now. Thanks15:45
<ArtemGr>List<List<int>> example: for( range : [1..10,1..5,9..12] ) for( num : range ) println( num );15:47
<inigo>Neat :)15:48
<raboof>http://nice.sourceforge.net/coverage seems to be missing16:01
i guess it's not yet time to add a `success stories / projects that use nice' because there aren't many?16:06
(to the site)
<ArtemGr>IMHO, percent of published (vs. unpublished) succes stories is usually low, unless authors are specially looking for them (and freeware authors are usually aren't), so the situation reflects that Nice is not as widespread, yet.16:10
<bonniot>doesn't ArtemGr has one such success story ? ;-)16:12
<ArtemGr>not yet
it's only evolving. : )
<bonniot>raboof: what are you expecting at http://nice.sourceforge.net/coverage ?16:13
<raboof>bonniot: not sure, but there's a link to it on nice.sf.net16:25
<bonniot>from where?16:35
<raboof>under `Development'16:36
on the left
<bonniot>ah yes, that were the coverage tests results16:37
* inigo leaves16:51
* inigo joins17:03
* inigo leaves17:06
* inigo joins17:07
Are there any docs describing what public-read and private-write do?17:21
<bonniot>not sure, it's not implemented yet17:23
although it should come soon ;-)
basically, a public-read field is public in access and default (package) in modification17:24
<inigo>OK - the compiler suggested that it was a keyword I could use, and I was curious
<bonniot>clever compiler ;-)
<inigo>I see - and a private-write is default in access and private in write
<bonniot>yes17:25
and you can cumulate them too: public-read private-write
would get/set look better than read/write ?17:27
<inigo>Not sure - more familiar from JavaBeans getters and setters
But maybe less clear to people who aren't already familiar with Java17:28
<ArtemGr>i like read/write more. but there should be some shortcut. what would it be? variant: (pubget, priset)17:29
+r -w17:30
the latter is cook, it is looks like UNIX filesystem permissions
s/cook/cool/17:31
<bonniot>but a bit cryptic, no?
<ArtemGr>+r-w
<inigo>+r and -w imply to me that -r and +w are possible too, which probably wouldn't make much sense17:33
<bonniot>it wouldn't
<ArtemGr>it's not verbose, but it's intuitive enough and easy to remember17:34
-r+w makes sence
"out" in IDL
<bonniot>but that's for methods, not fields, right?17:35
<ArtemGr>ehm, or maybe "in" ? : )17:36
in IDL it is for method arguments
there IS sence setter-only fields, i even read about it somewere
<bonniot>motivation?17:37
another option is to use a "positional" syntax: first read, then write17:38
so public-private would be public read, private write
public-package, ...
<ArtemGr>just useful in some special cases, how about producer/consumer case for example
<bonniot>public is a shortcur for public-public
that leaves open the possibility for private-public ;-)17:39
<ArtemGr>positional is harder to remember
<bonniot>yes, a bit
although you always say get/set, not set/get I think
and read-write, not write-read
<ArtemGr>rwx, yes, but it's less intuitive nevertheless17:40
<bonniot>how would you write public-read package-write in your syntax?17:41
<ArtemGr>+r17:42
<bonniot>hum, that's not very explicit
you have to remember lots of conventions to understand it17:43
<ArtemGr>public-read, protected-write, from UML: +r#w
i don't thing _shorthands_ should be explicit (verbose). public-read is explicit17:44
<arjanb>if the read and write access aren't symmetric then i expect an explicit getter or setter
<ArtemGr>so +r is ok for a shorthand
you wont write, i suppose, "public-read package-write" always, you will write only the "public-read", becouse "package-write" is default. so why enforce verbose notation for shorthands if there isn't for verbose notation?17:47
<bonniot>ArtemGr: i'm not sure we want two syntaxes. you need to know both when reading code anyway, so it's better to have a standard
<arjanb>if a modifier on a explitict getter/setter override the one on the field we don't need additional keywords17:48
<bonniot>arjanb: i think assymetric access is very common, so i'm not too keen on forcing writing explicit accessors in that case17:49
<ArtemGr>bonniot: my opinion is that "public-read package-write" is too big, it clutters the code, making it hard to read
<bonniot>ArtemGr: agreed. so i'm looking for a shorter but still explicit syntax to replace it, not an additional one17:50
actually public-read would be enough, since package-write is the default
but for public-read private-write, agreed17:51
<ArtemGr>ok, "public-read private-write" ; )
<bonniot>yeah
i think public-private could be the good compromise
you need to know only one thing: get comes before set17:52
public-private is still a bit long, but much less than writing getters and setters!
does that sound realistic to all?17:55
<ArtemGr>how does it look when i need to modify only read or only write?17:56
<bonniot>modify? from package?
public-package
<ArtemGr>public-private is "+r-w". what whould "+r" looks like? "public-package" ?17:57
i see
<bonniot>a bit long, but quite consistent
that's very important17:58
that's better than the previous public-read private-write, which was asymmetrical
<ArtemGr>perhaps we have different customs, but logically i can't agree. public-read is obvious without additional knowledge. public-private - not.17:59
you want to make it obvious, but contradicting yourself by forcing the programmer to remember something.18:00
<bonniot>i agree public-read private-write is the most descriptive18:01
it's just awfully verbose
<ArtemGr>+r-w is not ;-j18:02
<bonniot>(my above about assymetry does not apply, since you could allow public-write and private-read)
yes, but then it's very cryptic
there are several criterias to meet, so a compromise needs to be found18:03
language design at its essence ;-)
<ArtemGr>even "r- / -w / rw" is better than "public-private" becouse is is obvious is there acces (rw) or no (-)
that would be read-, -write, read-write18:04
no private modifier, though
what about +get-set ?18:05
<bonniot>with + meaning public and - private?18:06
<ArtemGr>yes
<bonniot>that's confusing, no? you would think -set means "no setter"
<ArtemGr>private setter is equivalent to no setter, no?18:07
<bonniot>an advantage of public-private is also that it is more easily seen as an extension of the existing public and private
no setter could mean "final"18:08
public would be a synomim for +get+set, right?
<ArtemGr>confusing has two meanings: non-descriptive, counter-intuitive. i think functional languages are generally non-descriptive, but anyway, it is much more important to be intuitive then descriptive, the manual exists to describe things, the intuition - to remind what was described.18:10
intuitive language reminds, counter-intuitive misleads.
public: +get; package: get; private: -get18:11
public-private looks pretty (i agree), until you need to remeber what is public and what is private, which might not be so easy if you thing about something else18:13
s/thing/think/18:14
<raboof>(bah. stupid wikispam :))18:15
<bonniot>first, that's only one thing to remember. with +get you equally need to remember that + means public and - means private
and if we want to add new keywords (protected), you would need more symbols, which would be even less obvious18:16
<raboof>`pubget-privset'?
<ArtemGr>you don't need to remember this, it's a common sence, the '+' actually reminds about itself
<bonniot>i don't think it's common sense18:17
to me it evokes adding and substracting
<ArtemGr>+ is increase (access) - is decrease
exactly. add almost equal to grant, and substract to revoke18:18
<bonniot>i agree you can remember it if it was explained already. i don't think everybody would guess it
and how would you support protected, for instance?
raboof: yeah, pubget has all the info, and is short. it just looks weird! ;-)18:19
<raboof>true, dat ;)
hm, `gcj fibi.jar' complains about not finding libgcj.spec, ring any immediate bells?18:20
<ArtemGr>"i don't think everybody would guess it" - i learned Nice two monthes ago. i can say i could guess almost nothing from the syntax. it must be described first.
<bonniot>raboof: feel free to remove the spam you encounter if you have the energey
<raboof>bonniot: yeah, i remove it when i bump into it (twice now)
<bonniot>raboof: yes. you need to install some more package. what system are you on?18:21
raboof: thanks a lot!
<raboof>debian sarge - no problem, i maintain a wiki also, i know the pain :)
<bonniot>ArtemGr: really? you mean the bits different from java?
raboof: apt-get install libgcj5-dev, I think18:22
<ArtemGr>bonniot: yes and yes
<bonniot>what for instance?
raboof: btw, you need gcj as recent as possible, it's still moving fast18:24
<raboof>sweet. installing libgcj4-dev indeed did the trick (i'm currently still on gcj3.3)
ah ok :)
upgrading then :)18:25
<bonniot>you can always try, but 3.4 should already be better
<raboof>(man i love apt ;))
<bonniot>me too ;-)
i've been working with gcj upstream to report them all the bugs revealed by nice
<raboof>sweet18:26
open-source goodness at work
<bonniot>yep
http://nice.sourceforge.net/tests.html
they still have 5 regressions on our testsuite...
all reported
"regressions"18:27
<ArtemGr>bonniot: imports, constructors, initializers and named parameters, parametrization, tuples, enumerations, let and var meaning, arrays, anonymous functions, infanceof casting, interfaces18:29
<bonniot>yeah, i guess it all depends on your background (you're mainly C++ right?)18:30
i have done little C++, so i'm not too influenced by it18:31
<ArtemGr>any programming language is not an english or french, it isn't possible to read it not knowing what's going on. it isn't possible to make it descriptive enough without it being exactly equals to english (and requires human being to process)
<bonniot>agreed ;-)
<ArtemGr>my background includes machine codes, assembler, pascal, VisualBasic, perl, c++, haskell, lisp. i don't thing background will change my opinion on the meaning of "+", though.18:33
s/thing/think/
<raboof>the nice.deb from the site is the latest version?18:34
<bonniot>from sf.net, yes. 0.9.1018:35
<raboof>i'm getting a faulty executable with gcj5 and nice (0.9.8) from debian
trying the newest now
<bonniot>faulty how?
ArtemGr: you didn't answer about protected18:36
<raboof>java.lang.NullPointerException on startup
<bonniot>trace?
<raboof>at nice.lang.fun.println(java.lang.Object) (Unknown Source), at _Jv_InitClass (/usr/lib/libgcj.so.5.0.0)
<bonniot>you tried java -jar first, of course?
<raboof>yeah, that was ok18:37
<bonniot>upgrading nice is a good idea anyway, but it's not very likely to fix it
<raboof>the .jar file produced in the process of generating the executable works fine with java -jar, too18:38
<ArtemGr>bonniot: there is a UML standard, having (multi-language!) symbols for public, private _and_ protected. protected is # (fence)
<raboof>so i guess the problem is more at the gcj-side
<bonniot>ArtemGr: ah, ok
<ArtemGr>UML and OO design is my background too ; )18:39
<bonniot>i see that ;-)
btw, a team of 5 engineer students contacted me because they are starting a last-year project of building nice plugins for some UML design tool, with eclipse, nicedoc and niceunit integration...18:41
<raboof>hum, now `Native compilation with gcj failed, threads.nice: In class `nice.lang.NiceThread':'. but i'll get back at this later18:42
first i'll tidy up a bit before gf arrives :)
<bonniot>:-)
if you want, you can send me the jar, I could try it with cvs version of gcj to see if it's not fixed
<ArtemGr>bonniot: cool. what tool, if it's not a secred?18:43
<bonniot>checking... i remember reading it was the "challenger" tool, not the dominant one
magic draw18:44
+ mia generation
<ArtemGr>wov, i currently use it
<bonniot>cool
* Bluelive joins20:07
* ChanServ leaves20:56
* ChanServ joins20:57
<Bluelive>ellow21:05
<ArtemGr>great21:06
<Bluelive>ok21:08
<bonniot>what's up?21:17
* inigo leaves21:47
<Bluelive>working on getting a new pluk codegenerator working21:48
want to build a distributed processing environment using it
have some com+ inspired ideas i want to try out crossplatform21:49
hows nice progressing ?21:52
btw those double wide references are great when making proxy's to remote data21:53
* Bluelive_ joins22:39
* ArtemGr leaves22:47
* Bluelive leaves22:57
* Bluelive_ leaves23:42