|
| 1 | +# History |
| 2 | + - **How**: |
| 3 | + Lua is a lightweight, high-level, embeddable scripting language, created in 1993 by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes at the **Pontifical Catholic University of Rio de Janeiro**, Brazil. Lua was originally designed for embedded systems and to be used as a **scripting language** for applications. It was developed to be **fast**, **small**, and **flexible**, making it suitable for a variety of applications, from gaming to networking. |
| 4 | + - |
| 5 | + - **Name**: Lua (means "moon" in Portuguese) |
| 6 | + - **Created**: 1993 |
| 7 | + - **Creators**: Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes |
| 8 | + - **Primary Usage**: Embedded scripting language for applications |
| 9 | + - |
| 10 | + - ### Why was Lua created? |
| 11 | + - Lua was created because there was a need for a lightweight, efficient, and flexible scripting language that could easily be embedded into existing applications. The developers were aiming for a language that had low memory consumption while providing powerful capabilities, especially for applications that required customization or scripting. |
| 12 | +- |
| 13 | +- # Intro |
| 14 | + - ## Introduction to Lua: |
| 15 | + - Lua is a **scripting language** with a focus on simplicity, flexibility, and performance. It’s widely used in the gaming industry, embedded systems, and other applications that require fast scripting. |
| 16 | +- |
| 17 | + - ## Advanced Topics: |
| 18 | + - **Metatables and Metamethods**: Lua provides a feature known as metatables, which allows users to define custom behavior for tables, such as defining custom operators (`+`, `-`, etc.) or controlling the behavior of table indexing. |
| 19 | + - **Coroutines**: Lua has built-in support for cooperative multitasking with coroutines, which are lighter than threads and allow for managing multiple tasks concurrently. |
| 20 | + - **Garbage Collection**: Lua uses an automatic garbage collection mechanism to manage memory effectively. |
| 21 | +- |
| 22 | + - ## Disadvantages: |
| 23 | + - **Limited Standard Library**: Lua has a small standard library, which means you often have to rely on external libraries for additional functionality. |
| 24 | + - **Manual Memory Management**: While Lua uses garbage collection, developers still need to manage memory carefully to avoid performance bottlenecks. |
| 25 | + - **No Direct Object-Oriented Support**: Lua doesn’t have built-in support for object-oriented programming (OOP), but you can simulate it with tables and metatables. |
| 26 | +- |
| 27 | +- # Notes |
| 28 | +- # Libs & Framework |
| 29 | + - [[LuaSocket]]: A Lua library for networking. It provides support for TCP and UDP sockets. |
| 30 | + - [[LuaRocks]]: A package manager for Lua, which helps you install and manage Lua modules. |
| 31 | + - [[LÖVE]]: A framework for making 2D games in Lua. |
| 32 | +- |
| 33 | +- # More Learn |
| 34 | + - Explore the following links for valuable resources, communities, and tools to enhance your skills : - |
0 commit comments