Live data from Hacker News

Nim 2.2.6

nim-lang.org

21–30 of 98 posts

Re: Nim 2.2.6

#21
post #17

Earlier quoted context omitted.

I have been meaning to explore Nim for a while because it feels like "golang, but python syntax and dev experience." I vibe coded a simple tool, tt, that allows me to track time to a central log from all my devices. Realllly simple: $ tt stats Time Tracking Stats Total entries: 39 First entry: Oct 21, 2025 23:04 Last entry: Oct 30, 2025 18:29 Tracking since: 228h 34m Days tracked: 5 $ tt "working on xyz today" Logged…

What are the `@` characters for? Are they what makes it feel like Perl? Because other than them I don’t think the equivalent Python code would look much different. Maybe more concise, e.g. you could replace the second section with something like `sorted = entries.sorted(key=lambda entry: entry.timestamp)`.

Yeah, the code doesn't seem very Perl-ish to me.

Re: Nim 2.2.6

#22
post #17

Earlier quoted context omitted.

I have been meaning to explore Nim for a while because it feels like "golang, but python syntax and dev experience." I vibe coded a simple tool, tt, that allows me to track time to a central log from all my devices. Realllly simple: $ tt stats Time Tracking Stats Total entries: 39 First entry: Oct 21, 2025 23:04 Last entry: Oct 30, 2025 18:29 Tracking since: 228h 34m Days tracked: 5 $ tt "working on xyz today" Logged…

What are the `@` characters for? Are they what makes it feel like Perl? Because other than them I don’t think the equivalent Python code would look much different. Maybe more concise, e.g. you could replace the second section with something like `sorted = entries.sorted(key=lambda entry: entry.timestamp)`.

`@` makes the array (stack allocated) into a sequence (heap allocated).

Edit: Just read the second half of your post—

> I don’t think the equivalent Python code would look much different. Maybe more concise

He could be leveraging [std/sugar](https://nim-lang.org/docs/sugar.html) to make this look cleaner.

Re: Nim 2.2.6

#23

Thank you for working on the Nim Compiler. This is great. Another great release. The Nim Compiler continues to move forward. Thank you very much to everyone who has contributed to the development of this superior language. Nim Compiler continues to be one of the most wonderful languages I have worked with. With the speed of C and the simplicity of Python, it has allowed me to write a lot of cool software. I do not kn…

> with the simplicity of Python

So, not simple at all, then? Python is a very complex language hiding behind friendly syntax.

Do you just mean “with the syntax of Python”? Or does Nim’s similarity to Python go more than skin-deep?

Re: Nim 2.2.6

#24
post #23

Thank you for working on the Nim Compiler. This is great. Another great release. The Nim Compiler continues to move forward. Thank you very much to everyone who has contributed to the development of this superior language. Nim Compiler continues to be one of the most wonderful languages I have worked with. With the speed of C and the simplicity of Python, it has allowed me to write a lot of cool software. I do not kn…

> with the simplicity of Python So, not simple at all, then? Python is a very complex language hiding behind friendly syntax. Do you just mean “with the syntax of Python”? Or does Nim’s similarity to Python go more than skin-deep?

Not the OP, but as an individual who has programmed in Nim on and off for a decade, I feel qualified to answer. The similarities are definitely only skin-deep, and Nim is just as complex, if not more complex than Python.

Nim is much closer to Pascal / Modula / Oberon than Python. The whole - ease/simplicity of Python and speed of C is mostly marketing jargon that the Nim community has been using as long as I've been aware of the project.

Re: Nim 2.2.6

#25
post #10

Nim has a python-like syntax, but I wish they'd gone farther, using `def` instead of `proc` and a `print` function instead of the `echo` statement. Though even if they did those things, I'm not sure it would really feel like programming Python. As a long-time Python programmer, I was drawn to trying the language partly because of the syntax, but as soon as I tried to write something substantial, Nim's heritage in lan…

Actually echo is not a statement - Nim's syntax is just much more flexible than Python so what looks like a statement in Python is actually just a UFCS/Command-Line "call" (of macro/template/generic/procedure aka "routine"). It is super easy to roll your own print function [1] and there is no penalty for doing so except that the std lib does not provide a "common parlance". So, that wheel might get reinvented a lot.

A lot of things like this in cligen because it is a leaf dependency (the literally 1..3 identifier CLI "api") and so many "drive by" PLang tester-outers might want to roll a little CLI around some procs their working on.

Also, beyond the echo x,y is same as echo(x,y) or x.echo(y) or x.echo y, the amount of syntax flexibility is dramatically more than Python. You can have user-defined operators like `>>>` or `!!!` or `.*`. There are also some experimental and probably buggy compiler features to do "term re-writing macros" so that your matrix/bignum library could in theory re-write some bz*ax+y expression into a more one-pass loop (or maybe conditionally depending upon problem scale).

I sometimes summarize this as "Nim Is Choice". Some people don't like to have to/get to choose. To others it seems critical.

Someone even did some library to make `def` act like `proc`, but I forget its name. Nim has a lot more routine styles than Python, including a special iterator syntax whose "call" is a for-construct.

[1] https://github.com/c-blake/cligen/blob/master/cligen/print.n...

Re: Nim 2.2.6

#26
I had completely forgot about Nim. It was trending a while back, but now it seems all the fanfare is around Zig instead.

Re: Nim 2.2.6

#27

nim is memory safe, python syntax, emits c/c++/js. It really deserves more love and publicity. more mature than zig, much easier than rust.

It doesn't seem as exciting as those because it doesn't have a whiz-bang-pow killer feature (other than very robust metaprogramming), but it's very mature, and breezy to write high-performance software.

> other than very robust metaprogramming

lol then i guess zig's comptime isn't a "whiz-bang-pow killer feature" either

Re: Nim 2.2.6

#28
post #23

Thank you for working on the Nim Compiler. This is great. Another great release. The Nim Compiler continues to move forward. Thank you very much to everyone who has contributed to the development of this superior language. Nim Compiler continues to be one of the most wonderful languages I have worked with. With the speed of C and the simplicity of Python, it has allowed me to write a lot of cool software. I do not kn…

> with the simplicity of Python So, not simple at all, then? Python is a very complex language hiding behind friendly syntax. Do you just mean “with the syntax of Python”? Or does Nim’s similarity to Python go more than skin-deep?

In practice, it means that unlike most native-compiled languages, if you want a data-oriented approach without having to worry about system details at all, you can do that. Your program will still be strongly typed, but you're not obligated to worry about allocation, reference vs value semantics, ownership, or initialization details. For programs that shouldn't have to worry about those details, the Nim team has done a lot of work to make sure the language gets out of the way and lets you process data. Then, you get a fast binary comparable to the results you'd get from C++ (with a lot more effort).

In buzzword-speak, it's easy to write programs composed of nearly pure business logic while getting C++-level performance.

Re: Nim 2.2.6

#29

Earlier quoted context omitted.

It doesn't seem as exciting as those because it doesn't have a whiz-bang-pow killer feature (other than very robust metaprogramming), but it's very mature, and breezy to write high-performance software.

> other than very robust metaprogramming lol then i guess zig's comptime isn't a "whiz-bang-pow killer feature" either

Metaprogramming isn't exactly new. I guess the novelty is that its history in the systems language space is spotty, and has only recently become usable in the way a Lisper might want to use it.

Re: Nim 2.2.6

#30
post #23

Thank you for working on the Nim Compiler. This is great. Another great release. The Nim Compiler continues to move forward. Thank you very much to everyone who has contributed to the development of this superior language. Nim Compiler continues to be one of the most wonderful languages I have worked with. With the speed of C and the simplicity of Python, it has allowed me to write a lot of cool software. I do not kn…

> with the simplicity of Python So, not simple at all, then? Python is a very complex language hiding behind friendly syntax. Do you just mean “with the syntax of Python”? Or does Nim’s similarity to Python go more than skin-deep?

How do you find a simple language with abstraction? Pretty much all the "complexity" of the language is juggling its abstraction overhead. Whether that's Haskell's monad transformer stacks or Rust's Send + Sync.

Given the space it's tackling I think Nim is a great effort and refreshing as it keeps a Python like syntax with a Pascal-like feel, which I feel is an underexplored evolution of languages.

Post reply on HN