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

Using timezone: Central European Time
<DRMacIver>Is it just me, or is Nice amazingly brittle? It seems to pass test cases while failing on nearly equivalent real code.07:28
In particular it seems like abstract interfaces never work under any non-trivial circumstances.07:29
<arjanb>yeah it's brittle especially in the less used features07:32
<DRMacIver>I'm currently having a problem where I have an abstract interface which has a method with the signature "<Foo T> () -> T more(T original);" which the compiler simply won't let me implement, but I can't seem to reproduce the problem in a test case.07:36
Or at least not a test case which is any less complicated than the original code07:37
Ah, there we go. 07:39
Before I file a bug report, see anything wrong with this? http://eugeneciurana.com/pastebin/pastebin.php?show=44007:41
The error given is "Found: () -> test.Test. Expected: () -> T."
(Not that I really expect a bug report to do any good. I should try working on some of these myself, but working on the compiler is proving significantly harder than anticipated.)07:46
<arjanb>shouldn't the last line be <Foo T> () -> [T] more(T t);07:49
<DRMacIver>I don't think so. 07:50
The idea is that 'more' returns a generator for producing more elements of T.
(For context, I have a tree of nodes and more returns the children of that node. This is just bundled up in a convenience abstract interface to genericise the logic in a nice way)07:51
* arjanb isn't awake yet07:52
you might try 'finally implements' instead of 'implements'07:53
but it's more likely a bug
<DRMacIver>...
That works.07:54
What the hell?
Thanks
But what does 'finally implements' even mean?
Anyway, that fixes the problem in the general code as well. Thanks. That was a really annoying show stopper.07:55
<arjanb>i don't really know what it means but it has something to how it interacts with subtyping
<DRMacIver>ok07:56
<arjanb>i think it's somewhere in Daniel's papers
<DRMacIver>I take it this is another of those features which does not exist anywhere in the documentation? :)
Ah. I really need to read those. I've only skimmed.07:57
<arjanb>i tried to read them but didn't really understand
<DRMacIver>I think on skimming I felt that it would require a good deal of work to understand them, which is why I only skimmed at the time. :)07:58
* DRMacIver 's compsci background is a bit weak
Anyway, I suppose I'd better go to work.08:05
Thanks for your help08:06
arjanb: Ok. I figured out the behaviour on the walk to work.08:19
arjanb: It's correct. Just confusing, and could use a better error message.
arjanb: The problem is that if I subclass Test I'll need to override this method in order to make it work, as we'd be having Test2 returning a () -> Test08:20
arjanb: "Test finally implements Foo" prevents the type parameter in the definition of 'more' being bound below Test, so the typing now works.
* arjanb leaves09:58
* DRMacIve1 joins16:15
* DRMacIver leaves16:28
* DRMacIver joins16:34
* DRMacIve1 leaves16:48
* arjanb joins17:54

Generated by Sualtam