Get in Touch
 Duration 14 hours

Course Outline

Introduction to the Lua Language

  • Historical background and context
  • Core objectives, capabilities, and intentional constraints
  • Documentation and educational resources
  • Installation of the Lua interpreter
  • Configuration and utilization of the LuaRocks package manager

Foundational Syntax and Semantic Rules

  • Identifier conventions
  • Commenting standards, including block comments
  • Global variable management and strict mode enforcement
  • Local variable scope definitions
  • Standalone program execution and argument handling
  • Compilation units, code chunks, expressions, and delimiter usage

Data Types and Structural Frameworks

  • Primitive types: nil, boolean, numeric, and string values
  • Reference types: functions, userdata, threads, and tables
  • Distinction between reference objects and primitive values
  • Operational significance of table structures within Lua

Table Architecture and Functional Versatility

  • Implementation of tables as associative array structures
  • Implementation of tables as numeric sequences or arrays

Core Control Flow Mechanisms

  • Conditional logic using if-then-elseif-else-end structures
  • Iteration via while loops
  • Execution via repeat-until loops
  • Iteration via simple for loops

Exception Management and Error Handling

  • Differentiation between return values and exception mechanisms
  • Procedure for converting return values into exceptions
  • Procedure for converting exceptions into return values
  • Definition and application of error levels

Practical Program Implementations

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

Advanced Functionality and Usage Patterns

  • Management of named arguments
  • Method calls oriented toward object structures
  • Construction and application of closures
  • Implementation of currying techniques
  • Utilization of tail calls
  • Handling multiple assignment and return operations
  • Processing of variable-length argument lists

Iteration Patterns and Coroutine Operations

  • Mechanisms of the generic for loop
  • Distinction between stateless and stateful iteration models
  • Operational differences between iterators and coroutines

Metatables and Custom Method Implementation

  • Case study: Implementation of set data structures
  • Application of the __tostring metamethod
  • Definition of arithmetic-related metamethods
  • Implementation of __index and __newindex metamethods
  • Utilization of the __len metamethod

Modular Architecture and Package Management

  • Integrating existing modules into applications
  • Developing custom module structures
  • Structuring modules into distributable packages

Object-Oriented Programming Principles

  • Fundamental components of object-oriented design in Lua
  • Illustrative implementation examples

Advanced Language Capabilities and Features

  • Implementation and use of weak table references
  • Management of finalizer functions
  • Processes for compilation, evaluation, and code loading

Requirements

Demonstrated familiarity with at least one other programming language and general programming experience are required. Optional prior exposure to other scripting languages may facilitate a more efficient understanding of Lua syntax and paradigms.

Number of participants


Price per participant

Upcoming Courses

Related Categories