Skip to content

Instantly share code, notes, and snippets.

@fsantanna
Last active February 4, 2016 18:06
Show Gist options
  • Save fsantanna/7b9e88606314eb2c384c to your computer and use it in GitHub Desktop.
Save fsantanna/7b9e88606314eb2c384c to your computer and use it in GitHub Desktop.
Extending the online tutorial of Céu with Emscripten and SDL

Extending the online tutorial of Céu with Emscripten and SDL

About Céu

Céu is a programming language that targets system-level development of reactive systems.

The language is under development at the LabLua since 2011.

For a little introduction about Céu, please watch the video in our front page:

http://ceu-lang.org/

Céu appeared in "Future Programming" and "Curry-On" workshops:

http://www.future-programming.org/2014/program.html

http://curry-on.org/2015/sessions/structured-synchronous-programming.html

Brief explanation

Currently, the online tutorial of Céu executes a simulation at the server side:

http://ceu-lang.org/try.php

The tutorial works as follows:

  1. User reads about a new concept (top/left of the page).
  2. User reads an accompanying example (top/right) with an input (bottom/right).
  3. User clicks "Run" (top/right):
    1. Code is sent to the server.
    2. Server compiles and executes the code with the provided input.
    3. User gets an output (bottom/left).
  4. User changes the code and input to experiment with it (going to step 3).
  5. User advances in the tutorial.

The server-side approach does not provide a reactive and real-time experience, which are the ultimate objectives of the language.

We want the online tutorial to offer a more interactive experience for learners of Céu.

The client-side tutorial would work as follows:

  1. User reads about a new concept (top/left of the page).
  2. User sees an example (top/right) with an input (bottom/right).
  3. User clicks "Run" (top/right):
    1. Code is sent to the server.
    2. Server compiles the code with the provided input to Javascript and returns it to the client.
    3. User gets an output (bottom/left) interacts with the program in real time.
  4. User changes the code and input to experiment with it (going to step 3).
  5. User advances in the tutorial.

Tools

SDL is a C-based and cross-platform development library that provides access to audio, keyboard, mouse, joystick, and graphics hardware:

http://libsdl.org/

Given that Céu interacts well with C, combining Céu and SDL is a viable option for building a visually-appealing interactive tutorial.

Emscripten is an LLVM-to-JavaScript compiler:

https://github.com/kripken/emscripten/

SDL has already been ported to Emscripten:

emscripten-core/emscripten#2404

Putting it all together, we can build an interactive tutorial for Céu that runs in the browser at the client side.

The bulk of the project is to implement this synergy between C, Céu, SDL, and Emscripten.

However, the project involves many other tools:

  • C
  • Céu
  • Emscripten
  • SDL
  • Linux
  • Git
  • HTML
  • PHP

Expected results

  • A working interactive online tutorial for Céu.

As an ultimate goal, we would like to build an incremental tutorial based on this video:

https://vimeo.com/110512582

Prerequisites

We expect the applicants to know C well and to develop minimum familiarity with the important tools before the project kicks off.

For this reason, we will ask the applicants to perform two activities before the application period:

  1. Create a repository on Github and write a simple "Hello World" page using Emscripten and SDL.
  2. Install Céu and compile some existing SDL examples (without Emscripten).

Both activities should be simple, i.e., nothing more than following tutorials on the web.

How to apply

Skill level

Medium

Mentor

Francisco Sant'Anna

http://www.ceu-lang.org/chico

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment