brew tap gravatalonga/ninja-lang
brew install ninja-lang
To enable, add the following file /etc/yum.repos.d/ninja.repo
:
[ninja]
name=Ninja Programming Language
baseurl=https://yum.fury.io/gravatalonga/
enabled=1
gpgcheck=0
Check if correctly created
yum --disablerepo=* --enablerepo=ninja list available
To install you only need run following command:
yum install ninja-lang
To configure apt access, create a following file /etc/apt/sources.list.d/ninja.list
with content of :
deb [trusted=yes] https://apt.fury.io/gravatalonga/ /
Or use this one line command:
echo "deb [trusted=yes] https://apt.fury.io/gravatalonga/ /" > /etc/apt/sources.list.d/ninja.list
and them you can install
sudo apt install ninja-lang
For windows, you can get binaries from github.
https://github.com/gravataLonga/ninja/releases
Download from github
git clone https://github.com/gravataLonga/ninja
cd ninja
go build -o ninja-lang
You can execute code in three ways,
example.nj
and execute binary passing file. E.g.: ninja-lang example.nj
ninja-lang
and you good to go.ninja-lang -e "var a = 1; puts(a);