Get Started
How to install Nomsu.This page will walk you through getting set up with Nomsu. Nomsu’s only prerequisites are Lua and LPEG. Nomsu has been tested on Mac, Linux, and Windows 10.
Installing Nomsu on Windows
For Windows, the best way to install is to download the self-contained executable build:
To get started, launch nomsu[version number].exe
and type
tutorial
into the interactive console
and hit “enter” twice.
You can right click a “.nom” file and choose “Open With…” and browse to the Nomsu .exe file and choose to always open .nom files with it. From then on, you can launch a Nomsu file by double clicking it. If you want a program to remain open until you close it, put this line at the end of your program:
"press enter to exit..." ask
Installing Prerequisites on Mac
If you use the Homebrew package manager, you can install Lua and LuaRocks (a Lua package manager) with:
brew update
brew install lua
brew install luarocks
Then, you can install the Lua modules LPEG (required) and LuaFilesystem (recommended) with:
luarocks install lpeg
luarocks install luafilesystem
Or, if any of these steps don’t work for you, you can also build the prerequisites from source code.
Next: Download Nomsu
Installing Prerequisites on Linux
Use your package manager to install Lua and LuaRocks (a Lua package manager), for example, using apt-get:
sudo apt-get update
sudo apt-get install lua5.3 luarocks
With LuaRocks, install LPEG and LuaFilesystem:
sudo luarocks --lua-version=5.3 install lpeg luafilesystem
Or, if any of these steps don’t work for you, you can also build the prerequisites from source code.
Next: Download Nomsu
Building Prerequisites from Source
Building Lua from Source
Paraphrasing the instructions from Lua’s website:
cd ~
curl -O http://www.lua.org/ftp/lua-5.3.5.tar.gz
tar xzf lua-5.3.5.tar.gz
cd lua-5.3.5
make macosx test
make linux test
sudo make install
Building LPEG from Source
LPEG is a Lua library used by Nomsu for Parsing Expression Grammars. To build and install it from source:
cd ~
curl -O http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.0.1.tar.gz
tar xzf lpeg-1.0.1.tar.gz
cd lpeg-1.0.1
make LUADIR=/usr/local/include macosx
make LUADIR=/usr/local/include linux
sudo cp re.lua /usr/local/share/lua/5.3/
sudo cp lpeg.so /usr/local/lib/lua/5.3/
Building LuaFilesystem from Source
LuaFilesystem is an optional (but recommended) Lua module that handles cross-platform filesystem functionality. Nomsu can run without it, but will be a little slower. To build LuaFilesystem:
cd ~
curl https://codeload.github.com/keplerproject/luafilesystem/tar.gz/v1_7_0_2 > luafilesystem-1.7.0.2.tar.gz
tar xzf luafilesystem-1.7.0.2.tar.gz
cd luafilesystem-1.7.0.2
For Mac:
Edit the # OS dependent
section of the config
file
to comment out the Linux LIB_OPTION
line and uncomment the Mac
version. Then, in the file Makefile
, delete the text:
MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET;
so the line just reads:
$(CC) $(LIB_OPTION) -o src/lfs.so $(OBJS)
make
sudo make install
Now, you should have all the necessary prerequisites installed.
Next: Download NomsuDownloading Nomsu
Once you have the prerequisites, download and unzip Nomsu:
curl -O https://nomsu.org/releases/nomsu.zip
unzip nomsu.zip
cd nomsu-*
That’s it! You can now run the Nomsu tutorial from within the directory you just created:
lua nomsu.lua -t tutorial
If you want to install Nomsu so it’s available on the whole system as the
command nomsu
, you can run this from within the Nomsu
directory:
make test && sudo make install