Get in Touch
 Duration 14 hours

Course Outline

Introduction to the Lua Programming Language

  • Historical development and context
  • Design objectives, core capabilities, and intentional limitations
  • Official documentation and instructional resources for government use
  • Deployment of the Lua interpreter in controlled environments
  • Configuration and implementation of the LuaRocks package management system

Core Syntax and Semantic Rules

  • Identifier conventions and standards
  • Commenting syntax, including block-level annotations
  • Management of global state and enforcement of strict variable scoping
  • Definition and scope of local variables
  • Execution of standalone applications and handling of program arguments
  • Compilation units, code chunks, expression evaluation, and statement delimiters

Data Types and Structural Organization

  • Fundamental types: nil, boolean, numeric, and string
  • Reference types: functions, userdata, threads, and tables
  • Distinction between reference objects and primitive values
  • The central role of tables in Lua architecture

Foundational Use of Tables and Their Flexibility

  • Tables implemented as associative arrays
  • Tables implemented as numeric sequences or linear arrays

Basic Control Flow Structures

  • Conditional branching using if, then, elseif, else, and end
  • Implementation of while loops
  • Implementation of repeat-until loops
  • Implementation of basic for loops

Error Management Strategies

  • Differences between return values and exception handling
  • Methods for converting return values into exceptions
  • Methods for converting exceptions into return values
  • Hierarchical error levels and propagation

Illustrative Program Examples

  • Algorithm for polynomial evaluation
  • Implementation of breadth-first search
  • Supplementary practical exercises

Advanced Functionality in Lua

  • Implementation of named parameters
  • Mechanisms for object-oriented invocation
  • Creation and use of closures
  • Techniques for currying
  • Optimization of tail calls
  • Syntax for multiple assignment and return statements
  • Handling of variable-length argument lists (varargs)

Iterators and Coroutines

  • Utilization of the generic for loop
  • Distinction between stateless and stateful iterators
  • Comparative analysis of iterators versus coroutines

Metatables and Metamethods

  • Case study: Implementing set logic
  • Application of the __tostring metamethod
  • Definition of arithmetic metamethods
  • Implementation of __index and __newindex metamethods
  • Application of the __len metamethod

Modules and Package Management

  • Integration and usage of existing modules
  • Development of custom modules
  • Structuring modules into cohesive packages

Object-Oriented Programming Paradigms

  • Foundational components of OOP within the Lua environment
  • Practical examples and demonstrations

Discussion of Advanced Language Features

  • Utilization of weak tables
  • Implementation of finalizers
  • Processes for compilation, dynamic evaluation, and code loading

Requirements

Participants must demonstrate proficiency in at least one established programming language. Prior experience in software development is required. Familiarity with other scripting languages is recommended, as it will facilitate a more efficient understanding of Lua syntax and concepts for government application.

Number of participants


Price per participant

Upcoming Courses

Related Categories