Skip to content

egordorichev/lit

Repository files navigation

logo.png

Lit is a dynamicaly-typed language, inspired by highly-hackable Lua and familiar C-styled JavaScipt. You can try it out in your browser!

Lua JavaScript Lit
Easy classes Example
Arrays start from 1 0 0
String interpolation Example
Operator overloading Example
Easy to embed Example
Has no undefined
Syntax sugar like += Example
Coroutines (fibers) Example

Sounds good? Check out some challenge solutions or try lit for yourself!

Building

Lit has no external dependencies (besides Emscripten, but that's only for the HTML5 builds), so you will only need gcc, make & cmake.

On linux, you will also need to install libreadline:

sudo apt-get install libreadline6-dev
git clone https://github.com/egordorichev/lit/ && cd lit 
git submodule init
git submodule update
cmake .
make
sudo make install

That should install lit, and you should be able to access it from the console. Let's write our first program:

print("Hello, world!")

Just run it, and you should see the familiar message in your terminal:

lit hello.lit

That's it! If you want to learn more about lit, visit the wiki!

Syntax Highlighting

If you want syntax highlighting in Visual Studio Code, see lit-vscode.

History

This is not the first version of lit. And not second. Sadly, most of the versions got lost along the way, but you still can checkout previous version of lit, that was staticly-typed!