News for hackers. Stuff that matters.
Re:Nim Community Survey 2019 Results by logicchains on Monday February 24, 2020 @01:09AM (#22402036)
Thanks for pointing it out, that library looks quite interesting. A question: it mentions it "Supports tensors of up to 6 dimensions.". Sadly some of us have to deal with tensors of even more dimensions sometimes. Does Nim support some kind of equivalent to C++'s variadic templates that would allow creating tensors with an arbitrary number of dimensions?
Re:Nim Community Survey 2019 Results by mratsim on Monday February 24, 2020 @09:25AM (#22404161)
Author here:

Actually it's 7 [1]

But in my future backend revamp I plan to make the default 6 [2]

Note that the line can easily be updated to

    const MAXRANK* {.intdefine.} = 6
as in the planned revamp and then you would be able to change the MAXRANK with a compile parameter

    nim c -d:MAXRANK=16 path/to/my/app
[1]: https://github.com/mratsim/Arraymancer/blob/6fddfa9a734ac01c...

[2]: https://github.com/numforge/laser/blob/d1e6ae6106564bfb350d4...

Re:Nim Community Survey 2019 Results by beagle3 on Monday February 24, 2020 @02:16AM (#22402239)
Nim supports variadic templates, type checked variadic run time calls, and macros which let you run readable code at compile time (unlike C++ which has an accidentally turing complete, so can do anything but readability -- or speed -- are not part of that accident).

But unless you actually extend Arraymancer to more than 6 dimensions, you will likely lose some speed and convenience.

mratsim is a magician. Both Arraymancer (tensor library) and weave (multithreading core) are comparable and in some way better than other similar runtimes, despite being written by one person who is working on other projects as well.