Nim (programming language)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Nim
Nim-logo.svg
The Nim crown logo
ParadigmsMulti-paradigm: compiled, concurrent, procedural, imperative, functional, object-oriented, meta
Designed byAndreas Rumpf
DeveloperNim Lang Team[1]
First appeared2008; 14 years ago (2008)
Stable release
1.6.8[2] Edit this on Wikidata / 27 September 2022; 1 day ago (27 September 2022)
Typing disciplineStatic,[3] strong,[4] inferred, structural
ScopeLexical
Implementation languageNim (self-hosted)
PlatformIA-32, x86-64, ARM, Aarch64, RISC-V, PowerPC ...[5]
OSCross-platform[6]
LicenseMIT[7][8]
Filename extensions.nim, .nims, .nimble
Websitenim-lang.org
Influenced by
Ada, Modula-3, Lisp, C++, Object Pascal, Python, Oberon, Rust

Nim is a general-purpose, multi-paradigm, statically typed, compiled systems programming language,[9] designed and developed by a team around Andreas Rumpf. Nim is designed to be "efficient, expressive, and elegant",[10] supporting metaprogramming, functional, message passing,[7] procedural, and object-oriented programming styles by providing several features such as compile time code generation, algebraic data types, a foreign function interface (FFI) with C, C++, Objective-C, and JavaScript, and supporting compiling to those same languages.

Description[edit]

Nim was created to be a language as fast as C, as expressive as Python, and as extensible as Lisp.

Nim is statically typed.[11] It supports compile-time metaprogramming features such as syntactic macros and term rewriting macros.[12] Term rewriting macros enable library implementations of common data structures, such as bignums and matrices, to be implemented efficiently, as if they were built-in language facilities.[13] Iterators are supported and can be used as first class entities,[12] as can functions, allowing for the use of functional programming methods. Object-oriented programming is supported by inheritance and multiple dispatch. Functions can be generic, they can be overloaded, and generics are further enhanced by Nim's support for type classes. Operator overloading is also supported.[12] Nim includes tunable automatic garbage collection based on deferred reference counting with cycle detection, which can also be turned off altogether.[14]

[Nim] ... presents a most original design that straddles Pascal and Python and compiles to C code or JavaScript.[15]

— Andrew Binstock, editor-in-chief of Dr. Dobb's Journal, 2014

As of October 2021, Nim compiles to C, C++, JavaScript, and Objective-C.[16]

History[edit]

Branch Version Release date[17]
0.x Old version, no longer maintained: 0.10.2 2014-12-29
Old version, no longer maintained: 0.11.2 2015-05-04
Old version, no longer maintained: 0.12.0 2015-10-27
Old version, no longer maintained: 0.13.0 2016-01-18
Old version, no longer maintained: 0.14.2 2016-06-09
Old version, no longer maintained: 0.15.2 2016-10-23
Old version, no longer maintained: 0.16.0 2017-01-08
Old version, no longer maintained: 0.17.2 2017-09-07
Old version, no longer maintained: 0.18.0 2018-03-01
Old version, no longer maintained: 0.19.6 2019-05-13
Old version, no longer maintained: 0.20.2 2019-06-17
1.0 Old version, no longer maintained: 1.0.0 2019-09-23
Older version, yet still maintained: 1.0.10 2020-10-27
1.2 Old version, no longer maintained: 1.2.0 2020-04-03
Older version, yet still maintained: 1.2.18 2022-02-09
1.4 Old version, no longer maintained: 1.4.0 2020-10-16
Older version, yet still maintained: 1.4.8 2021-05-25
1.6 Old version, no longer maintained: 1.6.0 2021-10-19
Current stable version: 1.6.8 2022-09-27
Legend:
Old version
Older version, still maintained
Latest version
Latest preview version
Future release
For each 0.x branch, only the latest point release is listed.
For later branches, the first and the latest point release is listed.

Nim's initial development was started in 2005 by Andreas Rumpf. It was originally named Nimrod when the project was made public in 2008.[18]: 4–11  The first version of the Nim compiler was written in Pascal using the Free Pascal compiler.[19] In 2008, a version of the compiler written in Nim was released.[20] The compiler is free and open-source software, and is being developed by a community of volunteers working with Andreas Rumpf.[21] The language was officially renamed from Nimrod to Nim with the release of version 0.10.2 in December 2014.[22] On September 23, 2019, version 1.0.0 of Nim was released, signifying the maturing of the language and its toolchain.

Language design[edit]

Syntax[edit]

The syntax of Nim resembles that of Python.[23] Code blocks and nesting statements are identified through use of whitespace, according to the offside-rule. Many keywords are identical to their Python equivalents, which are mostly English keywords, whereas other programming languages usually use punctuation. With the goal of improving upon its influence languages, even though Nim supports indentation-based syntax like Python, it introduced additional flexibility. For example, a single statement may span multiple lines if a comma or binary operator is at the end of each line. And Nim supports user-defined operators.

Unlike Python, Nim implements (native) static typing. Nim's type system allows for easy type conversion, casting, and provides syntax for generic programming. Nim notably provides type classes which can stand in for multiple types, and provides several such type classes 'out of the box'. Type classes allow working with several types as if they were a single type. For example:

  • SomeSignedInt - Represents all the signed integer types
  • SomeInteger - Represents all the Integer types, signed or not
  • SomeOrdinal - Represents all the basic countable and ordered types, except of non integer number

This code sample demonstrates the use of typeclasses in Nim

# Let's declare a function that takes any type of number and displays its double
# In Nim functions with side effect are called "proc"
proc timesTwo(i: SomeNumber) =
  echo i * 2


# Let's write another function that takes any ordinal type, and returns
# the double of the input in its original type, if it is a number;
# or returns the input itself otherwise.
# We use a generic Type(T), and precise that it can only be an Ordinal
func twice_if_is_number[T: SomeOrdinal](i: T): T =
  when T is SomeNumber: # A `when` is an `if` evaluated during compile time
    result = i * 2 # You can also write `return i * 2`
  else:
    # If the Ordinal is not a number it is converted to int,
    # multiplied by two, and reconverted to its based type
    result = (i.int * 2).T

echo twice_if_is_number(67) # Passes an int to the function
echo twice_if_is_number(67u8) # Passes an uint8 
echo twice_if_is_number(true) # Passes a bool (Which is also an Ordinal)

Nim is almost fully style-insensitive; two identifiers are considered equal if they only differ by capitalization and underscores, as long as the first characters are identical. Historically, Nim was fully case-insensitive (capitalization of the identifiers was fully ignored) and underscores were completely ignored, too.[24]

Influence[edit]

Nim was influenced by specific characteristics of existing languages, including the following:

Uniform Function Call Syntax[edit]

Nim supports Uniform Function Call Syntax (UFCS)[25] and identifier equality, which provides a large degree of flexibility in use.

For example, each of these lines does the same call, just with different syntax:

echo "hello world"
echo("hello world")
"hello world".echo()
"hello world".echo
"hello".echo(" world")
"hello".echo " world"

Identifier equality[edit]

Except for the first letter, identifiers in Nim are compared in a case-insensitive manner, and underscores are ignored.

Example:

const useHttps = true
assert useHttps == useHttps
assert useHTTPS == useHttps
assert use_https == useHttps

Stropping[edit]

The stropping feature allows the use of any name for variables or functions, even when the names are reserved words for keywords. An example of stropping is the ability to define a variable named if, without clashing with the keyword if. Nim's implementation of this is achieved via backticks, allowing any reserved word to be used as an identifier.[26]

type Type = object
  `int`: int

let `object` = Type(`int`: 9)
assert `object` is Type
assert `object`.`int` == 9

var `var` = 42
let `let` = 8
assert `var` + `let` == 50

const `assert` = true
assert `assert`

Compiler[edit]

The Nim compiler emits fast, optimized C code by default. It defers compiling-to-object code to an external C compiler[27] to leverage existing compiler optimization and portability. Many C compilers are supported, including Clang, Microsoft Visual C++ (MSVC), MinGW, and GNU Compiler Collection (GCC). The Nim compiler can also emit C++, Objective-C, and JavaScript code to allow easy interfacing with application programming interfaces (APIs) written in those languages;[9] developers can simply write in Nim, then compile to any supported language. This also allows writing applications for iOS and Android. There is also an unofficial LLVM backend, allowing use of the Nim compiler in a stand-alone way.[28]

The Nim compiler is self-hosting, meaning it is written in the Nim language.[29] The compiler supports cross-compiling, so it is able to compile software for any of the supported operating systems, no matter the development machine. This is useful for compiling applications for embedded systems, and for uncommon and obscure computer architectures.

Compiler options[edit]

By default, the Nim compiler creates a debug build.[30] With the option -d:release a release build can be created, which is optimized for speed and contains fewer runtime checks.[30] With the option -d:danger all runtime checks can be disabled, if maximum speed is desired.[30]

Memory management[edit]

Nim supports multiple memory management strategies, including the following:[31]

  • --gc:refc – This is the default GC. It's a deferred reference counting based garbage collector with a simple Mark&Sweep backup GC in order to collect cycles. Heaps are thread-local.
  • --gc:markAndSweep – Simple Mark-And-Sweep based garbage collector. Heaps are thread-local.
  • --gc:boehm – Boehm based garbage collector, it offers a shared heap.
  • --gc:goGo's garbage collector, useful for interoperability with Go. Offers a shared heap.
  • --gc:arc – Plain reference counting with move semantic optimizations, offers a shared heap. It offers deterministic performance for hard realtime systems. Reference cycles cause memory leaks, beware.
  • --gc:orc – Same as --gc:arc but adds a cycle collector based on "trial deletion". Unfortunately, that makes its performance profile hard to reason about so it is less useful for hard real-time systems.
  • --gc:none – No memory management strategy nor a garbage collector. Allocated memory is simply never freed, unless manually freed by the developer's code.

Development tools[edit]

Bundled[edit]

Many tools are bundled with the Nim install package, including:

Nimble[edit]

Nimble is the standard package manager used by Nim to package Nim modules.[32] It was initially developed by Dominik Picheta, who is also a core Nim developer. Nimble has been included as Nim's official package manager since Oct 27, 2015, the v0.12.0 release.[33]

Nimble packages are defined by .nimble files, which contain information about the package version, author, license, description, dependencies, and more.[18]: 132  These files support a limited subset of the Nim syntax called NimScript, with the main limitation being the access to the FFI. These scripts allow changing of test procedure, or for custom tasks to be written.

The list of packages is stored in a JavaScript Object Notation (JSON) file which is freely accessible in the nim-lang/packages repository on GitHub. This JSON file provides Nimble with a mapping between the names of packages and their Git or Mercurial repository URLs.

Nimble comes with the Nim compiler. Thus, it is possible to test the Nimble environment by running: nimble -v. This command will reveal the version number, compiling date and time, and Git hash of nimble. Nimble uses the Git package, which must be available for Nimble to function properly. The Nimble command-line is used as an interface for installing, removing (uninstalling), and upgrading–patching module packages.[18]: 130–131 

c2nim[edit]

c2nim is a source-to-source compiler (transcompiler or transpiler) meant to be used on C/C++ headers to help generate new Nim bindings.[34] The output is human-readable Nim code that is meant to be edited by hand after the translation process.

koch[edit]

koch is a maintenance script that is used to build Nim, and provide HTML documentation.[35]

Nimgrep[edit]

nimgrep is a generic tool for manipulating text. It is used to search for regex, peg patterns, and contents of directories, and it can be used to replace tasks. It is included to assist with searching Nim's style-insensitive identifiers.[36]

nimsuggest[edit]

nimsuggest is a tool that helps any source code editor query a .nim source file to obtain useful information like definition of symbols or suggestions for completions.[37]

niminst[edit]

niminst is a tool to generate an installer for a Nim program.[38] It creates .msi installers for Windows via Inno Setup, and install and uninstall scripts for Linux, macOS, and Berkeley Software Distribution (BSD).

nimpretty[edit]

nimpretty is a source code beautifier, used to format code according to the official Nim style guide.[39]

Testament[edit]

Testament is an advanced automatic Unittests runner for Nim tests. Used in developing Nim, it offers process isolation tests, generates statistics about test cases, supports multiple targets and simulated Dry-Runs, has logging, can generate HTML reports, can skip tests from a file, and more.

Other notable tools[edit]

Some notable tools not included in the Nim package include:

choosenim[edit]

choosenim was developed by Dominik Picheta, creator of the Nimble package manager, as a tool to enable installing and using multiple versions of the Nim compiler. It downloads any Nim stable or development compiler version from the command line, enabling easy switching between them.[40]

nimpy[edit]

nimpy is a library that enables convenient Python integration in Nim programs.[41]

nimterop[edit]

nimterop is a tool focused on automating the creation of C/C++ wrappers needed for Nim's foreign function interface.[42]

Libraries[edit]

Pure/impure libraries[edit]

Pure libraries are modules written in Nim only. They include no wrappers to access libraries written in other programming languages.

Impure libraries are modules of Nim code which depend on external libraries that are written in other programming languages such as C.

Standard library[edit]

The Nim standard library includes modules for all basic tasks, including:[43]

  • System and core modules
  • Collections and algorithms
  • String Handling
  • Time handling
  • Generic Operating System Services
  • Math libraries
  • Internet Protocols and Support
  • Threading
  • Parsers
  • Docutils
  • XML Processing
  • XML and HTML code generator
  • Hashing
  • Database support (PostgreSQL, MySQL and SQLite)
  • Wrappers (Win32 API, POSIX)

Use of other libraries[edit]

A Nim program can use any library which can be used in a C, C++, or JavaScript program. Language bindings exist for many libraries, including GTK,[44][45] Qt QML,[46] wxWidgets,[47] Simple DirectMedia Layer (SDL) 2,[48][49] Cairo,[50] OpenGL,[51] Windows API (WinAPI),[52] zlib, libzip, OpenSSL, Vulkan[53] and cURL.[54] Nim works with PostgreSQL, MySQL, and SQLite databases. Nim can interface with the Lua,[55] Julia,[56] Rust,[57] C#,[58] TypeScript,[59] and Python[60] programming languages.

Examples[edit]

Hello world[edit]

The "Hello, World!" program in Nim:

echo("Hello, world!")
# Procedures can be called with no parentheses
echo "Hello, World!"

Another version of making a "Hello World" is...

stdout.write("Hello, world!\n")

Factorial[edit]

Program to calculate the factorial of a positive integer using the iterative approach:

import strutils

var n = 0
try:
  stdout.write "Input positive integer number: "
  n = stdin.readline.parseInt
except ValueError:
  raise newException(ValueError, "You must enter a positive number")

var fact = 1
for i in 2..n:
  fact = fact * i

echo fact

Using the module math from Nim's standard library:

import math
echo fac(x)

Reversing a string[edit]

A simple demonstration showing many of Nim's features.

proc reverse(s: string): string =
  for i in countdown(s.high, 0):
    result.add s[i]

let str1 = "Reverse This!"
echo "Reversed: ", reverse(str1)

One of the more exotic features is the implicit result variable. Every procedure in Nim with a non-void return type has an implicit result variable that represents the value to be returned. In the for loop we see an invocation of countdown which is an iterator. If an iterator is omitted, the compiler will attempt to use an items iterator, if one is defined for the type specified.

Graphical user interface[edit]

Using GTK3 with gobject introspection through the gintro module:

import gintro/[gtk, glib, gobject, gio]

proc appActivate(app: Application) =
  let window = newApplicationWindow(app)
  window.title = "GTK3 application with gobject introspection"
  window.defaultSize = (400, 400)
  showAll(window)

proc main =
  let app = newApplication("org.gtk.example")
  connect(app, "activate", appActivate)
  discard run(app)

main()

This code requires the gintro module to work, which is not part of the standard library. To install the module gintro and many others you can use the tool nimble, which comes as part of nim. To install the gintro module with nimble you do the following:

nimble install gintro

Programming paradigms[edit]

Functional Programming[edit]

Functional programming is supported in Nim through first-class functions and code without side effects via the `noSideEffect` pragma, the `func` keyword[61] and the experimental feature `strictFuncs`.

With the `strictFuncs` feature enabled, Nim will perform side effect analysis and raise compilation errors for code that does not obey the contract of producing no side effects.

Contrary to purely functional programming languages, Nim is a multi-paradigm programming language, so functional programming restrictions are opt-in on a function-by-function basis.

First Class Functions[edit]

Nim supports first-class functions by allowing functions to be stored in variables or passed as parameters to be invoked by other functions.

For example:

import sequtils

let powersOfTwo = @[1, 2, 4, 8, 16, 32, 64, 128, 256]

echo(powersOfTwo.filter do (x: int) -> bool: x > 32)
echo powersOfTwo.filter(proc (x: int): bool = x > 32)

proc greaterThan32(x: int): bool = x > 32
echo powersOfTwo.filter(greaterThan32)

Produces the output:

@[64, 128, 256]
@[64, 128, 256]
@[64, 128, 256]

[62]

Funcs[edit]

The func keyword introduces a shortcut for a noSideEffect pragma.

func binarySearch[T](a: openArray[T]; elem: T): int

Is short for:

proc binarySearch[T](a: openArray[T]; elem: T): int {.noSideEffect.}

[63]

Strict funcs[edit]

Since version 1.4, a stricter definition of a "side effect" is available. In addition to the existing rule that a side effect is calling a function with side effects the following rule is also enforced:

Any mutation to an object does count as a side effect if that object is reachable via a parameter that is not declared as a var parameter.

For example:

{.experimental: "strictFuncs".}

type
  Node = ref object
    le, ri: Node
    data: string

func len(n: Node): int =
  # valid: len does not have side effects
  var it = n
  while it != nil:
    inc result
    it = it.ri

func mut(n: Node) =
  let m = n # is the statement that connected the mutation to the parameter
  m.data = "yeah" # the mutation is here
  # Error: 'mut' can have side effects
  # an object reachable from 'n' is potentially mutated

[64]

Object-oriented programming (OOP)[edit]

Metaprogramming[edit]

Template[edit]

This is an example of metaprogramming in Nim using its template facilities.

template genType(name, fieldname: untyped, fieldtype: typedesc) =
  type
    name = object
      fieldname: fieldtype

genType(Test, foo, int)

var x = Test(foo: 4566)
echo(x.foo) # 4566

The genType is invoked at compile-time and a Test type is created.

Generic[edit]

Nim supports both constrained and unconstrained generic programming. Generics may be used in procedures, templates and macros. They are defined after the proc's name in square brackets, as seen below.

proc addThese[T](a, b: T): T =
  a + b

echo addThese(1, 2) # 3 (of int type)
echo addThese(uint8 1, uint8 2) # 3 (of uint8 type)

In addThese, T is the generic type, the compiler will accept any values for this function as long as both parameters and the return value are of the same type.

One can further clarify which types the procedure will accept by specifying a type class.[65]

proc addTheseNumbers[T: SomeNumber](a, b: T): T =
  a + b

addTheseNumberswill then only work for types contained in the SomeNumbersum type.

Macros[edit]

Macros can rewrite parts of the code at compile-time. Nim macros are powerful and can do many operations on the abstract syntax tree.

Here's a simple example, that creates a macro called twice:

import macros

macro twice(arg: untyped): untyped =
  result = quote do:
    `arg`
    `arg`

twice echo "Hello world!"

The twice macro in this example takes the echo statement in the form of an abstract syntax tree as input. In this example we decided to return this syntax tree without any manipulations applied to it. But we do it twice, hence the name of the macro. The result is that the code gets rewritten by the macro to look like the following code at compile time:

echo "Hello world!"
echo "Hello world!"

Foreign function interface (FFI)[edit]

Nim's FFI is used to call functions written in the other programming languages that it can compile to. This means that libraries written in C, C++, Objective-C, and JavaScript can be used in the Nim source code. One should be aware that both JavaScript and C, C++, or Objective-C libraries cannot be combined in the same program, as they are not as compatible with JavaScript as they are with each other. Both C++ and Objective-C are based on and compatible with C, but JavaScript is incompatible, as a dynamic, client-side web-based language.[18]: 226 

The following program shows the ease with which external C code can be used directly in Nim.

proc printf(formatstr: cstring) {.header: "<stdio.h>", varargs.}

printf("%s %d\n", "foo", 5)

In this code the printf function is imported into Nim and then used.

Basic example using 'console.log' directly for the JavaScript compilation target:

proc log(args: any) {.importjs: "console.log(@)", varargs.}
log(42, "z", true, 3.14)

The JavaScript code produced by the Nim compiler can be executed with Node.js or a web browser.

Parallelism[edit]

To activate threading support in Nim, a program should be compiled with --threads:on command line argument. Each thread has a separate garbage collected heap and sharing of memory is restricted, which helps with efficiency and stops race conditions by the threads.

import locks

var
  thr: array[0..4, Thread[tuple[a,b: int]]]
  L: Lock

proc threadFunc(interval: tuple[a,b: int]) {.thread.} =
  for i in interval.a..interval.b:
    acquire(L) # lock stdout
    echo i
    release(L)

initLock(L)

for i in 0..high(thr):
  createThread(thr[i], threadFunc, (i*10, i*10+5))
joinThreads(thr)

Nim also has a channels module that simplifies passing data between threads.

import os

type
  CalculationTask = object
    id*: int
    data*: int

  CalculationResult = object
    id*: int
    result*: int

var task_queue: Channel[CalculationTask]
var result_queue: Channel[CalculationResult]

proc workerFunc() {.thread.} =
  result_queue.open()

  while true:
    var task = task_queue.recv()
    result_queue.send(CalculationResult(id: task.id, result: task.data * 2))

var workerThread: Thread[void]
createThread(workerThread, workerFunc)

task_queue.open()
task_queue.send(CalculationTask(id: 1, data: 13))
task_queue.send(CalculationTask(id: 2, data: 37))

while true:
  echo "got result: ", repr(result_queue.recv())

Concurrency[edit]

Nim supports asynchronous IO via the asyncdispatch module, which adds async/await syntax via the macro system. An example of an asynchronous http server:

import asynchttpserver, asyncdispatch

var server = newAsyncHttpServer()
proc cb(req: Request) {.async.} =
  await req.respond(Http200, "Hello World")

waitFor server.serve(Port(8080), cb)

Community[edit]

Nim has an active community on the self-hosted, self-developed official forum.[66] Further, the project uses a Git repository, bug tracker, and wiki hosted by GitHub, where the community engages with the language.[67]

Conventions[edit]

The first Nim conference, NimConf, took place on June 20, 2020. It was held digitally due to COVID-19, with an open call for contributor talks in the form of YouTube videos.[68] The conference began with language overviews by Nim developers Andreas Rumpf and Dominik Picheta. Presentation topics included talks about Nim web frameworks, mobile development, Internet of things (IoT) devices, and game development, including a talk about writing Nim for Game Boy Advance.[69] NimConf 2020 is available as a YouTube playlist.[70]

In addition to official conferences, Nim has been featured at various other conventions. A presentation on Nim was given at the O'Reilly Open Source Convention (OSCON) in 2015.[71][72][73] Four speakers represented Nim at Free and Open source Software Developers' European Meeting (FOSDEM) 2020, including the creator of the language, Andreas Rumpf.[74]

See also[edit]

References[edit]

  1. ^ "Contributors to nim-lang/Nim". Retrieved 2022-03-23.
  2. ^ https://nim-lang.org/blog/2022/09/27/version-168-released.html.
  3. ^ "Nim by example". GitHub. Retrieved 2014-07-20.
  4. ^ Караджов, Захари; Станимиров, Борислав (2014). Метапрограмиране с Nimrod. VarnaConf (in Bulgarian). Retrieved 2014-07-27.
  5. ^ "Packaging Nim". Retrieved 2022-03-23.
  6. ^ "Install Nim". Retrieved 2018-10-12.
  7. ^ a b "FAQ". nim-lang.org. Retrieved 2015-03-27.
  8. ^ "copying.txt". GitHub. Retrieved 2015-03-27.
  9. ^ a b Rumpf, Andreas (2014-02-11). "Nimrod: A new systems programming language". Dr. Dobb's Journal. Retrieved 2014-07-20.
  10. ^ "The Nim Programming Language". Nim-lang.org. Retrieved 2014-07-20.
  11. ^ Kehrer, Aaron (akehrer) (2015-01-05). "Nim Syntax". GitHub. Retrieved 2015-01-05.
  12. ^ a b c "Nim Manual". Nim-lang.org. Retrieved 2014-07-20.
  13. ^ "Strangeloop Nim presentation". Archived from the original on 2014-07-13. Retrieved 2015-04-30.
  14. ^ "Nim's Garbage Collector". Nim-lang.org. Retrieved 2018-01-10.
  15. ^ Binstock, Andrew (2014-01-07). "The Rise And Fall of Languages in 2013". Dr. Dobb's Journal. Retrieved 2018-10-08.
  16. ^ Nim Compiler User Guide
  17. ^ "Nim Releases". Nim Project. Retrieved 2020-01-26.
  18. ^ a b c d Picheta, Dominik (2017). Nim in Action. Manning Publications. ISBN 978-1617293436.
  19. ^ "Nim Pascal Sources". GitHub. Retrieved 2013-04-05.
  20. ^ "News". Nim-lang.org. Archived from the original on 2016-06-26. Retrieved 2016-06-11.
  21. ^ "Contributors". GitHub. Retrieved 2013-04-05.
  22. ^ Picheta, Dominik (2014-12-29). "Version 0.10.2 released". Nim-lang.org. Retrieved 2018-10-17.
  23. ^ Yegulalp, Serdar (2017-01-16). "Nim language draws from best of Python, Rust, Go, and Lisp". InfoWorld.
  24. ^ "Nim Manual". nim-lang.org. Retrieved 2020-07-21.
  25. ^ "Nim Manual: Method call syntax". Retrieved 2018-10-12.
  26. ^ Picheta, Dominik (dom96); Wetherfordshire, Billingsly (fowlmouth); Felsing, Dennis (def-); Raaf, Hans (oderwat); Dunn, Christopher (cdunn2001); wizzardx (2017-10-25). "Tips and tricks". GitHub. Retrieved 2018-10-17.
  27. ^ Rumpf, Andreas (2014-01-15). Nimrod: A New Approach to Metaprogramming. InfoQ. Event occurs at 2:23. Retrieved 2014-07-20.
  28. ^ Sieka, Jacek (2020-07-18), arnetheduck/nlvm, retrieved 2020-07-21
  29. ^ Rumpf, Andreas (2018-10-12). "Nim Compiling". GitHub. Retrieved 2018-10-17.
  30. ^ a b c "Nim Compiler User Guide".
  31. ^ Nim's Memory Management
  32. ^ "Nimble". GitHub. Retrieved 2018-10-12.
  33. ^ "Nim v0.12.0 release". GitHub. Retrieved 2020-11-28.
  34. ^ "c2nim". GitHub. Retrieved 2018-10-12.
  35. ^ "Nim maintenance script". nim-lang.org. Retrieved 2021-11-16.
  36. ^ "nimgrep User's manual". nim-lang.org. Retrieved 2021-11-16.
  37. ^ "Nim IDE Integration Guide". nim-lang.org. Retrieved 2021-11-16.
  38. ^ "niminst User's manual". nim-lang.org. Retrieved 2021-11-16.
  39. ^ "Tools available with Nim". nim-lang.org. 2021-10-19. Archived from the original on 2015-05-09. Retrieved 2022-02-18.
  40. ^ "choosenim". GitHub. Retrieved 2018-10-12.
  41. ^ Glukhov, Yuriy (2021-11-12), nimpy, retrieved 2021-11-16
  42. ^ nimterop/nimterop, nimterop, 2021-11-12, retrieved 2021-11-16
  43. ^ Nim Standard Library
  44. ^ Installation, The Nim programming language, 2021-09-25, retrieved 2021-11-16
  45. ^ StefanSalewski (2021-11-15), High level GTK4 and GTK3 bindings for the Nim programming language, retrieved 2021-11-16
  46. ^ "NimQml". GitHub.
  47. ^ "WxNim". GitHub.
  48. ^ SDL2 for Nim, The Nim programming language, 2021-10-26, retrieved 2021-11-16
  49. ^ Arabadzhi, Vladimir (2021-11-15), sdl2_nim 2.0.14.2, retrieved 2021-11-16
  50. ^ Cairo, The Nim programming language, 2021-10-05, retrieved 2021-11-16
  51. ^ opengl, The Nim programming language, 2021-11-14, retrieved 2021-11-16
  52. ^ Ward (2021-11-15), Winim, retrieved 2021-11-16
  53. ^ "Vulkanim". GitHub.
  54. ^ "Nim Standard Library". Nim documentation. Archived from the original on 2015-04-06. Retrieved 2015-04-04.
  55. ^ Lim, Andri (jangko) (2018-10-17). "nimLUA". GitHub. Retrieved 2018-10-17.
  56. ^ "Nimjl". GitHub.
  57. ^ "Nbindgen". GitHub.
  58. ^ "cs2nim". GitHub.
  59. ^ "ts2nim". GitHub.
  60. ^ Glukhov, Yuriy (2020-07-20), yglukhov/nimpy, retrieved 2020-07-21
  61. ^ "Nim Manual". nim-lang.org. Retrieved 2021-07-10.
  62. ^ "Nim by Example - First Class Functions".
  63. ^ "Nim Manual".
  64. ^ "Nim Experimental Features".
  65. ^ "Nim Manual". nim-lang.org. Retrieved 2020-07-21.
  66. ^ "Nim Forum". nim-lang.org. Retrieved 2015-05-04.
  67. ^ "Primary source code repository and bug tracker". GitHub. Retrieved 2015-05-04.
  68. ^ "Nim Online Conference 2020". Nim. Retrieved 2020-11-28.
  69. ^ "NimConf 2020". Nim. Retrieved 2020-11-28.
  70. ^ "NimConf 2020 Playlist". YouTube. Retrieved 2020-11-28.
  71. ^ "Nim at OSCON 2015". O'Reilly Open Source Convention (OSCON). O'Reilly Media. 2015-07-20. Retrieved 2018-10-17.
  72. ^ Rumpf, Andreas; Swartz, Jason; Harrison, Matt. "Essential Languages: Nim, Scala, Python". O’Reilly. O'Reilly Media. Retrieved 2018-10-17.
  73. ^ Rumpf, Andreas (2015-10-26). OSCON 2015 – Nim: An Overview. YouTube (Video). Retrieved 2018-10-12.
  74. ^ "Events". fosdem.org. Retrieved 2020-02-17.

External links[edit]