Cuber01 / lit

Lit scripting language

Home Page:https://egordorichev.github.io/lit-html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lit

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 (WHAT) 0 0 Balance in the universe is restored
String interpolation Example
Operator overloading Example
Easy to embed Example
Has no undefined Seriously, why, JS??
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 
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! Now you are ready to face a more serious challenge, like the examples or challenges! Or alternatively, lit runs just fine in browsers.

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!

About

Lit scripting language

https://egordorichev.github.io/lit-html


Languages

Language:C 88.4%Language:Python 5.3%Language:C++ 3.9%Language:HTML 0.9%Language:CMake 0.7%Language:Lua 0.5%Language:Objective-C 0.3%Language:Shell 0.1%