Curso Lua

  • Development

Curso Lua

32 horas
Visão Geral

Curso Lua. Lua é uma linguagem de script fácil de usar que é usada como uma linguagem de plug-in/extensão incorporada em diferentes produtos. Lua também pode ser usada como uma linguagem independente. É uma linguagem de programação leve e multiparadigma e, portanto, o curso ensina vários conceitos que os participantes também acharão úteis em outras áreas da engenharia de software.

O Curso Lua cobre as construções básicas de programação, técnicas avançadas e incorporação de Lua em outras linguagens de programação e incorporação de outras linguagens de programação em Lua.

Pre-Requisitos
  • Experiência de programação ou familiaridade com pelo menos uma outra linguagem de programação.
Materiais
Portugues/Inglês + Lab Pratico
Conteúdo Programatico

Introduction to Lua

  1. A bit of history
  2. Lua's goals, features and non-goals
  3. Resources of Lua documentation and tutorials
  4. Installing the Lua interpreter
  5. Setting up and using LuaRocks

Basic syntax and semantics

  1. Identifiers
  2. Comments, block comments
  3. Global variables and enforcing of strictness
  4. Local variables
  5. Standalone programs, program arguments
  6. Compilation units, chunks, expressions, semicolons

Data types and data structures

  1. Basic types: nil, boolean, number, string
  2. Object types: function, userdata, thread, table
  3. References/objects vs. basic values
  4. The importance of tables in Lua

Introduction to tables and their versatility

  1. Tables as an associative array
  2. Tables as numeric arrays, sequences

Basic control structures

  1. The if then elseif else end
  2. The while loop
  3. The repeat loop
  4. The simple for loop

Error handling

  1. Return values vs exceptions
  2. Converting a return value to an exception
  3. Converting an exception to a return value
  4. Error levels

Example programs

  1. Polynomial evaluation
  2. Breadth first search
  3. Additional exercises

More about functions

  1. Named arguments
  2. Object-oriented calls
  3. Closures
  4. Currying
  5. Tail calls
  6. Multiple assignment and return
  7. Var args

Iterators and co-routines

  1. The generic for loop
  2. Stateless vs stateful iterators
  3. Differences between iterators and co-routines

Metatables and metamethods

  1. The set example
  2. The __tostring metamethod
  3. Arithmetic metamethods
  4. The __index, __newindex metamethods
  5. The __len metamethod

Modules and packages

  1. Using modules
  2. Creating modules
  3. Organizing modules into packages

Advanced tables

  1. Tables for queues and stacks
  2. Tables describing graphs
  3. Matrices as tables
  4. Linked lists as tables
  5. String buffers

Metatables through examples

  1. Proxies
  2. Readonly
  3. Memoization
  4. Dynamic programming with memoization
  5. The Fibonacci example

Environments

  1. Relationship between global variables and environments
  2. Free variables
  3. The _ENV table and the _G table

More about modules

  1. Different approaches to creating modules
  2. Modules that change the behavior
  3. Module initialization and arguments
  4. Using environments to implement safe modules

Advanced iterators and co-routines

  1. Producer, consumer, filter
  2. Wrapping co-routines to get iterators
  3. Stateless iterator for linked lists

Contributing to the Ecosystem

  1. Uploading packages to MoonRocks

Functional paradigm in Lua

  1. The map function
  2. The reduce / fold function

Object-oriented Programming

  1. Different approaches to OOP
  2. Different approaches to inheritance

A walkthrough of the Lua Standard Libraries

Compilation

  1. Compilation
  2. Eval
  3. Relationship with the environment
  4. Binary chunks

Garbage collection

  1. Weak tables
  2. Finalizers, the __gc meta-method

Lua bytecode and virtual machine

  1. Generating bytecode from source code
  2. Reading and analyzing bytecode
  3. Quick tour of the source code of the Lua VM

C modules

  1. Calling C from Lua
  2. Search path and loading of C modules

Calling Lua from C

  1. The Stack
  2. Error handling
  3. Continuations

Handling Lua values and types from C

  1. Arrays
  2. Strings
  3. Userdata
  4. Metatables
  5. Object oriented calls
  6. Light userdata

Memory management

  1. Allocators
  2. GC API

Threads in Lua

  1. Co-routines vs threads
  2. Real multi-threading and Lua states
TENHO INTERESSE

Cursos Relacionados

Curso Python Programação Advanced

32 horas

Curso SAP ABAP S4hana Developer Foundation

32 horas

Curso Full Stack and React Essentials

32 Horas

Curso Node.js for JavaScript Developers

24 horas

Curso Elasticsearch for Developers

16H

Curso Elastic Stack Foundation

24 horas

Curso Apache Spark™ Foundation

8 Horas