Re: Metaprogramming in D : Some Real-world Examples

2009-11-24 Thread BCS
Hello Lutger, Walter Bright wrote: Looks like Bill Baxter is giving a presentation on D Nov. 18! http://www.nwcpp.org/ slides are there! Very pretty, I bet it was a fine presentation. The slides are informative, good examples. re: the slides, are they avalable in .ppt or pdf for us

Re: Metaprogramming in D : Some Real-world Examples

2009-11-22 Thread Long Chang
nice work

Re: Metaprogramming in D : Some Real-world Examples

2009-11-13 Thread rmcguire
Bill Baxter wbax...@gmail.com wrote: On Mon, Nov 9, 2009 at 4:09 PM, Walter Bright newshou...@digitalmars.com wrote: Looks like Bill Baxter is giving a presentation on D Nov. 18! http://www.nwcpp.org/ Yep, that's right, and I'd be quite grateful to you smart folks here if you could

Re: Metaprogramming in D : Some Real-world Examples

2009-11-13 Thread Bill Baxter
On Fri, Nov 13, 2009 at 11:38 AM, Tomas Lindquist Olsen tomas.l.ol...@gmail.com wrote: On Thu, Nov 12, 2009 at 8:24 PM, Bill Baxter wbax...@gmail.com wrote: On Thu, Nov 12, 2009 at 10:46 AM, Tomas Lindquist Olsen tomas.l.ol...@gmail.com wrote: On Tue, Nov 10, 2009 at 1:27 AM, Bill Baxter

Re: Metaprogramming in D : Some Real-world Examples

2009-11-12 Thread Bill Baxter
On Mon, Nov 9, 2009 at 6:03 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Bill Baxter wrote: On Mon, Nov 9, 2009 at 4:09 PM, Walter Bright newshou...@digitalmars.com wrote: Looks like Bill Baxter is giving a presentation on D Nov. 18! http://www.nwcpp.org/ Yep, that's

Re: Metaprogramming in D : Some Real-world Examples

2009-11-12 Thread Bill Baxter
2009/11/10 Denis Koroskin 2kor...@gmail.com: On Tue, 10 Nov 2009 03:27:20 +0300, Bill Baxter wbax...@gmail.com wrote: kprintf (a printf variant) in XoMB is a nice example imo. It accepts format as a template parameter, doing all the checks at compile-time (and more).

Re: Metaprogramming in D : Some Real-world Examples

2009-11-12 Thread Jacob Carlborg
On 11/11/09 17:58, grauzone wrote: Andrei Alexandrescu wrote: grauzone wrote: Don wrote: Christopher Wright wrote: grauzone wrote: You're not testing for types, you're testing if it compiles. Inside the tested block of code, all sorts of things could go wrong. You can't know if

Re: Metaprogramming in D : Some Real-world Examples

2009-11-12 Thread Nick Sabalausky
Bill Baxter wbax...@gmail.com wrote in message news:mailman.337.1258023453.20261.digitalmars-d-annou...@puremagic.com... Hi Nick, Thanks for the response. More below. However, the unescape() function used in traceVal looks like it might be a useful CTFE example. Some kind of compile-time

Re: Metaprogramming in D : Some Real-world Examples

2009-11-12 Thread Nick Sabalausky
Nick Sabalausky a...@a.a wrote in message news:hdgt9q$vt...@digitalmars.com... Bill Baxter wbax...@gmail.com wrote in message news:mailman.337.1258023453.20261.digitalmars-d-annou...@puremagic.com... Hi Nick, === Compile-time checking on types with non-identifier strings === That is kinda

Re: Metaprogramming in D : Some Real-world Examples

2009-11-12 Thread Jeremie Pelletier
Andrei Alexandrescu wrote: grauzone wrote: Don wrote: Christopher Wright wrote: grauzone wrote: You're not testing for types, you're testing if it compiles. Inside the tested block of code, all sorts of things could go wrong. You can't know if is(typeof(...)) really did what you wanted, or

Re: Metaprogramming in D : Some Real-world Examples

2009-11-12 Thread Andrei Alexandrescu
Bill Baxter wrote: On Mon, Nov 9, 2009 at 6:03 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Bill Baxter wrote: On Mon, Nov 9, 2009 at 4:09 PM, Walter Bright newshou...@digitalmars.com wrote: Looks like Bill Baxter is giving a presentation on D Nov. 18! http://www.nwcpp.org/

Re: Metaprogramming in D : Some Real-world Examples

2009-11-12 Thread Bill Baxter
On Thu, Nov 12, 2009 at 7:53 AM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Bill Baxter wrote: On Mon, Nov 9, 2009 at 6:03 PM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Bill Baxter wrote: On Mon, Nov 9, 2009 at 4:09 PM, Walter Bright newshou...@digitalmars.com

Re: Metaprogramming in D : Some Real-world Examples

2009-11-12 Thread Lutger
Bill Baxter wrote: ... This is almost just a preprocessor macro trick, except for this line: mixin( FoldStringsOf!visitMethodOf( [Sum, Product] ) ); The essence is to generate a bunch of methods from a list of names. I was thinking to include a similar example from the world of 3d

Re: Metaprogramming in D : Some Real-world Examples

2009-11-12 Thread Tomas Lindquist Olsen
On Tue, Nov 10, 2009 at 1:27 AM, Bill Baxter wbax...@gmail.com wrote: On Mon, Nov 9, 2009 at 4:09 PM, Walter Bright newshou...@digitalmars.com wrote: Looks like Bill Baxter is giving a presentation on D Nov. 18! http://www.nwcpp.org/ Yep, that's right, and I'd be quite grateful to you smart

Re: Metaprogramming in D : Some Real-world Examples

2009-11-11 Thread grauzone
Andrei Alexandrescu wrote: grauzone wrote: Lars T. Kyllingstad wrote: Jacob Carlborg wrote: On 11/10/09 01:27, Bill Baxter wrote: On Mon, Nov 9, 2009 at 4:09 PM, Walter Bright newshou...@digitalmars.com wrote: Looks like Bill Baxter is giving a presentation on D Nov. 18!

Re: Metaprogramming in D : Some Real-world Examples

2009-11-11 Thread Don
Christopher Wright wrote: grauzone wrote: You're not testing for types, you're testing if it compiles. Inside the tested block of code, all sorts of things could go wrong. You can't know if is(typeof(...)) really did what you wanted, or if something broke. You're testing, is everything

Re: Metaprogramming in D : Some Real-world Examples

2009-11-11 Thread Andrei Alexandrescu
grauzone wrote: Don wrote: Christopher Wright wrote: grauzone wrote: You're not testing for types, you're testing if it compiles. Inside the tested block of code, all sorts of things could go wrong. You can't know if is(typeof(...)) really did what you wanted, or if something broke.

Re: Metaprogramming in D : Some Real-world Examples

2009-11-11 Thread grauzone
Andrei Alexandrescu wrote: grauzone wrote: Don wrote: Christopher Wright wrote: grauzone wrote: You're not testing for types, you're testing if it compiles. Inside the tested block of code, all sorts of things could go wrong. You can't know if is(typeof(...)) really did what you wanted, or

Re: Metaprogramming in D : Some Real-world Examples

2009-11-10 Thread Denis Koroskin
On Tue, 10 Nov 2009 03:27:20 +0300, Bill Baxter wbax...@gmail.com wrote: On Mon, Nov 9, 2009 at 4:09 PM, Walter Bright newshou...@digitalmars.com wrote: Looks like Bill Baxter is giving a presentation on D Nov. 18! http://www.nwcpp.org/ Yep, that's right, and I'd be quite grateful to you

Re: Metaprogramming in D : Some Real-world Examples

2009-11-10 Thread Jacob Carlborg
On 11/10/09 01:27, Bill Baxter wrote: On Mon, Nov 9, 2009 at 4:09 PM, Walter Bright newshou...@digitalmars.com wrote: Looks like Bill Baxter is giving a presentation on D Nov. 18! http://www.nwcpp.org/ Yep, that's right, and I'd be quite grateful to you smart folks here if you could share

Re: Metaprogramming in D : Some Real-world Examples

2009-11-10 Thread Lars T. Kyllingstad
Jacob Carlborg wrote: On 11/10/09 01:27, Bill Baxter wrote: On Mon, Nov 9, 2009 at 4:09 PM, Walter Bright newshou...@digitalmars.com wrote: Looks like Bill Baxter is giving a presentation on D Nov. 18! http://www.nwcpp.org/ Yep, that's right, and I'd be quite grateful to you smart folks

Re: Metaprogramming in D : Some Real-world Examples

2009-11-10 Thread Bill Baxter
On Tue, Nov 10, 2009 at 4:29 AM, Lars T. Kyllingstad pub...@kyllingen.nospamnet wrote: Jacob Carlborg wrote: On 11/10/09 01:27, Bill Baxter wrote: On Mon, Nov 9, 2009 at 4:09 PM, Walter Bright newshou...@digitalmars.com  wrote: Looks like Bill Baxter is giving a presentation on D Nov. 18!

Re: Metaprogramming in D : Some Real-world Examples

2009-11-10 Thread Andrei Alexandrescu
grauzone wrote: Lars T. Kyllingstad wrote: Jacob Carlborg wrote: On 11/10/09 01:27, Bill Baxter wrote: On Mon, Nov 9, 2009 at 4:09 PM, Walter Bright newshou...@digitalmars.com wrote: Looks like Bill Baxter is giving a presentation on D Nov. 18! http://www.nwcpp.org/ Yep, that's right,

Re: Metaprogramming in D : Some Real-world Examples

2009-11-09 Thread Bill Baxter
On Mon, Nov 9, 2009 at 4:09 PM, Walter Bright newshou...@digitalmars.com wrote: Looks like Bill Baxter is giving a presentation on D Nov. 18! http://www.nwcpp.org/ Yep, that's right, and I'd be quite grateful to you smart folks here if you could share your meta-programming favorites with me!

Re: Metaprogramming in D : Some Real-world Examples

2009-11-09 Thread Andrei Alexandrescu
Bill Baxter wrote: On Mon, Nov 9, 2009 at 4:09 PM, Walter Bright newshou...@digitalmars.com wrote: Looks like Bill Baxter is giving a presentation on D Nov. 18! http://www.nwcpp.org/ Yep, that's right, and I'd be quite grateful to you smart folks here if you could share your meta-programming

Re: Metaprogramming in D : Some Real-world Examples

2009-11-09 Thread Nick Sabalausky
Bill Baxter wbax...@gmail.com wrote in message news:mailman.290.1257812868.20261.digitalmars-d-annou...@puremagic.com... On Mon, Nov 9, 2009 at 4:09 PM, Walter Bright newshou...@digitalmars.com wrote: Looks like Bill Baxter is giving a presentation on D Nov. 18! http://www.nwcpp.org/ Yep,