HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
nim-lang
Nim
Nim2013–2026
nim-lang / Nim

Nim

Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).

100Distinct people
162Mentions
2Explicit recommenders
18.3KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

I see Go and OCaml recommended to people fed up with Python's lack of static typing, and I just cringe. I love experimenting with programming languages, and Go seems to be…

Cyther606 used a recommendation phrase. 2 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 3:59:04 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year162 dated mentions

Observed mentions: 2013-08-26 07:15:53 UTC to 2026-08-14 22:20:35 UTC.

01020302013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20132014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 16 mentions; 2 submissions, 14 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 15 mentions; 1 submissions, 14 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 11 mentions; 0 submissions, 11 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 7 mentions; 0 submissions, 7 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 12 mentions; 0 submissions, 12 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 21 mentions; 3 submissions, 18 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 14 mentions; 0 submissions, 14 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 26 mentions; 3 submissions, 23 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 14 mentions; 3 submissions, 11 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 8 mentions; 0 submissions, 8 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC202
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC16214
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC15114
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC11011
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC707
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC909
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC12012
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC21318
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC14014
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC26323
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC14311
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC615
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC808
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC101

What Hacker News says

26 sources
Reference and pointer types (annotated with `ref` and `ptr` respectively) are nillable. The compiler can provide null safety guarantees by annotating types with `not nil`: https://nim-lang.github.io/Nim/manual_experimental.html#not-.... So then your example would look like the following, and fail to compile. type Foo = ref object Bar = Foo not nil var bar: Bar = nil # error: type mismatch echo bar.a Discussion about not nil by default is here: https://github.com/nim-lang/Nim/issues/6638
In Choosing Nim out of a crowded market for systems programming languages
It's great to hear Nim in production stories! > I feel like Nim made me fall in love with programming again. Same. It's just so frictionless and productive, and you know your code will run on basically any platform in a nice, efficient, self contained executable. For me it's a language of sensible defaults. Speed and safety first, and opt-in machine level control. Want to target that obscure microcontroller? No worries: https://github.com/PMunch/ratel. Want to use Unreal? Sure: https://github.com/jmgomez/NimForUE. Want to target the web? Native React support with https://github.com/andreaferretti/react.nim or web apps with https://github.com/karaxnim/karax. The list goes on! https://github.com/nim-lang/Nim/wiki/Curated-Packages But, what if you want to use that battle tested C++ library? Nim can compile to C++ so you have native ABI FFI!
Read the rest
There's also a lot to be said for automation with AST macros. The language is built around them, they're not just a tacked on after thought. As a result, it's very easy to do everything from removing boilerplate copy pasta errors to creating mini languages or even generating APIs from data. This can give you new paradigms in approaching solutions for things that are quite painful in other languages. I feel like this language could be a weapon of mass production for many businesses once they dip their toes in!
In I enjoy using the Nim programming language at Reddit
I did some work on Nim's hash tables back in 2020, specifically with OrderedTable, comparable to a Python dict where insertion order is preserved. I stumbled on this table module in a roundabout way, via Nim's database module, db_sqlite. The db_sqlite module was much slower than Python for simple tests, and on investigation, I found that it didn't automatically handled prepared statement caching like Python's sqlite3 module. There were some other issues with db_sqlite, like blob handling and null handling, which led me to a different SQLite interface, tiny_sqlite. This was a big improvement, handling both nulls and blobs, and the developer was great to work with. But it also didn't support prepared statement caching. I filed an issue and he implemented it, using Nim's OrderedTable to simulate an LRU cache by adding a new prepared st
Read the rest
atement and deleting the oldest one if the cache was too big: https://github.com/GULPF/tiny_sqlite/issues/3 Performance was hugely improved. There was another LRUCache implementation I played with, and when using that for the statement cache, performance was 25% faster than OrderedTable. That didn't make much sense to me for a 100-entry hash table, so I started running some tests comparing LRUCache and OrderedTable. What I discovered is that OrderedTable delete operations created an entirely new copy of the table, minus the entry being deleted, on every delete. That seemed pretty crazy, especially since it was already showing up as performance problems in a 100-entry table. The tiny_sqlite developer switched to LRUCache, and I did some work on the OrderedTable implementation to make deletes O(1) as expected with hash table operations: https://github.com/nim-lang/Nim/pull/14995 After spending a lot of time on this, I finally gave up. The problems were: - the JSON implementation used OrderedTables and never did deletes. JSON benchmark performance was rather sacred, so changing OrderedTables to be slightly slower/larger (I used a doubly-linked list) was not desirable, even if it changed delete performance from O(n) to O(1) - the Nim compiler also used OrderedTables and never did deletes - Nim tables allowed multiple values for the same key (I did help get that deprecated). - alternatives were proposed by others that maintained insertion order until a deleted occurred, but then it could become unordered. That made no sense to me. The TLDR is, if you use Nim tables, don't use OrderedTable unless you can afford to make an copy of the table on every deleted. Current Nim OrderedTable delete code: https://github.com/nim-lang/Nim/blob/15bffc20ed8da26e68c88bb... Issue for db_sqlite not handling nulls, blobs, statement cache: https://github.com/nim-lang/Nim/issues/13559
In A cost model for Nim
> Side Note: Why don’t I ever hear about Nim anymore??? It’s version 1.68 (and presumably stable), has very approachable syntax, claims great performance, provides a package manager, and allows the GC to be turned off (much like Dlang). What gives? I don't know if it's still the case. But there were issues with Nim executables being incorrectly flagged as viruses in Windows. ^1 1.https://github.com/nim-lang/Nim/issues/17820
In Introduction to Dlang [video]
Perhaps not the "best" source code I've ever read, but libVF.io had some beautiful code for what's generally gnarly system-glue code. The libVF.io iommu setup code is a good example and inspires me to think that system-glue code doesn't need to be gross or impenetrable: https://github.com/Arc-Compute/LibVF.IO/blob/master/src/libv... Another one I've appreciated reading (and learned more about 2d graphics from) is Pixie, a 2d graphics library written in Nim. It's strongly affected how I write similar code. Here's the implementation of a fair subset of SVG paths: https://github.com/treeform/pixie/blob/master/src/pixie/path... And one last one for basic algorithms which I'd use to teach intro to data structures any day: https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/al... Of course Knuth's original code is still some of the bes
Read the rest
t classic code. K&R's original C book is a classic. (edited formatting and tweak descriptions)
In Ask HN: What's the best source code you've read?
!: this is mostly a personal note although I am one of the nimskull contributors For now the aim of this project is first and foremost refactoring and making it easier to contribute and improve the main code base of the compiler, as indicated by the "near-term" timeline that is shown in the readme. This is mostly a disclaimer for the common reaction that invariably starts to move the discussion in the direction of "why not contribute to mainline instead", "disgruntled people" etc. etc. At the moment we are focused on making it easier to work with the codebase - more documentation, cutting down on decades-old cruft and legacy features, unraveling mysteries of the commit messages that were written with this attitude https://github.com/nim-lang/Nim/pull/19211#issuecomment-9859... ("I have no intention to follow this guideline so I cannot ac
Read the rest
cept it.") Applying data-oriented design principles, writing a specification, providing guides for compiler developers https://nim-works.github.io/nimskull/debug.html and focusing on what is important for people who work in the project. At least that's why I work on nimskull. I don't want to go into another round of "stories" that describe some interpersonal issues (which of course exist) and we explicitly opted to keep this our of readme as well, even though other might be interested in dirty details.
In NimSkull: A Hard Fork of Nim

Showing the 15 most recent of 26 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.