Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-11 Thread Andrei Alexandrescu
http://www.infoq.com/presentations/Generic-Programming-Galore-Using-D Andrei

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-11 Thread Andrej Mitrovic
On 4/11/12, Andrei Alexandrescu wrote: > http://www.infoq.com/presentations/Generic-Programming-Galore-Using-D > > Andrei > Cool talk! And it just occurred to me that you can actually use a static assert on a return type in D, e.g.: import std.traits; import std.algorithm; auto min(T1, T2)(T1 t

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-11 Thread Olivier Pisano
Le 11/04/2012 18:23, Andrei Alexandrescu a écrit : http://www.infoq.com/presentations/Generic-Programming-Galore-Using-D Andrei Great talk ! I am going to start to feel at ease with those is(typeof(...)) constructs ! :) Olivier

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-11 Thread deadalnix
Le 11/04/2012 18:23, Andrei Alexandrescu a écrit : http://www.infoq.com/presentations/Generic-Programming-Galore-Using-D Andrei You didn't used the new syntax for closures :'( But nice talk. BTW, it seemed strange to me that you mentioned AST manipulation when talking about mixin, when you d

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-11 Thread Andrei Alexandrescu
On 4/11/12 11:23 AM, Andrei Alexandrescu wrote: http://www.infoq.com/presentations/Generic-Programming-Galore-Using-D Destroy on reddit: http://www.reddit.com/r/programming/comments/s4qul/infoq_generic_programming_galore_using_d_video/ Andrei

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-11 Thread simendsjo
On Wed, 11 Apr 2012 21:34:11 +0200, Olivier Pisano wrote: Le 11/04/2012 18:23, Andrei Alexandrescu a écrit : http://www.infoq.com/presentations/Generic-Programming-Galore-Using-D Andrei Great talk ! I am going to start to feel at ease with those is(typeof(...)) constructs ! :) Olivier

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-11 Thread Eldar Insafutdinov
On Wednesday, 11 April 2012 at 16:23:48 UTC, Andrei Alexandrescu wrote: http://www.infoq.com/presentations/Generic-Programming-Galore-Using-D Andrei Also on HN: http://news.ycombinator.com/item?id=3829871

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-11 Thread bearophile
Andrej Mitrovic: it just occurred to me that you can actually use a static assert on a return type in D, e.g.: import std.traits; import std.algorithm; auto min(T1, T2)(T1 t1, T2 t2) { return t1; // e.g. implementation bug static assert(is(typeof(return) == CommonType!(T1, T2))); }

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-11 Thread bearophile
Andrei Alexandrescu: http://www.infoq.com/presentations/Generic-Programming-Galore-Using-D It was a quite good talk. Slide 13: very good, I am asking for min([1, 3, 5)) for a lot of time :-) (http://d.puremagic.com/issues/show_bug.cgi?id=4705 ). I hope to see those new min/max/argMin/argMa

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-11 Thread Caligo
Question on slide #6: "Should work at efficiency comparable to hand-written code" A version of min() that used 'ref' would probably be faster on large structs. Is that a problem? How do you make the decision to exclude 'ref'? Do [generic] algorithms always go with value semantics? On Wed, Apr

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-11 Thread Jacob Carlborg
On 2012-04-11 18:23, Andrei Alexandrescu wrote: http://www.infoq.com/presentations/Generic-Programming-Galore-Using-D Andrei Nice talk. I noted a minor error in the slides. On several occasions you check for the "<" operator but then uses the ">" operator in the actual body of the function/t

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-16 Thread Denis Shelomovskij
11.04.2012 20:23, Andrei Alexandrescu написал: http://www.infoq.com/presentations/Generic-Programming-Galore-Using-D Andrei 27:17 It's valid to pass an empty list. Compilation will fail when T.length = 1 for 'x[1]'. Andrei is really looking embarrassed telling this like if he knows it's a

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-16 Thread Ali Çehreli
On 04/11/2012 11:28 PM, Jacob Carlborg wrote: > On 2012-04-11 18:23, Andrei Alexandrescu wrote: >> http://www.infoq.com/presentations/Generic-Programming-Galore-Using-D >> >> Andrei > > Nice talk. I noted a minor error in the slides. On several occasions you > check for the "<" operator but then u

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-16 Thread Andrei Alexandrescu
On 4/16/12 10:00 AM, Denis Shelomovskij wrote: 11.04.2012 20:23, Andrei Alexandrescu написал: http://www.infoq.com/presentations/Generic-Programming-Galore-Using-D Andrei 27:17 It's valid to pass an empty list. Compilation will fail when T.length = 1 for 'x[1]'. Andrei is really looking emba

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-17 Thread Denis Shelomovskij
17.04.2012 7:55, Andrei Alexandrescu написал: On 4/16/12 10:00 AM, Denis Shelomovskij wrote: 11.04.2012 20:23, Andrei Alexandrescu написал: http://www.infoq.com/presentations/Generic-Programming-Galore-Using-D Andrei 27:17 It's valid to pass an empty list. Compilation will fail when T.length

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-18 Thread SomeDude
On Tuesday, 17 April 2012 at 08:00:36 UTC, Denis Shelomovskij wrote: It's pity that a video is read-only and it isn't easy to fix slips of the tongue like this one. Maybe some notes can be added? Anyway, these (Andrei's and Walter's) videos are too good to not list them on the site. I've

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-18 Thread Jesse Phillips
On Wednesday, 18 April 2012 at 18:41:05 UTC, SomeDude wrote: I've cleaned up the wiki a bit and added them: http://prowiki.org/wiki4d/wiki.cgi?WhySwitch And thank you for doing that.

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-18 Thread Andrej Mitrovic
On 4/18/12, SomeDude wrote: > On Tuesday, 17 April 2012 at 08:00:36 UTC, Denis Shelomovskij > wrote: >> >> It's pity that a video is read-only and it isn't easy to fix >> slips of the tongue like this one. Maybe some notes can be >> added? >> >> Anyway, these (Andrei's and Walter's) videos are too

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-19 Thread Denis Shelomovskij
19.04.2012 4:11, Andrej Mitrovic написал: On 4/18/12, SomeDude wrote: On Tuesday, 17 April 2012 at 08:00:36 UTC, Denis Shelomovskij wrote: It's pity that a video is read-only and it isn't easy to fix slips of the tongue like this one. Maybe some notes can be added? Anyway, these (Andrei's an

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-19 Thread Jesse Phillips
On Thursday, 19 April 2012 at 09:42:43 UTC, Denis Shelomovskij wrote: D wiki is really a maze for me (or I just don't understand something?). It contains lots of outdated info mixed with some up-to-date info. I thought that D wiki is only for experienced D developers who know what is outdated

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-20 Thread SomeDude
On Thursday, 19 April 2012 at 00:11:29 UTC, Andrej Mitrovic wrote: On 4/18/12, SomeDude wrote: On Tuesday, 17 April 2012 at 08:00:36 UTC, Denis Shelomovskij wrote: It's pity that a video is read-only and it isn't easy to fix slips of the tongue like this one. Maybe some notes can be added? A

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-22 Thread Famous
I like your talk but how did you come to the conclusion that min(a) does not make sense? Cheers, Famous

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-23 Thread bearophile
Famous: > I like your talk but how did you come to the conclusion that > min(a) does not make sense? Do you mean the min of a single item is the item itself? This is right, but this case is better (more handy) left as function overload to ask for the min of a single given iterable. Bye, bearop

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-24 Thread Famous
On Monday, 23 April 2012 at 16:45:19 UTC, bearophile wrote: Do you mean the min of a single item is the item itself? Yes. This is right, but this case is better (more handy) left as function overload to ask for the min of a single given iterable. Would this transparantly work for an item an

Re: Video: Generic Programming Galore using D @ Strange Loop 2011

2012-04-24 Thread bearophile
Famous: bearophile: Do you mean the min of a single item is the item itself? Yes. This is right, but this case is better (more handy) left as function overload to ask for the min of a single given iterable. Would this transparantly work for an item and a set consisting of one item? I