Re: Adam D. Ruppe's "D Cookbook" now available!
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. https://drive.google.com/file/d/0BzpDFld47vULS1VSZl9JaG1PMkk :D -- http://dejan.lekic.org
Re: Adam D. Ruppe's "D Cookbook" now available!
On Fri, 30 May 2014 11:48:56 + Chris via Digitalmars-d-announce wrote: > 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. 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 Davis
Re: Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"
On 5/29/14, 9:21 PM, Jesse Phillips wrote: On Wednesday, 28 May 2014 at 07:21:56 UTC, dennis luehring wrote: woudl be nice to have some sort of example by example comparison or as an extension to the page http://dlang.org/cpptod.html I've got two posts complete[1]. Since C++ and D are exactly the same for the majority of the code I'm only showing D and talk of C++'s choice. While the rules governing D's behavior are fairly simple I feel that I've expanded on the content enough to provide useful information beyond fixing C++'s problems. 1. http://he-the-great.livejournal.com/52333.html http://www.reddit.com/r/programming/comments/26vy2i/comparing_scott_meyers_talk_examples_in_c_and_d/ Andrei
Re: DConf 2014 Opening Keynote: State of the struct address - Andrei Alexandrescu
Thanks David, I will get the time to read that thread and I'll reply over there. Florin On Friday, 30 May 2014 at 15:25:17 UTC, David Gileadi wrote: Here's the thread where this was recently discussed (with a proposed design): http://forum.dlang.org/thread/mmoxalewsvwcgeaas...@forum.dlang.org Unfortunately the original poster has been quiet lately. I think you could perhaps continue evolving the design that he posted or else post a proposal of your own. I'm interested in helping out with whatever changes we make.
Re: DConf 2014 Opening Keynote: State of the struct address - Andrei Alexandrescu
On 5/30/14, 8:16 AM, florin wrote: Hi, In the opening of your keynote you mentioned the need of redesigning dlang.org. I'm more of a webdesigner than programmer so maybe I can lend a hand here. Is there a place where this is being discussed? Here's the thread where this was recently discussed (with a proposed design): http://forum.dlang.org/thread/mmoxalewsvwcgeaas...@forum.dlang.org Unfortunately the original poster has been quiet lately. I think you could perhaps continue evolving the design that he posted or else post a proposal of your own. I'm interested in helping out with whatever changes we make.
Re: DConf 2014 Opening Keynote: State of the struct address - Andrei Alexandrescu
Hi, In the opening of your keynote you mentioned the need of redesigning dlang.org. I'm more of a webdesigner than programmer so maybe I can lend a hand here. Is there a place where this is being discussed?
Re: Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"
On Friday, 30 May 2014 at 11:31:18 UTC, safety0ff wrote: On Friday, 30 May 2014 at 04:21:18 UTC, Jesse Phillips wrote: 1. http://he-the-great.livejournal.com/52333.html Note that in the following code: import core.memory : GC; int* pxprime = cast(int*)GC.malloc(int.sizeof); version(none) assert(pxprime); // possibly zero GC.malloc currently doesn't initialize the memory if NO_SCAN is specified as attribute. I expect malloc to not initialize ever, that was the point. Initialization can be done with calloc. Also, I don't understand why half of your asserts have version(none) (it's distracting.) I can't guarantee the assert to pass, as the comment mentions it is possibly zero, which would cause failure. Also note that you're not dereferencing pxprime, I'm not sure if its intentional. Thanks, was intending to dereference. Thank you for feedback.
Re: Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"
On Friday, 30 May 2014 at 10:56:30 UTC, Andrei Alexandrescu wrote: Nice! I'll post it tomorrow on reddit and friends. You have an unmatched brace after "assert(a2[].all!(x => x == 0));". Andrei Actually a bunch of unmatched braces (formatter eats the closing one?) and at least one ";;" instead of ";". -- Andrei It is not unmatched, the whole article is one big program (with the exception of the conclusion), the final brace is at the end: static int[100] a3; assert(a3[].all!(x => x == 0)); } Though the ;; is just an accident.
Re: Adam D. Ruppe's "D Cookbook" now available!
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: 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. 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).
Re: Adam D. Ruppe's "D Cookbook" now available!
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 book Yea, 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!
Re: Adam D. Ruppe's "D Cookbook" now available!
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.
Re: Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"
On Thu, 29 May 2014 21:15:21 -0400, deadalnix wrote: On Thursday, 29 May 2014 at 19:06:15 UTC, Steven Schveighoffer wrote: Static if is certainly NOT an attribute, it doesn't make any sense. Well... it sorta does. static if does not introduce a new scope, even with {}, and this only happens with attributes. -Steve in which case static if(cond) { immutable: } int x; should not create x as immutable if cond is true. The current behavior is not consistent with attribute either. Ugh, that is really bad. It shouldn't do that. Is that intentional? -Steve
Re: Adam D. Ruppe's "D Cookbook" now available!
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.
Re: Adam D. Ruppe's "D Cookbook" now available!
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.
Re: Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"
On Friday, 30 May 2014 at 04:21:18 UTC, Jesse Phillips wrote: 1. http://he-the-great.livejournal.com/52333.html Note that in the following code: import core.memory : GC; int* pxprime = cast(int*)GC.malloc(int.sizeof); version(none) assert(pxprime); // possibly zero GC.malloc currently doesn't initialize the memory if NO_SCAN is specified as attribute. Also, I don't understand why half of your asserts have version(none) (it's distracting.) Also note that you're not dereferencing pxprime, I'm not sure if its intentional.
Re: Adam D. Ruppe's "D Cookbook" now available!
On Friday, 30 May 2014 at 09:07:54 UTC, Mike James wrote: "Walter Bright" 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=- 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.)
Re: Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"
On 5/30/14, 3:53 AM, Andrei Alexandrescu wrote: On 5/29/14, 9:21 PM, Jesse Phillips wrote: On Wednesday, 28 May 2014 at 07:21:56 UTC, dennis luehring wrote: woudl be nice to have some sort of example by example comparison or as an extension to the page http://dlang.org/cpptod.html I've got two posts complete[1]. Since C++ and D are exactly the same for the majority of the code I'm only showing D and talk of C++'s choice. While the rules governing D's behavior are fairly simple I feel that I've expanded on the content enough to provide useful information beyond fixing C++'s problems. 1. http://he-the-great.livejournal.com/52333.html Nice! I'll post it tomorrow on reddit and friends. You have an unmatched brace after "assert(a2[].all!(x => x == 0));". Andrei Actually a bunch of unmatched braces (formatter eats the closing one?) and at least one ";;" instead of ";". -- Andrei
Re: Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"
On 5/29/14, 9:21 PM, Jesse Phillips wrote: On Wednesday, 28 May 2014 at 07:21:56 UTC, dennis luehring wrote: woudl be nice to have some sort of example by example comparison or as an extension to the page http://dlang.org/cpptod.html I've got two posts complete[1]. Since C++ and D are exactly the same for the majority of the code I'm only showing D and talk of C++'s choice. While the rules governing D's behavior are fairly simple I feel that I've expanded on the content enough to provide useful information beyond fixing C++'s problems. 1. http://he-the-great.livejournal.com/52333.html Nice! I'll post it tomorrow on reddit and friends. You have an unmatched brace after "assert(a2[].all!(x => x == 0));". Andrei
Re: DGui is alive
26.05.2014 23:08, Andre пишет: On Saturday, 24 May 2014 at 07:20:49 UTC, Denis Shelomovskij wrote: 20.05.2014 17:46, FrankLike пишет: DGui need some other controls,such as imageButton,DataView,GridViewe.t.c. There is no plan to add new controls and I don't see any lacking ones. One can use `paint` event to draw image on button and there is `GridPanel` (with usage example `grid.d`) so I don't understand why `GridView` is needed and what is its purpose. Also I don't know what is `DataView` for. DGui is really fantastic, it is easy to use and without a big overhead. What I experienced, developers coming from other frameworks might miss a horizontal/vertical layout. This would be much easier than using a grid for this purpose. Also some more examples could boost the popularity of DGui. Especially, how can I create create my own controls? Horizontal/vertical layout can be achieved using `Control.dock` property. I will think about examples and documentation improvements. What would be really nice for business developer would be a specific Stringgrid control (like delphi/lazarus has). Here an example http://i.stack.imgur.com/FJFiN.gif Use `ListView` and `TreeView` classes. Do you accept pull requests if developers provide you new stuff for DGui? Yes, but I strongly recommend to contact me first to plan and synchronize activities to prevent useless time wasting. -- Денис В. Шеломовский Denis V. Shelomovskij
Re: Adam D. Ruppe's "D Cookbook" now available!
"Walter Bright" 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=-
Re: Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"
On Thu, 29 May 2014 20:40:10 +0100, Walter Bright wrote: On 5/29/2014 11:25 AM, Dmitry Olshansky wrote: Agreed. The simple dream of automatically decoding UTF and staying "Unicode correct" is a failure. Yes. Attempting to hide the fact that strings are UTF-8 is just doomed. It's like trying to pretend that floating point does not do rounding. It's far more practical to embrace what it is and deal with it. Yes, D programmers will need to understand what UTF-8 is. I don't see any way around that. And it's the right choice. 4 of the 7 billion people in the world today are in Asia and by 2100 80% of the worlds population will be in Asia and Africa. http://bigthink.com/neurobonkers/it-is-not-about-political-views-or-ideologies-it-is-blunt-facts-which-are-not-known R -- Using Opera's revolutionary email client: http://www.opera.com/mail/
Re: Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"
On Tue, 27 May 2014 22:40:00 +0100, Walter Bright wrote: On 5/27/2014 2:22 PM, w0rp wrote: I'm actually a native speaker of 25 years and I didn't get it at first. Natural language communicates ideas approximately. What bugs me is when people say: I could care less. I've always assumed some sort of sentence finishing laziness on their part. As in, "I could care less, but it would be pretty hard to do so" or something like that. R