LoLa is an embeddable programming language for game scripting,
Its primary design focus is an easy-to-understand feature set and an implementation that allows perfect control of the script execution.

The language runtime and compiler are cross-platform and is available for MacOS, Windows and Linux. The compiler and runtime itself are platform independent and will work on any platform.

var list = [ "Hello", "World" ];
for(text in list) {
  Print(text);
}

Easy-to-learn syntax

The syntax of the LoLa language is similar to languages like JavaScript and it's familiar to most programmers.
Non-programmers can easily learn the block-oriented syntax with less than 20 keywords and only 20 operators.

Protection against bad code

The LoLa runtime protects the host application from misbehaving user code by slicing code execution in controllable chunks.
Even endless loops will eventually return to the host! Out-of-memory problems will be catched by the use of host-controlled allocators.
var i = 0;
while(true) {
  i += 1;
}

while(true) {
  var input = WaitForKey();
  if(input == " ") {
    Print("Space was pressed!");
  }
}

Asynchronous execution

LoLa code is designed to suspend at any time and return control back to the host. In this example, WaitForKey will immediately return control to the host, eating no CPU time until the host decides that the script should continue.
Most other scripting languages don't allow that behaviour, enforcing multithreading or other workarounds.

Fully serializable state

The LoLa runtime is designed to be saved to disk at any point not executing any code. This means that you can let your script execute for 1000 instructions, save the runtime state to disk and resume execution a week later on another computer, not having any problems with script resumption. This is especially useful for games which often want to embed the state of their scripts into the save files.
05 04 00 00 00 01 00 00 |........|
00 00 00 00 f0 3f 01 00 |.....?..|
00 00 00 00 00 00 40 04 |......@.|
05 00 00 00 48 65 6c 6c |....Hell|
6f 01 1f 85 eb 51 b8 1e |o....Q..|
09 40                   |.@|

Documentation

The following documents are available:

You can also check out these LoLa example source files on GitHub:

Releases

CI status

LoLa currently has no binary releases. Source code and build instructions can be gathered at github.com/MasterQ32/LoLa.

Community

IRC
irc.libera.chat/#lola-lang

Contact

lola-lang@random-projects.net