Lua Data Structures: Arrays, Matrices, Lists, Queues, Sets and Graphs
Build arrays, records, matrices, sparse matrices, linked lists, queues, deques, sets, string buffers, and graphs with Lua tables and suitable access patterns.
Build arrays, records, matrices, sparse matrices, linked lists, queues, deques, sets, string buffers, and graphs with Lua tables and suitable access patterns.
Work with binary data in Lua using bitwise operators, arbitrary byte strings, string.pack and string.unpack formats, integer widths, endianness, and binary files.
Use Lua os.time, os.date, os.difftime, and os.clock for timestamps, calendar tables, formatting, UTC output, time-zone handling, durations, and date arithmetic.
Learn Lua pattern syntax and character classes with string.find, string.match, string.gmatch, string.gsub, captures, replacements, balanced text, and escaping.
Understand Lua closures, lexical scope, captured-variable lifetime, higher-order functions, callbacks, loop capture pitfalls, and practical function-factory patterns.
Learn Lua conditions and truth values, while and repeat loops, numeric and generic for loops, break, return, and goto, with syntax and behavior examples.
Learn Lua lexical scope, local declaration timing, function and do blocks, multiple assignment, variable shadowing, lifetime, and the risks of accidental globals.
Read and write files in Lua with io.open, file handles, read formats, lines, write, seek, standard streams, temporary files, renaming, and system commands.
Learn Lua function definitions, parameters, first-class functions, multiple return values, variadic arguments, recursion, table.unpack, and proper tail calls.
Learn Lua table creation and indexing, array-like sequences, iteration with pairs and ipairs, insertion, removal, sorting, copying, identity, and equality behavior.