The Lua programming language

Cours the Lua programming language, tutoriel & guide de travaux pratiques en pdf.

Scripting languages

In the recent years, there has been a paradigm shift towards a higher level programming approach, partially represented by the so called scripting languages [1], 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 specific 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 [2][3][4] 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, reflexive 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 first compiled into bytecode for the VM. Lua also has dynamic data typing and includes automatic memory management facilities with garbage collection.

Concurrency models

It has become more than evident the last years that concurrency will lead the future of computing. Today with the first 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 offer 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 different 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.

Cours gratuitTélécharger le cours complet

Télécharger aussi :

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *