SDL

This page is about running the Céu programming language under the SDL platform.

Installation
You can either download a virtual machine preloaded with Céu, or install it manually from the git repository:


 * Céu in a Box virtual machine
 * SDL Manually

Examples
The distribution comes with some samples ready for playing with Céu.

$ cd ceu-sdl/ $ make CEUFILE=samples/ $ ./samples/

Hello world!
A reactive "Hello world!" can be written as follows:

native _printf;             // imports the `printf´ C function loop do                       // an infinite loop that: await 1s;                 //   - awaits 1 second _printf("Hello world!");  //   - prints "Hello world!" end                           //   - repeats

Choose your favorite editor to copy the code and compile with the following command:

$ vi samples/hello.ceu            # edit $ make CEUFILE=samples/hello.ceu  # compile $ ./samples/hello.exe             # run

The program is a loop that awaits 1 second, then prints "Hello world!", and repeats the process over and over.