News for hackers. Stuff that matters.
Re:Python vs. NumPy vs. Nim by narimiran on Friday May 11, 2018 @01:59AM (#17045238)
Author here.

If you have any questions and/or comments about Nim, I'm ready to answer.

Re:Python vs. NumPy vs. Nim by cicero on Monday May 14, 2018 @10:58AM (#17066084)
At this stage in my career, Python is my most used language, but I would prefer static typing (ideally with type inference) and native executables. I've been learning Haskell for that reason, but I see that Nim would also fulfill those requirements. How does Nim compare with Haskell, including its maturity and community?
Re:Python vs. NumPy vs. Nim by narimiran on Wednesday May 16, 2018 @04:41AM (#17080889)
> How does Nim compare with Haskell, including its maturity and community?

Nim is not as mature nor battle-tested as Haskell. Haskell has more users and it is more widely spread, so it would be a safe(r) bet.

I'm also coming from Python, and I have tried several languages (including Haskell) until I kinda settled with Nim.

I really like the similarities in the syntax between Nim and Python, which allows me to easily transfer my "Python thinking" into Nim code. There is also a possibility to only translate some slow/CPU-intensive parts of Python code to Nim, and then call it from Python (FFI).

Regarding community - the Nim community (IRC/Gitter) has been very welcoming to me and to my beginner/dumb questions - I guess this is the advantage of a small community - there's a sense of a connection and people want to help each other.

Re:Python vs. NumPy vs. Nim by amai on Friday May 11, 2018 @02:00PM (#17049480)
What about Numba and Cython?
Re:Python vs. NumPy vs. Nim by narimiran on Friday May 11, 2018 @02:42PM (#17049814)
> What about Numba?

I'll copy-paste my Reddit comment:

Like pypy, numba was also on my radar, but I couldn't make it work by just slapping `@jit` decorator to the original code, and I didn't want to go into figuring out what's wrong nor making modifications to the original code.

>> I suspect it should be on par with Nim.

Somebody else [0] has run a comparison including Numba, where Numba is 1.5x faster than NumPy.

This means, if we can compare tests on the different machines, that Nim should be about 2x faster than Numba.

[0] https://github.com/henryiii/framework_compare/tree/master/li...

----

> What about Cython?

I haven't tried it. It would be interesting to see the results.

Re:Python vs. NumPy vs. Nim by henryiii on Tuesday May 15, 2018 @04:42PM (#17077699)
I've added several others, including C++, as well as a faster numpy implementation (avoiding mixing double and float): https://github.com/henryiii/framework_compare/tree/master/li...