Why you should use nua?
- Until 15% faster than Lua 5.3
- Usage in Browser
- Covers 100% Lua syntax
- Powerful C-Api
- Npm packages
- Code coverages using Istanbul.io
Install Nua v.0.1.4 right from here!
- paste it in a native shell
npm install -g nua-lang
- Finished! Compile your .nua file with...
Start writing nua files using it's reference in JS codes using the
local = require("nua.nua") function greet() greet = "Hello, World!" if (greet ==
string)then print(greet), else print("Value is nil") end
Nua is tested against Dart, Ruby, PHP, csharp, LuaJIT (j-on), Crystal and Haskell.
The fib function is tested on a Lenovo L390 Yoga with an Intel core(R)(TM) i5-8265U CPU @ 1.60GHz - 1.80GHz. 8.00GB RAM memory on windows 10. As we see Nua is on first position. Hurray! But as we know we'have tested the fib with LuaJIT J-enabled. Would it be disabled it would be very much faster. The Nua is tested on the NuaC -librairy, that means it will be transpiled to C. So that's the source of Quality. However, NuaC is using until 32bit variables, that will make it faster. We're working still on 64-bits.
co = coroutine.create(function () print("Hy") end) print(co) --prints the fiber that we've created
pretty clean and elegant!