www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - New book: Developing with compile time in mind

reply Rikki Cattermole <alphaglosined gmail.com> writes:
Exciting news, my book on CTFE is out[0].

To summarize, it contains most of my knowledge of CTFE in a generic'ish 
form with examples being in D.

There is a bit of talk of what support there can be and what we have.
The design patterns are probably the most interesting.

If you have any improvements or find any issues e.g. stray hyphens 
(Copied directly from Word wasn't a good idea) please let me know.

The size of the book is around 51 pages.
I understand if you do not consider it worth $15USD so the minimum price 
is $5USD.

If there is demand I can create an extra package (will cost) that 
contains full examples on how to use the design patterns.

Leanpub support sending to Kindle and will you give you a pdf, mobi and 
epub versions.

[0] https://leanpub.com/ctfe
Feb 16 2015
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 2/16/2015 3:07 PM, Rikki Cattermole wrote:
 [0] https://leanpub.com/ctfe
Thank you. I bought my copy!
Feb 16 2015
parent reply Rikki Cattermole <alphaglosined gmail.com> writes:
On 17/02/2015 4:32 p.m., Walter Bright wrote:
 On 2/16/2015 3:07 PM, Rikki Cattermole wrote:
 [0] https://leanpub.com/ctfe
Thank you. I bought my copy!
No problem! Just let me know any improvements that could be made. Updates are free after all! (Leanpub is amazing, what with markdown writing and all).
Feb 16 2015
parent reply Russel Winder via Digitalmars-d-announce writes:
On Tue, 2015-02-17 at 16:40 +1300, Rikki Cattermole via Digitalmars-d-annou=
nce wrote:
=20
[=E2=80=A6]
 Just let me know any improvements that could be made. Updates are=20
 free after all! (Leanpub is amazing, what with markdown writing and=20
 all).
How did you find Markdown for writing a book? My prejudice is that you need XeLaTeX or AsciiDoc for large document=20 writing, especially when targeting press PDF. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Feb 17 2015
next sibling parent Rikki Cattermole <alphaglosined gmail.com> writes:
On 18/02/2015 12:49 a.m., Russel Winder via Digitalmars-d-announce wrote:
 On Tue, 2015-02-17 at 16:40 +1300, Rikki Cattermole via Digitalmars-d-announce
wrote:

 […]
 Just let me know any improvements that could be made. Updates are
 free after all! (Leanpub is amazing, what with markdown writing and
 all).
How did you find Markdown for writing a book? My prejudice is that you need XeLaTeX or AsciiDoc for large document writing, especially when targeting press PDF.
Rather enjoyable. I loved that I could just write my content. Maybe splash some hashes or {pagebreak} in there. Although I lost a lot of control especially since leanpub's system isn't opensource unfortunately. But I intend to fix that one day ;)
Feb 17 2015
prev sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 2/17/15 3:49 AM, Russel Winder via Digitalmars-d-announce wrote:
 On Tue, 2015-02-17 at 16:40 +1300, Rikki Cattermole via Digitalmars-d-announce
wrote:

 […]
 Just let me know any improvements that could be made. Updates are
 free after all! (Leanpub is amazing, what with markdown writing and
 all).
How did you find Markdown for writing a book? My prejudice is that you need XeLaTeX or AsciiDoc for large document writing, especially when targeting press PDF.
Mine too. However, PDF is for fixed layout and any future book should aim at flexible format or at least multiple fixed layouts. I think Markdown's use for a book is "works, won't ever win an interior design contest". TDPL's second edition will most likely use ddoc macros to generate LaTeX, HTML, and a couple of ebook formats. Andrei
Feb 17 2015
next sibling parent reply Russel Winder via Digitalmars-d-announce writes:
On Tue, 2015-02-17 at 08:08 -0800, Andrei Alexandrescu via Digitalmars-d-an=
nounce wrote:
 On 2/17/15 3:49 AM, Russel Winder via Digitalmars-d-announce wrote:
=20
[=E2=80=A6]
 My prejudice is that you need XeLaTeX or AsciiDoc for large=20
 document writing, especially when targeting press PDF.
=20 Mine too. However, PDF is for fixed layout and any future book=20 should aim at flexible format or at least multiple fixed layouts.
Print requires best possible formatting for press PDF, other formats=20 generally need reflow which is a different set of constraints. Sadly=20 XeLaTeX hasn't really caught up on the epub formats.=20
 I think Markdown's use for a book is "works, won't ever win an=20
 interior design contest".
OK so AsciiDoc is the future for book writing.
=20
[=E2=80=A6] --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Feb 17 2015
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 2/17/15 8:22 AM, Russel Winder via Digitalmars-d-announce wrote:
 OK so AsciiDoc is the future for book writing.
Guess I better find out what AsciiDoc is then. Wee, it has macros: Andrei
Feb 17 2015
parent Walter Bright <newshound2 digitalmars.com> writes:
On 2/17/2015 9:02 AM, Andrei Alexandrescu wrote:
 Guess I better find out what AsciiDoc is then. Wee, it has macros:

Ddoc leads the way in innovation again!
Feb 18 2015
prev sibling parent Rikki Cattermole <alphaglosined gmail.com> writes:
On 18/02/2015 5:08 a.m., Andrei Alexandrescu wrote:
 On 2/17/15 3:49 AM, Russel Winder via Digitalmars-d-announce wrote:
 On Tue, 2015-02-17 at 16:40 +1300, Rikki Cattermole via
 Digitalmars-d-announce wrote:

 […]
 Just let me know any improvements that could be made. Updates are
 free after all! (Leanpub is amazing, what with markdown writing and
 all).
How did you find Markdown for writing a book? My prejudice is that you need XeLaTeX or AsciiDoc for large document writing, especially when targeting press PDF.
Mine too. However, PDF is for fixed layout and any future book should aim at flexible format or at least multiple fixed layouts. I think Markdown's use for a book is "works, won't ever win an interior design contest". TDPL's second edition will most likely use ddoc macros to generate LaTeX, HTML, and a couple of ebook formats. Andrei
Idk Makura version (leanpub's specification) is pretty nice. You really don't think about formatting much. You just make the content and let it do the rest. Everything you put into the markdown documents themselves are pretty straight forward easy to read and understand e.g. {title="On top of code snippet text"} ```D void main() { import std.stdio; writeln("Hello World!"); } ``` And yes it support D code blocks :D Much better then my previous method of using images. In fact this is a requirement for me. You can configure Makura's generation via a config file which includes output page size. So right now leanpub is generating pdf's that can be used on lulu.com. There is some modifications need to be done e.g. blank last page. But that's about it. Specifically for a pocketbook. I would highly recommend giving leanpub a go. I absolutely fell in love with it. In fact I'm seriously considering implementing Makura in D once I have a good pdf generation library. I know we already have a markdown library but I might just make my own.
Feb 17 2015