I've been intrigued by the C code-generation feature of Nim but haven't really gotten around to exploring the language yet.
Is there any write-up or tutorial that expands on this aspect?
Is there any write-up or tutorial that expands on this aspect?
That second link describes the `nimcache` directory into which the generated C code is written. If you poke around in that directory (starting with the generated C version of your Nim code, which will have the same filename but a `.c` suffix instead of a `.nim` suffix) then you can see that the generated C code is really quite readable.
Theano's output, on the other hand...
I'm looking for a high level language that generates really succint human-readable code. Essentially, what a human would do to create the exact program in C. And doing what I did in nim in 3 lines, really only takes less than 10 lines in C.