Videos

The videos below introduce the reactive programming language Céu through some graphical applications using the SDL library. They assume knowledge of C and SDL (or a similar graphical library).

Céu basics

 * Introduces the reactive and synchronous execution model of Céu.


 * Shows how concurrent applications can execute deterministically without heavy synchronization primitives (e.g. locks and mutexes).

Particular features of Céu in this video:


 * The await &lt;evt&gt; statement: Suspends the running line of execution until the referred event occurs.
 * First-class timers: Support for multiple timers that are automatically adjusted to avoid desynchronization.
 * The par/and and par/or compositions: Handle creation and termination of lines of execution automatically.
 * Internal events: A broadcast notification mechanism that follows a stacked execution.

Céu with SDL

 * Shows in more detail the Céu &lt;=&gt; C integration through the SDL API.
 * Céu enforces strict policies to C calls that can avoid subtle bugs, such as memory leaks and dangling pointers.


 * Illustrates how Céu can specify (implicit) stateful animations that avoid the hassle of callback soups.
 * The bouncing animation in the example uses two loops in sequence that don't need to be split into multiple callbacks.
 * Note the absence of if statements to handle state explicitly.

Particular features of Céu in this video:


 * External input events: Provide means to interface with the environment.
 * The finalize construct: Enforces proper handling of side-effect functions that require associated destruction (e.g. malloc/free).

Céu organisms

 * Introduces Céu organisms, a OO-like abstraction mechanism that encapsulates state (i.e. properties) and lines of execution (i.e. trails) in a single construct.
 * In the example, we hide the animation behavior in a class that can be parameterized via properties.


 * Shows how organisms are scoped just like normal variables.
 * In conventional OO, references are scoped, but not the objects themselves (which live in the heap).
 * In Céu, when an organism goes out of scope, the memory is reclaimed and its associated running code is killed.


 * Relies on the deterministic scheduler to properly handle the z-order implicitly when redrawing objects.

Particular features of Céu in this video:


 * The class</tt> construct: Céu's abstraction mechanism.
 * The par</tt> construct: A parallel composition that never terminates, regardless of what happens to its sub-trails.

Céu dynamic organisms

 * Illustrates the dynamic allocation of organisms.
 * Shows that although organisms can be allocated in the heap, they are still automatically managed by lexical scope.

Particular features of Céu in this video:


 * The new</tt> statement: Dynamically allocate a new organism.
 * The spawn</tt> statement: Dynamically allocate a new anonymous organism that is automatically freed when its body terminates.