With the Nim 1.6 series nearing a stable enough release, the time has finally 
come: the LLVM-based `nlvm` compiler for Nim is now based off the nim-1.6 
branch of the language!

With it come a bunch of small fixes here and there - floating point intrinsics, 
reset/move support, etc.

As policy, `nlvm` tracks the most stable release available of Nim giving 
priority to the stable feature set of that release (what you get when you run 
`nim` without weird flags) - to make things work, the project keeps a fork off 
`Nim` itself where patches that have not yet been upstreamed (or are not 
suitable for upstreaming) are kept: 
<https://github.com/arnetheduck/Nim/tree/nlvm>

`nlvm` uses the same test suite as upstream nim: currently, about 1250 of 1600 
tests are passing. The tests that are failing fall into three categories:

  * ARC/ORC: currently unimplemented (about 50% of test failures) - most of the 
issues probably derive from how string / seq has changed, given that the v2 
strings are default - unforunately, these two types have a lot of magic stuff 
and dependencies in the compiler instead of being implemented as a library - 
it's probably not too much work to fix, but it'll be easier to do when the 
ORC/ARC becomes usable / more stable in Nim itself.
  * unsupported features or things that depend on the C backend (another 40%): 
stuff like `emit` and undefined types that rely on C header parsing to happen - 
I've been wanting to patch testament so that these can be excluded from runs 
more easily which would cut down on noise
  * codegen issues / unimplemented features (about 10% of the failures): things 
that still need sorting out - if you're interested in helping, this is a good 
place to start - grab a random test from 
<https://github.com/arnetheduck/nlvm/blob/master/skipped-tests.txt> and fix it 
:)



What works and what doesn't is further described in 
<https://github.com/arnetheduck/nlvm#status>=, but if you want to give it a 
quick spin (on linux), here's a one-liner that fits in a tweet:
    
    
    curl -L https://bit.ly/2W7O0yH -o nlvm; chmod +x nlvm;  echo 'echo "space 
mutants"' > t.nim; ./nlvm c -d:release -r t.nim
    
    
    Run

Reply via email to