News for hackers. Stuff that matters.
Re:NIR: Nim Intermediate Representation by mathisfun123 on Saturday September 30, 2023 @07:57PM (#37721147)
> Nim's VM runs from Nim AST

What does this mean? There's a runtime VM or compile time VM?

Re:NIR: Nim Intermediate Representation by elcritch on Saturday September 30, 2023 @08:19PM (#37721271)
> What does this mean? There's a runtime VM or compile time VM?

Compile time VM. It's used to run macros / templates / concepts. You can also run most code at compile time in a `static` block except for stuff that needs C calls. You can also compile the VM into a program and use it as a runtime VM (see https://github.com/beef331/nimscripter) which I do in my GUI lib. NIR should enable the compile time VM to run faster too, and possibly use JIT'ed code.

Re:NIR: Nim Intermediate Representation by mathisfun123 on Saturday September 30, 2023 @09:38PM (#37721738)
ah so like clang's constexpr. got it. thanks