digitalmars.D.announce - Adam D. Ruppe's "D Cookbook" now available!
- Walter Bright (5/5) May 28 2014 http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook...
- Olivier Pisano (1/1) May 28 2014 I have just ordered mine. I can't wait to get it !
- Misu (1/1) May 28 2014 Thank you, I ordered mine as well !
- Szymon Gatner (2/3) May 28 2014 I am already half through mine :) Great stuff!
- Jacob Carlborg (4/9) May 29 2014 I've already bought the ebook version.
- simendsjo (3/19) May 29 2014 Ditto. Just had time to look at the ToC though. Really looking forward
- Atila Neves (5/18) May 29 2014 For some reason I didn't even know it was available as an ebook
- Steven Schveighoffer (8/11) May 29 2014 To be fair, the physical book comes with access to the ebook.
- Chris (6/11) May 29 2014 I dug into Chapter 3 about ranges. It clarifies a lot of things
- Philippe Sigaud via Digitalmars-d-announce (6/18) May 29 2014 I bought it today, more D goodness, yummy.
- Jacob Carlborg (7/10) May 29 2014 Amazon has a version for their Kindle [1]. I have not seen any
- Philippe Sigaud via Digitalmars-d-announce (5/9) May 29 2014 But the paper edition does not come with the electronic version,
- Adam D. Ruppe (22/24) May 29 2014 Yeah, a lot of the stuff there comes from my own process when
- Chris (15/39) May 29 2014 I have different types of range implementations throughout my
- Adam D. Ruppe (4/6) May 29 2014 I ask myself that a lot too, even the book isn't really meant to
- Nick Sabalausky (21/27) May 29 2014 FWIW, and in the spirit of "maybe others could benefit too" (not sure
- Adam D. Ruppe (5/5) May 29 2014 Packt made an excerpt from the range chapter available too:
- uri (2/16) May 29 2014 +1, just purchased my copy :)
- Szymon Gatner (23/28) May 29 2014 A question(s) regarding Chapter 5: Making a reference-counted
- Adam D. Ruppe (7/10) May 29 2014 hmm, you seem to be right, but this might be a bug. I'm pretty
- Szymon Gatner (3/14) May 29 2014 :(
- Steven Schveighoffer (15/25) May 29 2014 e =
- Adam D. Ruppe (3/5) May 29 2014 Hmm, that's some weird behavior.
- Adam D. Ruppe (6/8) May 29 2014 Sorry, I typed this answer but forgot to actually post it. But to
- Mike James (4/9) May 30 2014 Just got a copy - now I need the time to read it... :-)
- Chris (6/18) May 30 2014 If you already know D, you don't need to read it cover-to-cover.
- w0rp (5/5) May 30 2014 I received my copy this morning, earlier than I thought I would.
- Chris (3/8) May 30 2014 You're right, of course. There's _always_ something you can
- Jonathan M Davis via Digitalmars-d-announce (10/18) May 30 2014 On Fri, 30 May 2014 11:48:56 +0000
- Lars T. Kyllingstad (5/7) Jun 10 2014 Like the fact that you can @disable this() for a struct, even
- Adam D. Ruppe (13/15) Jun 10 2014 If my memory is working properly I actually think I was the one
- Adam D. Ruppe (7/9) May 30 2014 I still haven't gotten my copies! Hopefully will be here today
- Adam D. Ruppe (18/20) May 30 2014 Yea, I also tried to keep the dependencies on previous content to
- Chris (5/26) May 30 2014 Yep. I read bits of Chapter 1 and learned things I didn't know
- Dejan Lekic (6/14) May 30 2014 https://drive.google.com/file/d/0BzpDFld47vULS1VSZl9JaG1PMkk
- WhatMeWorry (3/3) Jun 01 2014 I am happy to report that it is on Safari Books website as well.
- ezneh (3/8) Jun 04 2014 Just received mine in the mail =)
- Chris (5/16) Jun 05 2014 My hard copy arrived today. Now I can read it anywhere I like ;)
- Jacob Carlborg (5/9) Jun 05 2014 There's a book about D1 and Tango as well. Also some Chinese book, or
- Chris (15/26) Jun 06 2014 There's Ali's online tutorial, of course. Great stuff. But a
- Jacob Carlborg (6/11) Jun 09 2014 Adam, I noticed that you mentioned DStep in the book. By reading the
- Adam D. Ruppe (3/7) Jun 10 2014 blargh, I thought it could do more. Does it at least work to pull
- Jacob Carlborg (9/11) Jun 10 2014 Hmm, I haven't tried that. You need to specified which language to use.
http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book http://www.amazon.com/D-Cookbook-Adam-D-Ruppe/dp/1783287217 http://www.reddit.com/r/programming/comments/26pn00/d_cookbook_officially_published_consists_of_d/ After watching Adam's most excellent presentation at Dconf, I'm sure the book will be great! My copy gets here on Friday.
May 28 2014
I have just ordered mine. I can't wait to get it !
May 28 2014
On Wednesday, 28 May 2014 at 19:06:04 UTC, Misu wrote:Thank you, I ordered mine as well !I am already half through mine :) Great stuff!
May 28 2014
On 2014-05-28 20:14, Walter Bright wrote:http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book http://www.amazon.com/D-Cookbook-Adam-D-Ruppe/dp/1783287217 http://www.reddit.com/r/programming/comments/26pn00/d_cookbook_officially_published_consists_of_d/ After watching Adam's most excellent presentation at Dconf, I'm sure the book will be great! My copy gets here on Friday.I've already bought the ebook version. -- /Jacob Carlborg
May 29 2014
On 05/29/2014 11:51 AM, Jacob Carlborg wrote:On 2014-05-28 20:14, Walter Bright wrote:Ditto. Just had time to look at the ToC though. Really looking forward to reading it (and all the dconf talks)http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book http://www.amazon.com/D-Cookbook-Adam-D-Ruppe/dp/1783287217 http://www.reddit.com/r/programming/comments/26pn00/d_cookbook_officially_published_consists_of_d/ After watching Adam's most excellent presentation at Dconf, I'm sure the book will be great! My copy gets here on Friday.I've already bought the ebook version.
May 29 2014
For some reason I didn't even know it was available as an ebook until I read this. At which point I promptly bought it. Dead trees and their lack of Ctrl-F... :) Atila On Thursday, 29 May 2014 at 09:51:02 UTC, Jacob Carlborg wrote:On 2014-05-28 20:14, Walter Bright wrote:http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book http://www.amazon.com/D-Cookbook-Adam-D-Ruppe/dp/1783287217 http://www.reddit.com/r/programming/comments/26pn00/d_cookbook_officially_published_consists_of_d/ After watching Adam's most excellent presentation at Dconf, I'm sure the book will be great! My copy gets here on Friday.I've already bought the ebook version.
May 29 2014
On Thu, 29 May 2014 06:20:51 -0400, Atila Neves <atila.neves gmail.com> wrote:For some reason I didn't even know it was available as an ebook until I read this. At which point I promptly bought it. Dead trees and their lack of Ctrl-F... :)To be fair, the physical book comes with access to the ebook. But the reason for me to buy the ebook was simpler -- it's half the price :) Still lack time to read it, but I like the AK47 tip (don't have one, but I'm sure it works for most rifles)! -Steve
May 29 2014
On Wednesday, 28 May 2014 at 18:14:28 UTC, Walter Bright wrote:http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book http://www.amazon.com/D-Cookbook-Adam-D-Ruppe/dp/1783287217 http://www.reddit.com/r/programming/comments/26pn00/d_cookbook_officially_published_consists_of_d/ After watching Adam's most excellent presentation at Dconf, I'm sure the book will be great! My copy gets here on Friday.I dug into Chapter 3 about ranges. It clarifies a lot of things about ranges. These little questions I kept asking my self, like "is this good practice or a hack?" etc. Thanks to one of his examples (+explanation) I've already been able to improve my production code. Thanks a million Adam!
May 29 2014
On Thu, May 29, 2014 at 12:28 PM, Chris via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote:On Wednesday, 28 May 2014 at 18:14:28 UTC, Walter Bright wrote:I bought it today, more D goodness, yummy. btw, I bought it through Packt. It was cheaper and came with the e-book version. Does Amazon also send you an electronic version along the paper one?http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book http://www.amazon.com/D-Cookbook-Adam-D-Ruppe/dp/1783287217 http://www.reddit.com/r/programming/comments/26pn00/d_cookbook_officially_published_consists_of_d/ After watching Adam's most excellent presentation at Dconf, I'm sure the book will be great! My copy gets here on Friday.
May 29 2014
On 2014-05-29 12:37, Philippe Sigaud via Digitalmars-d-announce wrote:btw, I bought it through Packt. It was cheaper and came with the e-book version. Does Amazon also send you an electronic version along the paper one?Amazon has a version for their Kindle [1]. I have not seen any mentioning of other formats. [1] http://www.amazon.com/D-Cookbook-Adam-D-Ruppe-ebook/dp/B00KLAJ62M/ref=sr_1_1_title_1_kin?s=books&ie=UTF8&qid=1401366690&sr=1-1 -- /Jacob Carlborg
May 29 2014
On Thu, May 29, 2014 at 2:31 PM, Jacob Carlborg wrote:Amazon has a version for their Kindle [1]. I have not seen any mentioning of other formats. [1] http://www.amazon.com/D-Cookbook-Adam-D-Ruppe-ebook/dp/B00KLAJ62M/ref=sr_1_1_title_1_kin?s=books&ie=UTF8&qid=1401366690&sr=1-1But the paper edition does not come with the electronic version, contrary to a buy through Packt. Anyway, I'm already throwing far too much money at Amazon all year long :-) Now for some time to read this book...
May 29 2014
On Thursday, 29 May 2014 at 10:28:45 UTC, Chris wrote:I dug into Chapter 3 about ranges. It clarifies a lot of things about ranges.Yeah, a lot of the stuff there comes from my own process when writing my first range consuming function (which is still in a pretty ugly form in my sha.d on github, I have never really fixed it). I had to ask on the newsgroup: what does it really mean to accept a generic input range? Does it mean to attempt data transformations to receive anything? Or is it semi-strict? (the answer is to take any input range but be strict on the element type - don't try to transform it yourself as that introduces bugs and hidden performance issues for the algorithm's user) I didn't quite understand the answer until some time later and now I think it is fairly simple, but since I was so wrong about it for such a long while I figured other people probably had the same problems and tried to cover them in the book. One of the sections there talks about emulating random access on a structure that doesn't really support it (a linked list) and focuses on the hidden performance. That's the range-writer side of the same range-consumer rule: don't try to get fancy and support something the underlying data doesn't natively do because then you'll introduce bugs and slowdowns that might be hard to find.
May 29 2014
On Thursday, 29 May 2014 at 12:45:20 UTC, Adam D. Ruppe wrote:On Thursday, 29 May 2014 at 10:28:45 UTC, Chris wrote:I have different types of range implementations throughout my code now, which basically depicts the learning process while I was trying to grasp the concept. I think the D website could do with something like your Chapter 3. It's not really rocket science, but when you have no guidelines, best practices whatsoever, you have to experiment yourself which always leaves a weird after taste, i.e. questions like "is this really the right way? am I doing something wrong?".I dug into Chapter 3 about ranges. It clarifies a lot of things about ranges.Yeah, a lot of the stuff there comes from my own process when writing my first range consuming function (which is still in a pretty ugly form in my sha.d on github, I have never really fixed it).I had to ask on the newsgroup: what does it really mean to accept a generic input range? Does it mean to attempt data transformations to receive anything? Or is it semi-strict? (the answer is to take any input range but be strict on the element type - don't try to transform it yourself as that introduces bugs and hidden performance issues for the algorithm's user)Yes, I always adhered to this rule.I didn't quite understand the answer until some time later and now I think it is fairly simple, but since I was so wrong about it for such a long while I figured other people probably had the same problems and tried to cover them in the book.True, true. Your book was direly needed, and if it's just to clarify things. Sometimes I would feel like a fool to ask questions about ranges, thinking everybody understands them except for me. Once you get the hang of it, it's pretty straight forward.One of the sections there talks about emulating random access on a structure that doesn't really support it (a linked list) and focuses on the hidden performance. That's the range-writer side of the same range-consumer rule: don't try to get fancy and support something the underlying data doesn't natively do because then you'll introduce bugs and slowdowns that might be hard to find.
May 29 2014
On Thursday, 29 May 2014 at 13:12:33 UTC, Chris wrote:a weird after taste, i.e. questions like "is this really the right way? am I doing something wrong?".I ask myself that a lot too, even the book isn't really meant to be authoritative, more like "this works pretty well for me hopefully it works for you too".
May 29 2014
On 5/29/2014 8:45 AM, Adam D. Ruppe wrote:One of the sections there talks about emulating random access on a structure that doesn't really support it (a linked list) and focuses on the hidden performance. That's the range-writer side of the same range-consumer rule: don't try to get fancy and support something the underlying data doesn't natively do because then you'll introduce bugs and slowdowns that might be hard to find.FWIW, and in the spirit of "maybe others could benefit too" (not sure whether your book touches on this or not): I *used to be* strongly opposed to what you suggest there, deliberately not emulating accesses the data doesn't support. Even had a big long debate over it with Andrei. My reasoning was that you should be able to swap different data structures in and out to find the best performance, because *even if* you're relying on an operation the underlying data doesn't support, it could still be such a *small* and infrequent reliance that the localized performance hit is overshadowed by improved performance in the rest of your code. Seemed a perfectly sound argument to be, but then I realized: It's trivial to write an adapter to emulate features on ranges or containers that don't support them. Not only is this more re-usable (ex: only need to write a particular method of "emulate random access" once), but far more importantly, this makes the feature-emulation EXPLICIT instead of hidden. The upshot of that is, if a range or container doesn't support some feature, you can *still* trivially have an emulated drop-in-replacement, and it's equally easy (or even easier still) but BETTER because it's explicit, not hidden.
May 29 2014
Packt made an excerpt from the range chapter available too: https://www.packtpub.com/article/ranges That's from the tail end of the chapter where I started talking about emulation performance (relevant to this little convo) and how to put some stuff together.
May 29 2014
On Thursday, 29 May 2014 at 10:28:45 UTC, Chris wrote:On Wednesday, 28 May 2014 at 18:14:28 UTC, Walter Bright wrote:+1, just purchased my copy :)http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book http://www.amazon.com/D-Cookbook-Adam-D-Ruppe/dp/1783287217 http://www.reddit.com/r/programming/comments/26pn00/d_cookbook_officially_published_consists_of_d/ After watching Adam's most excellent presentation at Dconf, I'm sure the book will be great! My copy gets here on Friday.I dug into Chapter 3 about ranges. It clarifies a lot of things about ranges. These little questions I kept asking my self, like "is this good practice or a hack?" etc. Thanks to one of his examples (+explanation) I've already been able to improve my production code. Thanks a million Adam!
May 29 2014
On Wednesday, 28 May 2014 at 18:14:28 UTC, Walter Bright wrote:http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book http://www.amazon.com/D-Cookbook-Adam-D-Ruppe/dp/1783287217 http://www.reddit.com/r/programming/comments/26pn00/d_cookbook_officially_published_consists_of_d/ After watching Adam's most excellent presentation at Dconf, I'm sure the book will be great! My copy gets here on Friday.A question(s) regarding Chapter 5: Making a reference-counted object: (btw do we need separate thread for content-related questions?) - point 5 (of How to do it...) says: "... and free the object if necessary", but then in code: ~this() { if(data is null) return; data.refcount--; writeln("Released. Refcount = ", data.refcount); if(data.refcount == 0) writeln("Destroyed."); } is actual freeing missing? Or am I missing something? Later in same chapter: "... or being collected by the garbage collector—its destructor is called, if present." Is that really true? My understanding (and unfortunate test) is that it is never guaranteed that d-tor of GD allocated object is ever called. If that is the case then: is that true that dynamic array of RefCountedObject does not guarantee any of d-tors called? That would also mean that if any of objects in object graph is GC-allocated then NONE of its child nodes have any guarantees about destruction?
May 29 2014
On Thursday, 29 May 2014 at 13:01:50 UTC, Szymon Gatner wrote:Later in same chapter: "... or being collected by the garbage collector—its destructor is called, if present." Is that really true?hmm, you seem to be right, but this might be a bug. I'm pretty sure the struct dtors were called on arrays not long ago but it isn't really reliable with the GC (My weasel word there is "provably", sometimes the GC can't prove there are no references; false pointers etc) but still blargh this current reality seems weird.
May 29 2014
On Thursday, 29 May 2014 at 13:57:41 UTC, Adam D. Ruppe wrote:On Thursday, 29 May 2014 at 13:01:50 UTC, Szymon Gatner wrote::( And the 1st question?Later in same chapter: "... or being collected by the garbage collector—its destructor is called, if present." Is that really true?hmm, you seem to be right, but this might be a bug. I'm pretty sure the struct dtors were called on arrays not long ago but it isn't really reliable with the GC (My weasel word there is "provably", sometimes the GC can't prove there are no references; false pointers etc) but still blargh this current reality seems weird.
May 29 2014
On Thu, 29 May 2014 09:57:40 -0400, Adam D. Ruppe = <destructionator gmail.com> wrote:On Thursday, 29 May 2014 at 13:01:50 UTC, Szymon Gatner wrote:Later in same chapter: "... or being collected by the garbage =e =collector=E2=80=94its destructor is called, if present." Is that really true?hmm, you seem to be right, but this might be a bug. I'm pretty sure th=struct dtors were called on arrays not long ago but it isn't really =reliable with the GC (My weasel word there is "provably", sometimes th=e =GC can't prove there are no references; false pointers etc) but still ==blargh this current reality seems weird.The GC never has called struct destructors for arrays of structs or = individual structs allocated on the heap. It will call destructors on structs that are members of classes ONLY = because the class destructor will call the struct destructor. One other situation a heap allocated struct will have it's destructor = called (I think) is due to a closure allocation, but I'm not 100% sure h= ow = that works. A way to verify is to make a closure occur, then test the = closure's block to see if FINALIZE flag is set on it. -Steve
May 29 2014
On Thursday, 29 May 2014 at 14:42:02 UTC, Steven Schveighoffer wrote:The GC never has called struct destructors for arrays of structs or individual structs allocated on the heap.Hmm, that's some weird behavior.
May 29 2014
On Thursday, 29 May 2014 at 13:01:50 UTC, Szymon Gatner wrote:- point 5 (of How to do it...) says: "... and free the object if necessary", but then in code:Sorry, I typed this answer but forgot to actually post it. But to keep the example focused on postblit and destructor stuff instead of malloc/free so I used the writeln instead of the actual calls. So all you'd have to do is do free() where it says "Destroyed" instead and alloc in the ctor.
May 29 2014
"Walter Bright" <newshound2 digitalmars.com> wrote in message news:lm5924$7r8$1 digitalmars.com...http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book http://www.amazon.com/D-Cookbook-Adam-D-Ruppe/dp/1783287217 http://www.reddit.com/r/programming/comments/26pn00/d_cookbook_officially_published_consists_of_d/ After watching Adam's most excellent presentation at Dconf, I'm sure the book will be great! My copy gets here on Friday.Just got a copy - now I need the time to read it... :-) -=mike=-
May 30 2014
On Friday, 30 May 2014 at 09:07:54 UTC, Mike James wrote:"Walter Bright" <newshound2 digitalmars.com> wrote in message news:lm5924$7r8$1 digitalmars.com...If you already know D, you don't need to read it cover-to-cover. Just read the sexy bits :) (Although I will read it thoroughly one day when I find the time. The good thing is, you don't need to read it c-t-c to make it work for you, like, errr, a cookbook.)http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book http://www.amazon.com/D-Cookbook-Adam-D-Ruppe/dp/1783287217 http://www.reddit.com/r/programming/comments/26pn00/d_cookbook_officially_published_consists_of_d/ After watching Adam's most excellent presentation at Dconf, I'm sure the book will be great! My copy gets here on Friday.Just got a copy - now I need the time to read it... :-) -=mike=-
May 30 2014
I received my copy this morning, earlier than I thought I would. I shall check it out over the weekend. I suspect I'll probably know a lot of the things in the book, but I'm the type who likes to watch introductory lectures because there's always something I didn't see before.
May 30 2014
On Friday, 30 May 2014 at 11:46:35 UTC, w0rp wrote:I received my copy this morning, earlier than I thought I would. I shall check it out over the weekend. I suspect I'll probably know a lot of the things in the book, but I'm the type who likes to watch introductory lectures because there's always something I didn't see before.You're right, of course. There's _always_ something you can learn, even if you think you know it all.
May 30 2014
On Fri, 30 May 2014 11:48:56 +0000 Chris via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote:On Friday, 30 May 2014 at 11:46:35 UTC, w0rp wrote:What I find sometimes is that even if I know most things about something, I still forget things that I knew (particularly if I don't use that knowledge regularly), so reading something like this could jog your memory about things and thus improve your knowledge, even if you actually had known all of it at some point (though the odds are still that there are at least a few things in it that you never learned, even if you know a lot). - Jonathan M DavisI received my copy this morning, earlier than I thought I would. I shall check it out over the weekend. I suspect I'll probably know a lot of the things in the book, but I'm the type who likes to watch introductory lectures because there's always something I didn't see before.You're right, of course. There's _always_ something you can learn, even if you think you know it all.
May 30 2014
On Friday, 30 May 2014 at 11:48:57 UTC, Chris wrote:There's _always_ something you can learn, even if you think you know it all.Like the fact that you can disable this() for a struct, even though you can't implement it. I didn't know that, but I have the perfect use case for it (and it's one which has bothered me for a long time). Thanks, Adam!
Jun 10 2014
On Tuesday, 10 June 2014 at 17:31:52 UTC, Lars T. Kyllingstad wrote:Like the fact that you can disable this() for a struct, even though you can't implement it.If my memory is working properly I actually think I was the one who suggested that to Walter a few years ago when it was introduced, though odds are I stole the idea from somebody else first and my memory is just a bit selectively egotistical :P But I think disable is a really cool thing for so many reasons. The two first ideas I had with it was the not null and ranged integer structs. Then the move semantics can come from it too. So can selectively disabling other operator overloads; forwarding most things to a member but filtering out some operations. Disabling default construction still has a few compiler bugs so it isn't watertight but I've found it is really nice to have.
Jun 10 2014
On Friday, 30 May 2014 at 11:46:35 UTC, w0rp wrote:I received my copy this morning, earlier than I thought I would.I still haven't gotten my copies! Hopefully will be here today though.I suspect I'll probably know a lot of the things in the bookYea, especially if you're a regular on the ng or irc, though you never know :P BTW if any of you who has read it want to write amazon reviews, make it so!
May 30 2014
On Friday, 30 May 2014 at 11:25:45 UTC, Chris wrote:If you already know D, you don't need to read it cover-to-cover. Just read the sexy bits :)Yea, I also tried to keep the dependencies on previous content to a minimum or at the least, explicit to make jumping around that much easier. That said though, after the first few pages, I tried to say things that are at least interesting to the target intermediate+ audience; like page one talks about installing dmd, boring, but by page 4 I tried to answer a FAQ about modules and also worked my agenda to clear up the directory structure common misconception "Modules have logical names that do not need to match the filename." which is something you can get work done without knowing; it might be new even to someone who has used D before and understanding this can make sense of a number of compile/link errors that come up. So, while I feel chapters one and two are the weakest links (and I definitely dropped the ball on editing the code on chapter one), hopefully none of the stuff is outright useless even if you've seen it before and have read the website documentation.
May 30 2014
On Friday, 30 May 2014 at 13:25:28 UTC, Adam D. Ruppe wrote:On Friday, 30 May 2014 at 11:25:45 UTC, Chris wrote:Yep. I read bits of Chapter 1 and learned things I didn't know yet. No matter how much you know, something always escapes you. I've learned tricks even from bad musicians (like the AK 47 thing).If you already know D, you don't need to read it cover-to-cover. Just read the sexy bits :)Yea, I also tried to keep the dependencies on previous content to a minimum or at the least, explicit to make jumping around that much easier. That said though, after the first few pages, I tried to say things that are at least interesting to the target intermediate+ audience; like page one talks about installing dmd, boring, but by page 4 I tried to answer a FAQ about modules and also worked my agenda to clear up the directory structure common misconception "Modules have logical names that do not need to match the filename." which is something you can get work done without knowing; it might be new even to someone who has used D before and understanding this can make sense of a number of compile/link errors that come up. So, while I feel chapters one and two are the weakest links (and I definitely dropped the ball on editing the code on chapter one), hopefully none of the stuff is outright useless even if you've seen it before and have read the website documentation.
May 30 2014
Walter Bright wrote:http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book http://www.amazon.com/D-Cookbook-Adam-D-Ruppe/dp/1783287217http://www.reddit.com/r/programming/comments/26pn00/d_cookbook_officially_published_consists_of_d/After watching Adam's most excellent presentation at Dconf, I'm sure the book will be great! My copy gets here on Friday.https://drive.google.com/file/d/0BzpDFld47vULS1VSZl9JaG1PMkk :D -- http://dejan.lekic.org
May 30 2014
I am happy to report that it is on Safari Books website as well. Sweet! It really compliment's TDPL and Ali's book as well.
Jun 01 2014
On Wednesday, 28 May 2014 at 18:14:28 UTC, Walter Bright wrote:http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book http://www.amazon.com/D-Cookbook-Adam-D-Ruppe/dp/1783287217 http://www.reddit.com/r/programming/comments/26pn00/d_cookbook_officially_published_consists_of_d/ After watching Adam's most excellent presentation at Dconf, I'm sure the book will be great! My copy gets here on Friday.Just received mine in the mail =) I now have something interesting to read ;)
Jun 04 2014
On Wednesday, 4 June 2014 at 09:45:39 UTC, ezneh wrote:On Wednesday, 28 May 2014 at 18:14:28 UTC, Walter Bright wrote:My hard copy arrived today. Now I can read it anywhere I like ;) Funnily enough, it's only the second book about D and still I've been more productive in D than in any other language, languages for which thousands of titles are available.http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book http://www.amazon.com/D-Cookbook-Adam-D-Ruppe/dp/1783287217 http://www.reddit.com/r/programming/comments/26pn00/d_cookbook_officially_published_consists_of_d/ After watching Adam's most excellent presentation at Dconf, I'm sure the book will be great! My copy gets here on Friday.Just received mine in the mail =) I now have something interesting to read ;)
Jun 05 2014
On 2014-06-05 11:25, Chris wrote:My hard copy arrived today. Now I can read it anywhere I like ;) Funnily enough, it's only the second book about D and still I've been more productive in D than in any other language, languages for which thousands of titles are available.There's a book about D1 and Tango as well. Also some Chinese book, or that might have been a translation. -- /Jacob Carlborg
Jun 05 2014
On Thursday, 5 June 2014 at 17:48:44 UTC, Jacob Carlborg wrote:On 2014-06-05 11:25, Chris wrote:There's Ali's online tutorial, of course. Great stuff. But a cookbook was really the thing I needed. Just to pick it up and to know "How to send an email" is great. A lot of stuff here on the forum is about language design, which made D what it is. However, a lot of things in programming are plain and simple everyday problems like having your program send an email. I recently told a coworker to have a look at D and maybe use it for his number crunching algorithms. You can get far in D without templates, mixins and ranges. You don't need to learn them before you can use the language. You learn about them as you go along. You can dig right in. Maybe that's part of the reasons why people are reluctant to use D. They think you have to be a rocket scientist to write a program. You don't. But it will turn you into one :-)My hard copy arrived today. Now I can read it anywhere I like ;) Funnily enough, it's only the second book about D and still I've been more productive in D than in any other language, languages for which thousands of titles are available.There's a book about D1 and Tango as well. Also some Chinese book, or that might have been a translation.
Jun 06 2014
On 2014-05-28 20:14, Walter Bright wrote:http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book http://www.amazon.com/D-Cookbook-Adam-D-Ruppe/dp/1783287217 http://www.reddit.com/r/programming/comments/26pn00/d_cookbook_officially_published_consists_of_d/ After watching Adam's most excellent presentation at Dconf, I'm sure the book will be great! My copy gets here on Friday.Adam, I noticed that you mentioned DStep in the book. By reading the part about integrating with C++ I got the impression that DStep can handle C++. Currently, that's not the case. -- /Jacob Carlborg
Jun 09 2014
On Monday, 9 June 2014 at 19:14:15 UTC, Jacob Carlborg wrote:Adam, I noticed that you mentioned DStep in the book. By reading the part about integrating with C++ I got the impression that DStep can handle C++. Currently, that's not the case.blargh, I thought it could do more. Does it at least work to pull out extern "C" functions from a C++ header?
Jun 10 2014
On 10/06/14 19:43, Adam D. Ruppe wrote:blargh, I thought it could do more. Does it at least work to pull out extern "C" functions from a C++ header?Hmm, I haven't tried that. You need to specified which language to use. Currently DStep has hard coded its language support, in which C++ is not included. It starts to get more complicate if it needs to support multiple languages in the same file. It should be possible, but then I think every declaration will need to be prefixed with "extern (C)". -- /Jacob Carlborg
Jun 10 2014