Good news guys!

I have been writing a book about Nim titled Nim in Action for the past couple of months, it's still not finished, but it is now available through Manning's Early Access Program.

https://www.manning.com/books/nim-in-action

The first chapter is available for free. If you purchase the eBook, you will receive the first three chapters as well as the other chapters as they become available. You can also purchase the printed book together with the eBook and you will then receive the printed book once it is released (current estimate: Summer 2016).

If you do read the book, even if it just the first chapter, then please share any comments, suggestions and questions here or in Manning's own Author Online forum! I will truly appreciate you taking the time to do so, as any comments are extremely valuable in the development process.

I hope you guys are just as excited about this book as I am! Happy reading!

Edit: For a limited time you can get a 50% discount using the code: mlpicheta

2016-01-26 23:54:28
That's excellent! I just bought it, thanks so much for doing this. A book really validates the language. Let's hope we're at or past 1.0 by Summer 2016
2016-01-27 00:31:55

This is awesome! I'm definitely going to get this when it comes out, maybe even before through the EAP.

Nice work @dom96!

2016-01-27 02:58:24
So awesome! I almost never buy computer books anymore, but I definitely bought this one. Congratulations. Looking forward to the rest of the chapters. 2016-01-27 03:50:48
I haven't yet read the first chapter, but my suggestion would be to emphasize metaprogramming earlier. It is quite central to how Nim works, and it seems weird to relegate it to the advanced section 2016-01-27 09:29:28
It would also help to represent other languages fairly. In the table 1.2, the GC for Java should read "Yes, multiple", and C++ certainly has (at least partial) support for metaprogramming through templates. Also, in Python you can walk and modify the AST using the ast module
2016-01-27 09:41:50
Uh, by the way I was almost forgetting: great work!!!
2016-01-27 09:45:22
@dom96, Thats a really great start. Keep up the good job! Some questions from me though
  1. Twice you state that Nim is not great for just anything, but give no concrete example of such cases. So I wonder, what Nim is not good at?
  2. You state that JS backend lacks something. So I wonder again =). Thats almost personal, you know . Also I would add that nowadays JS is not only client-side, but server side as well. Also Nim package management along with dead-code elimination along with JS backend is something which can make Nim shine in all its glory. Frontend developers are usually concerned a lot with dependencies as they may bring a lot of dead code.
2016-01-27 10:29:25

Also congratulation for the great work.

I very much appreciate the way you create the book. This is a winner winner game for you and the readers as the input of the readers makes the book better, and the escort by the readers makes the learning experience for the readers much better (it is very motivating when readers have a chance to influence things to the better, or what they believe is better).

2016-01-27 12:22:26

Thank you guys so much for the feedback, and a special thank you to all those that bought the book!

Now let me reply to your feedback individually:

@andrea:

I haven't yet read the first chapter, but my suggestion would be to emphasize metaprogramming earlier.

Metaprogramming is mentioned in the first chapter. The mention of metaprogramming is brief but it does emphasize that it is a core feature of Nim. It's under the subsection 1.1.1 Core features, please take a look and let me know if that is what you had in mind.

It is quite central to how Nim works, and it seems weird to relegate it to the advanced section

I do believe that templates and in particular AST macros are advanced topics. Templates probably could have been introduced earlier, but I'm not sure where I could fit them.

It would also help to represent other languages fairly. In the table 1.2, the GC for Java should read "Yes, multiple", and C++ certainly has (at least partial) support for metaprogramming through templates. Also, in Python you can walk and modify the AST using the ast module

Thank you, I will fix this! Please let me know if you see any other errors like this.


@yglukhov

Twice you state that Nim is not great for just anything, but give no concrete example of such cases. So I wonder, what Nim is not good at?

Could you point me to the location in the chapter where I state that?

To answer your question. I can't actually think of any concrete examples. Nim has been designed to be good for just about anything, and in most cases it is. The only obstacle it faces is lack of Nim libraries which implement specific functionality. So when you have an application in mind which needs to use the Twitter API for example, if you're using Python you just search for "python twitter api" and the second result gives you something you can use immediately: https://github.com/bear/python-twitter, but if you're using Nim... well, in this case there actually is something you can use immediately: https://github.com/kubo39/twitter.nim. But the fact is that this isn't always the case, there are times when you will need to write this library yourself. The good news is that this obstacle will be overcome with time, and for those of us that love reinventing the wheel it's not even an obstacle, it's only an obstacle to those of us that want to get stuff done ASAP.

You state that JS backend lacks something. So I wonder again =). Thats almost personal, you know...

Hehe. I'm sorry. Keep in mind that I wrote this chapter around 6 months ago, so maybe it's time to soften my statement. (Please point me to it again if you can, although this one I can probably find on my own easily). My point is simply that the JS backend is not as mature as the C one. Please don't take what I wrote personally, my point was simply that the JS backend is not as mature as the C one. I'm fairly sure that it still does not support all of Nim. I would also love to see a library which makes working with the JS DOM much easier (ala JQuery), something which might perhaps make it into the stdlib someday. That brings me back to my point above though.

Hope this answers your questions!

2016-01-27 13:47:36
<<<••123456789...••>>>