top of page

The NIL programming language

by Jeroen P. Broks

​

NIL Isn't Lua

What is it?

NIL is an Extension language to Lua written in Lua. It has its own language set up, designed to be close to Lua, but has some extra features. The result is translated to Lua, and Lua handles the rest, allowing NIL to be used on any Lua based engine.

Why?

Lua is a great scripting language. It's fast (for an interpreted language), and easy to learn. It only lacks some functions that can be bothersome in big projects. NIL is therefore more strict that Lua, by requiring variable declarations (in order not to make typos haunt you forever), and as some extra features to help you to produce cleaner code.

Free

NIL is free. Not just free of charge, but also "free" as in "freedom". It has an open source license, and all I require is credit for my work.

NIL2.png
Product

Learn NIL

Dennis Ritchie (creator of the C language) said: "The only way to learn a new programming language is by writing programs in it".

​

So taking those words to heart, why don't you try out NIL for yourself?

​

Here are some interesting things to check out to get on the road with NIL

QuickNIL
Beginner's guide
Example code
Quick WIKI

QuickNIL is console application written in C#, using the .NET framework which can be used to run some quick prototype programs written in NIL. Using it is as easy as typing

 

"QuickNIL MyScript.nil"

 

on the command prompt, and QuickNIL will initize NIL and make it run your script. Although its functionality is limited, it's a great way to try experimental NIL programs.

​

QuickNIL can be downloaded for free here!

Although written with beginners in mind with mo programming experience in general, this guide can also help those who did program before.

​

The guide does contain some assignments in order to learn even faster and my own code to do these assignments has been included so you can get some pointers from it (try to do them yourself first before you check my code, if you really want to learn).

​

Check this guide out for free in either .odt or .pdf format, here!

Sure, sure, have a little peak at code already written and see if you can make something out of it. Learn from the masters right.

​

In this folder of NIL's repository you can find some examples, and hey, if you got an example you want to share with us, why don't you throw in a pull request with your example. The more the merrier!

Last (but not least), there's a quick WIKI in which some concepts of NIL has been explained. This WIKI is only a quick overview, and assumes that many coding rules and things are already known to you. It can shine a light on things.

​

Have a look!

About

Implementing NIL

There are many ways to implement NIL. It's just a Lua script after all, and there are many ways to implement Lua scripts, as well.

NIL requires Lua 5.1 or later (some features in NIL won't work properly (or not at all) in Lua 5.1 as they require Lua 5.2 functionality. Most features should work from Lua 5.1). So the main engine should have Lua 5.1 or later in it.

​

Now the easiest way to go is to put NIL.lua in the folder where you have your NIL scripts too. If you name your main script main.nil, do the following.

Add a file named start.lua and make it contain the following code:

NIL = require "NIL"

NIL.Use("main.nil")

That should get things to work.
Of course, this is just one of the many ways you can use to get NIL to work, but that is the simplest one.

Featured

Be part of NIL

Discord chat

Join the NIL server

Or just report bugs

Use the GitHub issue tracker

Contact
Demo
bottom of page