Nim in Action

Learn Nim from one of the main developers of the language.

Practical examples

Learn by implementing useful software projects. Including CLI chat applications, web apps, parsers and much more!

Fun and powerful language

Nim is a new systems programming language that gives you the low-level power of C with the elegance and ease of languages like Python and Ruby. It is perfect for developers that wish to explore systems programming.

Learn more about Nim

Universal concepts

The book includes best practices and concepts that apply to almost all programming languages. So you will be able to use what you learn for software projects in other languages as well.

A goldmine for Nim programmers; great insights for any general programmer.

Cosimo Attanasi, ER Sistemi

Gives readers a solid foundation in Nim, a robust and flexible language suitable for a variety of projects.

Robert Walsh, Excalibur Solutions

A great resource for an incredibly powerful language.

Jonathan Rioux, TD Insurance

What's inside?

Chapter 1

Explains what Nim is, compares it to other programming languages, and discusses its strengths and weaknesses.

Download

Chapter 2

Teaches the basics, such as the syntax and fundamental features of the language. This includes a demonstration of procedure definitions and exception handling.

Chapter 3

This is where you’ll develop your first nontrivial Nim application. The primary purpose of this application is communication: it allows messages to be sent through a network. You’ll learn, among other things, how to create command- line interfaces, parse JSON, and transfer data over a network in Nim.

Chapter 4

Gives an overview of the standard library, particularly the parts of it that aren’t covered in other chapters but are useful.

Chapter 5

Discusses package management in Nim and teaches you how to create your own packages and make them available to others.

Chapter 6

Explains what parallelism is and how it can be applied to different programming tasks. You’ll see a parsing example, demonstrating different ways to parse data in Nim and how parsing can be parallelized.

Chapter 7

This is where you’ll develop your second nontrivial Nim application: a web application based on Twitter. You’ll learn how to store data in a SQL database and generate HTML.

Chapter 8

Looks at the foreign function interface and shows how it can be used to make use of C and JavaScript libraries. You’ll develop a simple application that draws the letter N on the screen, first using a C library and then using JavaScript’s Canvas API.

Download

Chapter 9

Explains what metaprogramming is, discussing features such as generics, templates, and macros. At the end of this chapter, you’ll use macros to create a domain-specific language.

Buy Nim in Action

Purchase via Manning

Info about buying here:

  • You can purchase an eBook here.
  • If purchasing a printed book you will get an eBook for free immediately.
Buy now

Purchase via Amazon

Info about buying here:

  • Free shipping if using Prime.
  • You can't buy an eBook here. But you will get one for free after you receive the printed book.
Pre-order now

Bonus resources

Source code

The source code for all the guided projects in the book is available on GitHub.

Explore

Coming soon...

Supporting videos and blog posts consisting of content that didn't make it into the book.