- Paperback: 320 pages
- Publisher: Manning Publications; 1 edition (August 24, 2017)
- Language: English
- ISBN-10: 1617293431
- ISBN-13: 978-1617293436
- Product Dimensions: 7.5 x 0.8 x 9.5 inches
- Shipping Weight: 1.6 pounds (View shipping rates and policies)
- Average Customer Review: 4 customer reviews
- Amazon Best Sellers Rank: #786,229 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Nim in Action 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
Customers who bought this item also bought
From the Publisher
About this Book
Nim in Action is a practical way to learn how to develop software using the open source Nim programming language. This book includes many examples, both large and small, to show and teach you how software is written in Nim.
Nim is unique. It’s multi-paradigm, and unlike most other languages, it doesn’t emphasize object-oriented programming. Because of this, I encourage you to consciously absorb the styles used in this book instead of applying your own. Nim in Action will teach you a set of best practices and idioms that you’ll also find useful in other programming languages.
By learning Nim, you’ll discover a language that straddles the lines between efficiency, expressiveness, and elegance. Nim will make you productive and your end users happy.
Who should read this book
This is by no means a beginner’s book. It assumes that you know at least one other programming language and have experience writing software in it. For example, I expect you to be aware of basic programming language features such as functions, variables, and types. The fundamentals of programming aren’t explained in this book.
This book will teach you how to develop practical software in the Nim programming language. It covers features that are present in all programming languages, such as concurrency, parallelism, user-defined types, the standard library, and more. In addition, it covers Nim features that you may not be familiar with, such as asynchronous input/output, metaprogramming, and the foreign function interface.
About the Author
Dominik Picheta is one of the main developers of the Nim programming language, he is also the author of the Nimble package manager as well as many other Nim tools.
Top customer reviews
There was a problem filtering reviews right now. Please try again later.
In the two-chapter "Basics of Nim" portion, Nim is introduced as "a general-purpose programming language " that emphasizes efficiency and expressiveness without ignoring elegance. "Applications written in Nim are very fast; in many cases, just as fast as applications written in C, and more than thirteen times faster than applications written in Python," notes the author, Dominik Picheta. :Efficiency is the highest priority, and some features make optimizing code easy. This goes hand in hand with a soft real-time garbage collector, which allows you to specify the amount of time that should be spent collecting memory. This feature becomes important during game development, where an ordinary garbage collector may slow down the rendering of frames on the screen if it uses too much time collecting memory."
Nim is a compiled language that compiles Nim source code into C, and then feeds that source code into a C compiler. Picheta's initial chapters emphasize that Nim is "usable for just about any software project." But he also notes that Nim is still a "young and immature" programming language, and the "user base and community" is still very small and offers few jobs. Yet interest in, and acceptance of, Nim are growing. And, another positive note: the development of open-source Nim remains "exceptionally open" to newcomers who want to help out. (By the way, Nim is not a beginner's language. To learn from this book, development experience in at least one other programming language is needed. And you should have some SQL experience, as well.)
The opening part of the book also covers Nim syntax, procedures, for loops and "other basic aspects of the language." Numerous short code examples are provided as how-to illustrations.
In Part 2, "Nim in practice," the focus is on "writing some software." A simple, yet functional chat application is presented, Nim's standard library is examined, package management is explained, the process of parallelism is explored, and a Twitter clone is developed and deployed.
In Part 3, Nim's foreign function interface is described. It provides the ability "to use libraries written in other programming languages." This part of the book also digs into metaprogramming and "the three different metaprogramming constructs in Nim: generics, templates, and macros. And the process for creating a domain specific language for configuration parsing also is examined.
Appendix A deals with how to get help from the Nim community via IRC and Gitter, online forums, and more direct methods. Appendix B focuses on installing Nim, emphasizing that the latest procedures need to be obtained from the nim-lang.org website, where the Nim code also can be downloaded.
"Nim in Action" is an excellent guide for learning the new and versatile Nim programming language. It is well written and efficiently illustrated. And it keeps its code examples compact and to the point.
My thanks to Manning Books for provided an advance reading copy for review.
Instead of solely relying on describing the language with small but sufficient examples which illustrate this or that feature author decided to add pretty heavy programs inside -- chat app (almost 50 pages) and twitter clone (40 pages). One could write entire book about those topics and here it only reduced the room for Nim itself. Besides it is hard to sift through such chapters just to find a comment about given feature in language.
The rest is about the language and environment (as it should be in my opinion) and what the author describes is put in clear way. The problem is what the author does not describe and there is quite a lot I would say -- since Nim sports value and reference types is there boxing? What about value slicing? How the closure is built (using variable capturing or passing)? What about type hierarchy? What concepts from OOP world are included? And so on and on (maybe I missed something during reading, but I rechecked the ebook with the same results).
To actually use any language and avoid nasty gotchas those are really needed. And since they are not mentioned in the book one can wonder if the language supports them, does not support, or essentially what is going on. Yes, yes, I know -- go to website... but you see, paying for book just to get big "go to website" sign is a bit expensive way of learning ("Nim in Action" is better than that).
I like the level set for the audience ("for developers comfortable with mainstream languages") and it would be great if the author could add some remarks (maybe in second edition) when some idea is borrowed from another language. It could speed up learning, if I am not mistaken mainly references to Python are made, and for example syntax for generic types reminds me of Scala.
So, to sum this up -- reference? Firm no. Guide? No, I don't think so. Rather introduction, an appetizer for a weekend. On one hand I am glad I bought this book, on other my hunger for knowledge is fulfilled only a bit -- too much interesting stuff left out.
I didn't give 5 stars, mainly because the coverage is certainly not complete - there might have been several chapters more - and because the book will become partly obsolete soon due to the evolution of the language. Nevertheless, I strongly recommend it ... today!