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

Using timezone: Central European Time
<bonniot>good night00:01
<hallucinogenic>bon buit
nuit
bleh
Is that correct?
<bonniot>bonne nuit!00:03
<hallucinogenic>ah
<bonniot>(la nuit, c'est f?minin ;-)00:04
<hallucinogenic>No idea whacha talkin 'bout foo :P
I was trying to speak the couple of french words I heard once
hehe
<bonniot>quite close then00:05
;-)
<hallucinogenic>cool
<arjanb>hallucinogenic: do you have questions for today?00:20
* bonniot leaves
<hallucinogenic>no thanks arjanb00:22
<arjanb>good night00:23
* arjanb leaves
* hallucinogenic leaves00:25
* CIA-7 leaves05:20
* CIA-7 joins
* hallucinogenic joins07:09
* hallucinogenic leaves07:10
* hallucinogeni1 joins08:59
* hallucinogeni1 leaves
* CIA-7 leaves09:25
* CIA-7 joins09:26
* CIA-7 leaves
* CIA-7 joins
* CIA-7 leaves
* CIA-7 joins09:27
* CIA-7 leaves
* CIA-7 joins
* CIA-7 leaves
* CIA-7 joins09:28
* CIA-7 leaves
* CIA-7 joins
* CIA-7 leaves
* CIA-7 joins09:29
* arjanb joins09:31
* bonniot joins09:33
hi09:36
<arjanb>hi
i think a cast with a type is usefull in cases where the thing casted is used only once09:47
<bonniot>Bryn has written an extension of ranges to support semi-open ranges (1..) and indexing relative to the end. these ranges can be applied to lists to get a sublist09:48
yes, that makes sense. i'm wondering if it's more elegant to have the type first or second in the cast09:49
<arjanb>value.as(java.lang.String)09:50
<bonniot>it's elegant. but it does not stress the fact that the operation might fail. it looks like a conversion09:52
* hallucinogenic joins09:57
* hallucinogenic leaves
<arjanb>for ranges it make sense to have an exclusive last version to do slicing10:00
<bonniot>@-110:02
<arjanb>a..b this is inclusive b10:03
<bonniot>yes10:07
<arjanb>i think we could add an slice operator ':' that's only valid inside indexing brackets10:08
<bonniot>a..b-1 is exclusive :-)
whatever for?
<arjanb>using inclusive range for slice you need often to fiddle with the last index10:13
<bonniot>i recall proposing ..! to bryn, i'm not sure what happened to that10:16
having both .. and : would not be intuitive
and I don't see any reason to have an operator only inside brackets10:17
now we only support syntax for ranges in the compiler, all the rest can be done in a library
<arjanb>it make sense only inside brackets if it supports relative indexing10:19
* CIA-7 leaves10:21
* CIA-7 joins
<bonniot>it makes sense in any context where there is a size10:26
it can be guaranteed using different types of ranges that you don't use it where it does not make sense10:27
i'm not sure if Bryn's implementation does that, his patch does not seem complete10:28
<arjanb>could i see Bryn's patch?10:54
<bonniot>ok11:08
<arjanb>the use of @ looks odd to me11:22
<bonniot>in some languages they use negative indexes to count from the end, but that's not consistent. @ makes it explicit11:25
do you have another idea?
<CIA-7>03bonniot * 10Nice/stdlib/nice/lang/java.nice: Typo.11:30
<arjanb>either way isn't optimal but i know no alternative11:31
<bonniot>i wrote back to Bryn, so we'll know more later12:05
what about your testcases for dti?12:06
<arjanb>i will try to commit these today12:09
which directory they belong in?
<bonniot>compiler/typing/12:28
* CIA-7 leaves14:23
* CIA-1 joins14:24
03arjanb * 10Nice/testsuite/compiler/typing/dti.testsuite: Testcases for type inference that takes in account assignments, merging of branches at exit, not capturing variables before a closure declaration.15:26
<bonniot>for the FAIL cases, it's safer to include a FAIL HERE marker15:57
otherwise the test might seem to correctly fail, but for a wrong reason15:58
<arjanb>right16:17
i will be away for a day or 216:50
<bonniot>from when?16:51
i'll be away from saturday, for a week
<arjanb>over 10 minutes till friday evening or saturday16:53
<bonniot>ok16:56
i'm looking at allowing
class B extends A<String>
<arjanb>:-)17:03
bye17:04
<bonniot>bye
* arjanb leaves
* hallucinogenic joins17:59
<bonniot>hi18:06
<hallucinogenic>Hi daniel18:10
What would you say is the design philosophy behind nice?18:28
I mean when you think nice is going to have this feature X/syntax Y etc. what guides that?18:30
<bonniot>when I tried to sum it up on the website, I came up with:18:31
safety, modularity, expressivity
does that strike a chord?18:34
<hallucinogenic>Can you define expressivity?
Is is equivalent to terseness?18:35
s/Is is/Is it/
<bonniot>(looking up the word ;-)18:37
<hallucinogenic>"saying more with less"
<bonniot>terse: Elegantly concise; free of superfluous words
yes, that sounds good
:-)
for me, it goes in hand with the ability to build abstractions, to avoid boilerplate code18:38
anonymous functions are an example of feature that fall in this category18:39
multi-methods also help. for instance the visitor pattern is superfluous words when you have them18:40
<hallucinogenic>How open are you to doing various real cool concurrency extensions that others have done? Like E/Scala/Join/CSP based threads etc. and some of the standalone stuff for the same?18:41
Also, one thing I like about Ruby is their "Least surprise" philosophy
Does Safety include some of that or not?
<bonniot>least surprise and safety?18:42
<hallucinogenic>Or I should ask "Is Consistency a gorl?"
goal
ignore least surprise and safety
<bonniot>i agree with the least surprise principle. it's sort of implicit because it seems an obvious goal :-)18:43
about concurrency:
there is a plan to write tools for concurrency in a library18:44
<hallucinogenic>(Well implicit is not really better than explicit so asking explicitly ;) - go on)
<bonniot>it's Bryn Keller who has ideas about this
<hallucinogenic>I see
<bonniot>one thing I read about is futures, which I found really elegant
not sure how it relates to what you mentioned18:45
<hallucinogenic>futures rocks
<bonniot>:-)
<hallucinogenic>That's in E right?
<bonniot>i'm not sure where I read about them18:46
i definitely think that explicit synchronization is quite lowlevel, and one can do much better18:48
so yes, i'm very open to such features in Nice :-)
<hallucinogenic>That's great to find out :)
<bonniot>do you have precise ideas about what system you'd like?18:49
<hallucinogenic>Not at the moment no
Personally I think Ruby rocks but JRuby is not there yet ;)18:50
I like that language a lot
<bonniot>the implementation of JRuby is lacking?18:51
<hallucinogenic>I think Groovy will suck because they are too many cooks spoiling the broth
Last I read it is interpreted
I want something compiling to bytecode
<bonniot>having static typing helps there18:52
<hallucinogenic>But that's me - a one very uninformed guy ;)
<bonniot>well, you can also compile everything to Object, but then arithmetic will be horrible
<hallucinogenic>true18:53
Too much syntax also turns me off (e.g. Scale with it's XML datatype/syntax)18:54
Welp! Gotta run for a 1:1 with boss18:55
<bonniot>see you later then
<hallucinogenic>thanks and laterz
http://radio.weblogs.com/0100945/23:04
<bonniot>what's to be seen there?23:31
<hallucinogenic>Somebody is doing cookbook in Scala23:37
<bonniot>a Nice version would be interesting for comparison23:47
<hallucinogenic>exactly23:51
<bonniot>i'm afraid i don't have time to do it myself, but if you have specific questions don't hesitate. it could be a good way to learn a new language :-)23:53
<hallucinogenic>Come what may, I am downloading Nice today and starting on that23:54
:)
<bonniot>cool23:55
seen on comp.lang.java.help:
Can I overload the String type so that I can just write:
String s1 = "hello";
String s2 = s1.SomeMethod();
(where SomeMethod is a method he wants to write)
everybody's answer: impossible23:56
that cries for multi-methods :-)
<hallucinogenic>I started reading up on all the lamda the weblogesque terminology ;)23:57
multi-methods ... umm yes... yes multi-methods :)
so a trait in scala vs. a multi-method in nice?23:58
<bonniot>it's not a one-to-one correspondence, but they do overlap00:00
<hallucinogenic>so one can add methods to String class in nice?
and use them transparently?
<bonniot>but multi-methods let you write code that selects behaviour based on the type of several arguments, and I don't think you can do that naturally in Scala00:01
yes, here's the example I posted:
package test;00:02
private String someMethod(String s)
{
return s.substring(0,1);
}
void main(String[] args)
{
String s1 = "hello";
String s2 = s1.someMethod();
System.out.println(s2);
}
<hallucinogenic>aah interesting
now this is a global someMethod or a test.String.someMethod ?00:03
Restating: now this is a global "String.someMethod" or a "test.String.someMethod" ?
<bonniot>it's fully qualified name would be test.someMethod00:04
you can use it as soon as you import the package test
<hallucinogenic>ah I see00:05
thought so
but still, this is neat
<bonniot>the fact that it belong to package test is useful, in case you defined a method with the same name in another package. you would have a way to disambiguate them00:06
but as you see otherwise it's irrelevant00:07
* hallucinogenic leaves00:33
<CIA-1>03bonniot * 10Nice/ (11 files in 5 dirs): 01:21
Allow subclasses to have less type parameters than their parent, by
instantiation of some of their type parameters.
* hallucinogenic joins01:38
<CIA-1>03bonniot * 10Nice/NEWS: Spell-checked past items.01:42
<bonniot>bye02:03
* hallucinogenic leaves02:04
* bonniot leaves02:11

Generated by Sualtam