I'm pleased to announce that Nim in Action is now in print.
I just received one of the very first printed copies, which means that if you bought the printed book you should receive a copy soon as well!
Some pictures of the finished product:
I'm very happy with the print quality and would like to thank Manning for their hard work. They did a brilliant job. I'd also like to thank all of you, for your support and feedback throughout the development of this book. I couldn't have done it without you.
Excited to hear your thoughts about the print edition. Happy hacking!
Great Job !! Mine is on the way !
All the best.
50% off today only for those of you who haven't had a chance to pick up a copy yet :)
See https://book.picheta.me for details.
Got my copy yesterday! :D
Looks really good. I am looking forward to reading it.
Nice work Dom, a little bit of history in the making :)
I have just looked at the final PDF. Looks really nice. (The customer name at the bottom of each page -- well if they think that it will help...) I have the feeling that the epub version is not really identical with the PDF currently -- will there be an update for ebub later? Somewhere I read that final epub would be available on 4 of september, so I tried a epub download yesterday, but epub seems to be still meap 10?
I still have to decide if I may read some parts again, maybe on some dark winter days. So I just looked what errors have been fixed and what new stuff is added compared to the firsts meaps. Well, I am still irritated about Dom's remark to the ReadUntil() proc:
Page 165 final pdf:
domainCode.setLen(0)
i.inc parseUntil(line, domainCode, {' '}, i)
#The length of the string is reset to
#0. This is much more efficient
#than assigning "" because setLen
#reuses memory instead of
#allocating new strings.
That still looks strange for me, because we have
proc parseUntil*(s: string, token: var string, until: set[char],
start = 0): int {.inline.} =
## parses a token and stores it in ``token``. Returns
## the number of the parsed characters or 0 in case of an error. A token
## consists of the characters notin `until`.
var i = start
while i < s.len and s[i] notin until: inc(i)
result = i-start
token = substr(s, start, i-1)
So token is the result of substr. For the first meap I had the strong feeling that this means that a new string is allocated and I have still no idea how that match to Dom's string reuse remarks. (I reported that point long time ago, and Dom replied something like "well, maybe".
Well, maybe Manning and Dom are right, maybe the compiler does indeed some magic here? But my feeling is still, that token/domainCode are newly allocated for each call, so there is no string reuse involved, and domainCode.setLen(0) is unnecessary. I was hoping for a more detailed explanation from Manning people.
Another less important point: Why use {' '} ? Set for single char? There is a proc dedicated for single char, so why not use that?
Well, the PDF looks very nice. And my name is even listed in the reviewer section, thanks.