Re: A tutorial on D templates

2012-02-08 Thread deadalnix
Le 14/01/2012 19:26, Walter Bright a écrit : On 1/14/2012 12:36 AM, Jonathan M Davis wrote: I confess that it's a bit of a pet peeve of mine when people insist on avoiding words like you and your. I completely disagree that it's a problem. And there are times where avoiding it can cause

Re: A tutorial on D templates

2012-02-08 Thread deadalnix
Le 14/01/2012 19:36, Walter Bright a écrit : Another issue is Kindle is black white, so while the colored text does make it better, it should still be usable if rendered in black white (which should be done anyway, as many people are color blind). A good practice is to back up coloring with

Re: A tutorial on D templates: updates

2012-01-30 Thread Mattbeui
On Sunday, 29 January 2012 at 20:44:00 UTC, Philippe Sigaud wrote: Hello, I posted there a few weeks ago about a tutorial on D templates I put in github: https://github.com/PhilippeSigaud/D-templates-tutorial/blob/master/dtemplates.pdf . . . As before, do not hesitate to read, comment, post

Re: A tutorial on D templates: updates

2012-01-30 Thread bls
On 01/29/2012 12:44 PM, Philippe Sigaud wrote: Hello, I posted there a few weeks ago about a tutorial on D templates I put in github: https://github.com/PhilippeSigaud/D-templates-tutorial/blob/master/dtemplates.pdf Since then, I received numerous mails, issues, advices and thanks. Thank

Re: A tutorial on D templates: updates

2012-01-30 Thread Philippe Sigaud
On Mon, Jan 30, 2012 at 13:07, bls bizp...@orange.fr wrote: First of all thank you so much for this wonderful book! Thanks! I would like to ask for a little enhancement regarding mixin templates. see snippet. Yes, this section is still bit short. But, what enhancement are you talking about?

Re: A tutorial on D templates: updates

2012-01-30 Thread bls
Hi Philippe, Ok, something more interesting it combines suggestion 2) and 3). Still a quick hack, not much tested, but I think the intention is clear. The snippets show how a publisher subscriber pattern can be mixed in. Further it shows how a simple class could become a stack, queue, list

A tutorial on D templates: updates

2012-01-29 Thread Philippe Sigaud
Hello, I posted there a few weeks ago about a tutorial on D templates I put in github: https://github.com/PhilippeSigaud/D-templates-tutorial/blob/master/dtemplates.pdf Since then, I received numerous mails, issues, advices and thanks. Thank to you all! Following the ideas found in TDPL, I

Re: A tutorial on D templates: updates

2012-01-29 Thread Andrei Alexandrescu
On 1/29/12 2:44 PM, Philippe Sigaud wrote: Hello, I posted there a few weeks ago about a tutorial on D templates I put in github: https://github.com/PhilippeSigaud/D-templates-tutorial/blob/master/dtemplates.pdf Since then, I received numerous mails, issues, advices and thanks. Thank to you

Re: A tutorial on D templates: updates

2012-01-29 Thread Philippe Sigaud
On Mon, Jan 30, 2012 at 06:16, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Great! Just give me the green light when you feel this is reddit-publishable. That should be OK now, thanks.

Re: A tutorial on D templates

2012-01-17 Thread Philippe Sigaud
On Tue, Jan 17, 2012 at 02:49, Nick Sabalausky a@a.a wrote: dennis luehring dl.so...@gmx.net wrote in message news:jeu3mf$94o$1...@digitalmars.com... https://github.com/PhilippeSigaud/D-templates-tutorial/blob/master/dtemplates.pdf ...with acrobat reader... Eewww.  Do youself a favor

Re: A tutorial on D templates

2012-01-16 Thread Ali Çehreli
On 01/15/2012 04:34 PM, Andrei Alexandrescu wrote: On 1/15/12 4:19 PM, Philippe Sigaud wrote: On Sun, Jan 15, 2012 at 17:00, Ali Çehreliacehr...@yahoo.com wrote: I do think a big range tutorial is overdue. Andrei's article is good, but we need something a bit more detailed / for newbies I

Re: A tutorial on D templates

2012-01-16 Thread Andrej Mitrovic
On 1/15/12, Jacob Carlborg d...@me.com wrote: I'm not completely sure how it works but it looks like that Fields mixin can be replace with the code you have referenced from my Orange library and opDispatch. You mean your `fieldsOf` template? I'm not really sure how that would work, I've tried

Re: A tutorial on D templates

2012-01-16 Thread Jacob Carlborg
On 2012-01-16 12:43, Andrej Mitrovic wrote: On 1/15/12, Jacob Carlborgd...@me.com wrote: I'm not completely sure how it works but it looks like that Fields mixin can be replace with the code you have referenced from my Orange library and opDispatch. You mean your `fieldsOf` template? I'm not

Re: A tutorial on D templates

2012-01-16 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message news:jet0kk$1h97$1...@digitalmars.com... On 1/14/2012 1:00 PM, Nick Sabalausky wrote: Walter Brightnewshou...@digitalmars.com wrote in message news:jesl4i$30v3$1...@digitalmars.com... You and I are going to disagree on this.

Re: A tutorial on D templates

2012-01-16 Thread Nick Sabalausky
dennis luehring dl.so...@gmx.net wrote in message news:jeu3mf$94o$1...@digitalmars.com... https://github.com/PhilippeSigaud/D-templates-tutorial/blob/master/dtemplates.pdf ...with acrobat reader... Eewww. Do youself a favor and grab a copy of FoxIt Reader. Works just as well, but isn't

Re: A tutorial on D templates

2012-01-15 Thread dennis luehring
https://github.com/PhilippeSigaud/D-templates-tutorial/blob/master/dtemplates.pdf can't open the pdf with acrobat reader under win7 :( (the file seems to be ok, contains the pdf header) im using the latest acrobat reader x

Re: A tutorial on D templates

2012-01-15 Thread d coder
https://github.com/PhilippeSigaud/D-templates-tutorial/blob/master/dtemplates.pdf can't open the pdf with acrobat reader under win7 :( (the file seems to be ok, contains the pdf header) im using the latest acrobat reader x Same here. When I regenerated the pdf after cloning the git

Re: A tutorial on D templates

2012-01-15 Thread Jacob Carlborg
On 2012-01-14 22:04, Philippe Sigaud wrote: On Sat, Jan 14, 2012 at 21:07, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 1/14/12 5:21 AM, Philippe Sigaud wrote: Uh, I don't think it'll ever be a book. I didn't write it with a book in mind. It's organized as a book (TOC,

Re: A tutorial on D templates

2012-01-15 Thread Jacob Carlborg
and wanted to try LaTeX again, so I decided to bite the bullet and wrote a tutorial on templates. It's far from finished and most probably full of mistakes but since it's already quite big, I need some inputs. It's a Github project, here: https://github.com/PhilippeSigaud/D-templates-tutorial

Re: A tutorial on D templates

2012-01-15 Thread Philippe Sigaud
On Sun, Jan 15, 2012 at 12:26, Jacob Carlborg d...@me.com wrote: I see that you have referenced my Orange library, cool. As for Orange, is it OK with you if I show a small part of it? Is it OK for me to link to the github project? Mainly, I wanted to show some tricks you used in

Re: A tutorial on D templates

2012-01-15 Thread Philippe Sigaud
On Sun, Jan 15, 2012 at 12:16, Jacob Carlborg d...@me.com wrote: Thank you all for the encouragements! Templates is just one part of the language. There are many other parts to write about :) *snort* I do think a big range tutorial is overdue. Andrei's article is good, but we need something

Re: A tutorial on D templates

2012-01-15 Thread Philippe Sigaud
On Sun, Jan 15, 2012 at 11:50, d coder dlang.co...@gmail.com wrote: can't open the pdf with acrobat reader under win7 :( (the file seems to be ok, contains the pdf header) im using the latest acrobat reader x Same here. When I regenerated the pdf after cloning the git repository the pdf

Re: A tutorial on D templates

2012-01-15 Thread Philippe Sigaud
On Sun, Jan 15, 2012 at 03:27, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 1/14/12 6:54 PM, Georg Wrede wrote: Why don't we just let the guy write his thing in peace, before demanding a complete book with stylistically professional grammar and style? I mean, at this rate we

Re: A tutorial on D templates

2012-01-15 Thread Jacob Carlborg
On 2012-01-15 14:33, Philippe Sigaud wrote: On Sun, Jan 15, 2012 at 12:26, Jacob Carlborgd...@me.com wrote: I see that you have referenced my Orange library, cool. As for Orange, is it OK with you if I show a small part of it? Is it OK for me to link to the github project? Mainly, I wanted

Re: A tutorial on D templates

2012-01-15 Thread d coder
Btw, it's cool you could generate the pdf. Did you have minted and pygments already installed? No. But I downloaded minted.sty and apt-get pygmentize when pdflatex failed. Don't hesitate to tell me where it's unclear. If you have any example in mind or some difficulty that constantly trip

Re: A tutorial on D templates

2012-01-15 Thread Ali Çehreli
On 01/15/2012 05:34 AM, Philippe Sigaud wrote: On Sun, Jan 15, 2012 at 12:16, Jacob Carlborgd...@me.com wrote: Thank you all for the encouragements! Templates is just one part of the language. There are many other parts to write about :) *snort* I do think a big range tutorial is

Re: A tutorial on D templates

2012-01-15 Thread Walter Bright
On 1/15/2012 5:50 AM, Philippe Sigaud wrote: In fact, I'm thrilled to receive remarks, it means people are interested. Nothing worse than silence! Also, I would be doing you a disservice if you ask for feedback, and I don't because I thought it might hurt your feelings.

Re: A tutorial on D templates

2012-01-15 Thread Jesse Phillips
On Sunday, 15 January 2012 at 00:54:37 UTC, Georg Wrede wrote: Why don't we just let the guy write his thing in peace, before demanding a complete book with stylistically professional grammar and style? I mean, at this rate we are beating the horse to death before we've even put it in front

Re: A tutorial on D templates

2012-01-15 Thread Philippe Sigaud
On Sun, Jan 15, 2012 at 17:00, Ali Çehreli acehr...@yahoo.com wrote: I do think a big range tutorial is overdue. Andrei's article is good, but we need something a bit more detailed / for newbies I am hoping that this is good enough for now:  http://ddili.org/ders/d.en/ranges.html It sure

Re: A tutorial on D templates

2012-01-14 Thread Philippe Sigaud
On Fri, Jan 13, 2012 at 23:07, bearophile bearophileh...@lycos.com wrote: Philippe Sigaud: https://github.com/PhilippeSigaud/D-templates-tutorial/blob/master/dtemplates.pdf (click on View Raw) I am using a pdf blocking plug-in, that causes that GitHub link to save a fake pdf file

Re: A tutorial on D templates

2012-01-14 Thread Walter Bright
On 1/13/2012 1:20 PM, Philippe Sigaud wrote: This also extend to anyone who would want to share some template love/lore with the rest of us. I see you've already done a great deal of work on this, it looks nice! I strongly encourage you to continue with it, and release it as a book. We could

Re: A tutorial on D templates

2012-01-14 Thread Jonathan M Davis
On Saturday, January 14, 2012 00:16:37 Walter Bright wrote: On 1/13/2012 1:20 PM, Philippe Sigaud wrote: This also extend to anyone who would want to share some template love/lore with the rest of us. I see you've already done a great deal of work on this, it looks nice! I strongly

Re: A tutorial on D templates

2012-01-14 Thread Philippe Sigaud
On Sat, Jan 14, 2012 at 09:16, Walter Bright newshou...@digitalmars.com wrote: On 1/13/2012 1:20 PM, Philippe Sigaud wrote: This also extend to anyone who would want to share some template love/lore with the rest of us. I see you've already done a great deal of work on this, it looks nice!

Re: A tutorial on D templates

2012-01-14 Thread Zachary Lund
On page 78 where template mixins are discussed, some of the variable names feel rather confusing. I would suggest changing them to be more distinct.

Re: A tutorial on D templates

2012-01-14 Thread Philippe Sigaud
On Sat, Jan 14, 2012 at 14:56, Zachary Lund ad...@computerquip.com wrote: On page 78 where template mixins are discussed, some of the variable names feel rather confusing. I would suggest changing them to be more distinct. OK, added as an issue. You mean all the 'name', 'Named', 'named'?

Re: A tutorial on D templates

2012-01-14 Thread Jeff Nowakowski
On 01/14/2012 03:16 AM, Walter Bright wrote: Minor stylistic nit pet peeve of mine: please remove the word you and your from the prose. That sounds a bit strict, and looking at one of your articles I see it used in the second sentence: A pure function does what you'd expect — the compiler

Re: A tutorial on D templates

2012-01-14 Thread Philippe Sigaud
On Sat, Jan 14, 2012 at 16:56, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 1/13/12 3:20 PM, Philippe Sigaud wrote: https://github.com/PhilippeSigaud/D-templates-tutorial/blob/master/dtemplates.pdf (click on View Raw) If you have any comment, criticism, explanation, what

Re: A tutorial on D templates

2012-01-14 Thread Walter Bright
On 1/14/2012 12:36 AM, Jonathan M Davis wrote: I confess that it's a bit of a pet peeve of mine when people insist on avoiding words like you and your. I completely disagree that it's a problem. And there are times where avoiding it can cause problems and make the text more awkward (though it is

Re: A tutorial on D templates

2012-01-14 Thread Walter Bright
On 1/14/2012 3:21 AM, Philippe Sigaud wrote: I strongly encourage you to continue with it, and release it as a book. We could sure use another book on D! Uh, I don't think it'll ever be a book. I didn't write it with a book in mind. It looks like a book, and I see no reason why it can't be.

Re: A tutorial on D templates

2012-01-14 Thread Andrej Mitrovic
Counter-argument: You can't make a pull request to a book. Just take a look at the mountain of errata entries for tdpl.

Re: A tutorial on D templates

2012-01-14 Thread Philippe Sigaud
Maybe I'll write a small script to extract code samples and compile them. Do you have anything like this for TPDL? Emailed. Got it, thanks a lot! I have a problem with implicit main() and/or presenting in one sample code that should be in the global scope and some that must be put into a

Re: A tutorial on D templates

2012-01-14 Thread Philippe Sigaud
On Sat, Jan 14, 2012 at 21:07, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 1/14/12 5:21 AM, Philippe Sigaud wrote: Uh, I don't think it'll ever be a book. I didn't write it with a book in mind. It's organized as a book (TOC, index, structure) and has 141 pages with quite a

Re: A tutorial on D templates

2012-01-14 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message news:jesl4i$30v3$1...@digitalmars.com... You and I are going to disagree on this. Dosn't the reader mean The reader and I are going to disagree on this? ;) (only j/k, of course. Although I have always hated when authors say the

Re: A tutorial on D templates

2012-01-14 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message news:jesifv$2sm9$1...@digitalmars.com... - giving you powerful compile-time code generation abilities that'll make your code cleaner, more flexible and even more ecient. = giving powerful compile-time code

Re: A tutorial on D templates

2012-01-14 Thread Timon Gehr
On 01/14/2012 09:14 PM, Andrei Alexandrescu wrote: Since we're on this topic I can't stop picking - all in good fun I hope - on Jonathan, the master of words. The following two sentences convey the same exact information: 1. There are certainly times when reducing how much you is used reduces

Re: A tutorial on D templates

2012-01-14 Thread Nick Sabalausky
Philippe Sigaud philippe.sig...@gmail.com wrote in message news:mailman.374.1326575051.16222.digitalmars-d-annou...@puremagic.com... On Sat, Jan 14, 2012 at 21:07, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 1/14/12 5:21 AM, Philippe Sigaud wrote: Uh, I don't think it'll ever

Re: A tutorial on D templates

2012-01-14 Thread Walter Bright
On 1/14/2012 1:00 PM, Nick Sabalausky wrote: Walter Brightnewshou...@digitalmars.com wrote in message news:jesl4i$30v3$1...@digitalmars.com... You and I are going to disagree on this. Dosn't the reader mean The reader and I are going to disagree on this? ;) (only j/k, of course. Although I

Re: A tutorial on D templates

2012-01-14 Thread Walter Bright
On 1/14/2012 1:09 PM, Timon Gehr wrote: In longer posts, I think the information is often laid out in an approximately palindromic way. We're not in Notlob, you know.

Re: A tutorial on D templates

2012-01-14 Thread Philippe Sigaud
On Sat, Jan 14, 2012 at 14:56, Zachary Lund ad...@computerquip.com wrote: On page 78 where template mixins are discussed, some of the variable names feel rather confusing. I would suggest changing them to be more distinct. OK, done. Tell me if it's better?

Re: A tutorial on D templates

2012-01-14 Thread Philippe Sigaud
On Sat, Jan 14, 2012 at 16:56, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 1/13/12 3:20 PM, Philippe Sigaud wrote: They are used everywhere in Phobos, D standard library and any D user should know about them. - They are used everywhere in Phobos---D's standard library---and

Re: A tutorial on D templates

2012-01-14 Thread Philippe Sigaud
On Sat, Jan 14, 2012 at 17:00, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 1/14/12 9:56 AM, Andrei Alexandrescu wrote: [snip] Oh, one more thing. It would be great to make the explanatory boxes either floats, sidebars, or \mbox{}es so they don't span more than one page. Look

Re: A tutorial on D templates

2012-01-14 Thread Ali Çehreli
On 01/14/2012 12:14 PM, Andrei Alexandrescu wrote: Since we're on this topic I can't stop picking - all in good fun I hope - on Jonathan, the master of words. The following two sentences convey the same exact information: 1. There are certainly times when reducing how much you is used reduces

Re: A tutorial on D templates

2012-01-14 Thread Andrei Alexandrescu
On 1/14/12 3:04 PM, Philippe Sigaud wrote: On Sat, Jan 14, 2012 at 21:07, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 1/14/12 5:21 AM, Philippe Sigaud wrote: Uh, I don't think it'll ever be a book. I didn't write it with a book in mind. It's organized as a book (TOC,

Re: A tutorial on D templates

2012-01-14 Thread Georg Wrede
On 01/14/2012 11:04 PM, Philippe Sigaud wrote: On Sat, Jan 14, 2012 at 21:07, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 1/14/12 5:21 AM, Philippe Sigaud wrote: Uh, I don't think it'll ever be a book. I didn't write it with a book in mind. It's organized as a book (TOC,

Re: A tutorial on D templates

2012-01-14 Thread Georg Wrede
On 01/14/2012 08:45 PM, Walter Bright wrote: On 1/14/2012 7:05 AM, Jeff Nowakowski wrote: On 01/14/2012 03:16 AM, Walter Bright wrote: Minor stylistic nit pet peeve of mine: please remove the word you and your from the prose. That sounds a bit strict, and looking at one of your articles I

Re: A tutorial on D templates

2012-01-14 Thread Andrei Alexandrescu
On 1/14/12 6:54 PM, Georg Wrede wrote: On 01/14/2012 08:45 PM, Walter Bright wrote: On 1/14/2012 7:05 AM, Jeff Nowakowski wrote: On 01/14/2012 03:16 AM, Walter Bright wrote: Minor stylistic nit pet peeve of mine: please remove the word you and your from the prose. That sounds a bit strict,

A tutorial on D templates

2012-01-13 Thread Philippe Sigaud
the bullet and wrote a tutorial on templates. It's far from finished and most probably full of mistakes but since it's already quite big, I need some inputs. It's a Github project, here: https://github.com/PhilippeSigaud/D-templates-tutorial The resulting pdf is there: https://github.com

Re: A tutorial on D templates

2012-01-13 Thread bearophile
Philippe Sigaud: https://github.com/PhilippeSigaud/D-templates-tutorial/blob/master/dtemplates.pdf (click on View Raw) I am using a pdf blocking plug-in, that causes that GitHub link to save a fake pdf file :-( Is your tutorial containing the (a,b) = a * b syntax too? I'd like operators