
Show HN: Nim in Action - dom96
https://book.picheta.me/
======
dom96
Author here. The development of this book has taken a while but I'm happy to
say that it is now in print!

Chapter 1 and 8 are free so be sure to give them a look if you're new to Nim.

Previous discussion for the curious:
[https://news.ycombinator.com/item?id=10987975](https://news.ycombinator.com/item?id=10987975)

Happy to answer any questions.

~~~
ilyagr
Perhaps you should make chapter 3 free too? That's the kind of material is
want to see before I decide if I like the language or the book.

Of course, you might have a good reason not to do it, but that was my first
thought when looking at the web site.

~~~
djsumdog
That is the big advantage of getting books out on shelves, so people can look
through them. That's harder to do with more independent works.

Now that I think about it, I use to buy programming books in University and
just after (2005-ish), but I haven't really since. Even when I work places
where we have a book budget; I never request anything. These days I read the
documentation, and if I get stuck, I go to a stack exchange site.

~~~
nonsince
Hi Dan

------
SpacemanSpiff
I just ordered my book. Here's a 37% off discount code: _fccpicheta_ courtesey
of /r/nim and /u/psychotic_primes

~~~
icebraining
Thanks, that convinced me to pull the trigger.

------
wiz21c
Now that there'e even a book about Nim, what kind of production-level code do
people write with it ? As a Python lover, Nim looks very nice on the
surface...

~~~
crux
My company has several Nim services in production. Here's an open-source
component I wrote that we use:

[https://github.com/makingspace/syphus-
nim](https://github.com/makingspace/syphus-nim)

~~~
dom96
Nice! It would be great to have this in Nimble's package list if it's not
there already :)

------
Sir_Substance
Hey, glad to see it's about to hit the shelves, I've been waiting for this one
since around February. I've just chucked my order in.

~~~
dom96
Brilliant, thank you for grabbing a copy! Let me know if you've got any
questions.

------
perturbation
I pre-ordered it a while back; I love the Parallelism chapter. Cleared up a
lot of things for me as to the concurrency model of Nim.

~~~
dom96
I'm glad you like it. I'm particularly proud of that chapter :D

------
throwaway7645
I've checked my doorstep for this book every afternoon since April ;) and am
super stoked. Great book! I've learned a lot through the projects.

------
throwaway7645
I see there is supposed to be videos that didn't make it into the book. What
subject matter will those cover?

~~~
dom96
Currently my plan for these videos is a couple of "how to"s for Nim. For
example: a simple one showing how to install Nim.

~~~
throwaway7645
That's helpful. It wasn't particularly hard for Windows with Cygwin, but only
because I'm used to it. If this had been my first language before Python I
would be sorely confused lol.

------
aryamaan
What are the benefits of using Nim over any other language?

~~~
jackmott
There is a very terse and pleasant syntax that reminds people of Python, but
it compiles to C and is very efficient, and binding to C code has no cost and
is very easy as a result.

garbage collection is optional and configurable.

------
oswjk1
Nice work! I just ordered both physical copy and ebook from Manning.

~~~
dom96
Thank you! Be sure to get in touch with me or the Nim community if you've got
any questions :)

------
k__
Can Nim be used as drop-in replacement for C, like Rust?

~~~
ddlsmurf
Yes, the nim compiler outputs C-source code then passes that to your compiler.
It can also output other languages. That said while a lot is configurable, I
wouldn't consider the generated C as something a human can work on.

~~~
k__
Doesn't it has garbage collection?

~~~
tyingq
Optional garbage collection, with choices on which type of garbage collection.

~~~
jug
I wonder how well the Nim standard library handles this. D has been
controversial with this because the standard library expected GC to be enabled
although allowing it to be disabled. I think this story has improved but it
may have hurt adoption as a systems programming language that is now hard to
restore.

~~~
dom96
Sadly this is something that Nim can also improve on. I will actually be
looking into getting the stdlib ready for the highly sought after 1.0 release
and will be keeping this in mind.

~~~
ddlsmurf
The stdlib not working without GC, making not truly optional, is one of the
main reasons I stopped using nim - though I haven't checked if this is better
in some time.

~~~
dom96
What were you planning to develop? This should help me figure out whether the
stdlib still has an issue for that use case without a GC.

~~~
ddlsmurf
Embedded code, modules for use in higher level languages - and this is the
killer, memory management in "mixed" contexts

