News for hackers. Stuff that matters.
Re:Nim 1.6 by Zababa on Tuesday October 19, 2021 @09:01AM (#28917593)
I think Nim is in the sweet spot for it. You start with basically OCaml, which is already a great start, add some knobs for tweaking memory management, some for high performance, and you're in a great places. Compiling to native and to JS allows you to do web, cli tooling, applications, high level gamedev. Fast compilation is important for scripting, high level gamedev, exploratory programming, scripting. High performance allows you to do low level gamedev, deep learning, stuff like that. Being bootstapable from C and compiling to it with the memory management tweaks opens you the world of embedded.

There's also the fact that not all language are perfect. If they all are, the general language would always lose to the specific in every niche, so you need to do different things for the general to be worth. But languages aren't perfect, and you could prefer the general language even in niches.

Re:Nim 1.6 by haxscramper on Tuesday October 19, 2021 @09:18AM (#28917748)
I can't remember exact place where I've seen this discussion (I think it was on the nim IRC), but if I recall correctly, the original line of thought with nim was to take C (because fast/compiled/available-everywhere) and LISP (because flexible/extensible/good-ideas) and add more syntax sugar, so that user would not have to reimplement most of the syntax from scratch (using reader macros/special functions and so on).

There are of course a lot of other languages that influenced the syntax and semantics (like Ada, python, C++ and so on), and I omitted a huge number of extra considerations.

Re:Nim 1.6 by dom96 on Tuesday October 19, 2021 @10:03AM (#28918175)
Indeed, in fact the original line of thought was[1]:

> [combining] Lisp's power with Python's readability and C's performance.

I'd say Nim still satisfies this very well.

1 - https://web.archive.org/web/20110704041631/http://force7.de/...

Re:Nim 1.6 by Zababa on Tuesday October 19, 2021 @11:31AM (#28919231)
Interesting, I think Julia was close to that too:

> We want a language that's open source, with a liberal license. We want the speed of C with the dynamism of Ruby. We want a language that's homoiconic, with true macros like Lisp, but with obvious, familiar mathematical notation like Matlab. We want something as usable for general programming as Python, as easy for statistics as R, as natural for string processing as Perl, as powerful for linear algebra as Matlab, as good at gluing programs together as the shell. Something that is dirt simple to learn, yet keeps the most serious hackers happy. We want it interactive and we want it compiled.

https://julialang.org/blog/2012/02/why-we-created-julia/

Re:Nim 1.6 by Zababa on Tuesday October 19, 2021 @12:20PM (#28919898)
Interesting. No mention of Pascal or its descendants, specifically Modula 2 or 3? From what I understood, that's where Nim got its fast compilation and modules, like OCaml.
Re:Nim 1.6 by xigoi on Tuesday October 19, 2021 @06:47PM (#28924703)
If you ignore the whitespace sensitivity, Nim's syntax is actually more similar to Pascal than to Python.