News for hackers. Stuff that matters.
Re:Python C API, PyPy and the road into the future by jboy on Monday November 16, 2015 @09:55PM (#10578903)
There is some documentation on the various Nim backends here: http://nim-lang.org/docs/backends.html & http://nim-lang.org/docs/nimc.html#compiler-usage-generated-...

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.

Re:Python C API, PyPy and the road into the future by gcr on Monday November 16, 2015 @10:16PM (#10578956)
It's also quite fun digging around the output of other code generation toolkits. Cython code, for example, can look like quite idiomatic C if you add enough type annotations.

Theano's output, on the other hand...

Re:Python C API, PyPy and the road into the future by fizixer on Tuesday November 17, 2015 @08:01PM (#10585207)
Actually I recalled I played with nim about a month ago. Really only created a three liner (print "what's your name", read a string, print "Hello" + string_read). The generated C code was a couple hundred lines. Honestly that turned me off.

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.