# What do you think about the programming language NIM?

**URL:** https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369
**Category:** Offtopic
**Created:** [December 6, 2018, 11:17am UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369 "2018-12-06T11:17:38Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Juan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juan/32/7657_2.png) [@Juan](https://discourse.julialang.org/u/Juan)
#### Post date: [December 6, 2018, 11:17am UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/1 "2018-12-06T11:17:38Z")

</div>

While looking for different benchmarks I’ve found

> **[Nim Programming Language](https://nim-lang.org/)**
>
> The Nim programming language is a concise, fast programming language that compiles to C, C++ and JavaScript.

It’s supposed to be faster than Julia for many operations, though it doesn’t have so many libraries:

> **[GitHub - mratsim/Arraymancer: A fast, ergonomic and portable tensor library...](https://github.com/mratsim/Arraymancer)**
>
> A fast, ergonomic and portable tensor library in Nim with a deep learning focus for CPU, GPU and embedded devices via OpenMP, Cuda and OpenCL backends - GitHub - mratsim/Arraymancer: A fast, ergono...

> <https://gist.github.com/sdwfrost/7c660322c6c33961297a826df4cbc30d>
>
> There are more than three files. show original

[https://forum.nim-lang.org/t/3388](https://forum.nim-lang.org/t/3388)

---

<div class="post-metadata">

### Author: ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)
#### Post date: [December 6, 2018, 11:44am UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/2 "2018-12-06T11:44:57Z")

</div>

> It’s supposed to be faster than Julia for many operations

I highly doubt that 😉  
If you’re referring to the quoted Matrix multiplication benchmark, that’s just a pretty niche special case were Julia doesn’t have an optimized implementation.

Also, I just tried the Julia benchmark from the gist, and it already looks like one could optimize it a bit further, and more importantly, the benchmarking method is highly doubtful since It’s just taking one sample for comparison. I just executed the code a couple of times and already got a range of 0.02s to 0.06 seconds for Julia - so there is lots of noise, making it insufficient to take one sample and conclude any speed up 😉

Besides that, NIM looks pretty cool 🙂 I don’t really like the syntax as much and I haven’t looked into how one would structure high level code with it … mainly because I’m already suffering from Julia being a young language, so I’m not too excited to look into an even younger language right now 😉

---

<div class="post-metadata">

### Author: ![y4lu](https://avatars.discourse-cdn.com/v4/letter/y/47e85d/32.png) [@y4lu](https://discourse.julialang.org/u/y4lu)
#### Post date: [December 6, 2018, 11:49am UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/3 "2018-12-06T11:49:32Z")

</div>

It looks quite a lot like julia, bar some basic syntax differences, and julia is open source… so it kind of begs the question  
The 40kb Hello world benchmark is pretty nice, I thought it was Mb at first glance

---

<div class="post-metadata">

### Author: ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)
#### Post date: [December 6, 2018, 11:54am UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/4 "2018-12-06T11:54:35Z")

</div>

> [@y4lu](#):
>
> It looks quite a lot like julia

Nim quotes inspiration from Python, so the similarities are from Python. Also the fact that Nim can compile to C, Objective-C, and Javascript blows my mind.

---

<div class="post-metadata">

### Author: ![Juan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juan/32/7657_2.png) [@Juan](https://discourse.julialang.org/u/Juan)
#### Post date: [December 6, 2018, 11:56am UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/5 "2018-12-06T11:56:03Z")

</div>

I know it’s good to have alternatives and competition but it’s sad to see most people prefer to start new projects instead of collaborating on already existing ones. It’s the same situation than with Linux, thousands of people creating new distros instead of collaborating.  
Union make force.

---

<div class="post-metadata">

### Author: ![Juan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juan/32/7657_2.png) [@Juan](https://discourse.julialang.org/u/Juan)
#### Post date: [December 6, 2018, 11:57am UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/6 "2018-12-06T11:57:09Z")

</div>

This is something I’ve read before.  
Don’t all programming languages compile to machine assembler?

---

<div class="post-metadata">

### Author: ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)
#### Post date: [December 6, 2018, 11:57am UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/7 "2018-12-06T11:57:48Z")

</div>

> [@xiaodai](#):
>
> Also the fact that Nim can compile to C, Object-C, and Javascript blows my mind.

That is indeed super cool 🙂

---

<div class="post-metadata">

### Author: ![y4lu](https://avatars.discourse-cdn.com/v4/letter/y/47e85d/32.png) [@y4lu](https://discourse.julialang.org/u/y4lu)
#### Post date: [December 6, 2018, 12:10pm UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/8 "2018-12-06T12:10:08Z")

</div>

Python doesn’t have dot operators, multiple dispatch or getindex `[]` overloading though?  
I think it might be a bit more julia inspired than they admit

---

<div class="post-metadata">

### Author: ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)
#### Post date: [December 6, 2018, 12:14pm UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/9 "2018-12-06T12:14:14Z")

</div>

NIM is older than Julia [Nim (programming language) - Wikipedia](https://en.wikipedia.org/wiki/Nim_(programming_language)), first appeared 2008 vs 2012 for Julia.

---

<div class="post-metadata">

### Author: ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)
#### Post date: [December 6, 2018, 12:19pm UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/10 "2018-12-06T12:19:54Z")

</div>

> [@Juan](#):
>
> but it’s sad to see most people prefer to start new projects instead of collaborating on already existing ones.

I agree but the evolution doesn’t work that way. Unless you pay salary people are free to develop whatever they prefer themselves.

---

<div class="post-metadata">

### Author: ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)
#### Post date: [December 6, 2018, 12:29pm UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/11 "2018-12-06T12:29:44Z")

</div>

> [@Juan](#):
>
> I know it’s good to have alternatives and competition but it’s sad to see most people prefer to start new projects instead of collaborating on already existing ones. It’s the same situation than with Linux, thousands of people creating new distros instead of collaborating.  
> Union make force.

And this is what people said/have been saying about Julia for years. If the creators of Julia had thought like that, we might have had a slightly faster Python, or, more likely, more people disagreeing over some design issue.

A small number of people with a new idea can make a _far_ bigger impact by building something of their own, than by joining the large group of people already pulling one thing in every different direction.

I think this may have an analogy in the concept of the _punctuated equilibrium_ theory in biological evolution (please don’t quote me on that, though…)

---

<div class="post-metadata">

### Author: ![pkofod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pkofod/32/2179_2.png) [@pkofod](https://discourse.julialang.org/u/pkofod)
#### Post date: [December 6, 2018, 12:36pm UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/12 "2018-12-06T12:36:34Z")

</div>

> [@Juan](#):
>
> Union make force.

Where would you have drawn the line then? At Fortran? At C? At C++? At Ada? At CommonLisp?

In the end, programming languages are tools. If a group of people do not like the types of screwdrivers they can buy (because someone gave them torx screws, and they can only buy phillips drivers), then they’ll give up on the task or invent the tools they need.

---

<div class="post-metadata">

### Author: ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)
#### Post date: [December 6, 2018, 12:36pm UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/13 "2018-12-06T12:36:50Z")

</div>

My biology knowledge is shaky, but this quote spoke to me (from [here](https://en.wikipedia.org/wiki/Punctuated_equilibrium#Theoretical_mechanisms)):

> Allopatric speciation suggests that species with large central populations are stabilized by their large volume and the process of gene flow. New and even beneficial mutations are diluted by the population’s large size (…)  
> Smaller populations on the other hand, which are isolated from the parental stock, are decoupled from the homogenizing effects of gene flow. In addition, pressure from natural selection is especially intense, as peripheral isolated populations exist at the outer edges of ecological tolerance.

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [December 6, 2018, 12:43pm UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/14 "2018-12-06T12:43:07Z")

</div>

> [@DNF](#):
>
> A small number of people with a new idea can make a _far_ bigger impact by building something of their own, than by joining the large group of people already pulling one thing in every different direction.

This is a very important point. Also, the impact does not have to be direct: there are examples of projects which did not become mainstream for various reasons, but explored ideas that subsequent ones could build on.

That’s why I don’t find simple “X is a bit faster than Y for some very simple Z” discussions very useful. There is so much more to a language than a couple of heavily optimized microbenchmarks. To be in a position to evaluate Nim, Julia, or any other modern language, one has to program in it for a couple of months and develop at least one medium-sized project.

---

<div class="post-metadata">

### Author: ![Juan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juan/32/7657_2.png) [@Juan](https://discourse.julialang.org/u/Juan)
#### Post date: [December 6, 2018, 12:58pm UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/15 "2018-12-06T12:58:17Z")

</div>

I also agree.

---

<div class="post-metadata">

### Author: ![y4lu](https://avatars.discourse-cdn.com/v4/letter/y/47e85d/32.png) [@y4lu](https://discourse.julialang.org/u/y4lu)
#### Post date: [December 6, 2018, 1:30pm UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/16 "2018-12-06T13:30:50Z")

</div>

To be fair nim is also open source (mostly?)  
Even the forum looks rather familiar though - [https://forum.nim-lang.org/](https://forum.nim-lang.org/)

---

<div class="post-metadata">

### Author: ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)
#### Post date: [December 6, 2018, 1:39pm UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/17 "2018-12-06T13:39:43Z")

</div>

> [@y4lu](#):
>
> Even the forum looks rather familiar though

Lots of familiar thread titles 😀 And they even have a guy with a name eerily similar to “Stefan Karpinski” 🤨

---

<div class="post-metadata">

### Author: ![y4lu](https://avatars.discourse-cdn.com/v4/letter/y/47e85d/32.png) [@y4lu](https://discourse.julialang.org/u/y4lu)
#### Post date: [December 6, 2018, 1:46pm UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/18 "2018-12-06T13:46:30Z")

</div>

lol

I think i like our error messages a bit more,  
`[GCASSERT] decRef: interiorPtr Traceback (most recent call last) threadpool.nim(337) slave main.nim(272) inspectWrapper main.nim(251) inspect main.nim(103) register parsecfg.nim(588) setSectionKey tables.nim(807) []= tableimpl.nim(90) []= tables.nim(621) enlarge gc.nim(289) unsureAsgnRef gc.nim(116) decRef Error: execution of an external program failed: '../test.exe '`

---

<div class="post-metadata">

### Author: ![piever](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/piever/32/1815_2.png) [@piever](https://discourse.julialang.org/u/piever)
#### Post date: [December 6, 2018, 1:49pm UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/19 "2018-12-06T13:49:04Z")

</div>

> [@y4lu](#):
>
> Even the forum looks rather familiar though

A curious difference in the forums though is that, given that nim compiles to javascript, they actually rewrote a [lightweight version of discourse in nim](https://github.com/nim-lang/nimforum) and use it for their forum 🙂

It’d be really cool to be able to do something like this in Julia.

---

<div class="post-metadata">

### Author: ![y4lu](https://avatars.discourse-cdn.com/v4/letter/y/47e85d/32.png) [@y4lu](https://discourse.julialang.org/u/y4lu)
#### Post date: [December 6, 2018, 2:15pm UTC](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369/20 "2018-12-06T14:15:24Z")

</div>

I’m sure you could, I don’t think it would be too trivial in either language though. Plus we already have a forum =)

mildly suspicious - [Nim forum](https://forum.nim-lang.org/t/1926) /much prefer the term ‘borrowing’

[Next page](https://discourse.julialang.org/t/what-do-you-think-about-the-programming-language-nim/18369.md?page=2)
