当前位置:网站首页>lua笔记
lua笔记
2022-06-22 04:58:00 【贾斯汀玛尔斯】
Lua 是一种轻量小巧的脚本语言,用标准C语言编写并以源代码形式开放, 其设计目的是为了嵌入应用程序中,从而为应用程序提供灵活的扩展和定制功能。Lua 是巴西里约热内卢天主教大学(Pontifical Catholic University of Rio de Janeiro)里的一个研究小组于 1993 年开发的。
Lua 特性
● 轻量级: 它用标准C语言编写并以源代码形式开放,编译后仅仅一百余K,可以很方便的嵌入别的程序里。
● 可扩展: Lua提供了非常易于使用的扩展接口和机制:由宿主语言(通常是C或C++)提供这些功能,Lua可以使用它们,就像是本来就内置的功能一样。
● 其它特性:
○ 支持面向过程(procedure-oriented)编程和函数式编程(functional programming);
○ 自动内存管理;只提供了一种通用类型的表(table),用它可以实现数组,哈希表,集合,对象;
○ 语言内置模式匹配;闭包(closure);函数也可以看做一个值;提供多线程(协同进程,并非操作系统所支持的线程)支持;
○ 通过闭包和table可以很方便地支持面向对象编程所需要的一些关键机制,比如数据抽象,虚函数,继承和重载等。
Lua 环境安装
Linux 系统上安装
Linux & Mac上安装 Lua 安装非常简单,只需要下载源码包并在终端解压编译即可,本文使用了5.3.0版本进行安装:
curl -R -O http://www.lua.org/ftp/lua-5.3.0.tar.gz tar zxf lua-5.3.0.tar.gz
边栏推荐
- Golang為什麼不推薦使用this/self/me/that/_this
- requests cookie更新值
- Virtual address space
- 【故障诊断】cv2.imwrite无法写入图片,但程序就是不报错
- The application of RPC technology and its framework sekiro in crawler reverse, encrypting data is a shuttle!
- C # WinForm listview control has no scroll bar and has written an extension control by itself
- 【使用指南】清华源的使用
- VirtualBox 6.1.34 release
- Progress warning and problem management of progress control in Zhiyuan project management SPM system
- mysql常用sql
猜你喜欢

Remote Dictionary Server(Redis)——基于 KV 结构的作为 Cache 使用的 NoSQL 数据库管理系统

【故障诊断】stitch.py脚本失效

Solutions to MySQL 8.0 public key retrieval is not allowed errors

Systematic arrangement | how many children's shoes have forgotten to be done carefully before the model development (practical operation)

Redis 主从复制

Exness: ECB president Christine Lagarde reiterated her plan to raise interest rates at the July meeting

使用matplotlib实现GUI交互效果

《数据库原理》期末考试题

【科研笔记】Focal Loss

Ora-15063: ASM discovered an insufficient number of disks for diskgroup
随机推荐
QML控件类型:SwipeView、PageIndicator
【sdx12】使用QCMAP_CLI启动WiFi操作说明
Go learning (II. Built in container)
[user guide] create an environment using public CONDA
torch DDP Training
The feeling of leaving full-time for a single month!
A domestic developer opened the "programmer's Guide to cooking" and became popular!
Solutions to MySQL 8.0 public key retrieval is not allowed errors
Software architecture and pattern: structure, component and relationship
Chapter 6 infinite series_ Fourier series
厉害了!淮北两企业获准使用地理标志产品专用标志
[scientific research notes] about using the downsampling multiple of openslide cut
Great! Huaibei and Huaibei enterprises are approved to use special marks for geographical indication products
Reading notes on how MySQL works [updating]
Why does golang not recommend this/self/me/that/_ this
mysql day01课堂笔记
High precision positioner formwork
What is the difference between TOC and Tob
go学习(一、基础语法)
学信网的头像下载下来太小的处理方法