At long last: https://nim.godbolt.org/
We can thank https://github.com/DaemonSnake on github for this wonderful contribution :-D
The PR for syntax highlighting was just accepted as well. So hopefully the next time they update the live site it will look prettier :-)
Small note: There are a few small improvements that could be made around name mangling and source to asm mapping, if anyone has any thoughts:
https://github.com/mattgodbolt/compiler-explorer/pull/1753#issuecomment-570399679
That is great.
But my feeling is that there are two problems still: First, when I visited that page for the first time, then there was a proc square() available for testing, but there was no ASM code for it. Seems the reason is that nim compiler generates code for it only when it is called, so I added discard square(4) and code was generated. Second point is, that maybe default compiler option should be -d:release or -d:danger to confuse people not with all that debugging code.
Well, that are only problems for newcommers, but for these it may be confusing.
@mratsim Does zig do that on Godbolt?
I personally think removing the "preMain" stuff to be a little shady and disingenuous.
Then again, the point of Godbolt is to examine the assembly for a particular snippet of "code of interest" and not the whole program.
Zig notwithstanding, I'm pretty sure D, Clean, OCaml, Swift have a runtime as big at Nim at best or much larger but the output is very clean so it's probably stripped of the runtime.
The only language that seems to have an output as messy as Nim's seems to be Go.