Linotte is an interpreted 4th generation programming language. Linotte's syntax is in French.

Linotte is intentionally simple, as the language's goal is to allow French-speaking people and especially children with little experience in computer science to easily learn programming,Éducation nationale (in French), . with the slogan (in French) "you know how to read a book, so you can write a computer program".

Vocabulary

Linotte uses a non-technical vocabulary derived from common French use. Its terms are closer to those used in film or literature, with a program being a book, a variable being an actor, and the screen a canvas. Instead of executing a book, it is read.

The function body starts at . Keywords that in other languages might be named things "print" or "log" in Linotte are named things like :

Similarly, a program can , or ask, to prompt the user to enter a value.

A book in linotte

A book is the backbone of a program written in Linotte, and is represented by a file with the extension « .liv ». The first function in a book is the first one read in the book.

Actors and roles To give a certain value a tag or name, one creates an instance of the value in memory, called an actor. Each actor is an object consisting of a value, a name and a role (a type).

The roles in Linotte are:

Actions An action in Linotte constitutes a verb and one or ore actors. Here are some examples:

Example codes Hello, World BonjourLeMonde:

affiche "Bonjour le monde!" Programming paradigms Linotte supports Imperative programming This paradigm was the first to be implemented and is quick and easy to understand.

Here is an example of the fib function using parameters:

Object oriented programming are a relatively complex but powerful type. Here is an example:

Event driven programming Events are attached to graphical components when building a HCI: globale form est un formulaire, titre vaut "The text box", largeur vaut 400, hauteur vaut 260 box est une boite, x vaut 30, y vaut 30, largeur vaut 200, hauteur vaut 100 b1 est un bouton, texte vaut "Display text in the table", x vaut 30, y vaut 150 l1 est une étiquette, texte vaut "", x vaut 30, y vaut 200

principale : début ajoute box & b1 & l1 dans form Fais réagir b1 à "clic souris" pour afficher valeur tant que 1 != 2, lis temporise ferme

afficher valeur : *b est un bouton début affiche texte de boite reviens

Parallel execution

traitements asynchrone : début appelle traitement affiche "Wait 3 seconds" attends 3 secondes affiche "End of 3 seconds"

traitement : début attends 1 seconde affiche "I do not want to wait!" reviens

Dynamic web pages development From version 1.2.2 onwards, the concept of weblivre was introduced. It mixes in the same file HTML and Linotte. The latter is integrated into the HTML in a similar style as PHP or Java. <%action est un ''texte'' %> <%n est un ''nombre'' %> <%duration est un ''nombre'' %> <html> <head><title>Suite de Syracuse en ligne</title></head> <body> <h1>Suite de Syracuse :</h1> <% demande action si action == "resultat", lis demande n tant que n > 1, lis duration vaut duration + 1 si (n mod 2) == 0, n vaut n / 2 sinon, n vaut n * 3 + 1 ferme %> The duration of the flight is <%affiche duration%> <form action="syracuse.wliv" method="post"> <input type="submit" value="Recommencer" /> </form> <% ferme sinon, lis %> <form action="syracuse.wliv" method="post"> <input type="hidden" name="action" value="resultat" /> ''nombre'' de départ : <input type="texte" name="n" /> <input type="submit" value="Calculer la durée" /> </form> <% ferme %> </body> </html>

The Linotte interpreter Linotte is an interpreted language. For now there only exists one available interpreter, free to use. The interpreter is developed in Java with its source code licensed GNU-GPL. There likewise exists versions on Windows, Ubuntu Linux, Fedora Linux, Arch Linux and Framakey USB sticks.

Webonotte The Webonotte is a HTTP server integrated at l'Atelier Linotte based on Jetty. It produces dynamic web pages programmed in Linotte language.

References