Live data from Hacker News

Nim – Natively compiled language with hot code-reloading at runtime [video]

youtube.com

1–10 of 118 posts

Re: Nim – Natively compiled language with hot code-reloading at runtime [video]

#5
post #3

(Natively compiled) Erlang might want to have a word with you.

Educate me if I am wrong, but there are natively compiled Erlang modules, but no longer any natively compiled Erlang. It only runs on the BEAM, and ever since BEAM/C fell out of use in OTP R5 no native code is generated.

Re: Nim – Natively compiled language with hot code-reloading at runtime [video]

#6
post #2

Afaik Common Lisp would be the first, wouldn't it?

The answer to that would depend on the CL implementation, since not all of them can do AOT compilation.

But the same can be said about Nim, this ability depends on the implementation.

Re: Nim – Natively compiled language with hot code-reloading at runtime [video]

#7
Nim is an amazing language. The syntax is cleaner (IMO) and easier-to-read than Go and approaches Python in its readability, which is impressive for a statically typed, compiled language[0]. The design is focused on performance above all else, but it still has metaprogramming[1] and functional features.

However, Go and other languages have a huge ecosystem and many more libraries. Nim only has a few web servers/frameworks, for example. Even if Nim's web frameworks/servers (like httpbeast) are quite fast[2], they lack the completeness that exist for other languages.

Until then, if you are looking for a systems programming language, you owe it to yourself to investigate Nim[3], alongside Go, Crystal, Julia, D, Rust, Haskell, etc. The tooling is fantastic and the Nim compiler produces clean, cross-platform C code (or JS[4]!) that can be automatically fed into gcc, clang, mingw-w64, etc. It's a language that's undergoing rapid changes, but almost all of the changes are in the libraries and it's exciting to see all of the innovation there -- and as libraries increase and mature, it will become a really compelling application language as well.

The community is extremely active, and issues are promptly dealt with. For HNers, it's an opportunity to still make a huge difference by contributing to a relatively young language, compared to getting drowned out by all the noise in a more mature language community.

0. https://nim-lang.org/docs/tut1.html

1. https://en.wikipedia.org/wiki/Metaprogramming

2. https://www.techempower.com/benchmarks/

3. https://nim-lang.org/features.html

4. https://picheta.me/snake/

Re: Nim – Natively compiled language with hot code-reloading at runtime [video]

#8
post #5
post #3

(Natively compiled) Erlang might want to have a word with you.

Educate me if I am wrong, but there are natively compiled Erlang modules, but no longer any natively compiled Erlang. It only runs on the BEAM, and ever since BEAM/C fell out of use in OTP R5 no native code is generated.

  erlc +native
You will get beam file containing both the byte-code and native code.

Re: Nim – Natively compiled language with hot code-reloading at runtime [video]

#9
post #2

Afaik Common Lisp would be the first, wouldn't it?

The answer to that would depend on the CL implementation, since not all of them can do AOT compilation.

Not really...

It's in the CL standard, and compliant implementations support it. SBCL, LispWorks, Allegro, CCL, and others all do AOT native compilation, from the REPL and via eval (which should be avoided, in any case). ABCL does AOT compilation to JVM bytecode, and Clisp to its own bytecode.

It's a cool feature for Nim to have, but claiming to be the first makes them look bad.

Re: Nim – Natively compiled language with hot code-reloading at runtime [video]

#10
To add another existing implementation of this, Naughty Dog's Lisp-based assembler could do hot code reloading, and that workflow was extensively used for developing Jak & Daxter. Plus, obviously any JIT'd language can do this but it's fair not to count that. Still, that's just splitting hairs and it's really exciting to see this in Nim. It's a great language and it's a shame that it doesn't seem to have found a real niche yet.

http://www.codersnotes.com/notes/disassembling-jak/

Post reply on HN