Lua Flashcards

(26 cards)

1
Q

Lua was created on

A

1993

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Creator of Lua

A

Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Reason Why Lua was made

A

Due to Brazil’s strict trade barriers (1977–1992)—known as the “market reserve”
policy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

two domain-specific languages for its engineering applications at Petrobras that laid the ground work for the creation Lua

A

● DEL – A data-entry language
● SOL – A configurable report generator for lithology profiles

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The name Lua came from

A

The Portuguese word for “moon”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Latest Version of Lua

A

Version 5.4.7 (June 2024)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Version that added Constants

A

Version 5.4 (June 2020)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Application Areas of Lua

A

Game Development
Embedded Systems & IoT
Web Development
Artificial Intelligence (AI) & Machine Learning
System Administration & Scripting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Characteristics of Lua

A

Fast
Portable
Embeddable
Powerful (but Simple)
Small
Free

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Lua Programming Paradigm

A

Multi - paradigm - procedural, functional and object oriented programing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Lua Type System

A

Dynamically Type and Weakly Typed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Lua is weakly typed Because

A

of its automatic type conversion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Memory Management in Lua

A

It has an automatic garbage collection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Translator Program for Lua

A

Lua Translator
Bytecode compiler - luac
JIT compilation - LuaJIT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How to make constant in Lua

A

local PI <const> = 3.14159.</const>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Make a variable y with a value 7

17
Q

Make a local Variable y with value 7

18
Q

Used to differentiate the value from having some data or no data.

19
Q

Represents arbitrary C data.

20
Q

Lua’s only Data Structure Available

21
Q

Array in Lua

A

array = {10, 20, 30, 40, 50}
print(array[1])

22
Q

Record in Lua

A

record = {name = “John”, age = 30 }
print(record.name)

23
Q

List in Lua

A

list = {“banana”, “apple”, “cherry”}

24
Q

Sets in Lua

A

set = {}
set[“apple”] = true
set[“banana”] = true

25
Trees in Lua
tree = { value = 1, left = { value = 2, left = nil, right = nil}, right = {value = 3, left = nil, right = nil} }
26