Programming in D book, draft of the first print edition and eBook formats

2014-11-26 Thread Ali Çehreli via Digitalmars-d-announce

Main page:

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


1) For the first time, there are eBook formats:

  http://ddili.org/ders/d.en/Programming_in_D_Ali_Cehreli.ALPHA.epub

  http://ddili.org/ders/d.en/Programming_in_D_Ali_Cehreli.ALPHA.mobi

I used 'calibre' to generate those alpha quality books. I chose epub 
and mobi just because I thought that they are the most common formats. 
Just let me know if you need another format or simply use 'calibre' or 
another tool yourself. :)



2) There has been a lot of work to make the book ready for its first 
print edition. (I will spare you the details of countless hours of extra 
work that went into this eternal final step.)


The PDF version finally looks a lot like a real book:

* There is a Table of Contents section

* There is an Index section

* The internal links work


3) There are two new chapters:

* Lvalues and Rvalues

* Nested Functions, Structs, and Classes


4) There are the following notable additions to existing chapters:

* 'pragma' is added to the Templates chapter

* Special keywords are added to the Templates chapter (__FILE__, 
__LINE__, etc.)


* Contract inheritance is added to the 'Contract Programming for Structs 
and Classes' chapter


* The .offsetof property and the 'align' atribute are added to the 
'Memory Management' chapter



5) I am grateful to Andrej Mitrović, Steven Schveighoffer, and Luís 
Marques, who accepted to edit the book. However, they are through only 
less than 10% of the book so far. As always, current or future mistakes 
are mine. :)


Ali


Re: Programming in D book, draft of the first print edition and eBook formats

2014-11-26 Thread Ondra via Digitalmars-d-announce

Awesome!


Re: Programming in D book, draft of the first print edition and eBook formats

2014-11-26 Thread Gary Willoughby via Digitalmars-d-announce

Fantastic work.


Re: Programming in D book, draft of the first print edition and eBook formats

2014-11-26 Thread Anonymous via Digitalmars-d-announce
Thx, your book's just helped me last night (opSlice template not 
well explained in the official html). Two questions:

- do you know that your website has serious design issue ?
- does paper version mean no more free pdf/ebook ?


Re: Programming in D book, draft of the first print edition and eBook formats

2014-11-26 Thread Martin Drašar via Digitalmars-d-announce
This is HUGE!

I've gone through many of your chapters, but it was just now, after
seeing it as a one 700 pages long book, that I truly realized how much
of a work this must have been.

Thank you. Can't wait to have it on the shelf...

Martin



smime.p7s
Description: Elektronicky podpis S/MIME


Re: dfix 0.2.0

2014-11-26 Thread Nordlöw

On Tuesday, 25 November 2014 at 23:58:21 UTC, Brian Schott wrote:

On Tuesday, 25 November 2014 at 23:47:07 UTC, Nordlöw wrote:

On Tuesday, 25 November 2014 at 23:45:17 UTC, Nordlöw wrote:
I guess one solution would be to make warnings non-errors 
right but that seems dumb concerning what dfix can do for us 
regarding auto-converting C-style arrays syntax to D-style :)


The issue trackers for dfix and libdparse are on github.

BTW: How do I specify that a dependency package (libdparse) 
should be compiled with -wi instead of -w?


You can read DUB's documentation here: 
http://code.dlang.org/package-format


It would be nice if we could call DUB either as

dub -wi

or in a more generic way as

dub --dmd-flags=wi,...

so I don't have to clone the top-level project and modify its 
dub.json myself in order to test dfix built using dmd git master. 
Should I register an DUB issue for this?


Re: dfix 0.2.0

2014-11-26 Thread Nordlöw

On Wednesday, 26 November 2014 at 13:11:28 UTC, Nordlöw wrote:

It would be nice if we could call DUB either as

dub -wi

or in a more generic way as

dub --dmd-flags=wi,...

so I don't have to clone the top-level project and modify its 
dub.json myself in order to test dfix built using dmd git 
master. Should I register an DUB issue for this?



Note that

DFLAGS=-wi dub build -v

doesn't work here either because -wi is prepended to -w which 
still results warnings as errors.


Re: Programming in D book, draft of the first print edition and eBook formats

2014-11-26 Thread Dejan Lekic via Digitalmars-d-announce

On Wednesday, 26 November 2014 at 10:34:24 UTC, Ali Çehreli wrote:

Main page:

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


1) For the first time, there are eBook formats:

  
http://ddili.org/ders/d.en/Programming_in_D_Ali_Cehreli.ALPHA.epub


  
http://ddili.org/ders/d.en/Programming_in_D_Ali_Cehreli.ALPHA.mobi


I used 'calibre' to generate those alpha quality books. I 
chose epub and mobi just because I thought that they are the 
most common formats. Just let me know if you need another 
format or simply use 'calibre' or another tool yourself. :)



2) There has been a lot of work to make the book ready for its 
first print edition. (I will spare you the details of countless 
hours of extra work that went into this eternal final step.)


The PDF version finally looks a lot like a real book:

* There is a Table of Contents section

* There is an Index section

* The internal links work


3) There are two new chapters:

* Lvalues and Rvalues

* Nested Functions, Structs, and Classes


4) There are the following notable additions to existing 
chapters:


* 'pragma' is added to the Templates chapter

* Special keywords are added to the Templates chapter 
(__FILE__, __LINE__, etc.)


* Contract inheritance is added to the 'Contract Programming 
for Structs and Classes' chapter


* The .offsetof property and the 'align' atribute are added to 
the 'Memory Management' chapter



5) I am grateful to Andrej Mitrović, Steven Schveighoffer, and 
Luís Marques, who accepted to edit the book. However, they are 
through only less than 10% of the book so far. As always, 
current or future mistakes are mine. :)


Ali


Well done, Ali - I will buy the ePub once the book is done.

One suggestion: if you can, do what Ivan Ristic does with his 
SSL/TLS books (https://www.feistyduck.com). Basically, people who 
buy his books have unlimited access to book updates. Ivan is 
sending information about book updates whenever there is 
something new, so we readers can go back to the website and grab 
the latest version of the book.


I think this is a much better approach than book editions, as 
they may appear years after each other... Sure, it is more 
complicated, but I think it pays off, and I do not mind book 
being little bit more expensive if I can access updated version 
of it.


Cheers!


Re: Programming in D book, draft of the first print edition and eBook formats

2014-11-26 Thread Dejan Lekic via Digitalmars-d-announce
One more thing - if you have the book in some wiki form, it may 
be a good idea to transform it into AsciiDoc as it has really 
nice ePub/PDF/HTML output.


Re: Programming in D book, draft of the first print edition and eBook formats

2014-11-26 Thread Andrei Alexandrescu via Digitalmars-d-announce

On 11/26/14 2:34 AM, Ali Çehreli wrote:

Main page:

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


1) For the first time, there are eBook formats:

   http://ddili.org/ders/d.en/Programming_in_D_Ali_Cehreli.ALPHA.epub

   http://ddili.org/ders/d.en/Programming_in_D_Ali_Cehreli.ALPHA.mobi


Fantastic! I wanted to mention this on reddit but noticed that (a) 
http://ddili.org/ders/d.en/ has the left menu in Turkish, and (b) there 
are no links to the ebooks from that page.


Could you please fix that?


Thanks,

Andrei



Re: Programming in D book, draft of the first print edition and eBook formats

2014-11-26 Thread Ali Çehreli via Digitalmars-d-announce

On 11/26/2014 03:42 AM, Anonymous wrote:

 - do you know that your website has serious design issue ?

Of course. :(

 - does paper version mean no more free pdf/ebook ?

My current thinking is that all of the ebook formats should be free but 
also purchasable.


A distributor like Smashwords would reach more readers. However, a 
person who is interested in D would find the book on my site anyway. (I 
wonder whether Smashwords would allow me to also provide the book for 
free on my site?)


For the print version, I am thinking about Amazon's CreateSpace mainly 
because unlike Lulu and many other self-publishing houses they accept 
more than 440 pages.


Ali



Re: Programming in D book, draft of the first print edition and eBook formats

2014-11-26 Thread Ali Çehreli via Digitalmars-d-announce

On 11/26/2014 06:27 AM, Dejan Lekic wrote:

 whenever there is something new, so we readers can go back to the website
 and grab the latest version of the book.

That has always been the case with Programming in D. Although there has 
been a hiatus of about two months this last time, Luís Marques' edits 
from this morning have already made it to the site as we speak. ;)


 I think this is a much better approach than book editions, as they may
 appear years after each other... Sure, it is more complicated, but I
 think it pays off

It is not complicated at all. I type 'make', copy the generated .zip 
file to the hosting site, unzip, and the edits are live! :) (Although, 
the .epub and .mobi formats are not integrated to the Makefile yet.)


On 11/26/2014 08:55 AM, Dejan Lekic wrote:

 One more thing - if you have the book in some wiki form, it may be a
 good idea to transform it into AsciiDoc as it has really nice
 ePub/PDF/HTML output.

For historical reasons I started with Ddoc. I can investigate converting 
it to AsciiDoc but honestly I am not motivated much to do that. :)


Currently, Ddoc is first converted to HTML and I use the HTML to 
generate different final formats.


Ali



Re: Programming in D book, draft of the first print edition and eBook formats

2014-11-26 Thread Ali Çehreli via Digitalmars-d-announce

On 11/26/2014 09:24 AM, Andrei Alexandrescu wrote:

 I wanted to mention this on reddit

That site is fine.

 but noticed that (a) http://ddili.org/ders/d.en/ has the left menu in
 Turkish

That site sucks! :)

 and (b) there are no links to the ebooks from that page.

I intentionally did not link the alpha-quality stuff. Pictures are 
missing, chapter numbers vary between -1 and 2, etc. :p Let me deal with 
it after I eat some Thanksgiving turkey tomorrow.


Speaking of which, thank you everybody! :)

Ali



Re: Programming in D book, draft of the first print edition and eBook formats

2014-11-26 Thread weaselcat via Digitalmars-d-announce

Congrats on (nearly) finishing your book. It's one of the best D
resources available and very high quality.


Re: Programming in D book, draft of the first print edition and eBook formats

2014-11-26 Thread Meta via Digitalmars-d-announce

On Wednesday, 26 November 2014 at 10:34:24 UTC, Ali Çehreli wrote:

Main page:

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


1) For the first time, there are eBook formats:

  
http://ddili.org/ders/d.en/Programming_in_D_Ali_Cehreli.ALPHA.epub


  
http://ddili.org/ders/d.en/Programming_in_D_Ali_Cehreli.ALPHA.mobi


I used 'calibre' to generate those alpha quality books. I 
chose epub and mobi just because I thought that they are the 
most common formats. Just let me know if you need another 
format or simply use 'calibre' or another tool yourself. :)



2) There has been a lot of work to make the book ready for its 
first print edition. (I will spare you the details of countless 
hours of extra work that went into this eternal final step.)


The PDF version finally looks a lot like a real book:

* There is a Table of Contents section

* There is an Index section

* The internal links work


3) There are two new chapters:

* Lvalues and Rvalues

* Nested Functions, Structs, and Classes


4) There are the following notable additions to existing 
chapters:


* 'pragma' is added to the Templates chapter

* Special keywords are added to the Templates chapter 
(__FILE__, __LINE__, etc.)


* Contract inheritance is added to the 'Contract Programming 
for Structs and Classes' chapter


* The .offsetof property and the 'align' atribute are added to 
the 'Memory Management' chapter



5) I am grateful to Andrej Mitrović, Steven Schveighoffer, and 
Luís Marques, who accepted to edit the book. However, they are 
through only less than 10% of the book so far. As always, 
current or future mistakes are mine. :)


Ali


This is great news. I'm excited to have more than TDPL sitting on 
my shelf.


Re: D/Objective-C 64bit

2014-11-26 Thread Christian Schneider via Digitalmars-d-announce


Why not use a constructor and let the compiler manage the 
boilerplate?


this(NSRect frame) [initWithFrame:] {
//my stuff
super(frame);
}

This should emit the same code as the function above (but I 
haven't tested). And then you can write:


auto view = new KeyboardView(someFrame);

and have proper type safety.


Thanks Michel, my question was based on a completely wrong 
assumption (really sorry, my bad), the code of course works, 
which is again really cool about the D/Objective-C bridging.


When I prepare the framework glue headers I usually add both 
variations init.. and this(), so the coder who uses it can take 
the shortcut if he prefers. I try to stay as close as possible to 
the naming conventions of the Cocoa framework, it facilitates 
somewhat the documentation lookup in Xcode. Named parameters is 
probably the feature I like most about Objective-C, it makes the 
code so much more readable and auto-documents, if one is careful.


Re: Programming in D book, draft of the first print edition and eBook formats

2014-11-26 Thread Ali Çehreli via Digitalmars-d-announce

On 11/26/2014 11:35 AM, Ali Çehreli wrote:

 I wonder whether Smashwords would allow me to also provide the book 
for free

 on my site?

Found the answer to that question:

6c. Free Copies. As administrator of your work, Author may use the 
Smashwords platform to distribute complimentary copies of the work, or 
personally email free files to people, even when you are generally 
charging a fee. However, Smashwords files cannot be mass-distributed via 
download at blogs, websites or other retailers outside the Smashwords 
network.


  https://www.smashwords.com/about/tos

Ali



Necht Hob

2014-11-26 Thread sekopati via Digitalmars-d-announce

Necht hob was fitted many years ago and still works perfect.


_
[url=http://www.nechtgashob.co.uk]Necht Hob[/url]


Re: Programming in D book, draft of the first print edition and eBook formats

2014-11-26 Thread Joakim via Digitalmars-d-announce

On Wednesday, 26 November 2014 at 23:16:11 UTC, Ali Çehreli wrote:

On 11/26/2014 11:35 AM, Ali Çehreli wrote:

 I wonder whether Smashwords would allow me to also provide
the book for free
 on my site?

Found the answer to that question:

6c. Free Copies. As administrator of your work, Author may use 
the Smashwords platform to distribute complimentary copies of 
the work, or personally email free files to people, even when 
you are generally charging a fee. However, Smashwords files 
cannot be mass-distributed via download at blogs, websites or 
other retailers outside the Smashwords network.


  https://www.smashwords.com/about/tos


I think you are misinterpreting that clause.  I had never heard 
of Smashwords before, so I just looked at their site and their 
TOS.  What they do is take your book in doc format and generate 
ebook formats that can be sold online and to other book 
retailers, as detailed in clause 5 of their TOS:


5. Formats of Digital Conversions. Author shall submit their 
Work as a Microsoft Word .doc file. Smashwords shall utilize its 
proprietary Meatgrinder technology to convert the book into 
multiple ebook formats, and publish the work for use in sampling, 
distributing and selling the work. The author/publisher is not 
authorized to independently sell or distribute 
Smashwords-generated file conversions outside of the Smashwords 
site or Smashwords distribution network without first receiving 
written permission from Smashwords (in other words, you cannot 
use Smashwords as a free file conversion service so you can sell 
the files elsewhere). You acknowledge that if you violate this 
requirement, you may forfeit any accrued earnings at Smashwords, 
and your account may be deleted without notification.


I believe both clauses simply says you cannot distribute their 
converted ebook files: note that 6c says you cannot mass 
distribute Smashwords files, not the Work, which is how they 
refer to your book itself.  They also say on their site that you 
are free to use other distributors and retain copyright over your 
work.


Few would fault you for not wanting to give away free copies if 
you're selling the book, but I don't think Smashwords has a say 
in the matter.