This release makes me eager to try it again. I remember that the language impressed me a lot: easy to learn, well-thought, and very fast to compile.
Congratulations to the team!
131–140 of 308 posts
This release makes me eager to try it again. I remember that the language impressed me a lot: easy to learn, well-thought, and very fast to compile.
Congratulations to the team!
Earlier quoted context omitted.
Nim performance is really really good. Like, maybe C - 5%. Comparable with stuff like Rust or D... way way faster than Go or anything interpreted.
I think it depends on the nature of the code. For a side project of mine, I recently re-wrote the same code in a dozen or so languages. The application reads input data from text file and does a bunch of conversions to integers and floats (atoi and atof). It then runs through an algorithm that does calculations and identifies proper actions. Finally, it writes the output data as formatted text file. Regardless of imp…
1. C++ 0.04 (gcc version 5.4.0)
2. Rust 0.11 (version 1.37.0)
3. Go 0.13 (version 1.12.7)
4. D 0.16 (tied with Pascal) (DMD64 D Compiler v2.073.2-devel)
5. Pascal 0.16 (tied with D) (fpc 3.0.2)
6. C# 0.25 (mono 4.8.1)
7. Nim 0.50 (1.0.0)
8. Kotlin 0.81 (Kotlin version 1.3.50-release-112, JRE 1.8.0_222)
9. Java 0.95 (openjdk version "1.8.0_131")
10. Scala 1.79 (version 2.12.2, running on 1.8 openjdk)Question (genuine, not trolling): what's the use-case for Nim regarding other languages? What are its pros/cons?
For me, personally, the biggest points for Nim are: - "Transpiled" to C, with some options regarding runtime library, which means you can target any uController out there - Good metaprogramming support - Static and _strong_ typing - Consequently, precise type aware function dispatch - Type inference - Good generics Also, more stuff like covariants and contravariants and... maybe you just have a look-see? ;-)
Earlier quoted context omitted.
Nim performance is really really good. Like, maybe C - 5%. Comparable with stuff like Rust or D... way way faster than Go or anything interpreted.
I think it depends on the nature of the code. For a side project of mine, I recently re-wrote the same code in a dozen or so languages. The application reads input data from text file and does a bunch of conversions to integers and floats (atoi and atof). It then runs through an algorithm that does calculations and identifies proper actions. Finally, it writes the output data as formatted text file. Regardless of imp…
Question (genuine, not trolling): what's the use-case for Nim regarding other languages? What are its pros/cons?
Those are valid questions when evaluating an unknown technology. How could anyone consider this trolling? Not to digress but have we become too sensitive?
So, in order to avoid bias on the reader part, I preferred to explicitly tell it was not trolling.
Earlier quoted context omitted.
I think it depends on the nature of the code. For a side project of mine, I recently re-wrote the same code in a dozen or so languages. The application reads input data from text file and does a bunch of conversions to integers and floats (atoi and atof). It then runs through an algorithm that does calculations and identifies proper actions. Finally, it writes the output data as formatted text file. Regardless of imp…
Obviously, if you measure cold starts, JVM-based languages will be slower...
For compiling to Javascript, is it possible to use npm modules with the code?
What’s Nim’s concurrency story? Since it’s compuled via C, I suspect the answer is “shitty” as in I expect it to inherit all of C’s issues with undefined behaviour, values out of thin air, and so on...
For example, take a look at Cython, CGo etc.
Regarding concurrency, Nim has cross-platform thread support in the standard library. Concurrency, at least right now, is more memory safe than other languages, but also more restrictive. Each thread has its own heap, and and memory from one thread's heap cannot be referenced by another thread's heap without use of unsafe pointers. One can, however, copy memory from one heap to another.
There are more abstract currency mechanisms detailed in the manual (primarily for work that is well-suited for threadpool use cases)
I noticed that Araq's personal post about v1.0 mentioned a powerful macro system as a top priority. I wonder if Nim's macro system is now expressive enough that a front-end web framework like Svelte [1] could be implemented using Nim macros, as opposed to Svelte's HTML template language and custom compiler. COuld be useful for developing isomorphic web apps with something lighter than Node on the server side. [1]: ht…