Cours the Lua programming language, tutoriel & guide de travaux pratiques en pdf.
In the recent years, there has been a paradigm shift towards a higher level programming approach, partially represented by the so called scripting languages , which are on the rise today. Scripting languages are typically interpreted, while in some cases the just-in-time compilation or dynamic translation technique is used. Scripting languages are also characterized by dynamic typing and automatic type conversions, which altogether guarantees a better suited environment for rapid application development and a higher level of programming. There is a speciﬁc type of scripting languages that are particularly interesting. These languages, which are considered multi-paradigm programming languages, have the following properties:
• They can be used as dynamic general-purpose stand-alone languages
• They can play the role of a “glue” language between applications and components
• They can be embedded into other applications and extend their functionality (extension languages)
• They can extended with other languages (extensible languages)
The Lua programming language
One of the most interesting scripting languages, that has gained more popularity the last years, is the Lua  programming language. Lua is a dynamic general-purpose, embeddable and extensible, interpreted, scripting language, that is simple, powerful, fast, portable and lightweight. Lua combines a simple procedural syntax, powerful data description constructs and extensible semantics. This ability to extend its semantics is realized with the so called meta-mechanisms: dynamic associative arrays, reﬂexive facilities, fallbacks. Lua’s runtime system is also unique across the board, as it is based on a register-based Virtual Machine (VM), while source code is not directly interpreted, but is ﬁrst compiled into bytecode for the VM. Lua also has dynamic data typing and includes automatic memory management facilities with garbage collection.
It has become more than evident the last years that concurrency will lead the future of computing. Today with the ﬁrst multi-core systems already inside most of the modern personal computers, it is very important for programming solutions to take advantage of this computational power. Concurrent programming can be explicit or implicit. In explicit concurrency a set of primitives is provided to the application developer, by the use of which parallelism can be achieved. In implicit concurrency the developer does not need to take special action in order to exploit parallelism, as this is done transparently by some language constructs. Most of the mainstream programming languages today oﬀer explicit concurrency programming. In concurrent systems their components need to interact and communicate. Based on how the components communicate, they can be divided in two diﬀerent classes: shared memory and message passing. In shared memory systems communication takes place by memory that is shared between the communicating components. In message passing systems the components communicate by exchanging messages.