www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - "Programming in D" book, "User Defined Attributes (UDA)" chapter

reply =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
I made some additions and corrections. The following are the major ones:

* The 'User Defined Attributes (UDA)' chapter

*  nogc

* foreach_reverse

* Formatted element output with %( and %)

* static this, static ~this, shared static this, and shared static ~this

As a reminder, the book is available as PDF, downloadable from the 
header of each chapter:

   http://ddili.org/ders/d.en/index.html

Ali
Aug 26 2014
next sibling parent "eles" <eles215 gzk.dot> writes:
On Wednesday, 27 August 2014 at 06:16:14 UTC, Ali Çehreli wrote:
 I made some additions and corrections. The following are the 
 major ones:

 * The 'User Defined Attributes (UDA)' chapter

 *  nogc

 * foreach_reverse

 * Formatted element output with %( and %)

 * static this, static ~this, shared static this, and shared 
 static ~this
Wonderful work. Many thanks.
Aug 27 2014
prev sibling next sibling parent reply "Olivier Henley" <olivier.henley ubisoft.com> writes:
Super!

Huge thx for all the nice work btw.

Questions:

1. Does the book have been entirely translated then..?

2. Would you agree to configure a print version through 
Blurb.com? This way we could get a copy through amazon like ... 
tomorrow ;)
Aug 28 2014
next sibling parent "eles" <eles215 gzk.dot> writes:
On Thursday, 28 August 2014 at 21:07:00 UTC, Olivier Henley wrote:
 Super!

 Huge thx for all the nice work btw.

 Questions:

 1. Does the book have been entirely translated then..?
Here, the answer is "Yes" Ali's work is impressive.
Aug 28 2014
prev sibling parent reply =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
On 08/28/2014 02:06 PM, Olivier Henley wrote:

 Huge thx for all the nice work btw.
I thank everyone for the nice words and the motivation. :)
 1. Does the book have been entirely translated then..?
Technically yes, but UDAs had to be added before I could call it complete and there are still missing pieces: - opDollar and the very recent multi-index opSlice - disable - Importing multiple modules of a package - This is an interesting one, which I think not many people know about: aliases for operator overloading. See the following push for an example: https://github.com/D-Programming-Language/dmd/pull/989/files - Table of contents for the pdf version - Book index - A number of other things
 2. Would you agree to configure a print version through Blurb.com? This
 way we could get a copy through amazon like ... tomorrow ;)
I think I am finally very close to doing that, but not today. :) Would you recommend considering at least some of Blurb.com's competitors as well? Who? Thank you, Ali
Aug 28 2014
parent reply "Olivier Henley" <olivier.henley ubisoft.com> writes:
On Friday, 29 August 2014 at 05:35:12 UTC, Ali Çehreli wrote:

 Would you recommend considering at least some of Blurb.com's 
 competitors as well? Who?
Right. Blurb has a number of pages limitation that would require a two volumes release of your book. :/ Lulu can make it to 740 pages. CreateSpace offers packages up to 828 pages. Both can distribute through Amazon. Prices are somewhat similar... I found this post interesting: http://www.cnet.com/news/self-publishing-a-book-25-things-you-need-to-know/ Otherwise did you contact any publisher? olivier
Sep 09 2014
parent reply =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
On 09/09/2014 04:38 PM, Olivier Henley wrote:

 Blurb has a number of pages limitation that would require a two volumes
 release of your book. :/ Lulu can make it to 740 pages. CreateSpace
 offers packages up to 828 pages.
Page count can change simply by changing the font size. ;)
 I found this post interesting:
 
http://www.cnet.com/news/self-publishing-a-book-25-things-you-need-to-know/ Thank you. I had read that before and I have it bookmarked to be read again.
 Otherwise did you contact any publisher?
My only contact was in 2011 with Addison Wesley through Andrei. He had relayed my interest to his editor and had learned that "the field of general programming introduction is very crowded." They and other publishers may think differently as the book has become a little more like a language reference as well. As an update, I have already tied many loose ends. I am currently changing the operator overloading chapter to include the more proper multi-dimensional indexing and slicing that came with 2.066. Ali
Sep 09 2014
parent reply =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
On 09/09/2014 05:04 PM, Ali Çehreli wrote:

 I have already tied many loose ends. I am currently
 changing the operator overloading chapter to include the more proper
 multi-dimensional indexing and slicing that came with 2.066.
Done. I divided array operator overloading (indexing and slicing) into two categories: 1) I updated the existing Operator Overloading chapter to cover only single-dimensional uses by - opIndex - opIndexAssign - opIndexUnary - opIndexOpAssign - opDollar - opSlice (I specifically took out the now-discouraged opSliceUnary, opSliceAssign, and opSliceOpAssign.) http://ddili.org/ders/d.en/operator_overloading.html (Chuck Allison will be mad at me because I used one of his programming assignments as an example there: Double-ended queue implemented in terms of two D slices. :) ) 2) I added the multi-dimensional operator overloading to the More Templates chapter under the section "Using templates in multi-dimensional operator overloading". (That is admittedly a curious place for it but multi-dimensional operator overloading uses tuple template parameters, which are introduced in that chapter.) There, I especially noted that the responsibility of opSlice is reduced to returning simply a Tuple!(size_t, size_t) or an equivalent type. (In case others have missed it, returning a slice representing all of the elements of a container is now the responsibility of opIndex that takes no parameters.) http://ddili.org/ders/d.en/templates_more.html Ali
Sep 11 2014
parent reply ketmar via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> writes:
On Thu, 11 Sep 2014 10:47:40 -0700
Ali =C3=87ehreli via Digitalmars-d-announce
<digitalmars-d-announce puremagic.com> wrote:

    http://ddili.org/ders/d.en/templates_more.html
there is a little bug: opSlice(size_t, size_t) description is: `collection[i, j]` shouldn't it be: `collection[i..j]`?
Sep 11 2014
parent reply =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
On 09/11/2014 11:30 AM, ketmar via Digitalmars-d-announce wrote:
 On Thu, 11 Sep 2014 10:47:40 -0700
 Ali Çehreli via Digitalmars-d-announce
 <digitalmars-d-announce puremagic.com> wrote:

     http://ddili.org/ders/d.en/templates_more.html
there is a little bug: opSlice(size_t, size_t) description is: `collection[i, j]` shouldn't it be: `collection[i..j]`?
Thank you. There are others in the other table as well. Fix is coming soon. I have already fixed the template constaint bugs: Two of them should be if (dimension <= 1) (not 2). Would you like to send me your name so that I add it to the Acknowledgments section. (Otherwise ketmar is it. :) Ali
Sep 11 2014
parent ketmar via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> writes:
On Thu, 11 Sep 2014 11:48:26 -0700
Ali =C3=87ehreli via Digitalmars-d-announce
<digitalmars-d-announce puremagic.com> wrote:

 Would you like to send me your name so that I add it to the=20
 Acknowledgments section. (Otherwise ketmar is it. :)
Ketmar, or Ketmar Dark if you want "full name". ;-)
Sep 11 2014
prev sibling next sibling parent ketmar via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> writes:
On Tue, 26 Aug 2014 23:16:14 -0700
Ali =C3=87ehreli via Digitalmars-d-announce
<digitalmars-d-announce puremagic.com> wrote:

 * The 'User Defined Attributes (UDA)' chapter
great!
 * static this, static ~this, shared static this, and shared static
 ~this
and this too.
Aug 26 2014
prev sibling next sibling parent reply ketmar via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> writes:
On Tue, 26 Aug 2014 23:16:14 -0700
Ali =C3=87ehreli via Digitalmars-d-announce
<digitalmars-d-announce puremagic.com> wrote:

 * Formatted element output with %( and %)
by the way, i never knows about this feature. maybe i should RTFM someday...
Aug 26 2014
parent =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
On 08/26/2014 11:42 PM, ketmar via Digitalmars-d-announce wrote:
 On Tue, 26 Aug 2014 23:16:14 -0700
 Ali Çehreli via Digitalmars-d-announce
 <digitalmars-d-announce puremagic.com> wrote:

 * Formatted element output with %( and %)
by the way, i never knows about this feature. maybe i should RTFM someday...
They appear under formattedWrite: My brief explanation is under "Formatted element output" here: http://ddili.org/ders/d.en/formatted_output.html Ali
Aug 28 2014
prev sibling parent reply "Dejan Lekic" <dejan.lekic gmail.com> writes:
On Wednesday, 27 August 2014 at 06:16:14 UTC, Ali Çehreli wrote:
 I made some additions and corrections. The following are the 
 major ones:

 * The 'User Defined Attributes (UDA)' chapter

 *  nogc

 * foreach_reverse

 * Formatted element output with %( and %)

 * static this, static ~this, shared static this, and shared 
 static ~this

 As a reminder, the book is available as PDF, downloadable from 
 the header of each chapter:

   http://ddili.org/ders/d.en/index.html

 Ali
Good work Ali! Do you by any chance plan to release ePub version of it?
Aug 29 2014
parent reply =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
On 08/29/2014 03:45 AM, Dejan Lekic wrote:

  Do you by any chance plan to release ePub version of it?
Yes. It will happen. :) Ali
Aug 29 2014
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 8/29/14, 6:30 AM, Ali Çehreli wrote:
 On 08/29/2014 03:45 AM, Dejan Lekic wrote:

  Do you by any chance plan to release ePub version of it?
Yes. It will happen. :) Ali
Awesome!! Put it on Amazon too! -- Andrei
Aug 29 2014
parent reply Andrej Mitrovic via Digitalmars-d-announce writes:
On 8/29/14, Andrei Alexandrescu via Digitalmars-d-announce
<digitalmars-d-announce puremagic.com> wrote:
 Awesome!! Put it on Amazon too! -- Andrei
Yeah, I'd be the first in line to buy it as well! If you do consider publishing the book, do let us know before it happens so those of us who want to can go through a thorough review and let you know of any typo's or mistakes before it's set in stone (or on paper :P). I'd be glad to review it in-depth.
Sep 10 2014
parent =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
On 09/10/2014 01:41 AM, Andrej Mitrovic via Digitalmars-d-announce wrote:

 If you do consider publishing the book, do let us know before it
 happens so those of us who want to can go through a thorough review
 and let you know of any typo's or mistakes before it's set in stone
 (or on paper :P). I'd be glad to review it in-depth.
That is very kind of you. Everybody is always welcome to do so. :) I guess putting the sources on a git repo would help the reviewers. There was such a request at some point but I did not follow up on that. Ali
Sep 11 2014