A simple programming language implementation written in C.
git clone https://github.com/0xM4LL0C/yuji.git
cd yuji
git checkout tags/v0.2.1 # you can specify the version you want to installmake buildsudo make installYou can specify the installation prefix using the PREFIX variable:
sudo make install PREFIX=/usr/localssudo make uninstallyuji test.yujiuse "std/io"
use "std/core"
fn factorial(n) {
if n <= 1 {
1
} else {
n * factorial(n - 1)
}
}
let result = factorial(5)
println(format("5! = {}", result))
Warning
Work in progress - not ready for production use
For detailed language documentation, syntax guide, and standard library reference, see:
Benchmark 1: ./.build/yuji benchmark/factorial.yuji
Time (mean ± σ): 2.9 ms ± 0.5 ms [User: 0.7 ms, System: 1.6 ms]
Range (min … max): 2.1 ms … 5.4 ms 797 runs
Benchmark 2: python3 benchmark/factorial.py
Time (mean ± σ): 293.8 ms ± 15.5 ms [User: 139.1 ms, System: 145.7 ms]
Range (min … max): 275.7 ms … 318.1 ms 10 runs
Benchmark 3: lua benchmark/factorial.lua
Time (mean ± σ): 4.6 ms ± 0.9 ms [User: 1.5 ms, System: 2.3 ms]
Range (min … max): 3.5 ms … 14.5 ms 207 runs
Summary
./.build/yuji benchmark/factorial.yuji ran
1.59 ± 0.41 times faster than lua benchmark/factorial.lua
102.25 ± 18.23 times faster than python3 benchmark/factorial.py- yuji: 0.2.0
- python: 3.14.0
- lua: 5.4.8
Dependencies:
make benchmarkSee the project board for planned features and updates.
YUJI is licensed under the MIT License.
