8 ms·
Show HN: Nim in Action
- dom96 9y agoAuthor 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.
- steveklabnik 9y agoCongrats on finishing the book! Writing one is a monumental task, and a great thing for Nim.
- dom96 9y agoThank you! It was indeed a lot of work but I'm really happy I got through to the end. Incredibly excited for everyone to get their print copies :)
- generic_user 9y agoDo you have a link to the free chapters? Ok, I found them. https://www.manning.com/books/nim-in-action?a_aid=niminaction&a_bid=78a27e81 https://www.manning.com/books/nim-in-action?a_aid=niminactio...
- dom96 9y agoYou can click/touch the chapters under the "What's inside?" section to see the download buttons. But here are the direct links anyway: Chapter 1: https://manning-content.s3.amazonaws.com/download/4/7959d94-c1c2-499b-b958-aba99935f853/SampleCh01.pdf https://manning-content.s3.amazonaws.com/download/4/7959d94-... Chapter 2: https://manning-content.s3.amazonaws.com/download/5/08b3cf8-cea3-42c1-97b5-b5047c472b73/SampleCh08.pdf https://manning-content.s3.amazonaws.com/download/5/08b3cf8-...
- generic_user 9y agoThanks! I have been waiting for this book I have had this book in my wishlist for quite a while. Nim looks interesting and compiling to C is highly desirable to me. I much prefer a well written book length introduction to reading through the documentation even if its good.
- ilyagr 9y agoPerhaps 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 9y agoThat 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 9y agoHi Dan
- generic_user 9y agoOne of the things that can hook you into a new language is having a really well written introduction book that gives you the philosophy of the designers and the big picture while moving through the syntax and semantics. The book is roughly 300 pages. Even with a careful reading that's only a few days invested. For instance I read Roberto Ierusalimschys's Programming in Lua and Niklaus Wirth's Algorithms + Data Structures = Programs. But have never really had a project which fit either of those languages. I still enjoyed the books.
- dom96 9y agoIf it was up to me I would make the whole thing free. The publisher has to make their money somehow though :) I was given the option to make two chapters free. I figured an intro to Nim and an advanced chapter were good choices.
- Sir_Substance 9y agoHey, 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 9y agoBrilliant, thank you for grabbing a copy! Let me know if you've got any questions.
- deleted 9y ago[deleted]
- perturbation 9y agoI 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 9y agoI'm glad you like it. I'm particularly proud of that chapter :D
- throwaway7645 9y agoI'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 9y agoI see there is supposed to be videos that didn't make it into the book. What subject matter will those cover?
- dom96 9y agoCurrently 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 9y agoThat'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.
- deleted 9y ago[deleted]
- SpacemanSpiff 9y agoI just ordered my book. Here's a 37% off discount code: fccpicheta courtesey of /r/nim and /u/psychotic_primes
- icebraining 9y agoThanks, that convinced me to pull the trigger.
- oswjk1 9y agoNice work! I just ordered both physical copy and ebook from Manning.
- dom96 9y agoThank you! Be sure to get in touch with me or the Nim community if you've got any questions :)
- wiz21c 9y agoNow 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...
- dom96 9y agoA lot of different things. CLI applications, games (a large proportion of the companies using Nim are doing this, and some indie devs[1]), web applications, GUI applications, some are using it for scientific applications. The list goes on and on :) 1 - https://impbox.itch.io/vektor2089 https://impbox.itch.io/vektor2089
- crux 9y agoMy 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 9y agoNice! It would be great to have this in Nimble's package list if it's not there already :)
- k__ 9y agoCan Nim be used as drop-in replacement for C, like Rust?
- ddlsmurf 9y agoYes, 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__ 9y agoDoesn't it has garbage collection?
- tyingq 9y agoOptional garbage collection, with choices on which type of garbage collection.
- jug 9y agoI 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 9y agoSadly 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 9y agoThe 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.
- deleted 9y ago[deleted]
- aryamaan 9y agoWhat are the benefits of using Nim over any other language?
- jackmott 9y agoThere 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.