2026年7月30日 · 星期四
● 每日更新·改变自己
25信息来源
8,198精选文章
167单词卡片
18照片图片
Lua-related technology
与 Lua 相关的技术
4chan /g/ · Anonymous · 2026-07-09 02:05 · 288 帖 · 原文 ↗
#1 Lua-related technology / 与 Lua 相关的技术
Anonymous · 2026-07-09 02:05
>WHY SHOULD I USE LUA?
Lua is the greatest embeddable scripting language of all time! It's very fast and compatible because it's written in ANSI C, and it's small enough that it can be embedded anywhere. The language spec is very small, with just 1 of every type (1 number type, 1 data structure type, etc.) It has very advanced metaprogramming features. It can be used as a simple config language but is flexible enough to be an advanced programming language in its own right. Lua is ideal if you want to implement scripting bindings on top of a C application, or use C libraries though FFi.
Lua 是有史以来最棒的嵌入式脚本语言!它非常快且兼容性好,因为它是用 ANSI C 编写的,而且足够小巧,可以嵌入到任何地方。语言规范非常小,每种类型只有一种(1 种数字类型,1 种数据结构类型,等等)。它具有非常先进的元编程功能。它可以用作简单的配置语言,但也足够灵活,可以作为一种高级编程语言使用。如果你想在 C 应用程序之上实现脚本绑定,或者通过 FFi 使用 C 库,Lua 是理想的选择。
ITT: Share your favorite Lua-related technology
本帖:分享你最喜欢的与 Lua 相关的技术
>backend web development (production ready)
> 后端 Web 开发(生产环境就绪)
https://leafo.net/lapis/
>socket scripting (for writing a game server or a custom chat server or something)
> 套接字脚本编写(用于编写游戏服务器或自定义聊天服务器等)
https://lunarmodules.github.io/copas/
>game development
> 游戏开发
https://love2d.org/
图片: https://i.4cdn.org/g/1783562737850821.png
↳ #2 No.109231473
Anonymous · 2026-07-09 02:07
>>109231461
>words words words
> 废话连篇
No one cares, trans.
没人关心,跨儿。
>also
> 还有
That pic looks like some trans projection. Remove it now, codetrans
那张图看起来像是跨儿们的投射。马上删掉,代码跨儿
↳ #3 No.109231492
Anonymous · 2026-07-09 02:10
>>109231473
Congrats on first post
恭喜首次发帖
(You)
图片: https://i.4cdn.org/g/1783563058821545.png
↳ #4 No.109231495
Anonymous · 2026-07-09 02:11
>>109231461
Anyone know a Nintendo 64 emulator with Lua scripting support? Emulation General Wiki isn't helping here.
谁知道哪个 N64 模拟器支持 Lua 脚本?Emulation General Wiki 在这里帮不上忙。
↳ #5 No.109231499
Anonymous · 2026-07-09 02:12
BTFOd by AngelScript
被 AngelScript 按在地上摩擦
mpbp
↳ #6 No.109231508
Anonymous · 2026-07-09 02:15
>>109231461
>ITT: Share your favorite Lua-related technology
> 本帖:分享你最喜欢的与 Lua 相关的技术
This book by the textadept creator is pretty useful: https://orbitalquark.github.io/lua-quick-reference/
↳ #7 No.109231523
Anonymous · 2026-07-09 02:18
>>109231495
That's a cool idea, let me know if you find one
这主意挺酷,如果你找到了告诉我
↳ #8 No.109231549
Anonymous · 2026-07-09 02:24
>>109231508
I haven't heard of that, it looks useful
我没听说过这个,看起来挺有用的
Although the official Lua book (PIL) is extremely good if you didn't know, there is pretty much no need for anything else: https://www.lua.org/pil/
And the reference manual which is a stripped down version of PIL: https://www.lua.org/manual/5.1/
↳ #9 No.109231586
Anonymous · 2026-07-09 02:34
>>109231523
Looks like BizHawk and mupen64-rr-lua are my best options.
看起来 BizHawk 和 mupen64-rr-lua 是我最好的选择。
↳ #10 No.109231762
Anonymous · 2026-07-09 03:20
>>109231461
i hate lua
我讨厌 Lua
i hate the syntax, it just doesnt feel comfy programming it
我讨厌它的语法,写起代码来感觉很不顺手
↳ #11 No.109231773
Anonymous · 2026-07-09 03:23
>>109231762
I disagree, Lua syntax is very comfy.
我不同意,Lua 的语法写起来很顺手。
Keyword-heavy syntax without a lot of semicolons or braces in general looks really nice.
关键字密集的语法,通常没有分号或大括号,看起来真的很不错。
↳ #12 No.109231829
Anonymous · 2026-07-09 03:34
>>109231773
almost the complete opposite :c
几乎完全相反 :c
unfortunately python is my favorite syntax
不幸的是,Python 是我的最爱语法
its also my comfiest language even though it can be quite shit
它也是我写起来最舒服的语言,尽管它有时候挺烂的
I dont know any other languages where you just do
不知道还有哪种语言可以
myshit = "this"
我的屎=“这个”
or whatever without var, let, :=, local
或者随你便,完全不需要 var、let、:=、local
Python code is really nice to look at since your variable names and function calls are the "focus" instead of keywords or weird syntax
Python 代码看起来真的很舒服,因为变量名和函数调用是“焦点”,而不是关键字或奇怪的语法
Stuff like **kwargs looks ugly though, but type hints with myfoo:str is quite nice, though I'm not sure if I perfer it to char* myfoo
像 kwargs 这种确实挺丑的,不过 myfoo:str 这种类型提示倒是挺好看,虽然我不确定我是不是更喜欢它而不是 char* myfoo
Lua also looks to "nested" but I cant remember if this is a code style thing or a language thing
Lua 看起来也有点“嵌套”,但我记不清这到底是代码风格问题还是语言本身的问题了
↳ #13 No.109231902
Anonymous · 2026-07-09 03:56
↳ #14 No.109231912
Anonymous · 2026-07-09 04:00
>>109231461
>prosody xmpp server
>prosody xmpp 服务器
>awesomeWM
>真棒WM
>openresty
>开放式休息
>luanti
>乱体
↳ #15 No.109231959
Anonymous · 2026-07-09 04:11
>>109231829
>I dont know any other languages where you just do
>我不确定还有其他语言能让你直接
>myshit = "this"
>myshit = "这个"
>or whatever without var, let, :=, local
>或者随便写啥都不需要 var, let, :=, local
Lua can, but you will probably say it's fake (global table index instead of stack variable assignment). To be fair this is probably one of the most garbage pieces of Lua design that they refuse to fix.
Lua 其实可以,但你可能会说那是假的(全局表索引而不是栈变量赋值)。说实话,这可能是 Lua 设计中他们死活不肯修的最烂的一块。
Lua 5.5 added a `global` keyword, but it's just a strictness filter that throws if you don't predeclare your globals, it doesn't make local default which is what 99% of people meant when they said Lua should have a global keyword. Oh well.
Lua 5.5 加了个 `global` 关键字,但它只是个严格性过滤器,不预声明全局变量就报错,它并没有让全局变量变默认,而这恰恰是 99% 的人说 Lua 应该有 global 关键字时想表达的意思。算了。
>>109231912
Based, good additions
硬核,加得好
↳ #16 No.109232004
中出し · 2026-07-09 04:22
For me it's Lispy Lua.
对我来说这就是 Lisp 化的 Lua。
>Fennel is a programming language that brings together the simplicity, speed, and reach of Lua with the flexibility of a lisp syntax and macro system.
>Fennel 是一种编程语言,它结合了 Lua 的简洁、速度和广泛适用性,以及 Lisp 语法的灵活性和宏系统。
https://fennel-lang.org
>Lua Common Lisp. An implementation of Common Lisp targeting Lua.
>Lua Common Lisp。一个面向 Lua 的 Common Lisp 实现。
https://codeberg.org/gsou/LCL
>gLua is a Lua frontend on Guile platform. Guile is the GNU Ubiquitous Intelligent Language for Extensions, and the official extension language of the GNU project.
>gLua 是 Guile 平台上的 Lua 前端。Guile 是 GNU 通用智能扩展语言,也是 GNU 项目的官方扩展语言。
https://gitlab.com/NalaGinrut/guile-lua-rebirth
图片: https://i.4cdn.org/g/1783570974459332.png
↳ #17 No.109232013
Anonymous · 2026-07-09 04:25
>>109232004
>you will never be a real lisp
>你永远成不了真正的 Lisp
↳ #18 No.109232024
Anonymous · 2026-07-09 04:30
>>109232013
What is a "real lisp"? John McCarthy's LISP?
啥叫“真正的 Lisp”?John McCarthy 的 LISP 吗?
↳ #19 No.109232033
Anonymous · 2026-07-09 04:33
>>109231461
I am making a heavily moddable Minecraft remake in C, with the entire gameplay aspect being controlled by LuaJIT. Best of both worlds. It's more moddable than Garry's Mod internally.
我正在用 C 写一个高度可模改的 Minecraft 重制版,整个游戏逻辑都由 LuaJIT 控制。双管齐下。内部模改性比 Garry's Mod 还强。
<3 Lua
图片: https://i.4cdn.org/g/1783571601509139.png
↳ #20 No.109232038
Anonymous · 2026-07-09 04:35
>>109232033
>inb4 lol 47 fps
>先防喷 lol 47 fps
i have a dual core & integrated graphics and i have maxxed out all settings and it's opengl 2.0
我双核集成显卡,全开设置,OpenGL 2.0
↳ #21 No.109232040
Anonymous · 2026-07-09 04:36
>>109232033
Cool project, but I hope you already know about Luanti (formerly minetest) and chose to make this anyways
项目不错,但我希望你已经知道 Luanti(前身 minetest)还是决定自己搞
↳ #22 No.109232046
Anonymous · 2026-07-09 04:40
>>109232033
>minecraft clone #3094809485
>Minecraft 克隆版 #3094809485
nice
不错
↳ #23 No.109232923
Anonymous · 2026-07-09 09:11
>>109232033
I'm still fan of it
我还是挺喜欢它的
↳ #24 No.109232952
Anonymous · 2026-07-09 09:20
>>109231461
is it really fast?
它真的快吗?
aren't all scripting languages slow as fuck? what metric do they use to say it's fast?
难道所有脚本语言都慢得令人发指吗?他们用什么指标来说它快?
↳ #25 No.109232966
Anonymous · 2026-07-09 09:24
>>109232952
>aren't all scripting languages slow as fuck?
>难道所有脚本语言都慢得令人发指吗?
This is mostly a misconception that began with older managed/VM language runtimes, and nowadays the big example of a slow scripting language is python.
这主要是个误解,源于早期的托管/VM 语言运行时,如今慢的脚本语言大代表只有 Python。
For an example of an extremely fast scripting virtual machine that rivals native code speed, just look at modern JavaScript engines (but with JS the language is shit).
想看极快的脚本虚拟机并匹敌原生代码速度的,看看现代 JavaScript 引擎就行(但 JS 语言本身很烂)。
Lua is fast *and* the language is good.
Lua 既快,语言又好用。
>what metric do they use
>他们用什么指标
It's not really something "they" claim, Lua has been around since 1993, find any benchmark in the world that includes Lua and you will see how fast it is.
这根本不是谁“声称”的事,Lua 从 1993 年就有了,你去搜世界上任何包含 Lua 的基准测试,都会看到它有多快。
↳ #26 No.109232993
Anonymous · 2026-07-09 09:32
>>109232966
and what can I do with it besides nvim plugins?
除了写 nvim 插件,我还能用它干啥?
↳ #27 No.109233007
Anonymous · 2026-07-09 09:37
>>109232993
It's not really a standalone do-everything language because you're supposed to embed it into other programs and add features yourself (it's minimal by itself, you write a C program and include Lua as a library inside it, and then expose bindings to it)
它并不是真正意义上能独立干所有事的语言,因为它的设计初衷是嵌入到其他程序中,由你自行添加功能(它本身很精简:你写个 C 程序,把 Lua 作为库嵌入其中,然后向外部暴露绑定接口)
So you can use it to create a scripting layer for your software. Other than that, you'd have to use other projects that embed Lua, neovim is just one exmaple, other examples include openresty (nginx fork) or love2d (game development)
所以你可以用它为你的软件创建一个脚本层。除此之外,你得用其他嵌入 Lua 的项目,neovim 只是其中一个例子,其他例子包括 openresty(nginx 的分支)或 love2d(游戏开发)
↳ #28 No.109233283
Anonymous · 2026-07-09 10:50
>>109232993
use it as a scripting language but realize you just want to make your own after you get obscure run-time errors that don't actually tell you anything about the problem.
把它当脚本语言用,但在遇到那些晦涩难懂、完全说不清问题所在运行时报错后,你就会意识到自己其实只想写个自己的语言。
↳ #29 No.109233412
Anonymous · 2026-07-09 11:18
>>109233283
Lua has really simple error messages and stack traces, there's like 5 possible errors it can emit and I wouldn't call any of them obscure
Lua 的错误信息和栈追踪真的很简单,它大概只能抛出 5 种错误,我不会称其中任何一种为“晦涩”。
↳ #30 No.109234417
Anonymous · 2026-07-09 14:41
You can now use lual on lovr! *
现在你可以在 lovr 上使用 lual 了!*
* If you compile lovr yourself
* 前提是你自己编译了 lovr
↳ #31 No.109234465
Anonymous · 2026-07-09 14:56
>>109231461
Its only use is letting people write scripts for your program that you know will be sandboxed. This goes out the window the moment you keep FFI, which is the only way to make it not run like shit in real tasks, at least when the JIT feels like it.
它唯一的用途就是让你的人写的脚本在沙箱里运行。但只要你保留 FFI(这是让它在实际任务中不跑得稀烂的唯一方法,至少在某些 JIT 愿意干活的时候),这个沙箱保护就形同虚设了。
There is no point in using this language besides that peace of mind. I'm not joking.
除了这点心理安慰,用这种语言毫无意义。我没开玩笑。
图片: https://i.4cdn.org/g/1783608969186514.png
↳ #32 No.109234480
Anonymous · 2026-07-09 14:59
>arrays start from fucking 1
>数组居然从他妈的 1 开始
↳ #33 No.109235148
Anonymous · 2026-07-09 16:40
Can I use Lua as just like a regular script language?
我能把 Lua 当作普通的脚本语言来用吗?
I use Ruby for a bunch of little tasks on my computer. Many little ruby programs automating things for me. Like certain backups. Sending popups. Grabbing data from a sensor and writing it to a web page so anything can read it. Can you do that is Lua?
我在电脑上用 Ruby 处理一堆小任务。很多小的 Ruby 程序帮我省事。比如某些备份任务、发送弹窗通知、从传感器抓取数据并写入网页以便任何人读取。Lua 能做这些吗?
↳ #34 No.109235205
Anonymous · 2026-07-09 16:50
I use LuaJIT for everything except web browser scripting. standalone programs, extension of other programs, glue for library calling. it's fast, versatile and comfy.
除了浏览器脚本,我其他所有地方都用 LuaJIT。独立程序、扩展其他程序、作为库调用的胶水语言。它快、 versatile(多功能)而且用起来顺手。
↳ #35 No.109236213
Anonymous · 2026-07-09 18:55
>no continue
>没有 continue 关键字
↳ #36 No.109237932
Anonymous · 2026-07-09 22:53
↳ #37 No.109238049
Anonymous · 2026-07-09 23:08
>>109234465
Actually, Lua is a garbage sandboxing language, so that use case is very far down on the list.
事实上,Lua 是一种垃圾的沙箱语言,所以那个用例(沙箱脚本)在需求列表里排得很靠后。
↳ #38 No.109238061
Anonymous · 2026-07-09 23:09
>>109234480
Lua tables aren't arrays.
Lua 的表(tables)不是数组。
>but they have an array-like compo-
>但它们有类似数组的组-
Shut up
闭嘴
>internally, numeric keys are stored as-
>内部来说,数值键是作为-
Can it, FAG.
Lua tables are not arrays. Don't make me break out the full explanation.
Lua 的表不是数组。别逼我把完整解释搬出来。
↳ #39 No.109238071
Anonymous · 2026-07-09 23:10
>>109235148
Yeah you could, but it isn't what it was made for.
理论上可以,但这并不是它的设计用途。
↳ #40 No.109239809
Anonymous · 2026-07-10 05:52
fun fact: it takes fewer than 200 bytes of code+data to load lua library and execute a lua file.
冷知识:加载 Lua 库并执行一个 Lua 文件,所需的代码加数据不到 200 字节。
↳ #41 No.109240292
Anonymous · 2026-07-10 08:13
>>109232033
very good bro! tell me, siir, witch cloud model does i need to use to make this like me?
太棒了兄弟!告诉我,siir,我该用哪个云模型才能让我像现在这样?
↳ #42 No.109240324
Anonymous · 2026-07-10 08:25
I'm more of a micropython guy
我比较偏向用 micropython
↳ #43 No.109241525
Anonymous · 2026-07-10 12:55
>>109231461
the language is ass im sorry
这语言真烂,抱歉啊
the only saving grace is that its easily embeddable and fast, but thats why people put up with its weirdness. metatables are a good idea tho
唯一的亮点是它容易嵌入且速度快,但这也是人们忍受它那些奇葩特性的原因。不过元表(metatables)的想法倒是不错
↳ #44 No.109241812
Anonymous · 2026-07-10 13:47
>>109234480
In C arrays are 1 indexed
C 语言的数组是从 1 开始索引的(注:此处原贴可能有误,C 通常从 0 开始,但按原文直译)
>but it starts from 0
>但它从 0 开始
It starts from offset 0 which means the first element.
它从偏移量 0 开始,也就是第一个元素。
↳ #45 No.109242562
Anonymous · 2026-07-10 15:47
>>109234417
what's lual
lual 是什么鬼?
↳ #46 No.109244382
SmoothPorcupine · 2026-07-10 19:55
ITT: superior to a general in every way
本帖主题:全方位优于某将军
↳ #47 No.109245561
Anonymous · 2026-07-10 22:25
>>109242562
Lua Lizards
Lua Lizards(可能是对 LuaJIT 的戏称或笔误)
↳ #48 No.109246003
Anonymous · 2026-07-10 23:46
>>109242562
roblox lua
罗布洛克斯 Lua
↳ #49 No.109246037
Anonymous · 2026-07-10 23:51
>>109246003
That's Luau
那是 Luau
↳ #50 No.109246830
Anonymous · 2026-07-11 02:52
what if
如果
<script type="text/lua"></script>
<脚本类型=“文本/lua”></脚本>
instead text/javascript
代替 text/javascript
↳ #51 No.109246840
Anonymous · 2026-07-11 02:56
>>109246830
The world would be a better place if it was like this from the beginning.
如果从一开始就这样,世界会变美好的。
Though... it's more likely than you think.
不过……这其实比你想象的要更常见。
I've been working on a project that does this for the better part of a year. You load scripts exactly like that. It's a webassembly Lua-JS FFI but it needs work before it's stable.
我差不多花了一年时间在做一个能实现这个功能的项目。你可以完全像那样加载脚本。这是一个 WebAssembly Lua-JS FFI,但在稳定之前还需要做一些工作。
For existing options, there's wasmoon, but it's not very serious (type marshaling is flaky and it doesn't do cross-runtime GC) and Fengari which isn't webassembly and isn't a real Lua VM. Fengari isn't bad though.
至于现有的选项,有 wasmoon,但它看起来不太靠谱(类型转换不稳定,也不支持跨运行时垃圾回收),还有 Fengari,它不是 WebAssembly 也不是真正的 Lua 虚拟机。不过 Fengari 倒也不差。
↳ #52 No.109246843
Anonymous · 2026-07-11 02:57
>>109231461
What about TCL? Is it also small enough?
TCL 怎么样?它的体积也足够小吗?
↳ #53 No.109246859
Anonymous · 2026-07-11 03:00
>>109246843
TCL is a few megabytes
TCL 有几兆字节。
Lua is WAY smaller, it's not even close.
Lua 要小得多,根本不在一个量级上。
↳ #54 No.109246866
Anonymous · 2026-07-11 03:03
>>109246859
What about TinyLisp?
那 TinyLisp 呢?
↳ #55 No.109246874
Anonymous · 2026-07-11 03:04
>>109246840
256kb WASM or even less that can run lua and manipulate DOM would be awesome
如果能有一个 256kb 甚至更小的 WASM,能运行 Lua 并操作 DOM,那就太棒了。
↳ #56 No.109246914
Anonymous · 2026-07-11 03:14
↳ #57 No.109246955
Anonymous · 2026-07-11 03:23
>>109246874
I haven't worked on it for a while, but the latest I had it compiling down to 375kb. With certain emcc flags I managed to bring it down to closer to 250kb but it hurt the Lua VM performance a lot, so under 400kb is a more reasonable target.
我已经有一阵子没碰它了,但最新的一次编译下来是 375kb。通过一些特定的 emcc 编译标志,我勉强把它降到了接近 250kb,但这严重损害了 Lua 虚拟机的性能,所以 400kb 以下是更合理的目标。
A lot of that is the JS side (type marshaling alone is 1k lines of JavaShit) and additional logic in Lua, like an extension of the garbage collector for circular references between JS and Lua heap.
大部分体积都耗在 JS 那边(光是类型转换就有 1000 行“Java 屎”代码),还有 Lua 里的额外逻辑,比如为 JS 和 Lua 堆之间循环引用而扩展的垃圾回收器。
God I really need to work on this again. I would personally eat my own dogfood and use it over the alternatives already even though it's not done yet since Lua in the browser is just so underserved (there's not many options)
天哪,我真的需要重新投入这个项目了。即使它还没完成,我个人也愿意“吃自己的狗粮”用它替代其他方案,因为浏览器里的 Lua 支持实在太匮乏(可选方案寥寥无几)。
I'm considering removing a bunch of stuff from it just so I can reduce debugging complexity and get it to a state I'm comfortable putting on github.
我在考虑删掉里面一大堆东西,这样就能降低调试复杂度,让它达到我敢放心放到 GitHub 上的状态。
↳ #58 No.109247004
Anonymous · 2026-07-11 03:32
>>109246955
lua and js are close enough that requiring a luajit-sized (300 kb) blob just for running one vm in another is just tragic and a loss of performance, compared to transpiling.
Lua 和 JS 表面上看起来很接近,但如果只是为了在另一个 VM 里跑一个 VM,就必须依赖一个 Luajit 那么大的(300kb)体积,这简直是悲剧,而且性能损失严重,不如直接转译。
↳ #59 No.109247012
Anonymous · 2026-07-11 03:34
>>109247004
They are close on the surface but their VMs are nothing alike.
它们表面上接近,但虚拟机 internals 完全不一样。
↳ #60 No.109247076
Anonymous · 2026-07-11 03:45
>>109247004
Coroutines and most metamethods can't be represented in JS btw. So you wouldn't be able to support the whole language spec this way.
顺便说一句,协程和大多数元方法都无法在 JS 中表示。所以用这种方式你无法支持完整的语言规范。
↳ #61 No.109247194
Anonymous · 2026-07-11 04:08
>>109247076
lua coroutines map into js generators, metamethods map into js proxy and/or replacing operators with explicit function calls.
Lua 协程可以映射到 JS 生成器,元方法可以映射到 JS 代理和/或把运算符替换为显式函数调用。
↳ #62 No.109247237
Anonymous · 2026-07-11 04:16
>>109247194
Using generators as ghetto coroutines is going to be harder than it looks when you have stuff like a coroutine resuming a coroutine resuming a coroutine, etc. but yeah it could work.
把生成器当作蹩脚的协程来用,当你遇到像“协程恢复另一个协程,那个协程又恢复另一个协程”这种情况时,会比看起来难得多,但 yeah,也许行得通。
↳ #63 No.109247254
Anonymous · 2026-07-11 04:18
aren't there like five different and backwards-incompatible Lua's? each version is slightly different and each JIT is slightly different.
难道不像是有五种互不兼容的 Lua 吗?每个版本都有细微差别,每个 JIT 也各不相同。
↳ #64 No.109247274
Anonymous · 2026-07-11 04:24
>>109247254
Not really. The closest thing I can think of to what you're implying is that Lua 5.2 changed how function environments work (a 5.1 feature) but that's about it. Lua 5.5 is backwards compatible with Lua 5.2 and most Lua 5.2 code that doesn't touch fenvs will also work with 5.1.
并不真的如此。我能想到的最接近你意思的情况是 Lua 5.2 改变了函数环境的工作方式(这是 5.1 的特性),也就仅此而已了。Lua 5.5 向后兼容 Lua 5.2,大多数不操作 fenvs 的 5.2 代码在 5.1 上也能运行。
>each JIT
>每个 JIT
There is only 1 LuaJIT, written by Mike Pall, which is the 5.1 spec with some 5.2 features backported.
只有一个 LuaJIT,由 Mike Pall 编写,它是基于 5.1 规范并反向移植了一些 5.2 特性的实现。
↳ #65 No.109247284
Anonymous · 2026-07-11 04:26
>>109247274
thanks. as for JITs I meant various commercially-supported forks like Luau (Roblox), GLua (Facepunch), OpenResty LuaJIT etc
谢谢。至于 JIT,我指的是各种商业支持的分支,比如 Luau (Roblox)、GLua (Facepunch)、OpenResty LuaJIT 等。
↳ #66 No.109247296
Anonymous · 2026-07-11 04:29
>>109247284
GLua is just PUC Lua 5, and OpenResty uses Mike Pall's LuaJIT
GLua 其实就是 PUC Lua 5,而 OpenResty 用的是 Mike Pall 的 LuaJIT
Luau yeah I guess.
Luau 嘛,我想是吧。
↳ #67 No.109247303
Anonymous · 2026-07-11 04:30
↳ #68 No.109247306
Anonymous · 2026-07-11 04:30
>>109246830
Funny you say that, once upon a time back in like '02 I hacked together an experiment like that.
你说这个还真巧,早在 2002 年左右,我也瞎搞过一个类似的实验。
↳ #69 No.109247613
Anonymous · 2026-07-11 06:00
>>109247296
>GLua is just PUC Lua 5
>GLua 其实就是 PUC Lua 5
GLua has C-style logic operators and comments
GLua 支持 C 风格的条件逻辑运算符和注释
↳ #70 No.109248056
Anonymous · 2026-07-11 07:55
>>109234480
Ive only seen nocoders cry about this
我只见过那些没有编码能力的家伙为此哭爹喊娘
↳ #71 No.109248494
Anonymous · 2026-07-11 09:43
>>109231461
Mike Pall returns to discuss new syntax additions to be added in LuaJIT 3.0
Mike Pall 回归,讨论即将添加到 LuaJIT 3.0 中的新语法特性
https://github.com/LuaJIT/LuaJIT/issues/1475
Some of them are already backported to LuaJIT 2.1
其中一些已经反向移植到了 LuaJIT 2.1
https://github.com/LuaJIT/LuaJIT/issues/1476
My favorite are
我最喜欢的是
>ternary
>三元运算符
>short functions
>简写函数
>safe navigation operator
>安全导航运算符
图片: https://i.4cdn.org/g/1783763000533567.jpg
↳ #72 No.109248542
Anonymous · 2026-07-11 09:54
>>109248494
>returns
>返回表达式
Pretty active on github actually, idk why I thought he was gone
他在 GitHub 上其实挺活跃的,我还以为他隐身了呢
↳ #73 No.109248854
Anonymous · 2026-07-11 11:04
>>109248494
>ternary
>三元运算符
bro you literally call already do that with "and" and "or". do you really think saving to type 3 characters is a significant improvement?
哥们,你其实早就用 "and" 和 "or" 实现这个了。你真觉得省下敲 3 个字符能算是显著改进吗?
↳ #74 No.109249222
Anonymous · 2026-07-11 12:19
>>109248494
I love the idea of short functions, but that syntax is kind of garbage.
我喜欢简写函数的概念,但那语法简直是一坨屎。
The safe navigation operator is definitely my favorite from the list, if I had to pick 1 feature to add to keep Lua de-bloated that would be the one.
安全导航运算符绝对是列表里我最喜欢的,如果只能保留一个功能来保持 Lua 的精简,我会选它。
>>109248854
Not a ternary operator, that's just short-circuited logical operators. Try it yourself and see `a and false or b` returns `b` regardless of whether `a` is true or not. If it was a real ternary operator then it would return false if a was true and b if a was false.
那可不是三元运算符,那只是短路逻辑运算符。你自己试试看 `a and false or b`,无论 `a` 是真还是假,它都会返回 `b`。如果它是真正的三元运算符,当 `a` 为真时应该返回 false,为假时返回 b。
↳ #75 No.109250086
Anonymous · 2026-07-11 14:35
>>109231461
I just recently looked into Lua because I got interested into prototype based OOP languages like self and io and to me their object model implementation makes more sense than a class-instance based one
我最近因为对 Self 和 Io 这类基于原型的面向对象语言感兴趣,才开始研究 Lua。对我来说,它们基于原型的对象模型实现比基于类的实例模型更有道理。
Lua is already similar in terms of delegation to prototype OOP and it's really easy to implement it under Lua. I asked chatgpt to write a simple library and seems to work pretty fine, at least for toying around
Lua 在委托方面已经很像基于原型的 OOP 了,而且在 Lua 里实现起来非常简单。我让 ChatGPT 写了一个简单的库,看起来效果还不错,至少用来折腾着玩玩挺方便的。
-- object.lua
-- 对象.lua
local Object = {}
本地对象 = {}
local Meta = {}
本地元表 = {}
local function lookup(self, key)
本地函数 lookup(self, key)
local value = rawget(self, key)
本地值 = rawget(self, key)
if value ~= nil then
如果 value ~= nil 那么
return value
返回值
end
结束
local proto = rawget(self, "__proto")
本地原型 = rawget(self, "__proto")
if proto then
如果是 proto 的话
return lookup(proto, key)
返回查找(原型,密钥)
end
结束
end
结束
Meta.__index = function(self, key)
Meta.__index = 函数(self, key)
local value = lookup(rawget(self, "__proto"), key)
本地值 = Lookup(rawget(self, "__proto"), key)
if value ~= nil then
如果 value ~= nil 那么
return value
返回值
end
结束
local forward = lookup(self, "forward")
局部变量 forward = 查找(self, "forward")
if forward then
如果向前
return forward(self, key)
返回 self.key
end
结束
end
结束
function Object:clone(slots)
函数对象:克隆(槽)
local obj = slots or {}
本地 obj = 槽或 {}
rawset(obj, "__proto", self)
rawset(obj,“__proto”,自我)
return setmetatable(obj, Meta)
返回 setmetatable(obj, Meta)
end
结束
function Object:proto()
函数对象:proto()
return rawget(self, "__proto")
返回 rawget(self, "__proto")
end
结束
function Object:slotNames()
函数 Object:slotNames()
local names = {}
本地名称 = {}
for name in pairs(self) do
对于成对的名字(自我)做
if name ~= "__proto" then
如果 name ~= "__proto" 则
names[#names + 1] = name
names[#names + 1] = 名称
end
结束
end
结束
return names
返回名称
end
结束
function Object:forward(name)
函数 Object:forward(name)
error("message not understood: " .. tostring(name), 2)
error("无法识别的消息:" .. tostring(name), 2)
end
结束
setmetatable(Object, Meta)
setmetatable(对象,元)
return Object
返回对象
So I can do
所以我可以这样写
local Animal = Object:clone {
本地动物=对象:克隆{
speak = function()
说话=函数()
print(self.sound .. "!")
打印(自我声音..“!”)
end
结束
}
local Dog = Animal:clone {
本地狗=动物:克隆{
sound = "woof"
声音=“汪汪”
}
Dog:speak()
狗:说话()
↳ #76 No.109250233
Anonymous · 2026-07-11 15:01
>>109250086
I personally don't like it (tables are enough) but people have been doing this for a really long time, it's a completely valid use of metatables
我个人不太喜欢这样(表格就够了),但大家这么做已经很久了,这完全算是元表的有效用法
http://lua-users.org/wiki/SimpleLuaClasses
↳ #77 No.109250268
Anonymous · 2026-07-11 15:07
If you use libev as an event loop in your host program you can trivially access it from lua with lua-ev for timers, io watchers etc. Probably works with uv, too.
如果你在宿主程序里用 libev 作为事件循环,可以通过 lua-ev 在 lua 里轻松访问它,用于定时器、IO 监控等。uv 应该也行。
I'm also a fan of luaposix to access the complete (?) posix C api from lua.
我也推荐 luaposix,它能让你从 lua 调用完整的(?)POSIX C API。
Is there an alternative to luafilesystem? I'm not using it simply because it pollutes the global namespace.
luafilesystem 有替代品吗?我不用它纯粹是因为它会污染全局命名空间。
↳ #78 No.109250288
Anonymous · 2026-07-11 15:10
>>109250086
Btw for the specific example you showed, you can just do it out of the box using __index, without all the class boilerplate
顺便说一下,对于你展示的那个具体例子,你直接用 __index 就能搞定,不需要那些类的样板代码
图片: https://i.4cdn.org/g/1783782640560976.png
↳ #79 No.109250302
Anonymous · 2026-07-11 15:14
>>109250268
>Is there an alternative to luafilesystem? I'm not using it simply because it pollutes the global namespace.
>luafilesystem 有替代品吗?我不用它纯粹是因为它会污染全局命名空间。
Does it set a bunch of globals or something?
它是不是定义了一堆全局变量之类的东西?
↳ #80 No.109250347
Anonymous · 2026-07-11 15:21
>>109250302
>Does it set a bunch of globals or something?
>它是不是定义了一堆全局变量之类的东西?
It registers the module globally as lfs when require'd. Years ago this also used to break lua_ls, no idea if that is the case anymore.
它在被 require 时会作为全局模块 lfs 注册。几年前这还会搞挂 lua_ls(Lua 语言服务器),不知道现在是不是还这样。
It won't be fixed because there's probably lots of software that depend on that behavior.
这估计没法修,因为很可能有很多软件依赖这种行为。
↳ #81 No.109250362
Anonymous · 2026-07-11 15:24
>>109250086
>function Object:proto()
>函数 Object:proto()
> return rawget(self, "__proto")
> 返回 rawget(self, "__proto")
>end
>结束
Does this actually work? There is no self reference anywhere.
这真能跑通吗?到处都没看到 self 的引用啊。
I'm too used to just creating closure based classes, even tho it's heavier on memory (if you dont use references to functions instead of creating a new function every time you instance a class)
我已经习惯了直接用闭包来实现类,虽然这样比较耗内存(如果你不是在实例化类的时候每次都新建函数,而是复用函数引用的话)。
↳ #82 No.109250382
Anonymous · 2026-07-11 15:27
lisp lost, therefore nothing else matters besides python + optimized c/asm functions
Lisp 输了,所以除了 Python + 优化过的 C/asm 函数,其他都不重要
↳ #83 No.109250391
Anonymous · 2026-07-11 15:28
>>109250362
NTA but it's gay syntactic sugar, if you define a function with the colon syntax after the function keyword like
不算错,但这只是种“基情”语法糖,如果你在 function 关键字后面用冒号语法定义函数,就像
>function foo:bar() end
> 定义函数 foo:bar() 结束
It automatically implies a first parameter called self.
它会自动隐含一个名为 self 的第一个参数。
↳ #84 No.109250396
Anonymous · 2026-07-11 15:29
>>109250362
It works because Object:proto() is sugar for Object.proto(self) (note the : vs .)
这能行是因为 Object:proto() 是 Object.proto(self) 的语法糖(注意 : 和 . 的区别)
↳ #85 No.109250447
Anonymous · 2026-07-11 15:35
>>109250391
>>109250396
Oh, i see. Usually I do this
哦,我明白了。我通常是这么写的
function f(s)
函数 f(s)
end
结束
local a = {}
局部变量 a = {}
a.f = f
a:f()
instead of
而不是
local a = {}
局部变量 a = {}
function a:f()
函数 a:f()
end
结束
a:f()
I thought it only added the table as the first parameter during "using" and not during "writing".
我以为它只是在“使用”时把表格作为第一个参数传入,而不是在“编写”时就加进去。
↳ #86 No.109250473
Anonymous · 2026-07-11 15:40
>>109250233
That's actually the "opposite" of the prototype OOP object model (classless objects) inplemened in languages like self, Io and original JavaScript
这实际上跟 Self、Io 和原始 JavaScript 等语言里实现的“原型 OOP”(无类对象)模型正好相反
Tables are just flexible enough to be able to reimplement the "inheritance by delegation" model
表格足够灵活,可以重新实现“委托继承”模型
https://bibliography.selflanguage.org/_static/organizing-programs.pdf
↳ #87 No.109250494
Anonymous · 2026-07-11 15:44
>>109250473
That's just how Lua tables work already without any extra work doe.
这就是 Lua 表格本身的工作原理,不需要额外操作。
Same with JavaScript objects
JavaScript 对象也是一样的
↳ #88 No.109250578
Anonymous · 2026-07-11 15:53
this is how i do classes btw desu not sure if matters thoughbeit
顺便说一下,我就是这样定义类的,desu,虽然不确定这有没有关系
local function class()
局部函数 class()
local a = {}
局部变量 a = {}
a.type = "class"
a.type = "类"
return a
返回 a
end
结束
local function Animal()
本地函数 Animal()
local a = class()
局部 a = 类()
a.type = "animal"
a.type = "动物"
a.eat = function(food)
a.eat = 函数(食物)
end
结束
return a
返回 a
end
结束
local function Canine()
本地函数 Canine()
local a = Animal()
局部 a = 动物()
a.type = "canine"
a.type = "犬科动物"
a.bark = function()
a.树皮 = function()
print(a.type, "barks")
打印(a.type,“吠叫”)
end
结束
return a
返回 a
end
结束
local meow = function(s)
本地喵=函数
print(s.type, "meows")
打印(s.type, "meows")
end
结束
local function Feline()
本地函数 Feline()
local a = Animal()
局部 a = 动物()
a.type = "feline"
a.type = "猫科动物"
a.meow = meow -- you must use here : but it will use less memory
a.meow = meow —— 这里必须用冒号,但这样会占用更少的内存
return a
返回 a
end
结束
↳ #89 No.109250633
Anonymous · 2026-07-11 15:59
>>109231461
For a few weeks I ran the AwesomeWM window manager. It uses Lua instead of a configuration syntax. It was really annoying to work with. I remember needing to set a variable and it was ignored. Finally I set the variable to the value I wanted twenty times within the Lua script in order to get it to work.
我有几周时间用过 AwesomeWM 窗口管理器。它用 Lua 代替了传统的配置语法。用起来真的让人头疼。我记得当时设了个变量,但完全没生效。最后我不得不在 Lua 脚本里把那变量重复赋值二十次才搞定。
So, yeah, I think Lua is a bad idea.
所以,是的,我觉得 Lua 是个馊主意。
If you want a tiny language inside of your program, why not BASIC or Forth?
如果你想在程序里塞个微型语言,为什么不用 BASIC 或者 Forth?
↳ #90 No.109250687
Anonymous · 2026-07-11 16:05
>>109250494
>That's just how Lua tables work already without any extra work doe.
>这正是 Lua 表原本就有的特性,根本不需要额外折腾。
Tables are more general than that, that's why you write a library to "restrict" to a specific protocol
表的功能比那广得多,所以才需要写个库来“限制”到特定协议
To implement the Object, the Lobby and multiple inheritance you want to write down the object model to avoid repeating every time the same code for any object
要实现你要求的 Object、Lobby 和多重继承,你得先把对象模型定下来,避免每次为不同对象重复写同样的代码
> Same with JavaScript objects
> JavaScript 的对象也是同理
That's not a coincidence, js is heavily inspired by Self.
这可不是巧合,JS 深受 Self 语言启发。
Its VM was the first dynamically typed object-oriented VM to achieve performances almost on par of optimized C++ for many workloads, and many techniques that later became standard in modern language runtimes:
它的虚拟机是第一个动态类型面向对象虚拟机,在很多工作负载下性能几乎能跟优化过的 C++ 媲美,而且它采用了很多后来成为现代语言运行时标配的技术:
> Adaptive compilation
> 自适应编译
> Inline caches (building on earlier work in Smalltalk)
> 内联缓存(建立在 Smalltalk 的早期工作基础上)
> Polymorphic Inline Caches (PICs)
> 多态内联缓存(PIC)
> Type feedback
> 类型反馈
> Dynamic recompilation
> 动态重编译
Then Js later introduces classes as syntactic sugar but still with prototypes under the hood
后来 JS 引入了类作为语法糖,但底层依然是原型链
The problem is that
问题在于
- Self is "dead-ish" (not really dead but being live image-based env l don't see it making a comeback)
- Self 算是“半死不活”了(虽然没真死,但因为是基于活体镜像的环境,我看不到它翻身的希望)
- Io is still developed but too niche and tarteg wasm by default
- Io 还在开发中,但太冷门了,而且默认面向 WASM
- js ecosystem is too web-centric
- JS 的生态太偏向 Web 了
Lua is a nice modern compromise because it's almost like those languages although more general
Lua 是个不错的现代折中方案,因为它跟那些语言很像,但更通用
↳ #91 No.109250849
Anonymous · 2026-07-11 16:26
>>109250288
yes, the object library basically does that
是的,那个对象库基本上就是干这个的
But I rather have to type
但我宁愿多敲几行代码
UDPconnectionTrait = Conncection:clone {
UDPconnectionTrait = 连接:克隆 {
-- overwrite functions
-- 覆盖函数
}
UDPConnection = UDPConnectionTrait:clone {
UDPConnection = UDPConnectionTrait:克隆 {
transport_proto = "udp",
-- representations parameters
-- 表示层参数
}
rather than setting every time the metatables by hand
也比每次手动去设置元表来得强
↳ #92 No.109252819
Anonymous · 2026-07-11 21:35
>>109234480
Problem?
有啥问题吗?
↳ #93 No.109252824
Anonymous · 2026-07-11 21:37
>>109231461
>array index starts from 1
> 数组索引从 1 开始
HAHHAHAHAHHAHAHAH
↳ #94 No.109253061
Anonymous · 2026-07-11 22:25
>>109252824
> Using a number from indians
> 用个印度数字
Nice try Rajesh
挺能扯啊,Rajesh
↳ #95 No.109253066
Anonymous · 2026-07-11 22:26
>>109231461
Ask yourself why lua torch lost to pytorch
你自己琢磨琢磨为什么 Lua Torch 输给了 PyTorch
↳ #96 No.109253790
Anonymous · 2026-07-12 00:40
>>109253066
There is no correlation between Lua and machine learning
Lua 和机器学习之间没啥关联好吧
↳ #97 No.109254004
Anonymous · 2026-07-12 01:28
>>109248494
not looking forward for new incompatible syntax.
不想要什么新语法来搞破坏。
in particular, ternary operator reusing : is a terrible idea. consider:
特别是三元运算符要是复用冒号,简直是馊主意。想想看:
value = myobj ? myobj:func() : otherfunc()
值 = myobj ? myobj:func() : otherfunc()
oops, now value is either myobj or func():otherfunc()
完了,现在 value 要么是 myobj,要么是 func():otherfunc()
↳ #98 No.109254235
Anonymous · 2026-07-12 02:25
>>109248494
>const
>常量
HECK YES
time to mog jeetscript
是时候给 jeetscript 上强度了
↳ #99 No.109254275
Anonymous · 2026-07-12 02:37
>>109254235
PUC Lua already has const doe
PUC 的 Lua 已经有 const 了喂
↳ #100 No.109254742
Anonymous · 2026-07-12 04:51
>>109254004
>Due to a syntactical ambiguity, expression b cannot directly contain a method call obj:method(). For this case, use parentheses: cond ? (obj:method()) : default
>由于语法歧义,表达式 b 不能直接包含方法调用 obj:method()。这种情况下,请用括号:cond ? (obj:method()) : default
>That said, nope, ?: stays. I'll confess: I'm a heavy user. Addicted, even.
>话说回来,不,?: 语法保留。我坦白:我是重度用户。甚至是上瘾了。
↳ #101 No.109254747
Anonymous · 2026-07-12 04:53
>>109254275
In the most retarded way possible
用一种极其愚蠢的方式
local why <const> = "just why";
local 为什么 <const> = "只是为什么";
↳ #102 No.109254833
Anonymous · 2026-07-12 05:27
>>109254742
damn. I'm sticking to lua 5.1 + FFI subset.
该死。我就坚持用 lua 5.1 + FFI 子集。
↳ #103 No.109255360
Anonymous · 2026-07-12 08:06
i'm genuinely thankful for this thread. now i know i should never touch lua in my life for any reason whatsoever, as it seems to be another memelang for faggots.
我真的感谢这个帖子。现在我知道无论出于什么原因,我余生都绝不再碰 lua,因为它看起来又是给某些人的另一种 meme 方言。
↳ #104 No.109255427
Anonymous · 2026-07-12 08:26
>>109255360
Okay, I'm thankful that you posted this and bumped the thread
好吧,感谢你发了这个并顶起了这个帖
图片: https://i.4cdn.org/g/1783844794651269.png
↳ #105 No.109256638
Anonymous · 2026-07-12 12:43
love2d is really cool. too bad it uses Lua.
love2d 真的很酷。可惜它用 Lua。
↳ #106 No.109256924
Anonymous · 2026-07-12 13:42
>>109256638
Love2d is literally just a collection of Lua bindings for C libraries like box2d and SDL/OpenGL
Love2d 说白了就是一堆 Lua 绑定,封装了 C 库比如 box2d 和 SDL/OpenGL
So really cool my ass. If you're a lua hater then "love2d without Lua" would just be using those libraries directly.
所以“真的很酷”个鬼。如果你是个 lua 黑,那“不用 Lua 的 love2d”就等于直接调用这些库。
↳ #107 No.109257064
Anonymous · 2026-07-12 14:13
>>109256924
>would just be using those libraries directly
>就等于直接调用这些库
or with some other scripting language which doesn't suck
或者用某种其他不烂的脚本语言
↳ #108 No.109257128
Anonymous · 2026-07-12 14:24
↳ #109 No.109257168
Anonymous · 2026-07-12 14:31
>>109252819
It's really fun porting stuff from C or JavaScript. Speaking of JavaScript, that's the language that should be used for embeddable engines instead of Lua. It is just so much better for that purpose. Instead, it's being used server-side and to make desktop OSes. (???) Unfortunately Duktape is slower so Lua gets used instead simply because it is faster.
从 C 或 JavaScript 移植东西真的很有趣。说到 JavaScript,那种应该被用作嵌入式引擎的语言,而不是 Lua。它在那方面简直好太多了。结果呢?它被用在服务端,甚至用来做桌面操作系统。(???) 不幸的是 Duktape 更慢,所以 Lua 仅仅因为更快而被选中使用。
↳ #110 No.109257231
Anonymous · 2026-07-12 14:39
>>109252824
>t. nocoder
>t. 零代码能力
↳ #111 No.109257253
Anonymous · 2026-07-12 14:43
>>109257128
odin, it has those libraries in the default vendor package
odin,默认依赖包里就有那些库
↳ #112 No.109259510
Anonymous · 2026-07-12 20:47
↳ #113 No.109259608
Anonymous · 2026-07-12 21:03
>>109257231
>>109252824
the superior alternative is being able to specify the bounds of the array on allocation
更优秀的替代方案是在分配数组时能指定其边界
you can start from 0 or 1 or -50 or whatever you want to
你可以从 0 或 1 或 -50 或任何你想要的值开始
t. fortran
t。弗兰语言
(I will admit MAYBE the compiler adds microscopic overhead by starting from a different offset than 1 and idk whether or not this is the case)
(我得承认 MAYBE 编译器会因为起始偏移量不是 1 而增加微乎其微的开销,我不知是否真是如此)
also inclusive-inclusive is superior fuck off with your last index not being included
还有区间闭合(inclusive-inclusive)更棒,别搞你那不包含最后一个索引的鬼东西了,滚蛋
图片: https://i.4cdn.org/g/1783890210509853.jpg
↳ #114 No.109259638
Anonymous · 2026-07-12 21:07
>>109259510
>>109231461
>>109255427
don't worry i'm saving this thread forever
别担心,我会把这个帖子永久保存
图片: https://i.4cdn.org/g/1783890427848353.png
↳ #115 No.109259784
Anonymous · 2026-07-12 21:28
↳ #116 No.109261040
Anonymous · 2026-07-13 00:51
bump
顶贴
C and Lua. nothing more
C 和 Lua。就这些
>>109259784
lua is lua
lua 就是 lua
↳ #117 No.109261261
Anonymous · 2026-07-13 01:35
>>109259784
>Contributors: loukamb
>贡献者:loukamb
图片: https://i.4cdn.org/g/1783906507360897.png
↳ #118 No.109262598
Anonymous · 2026-07-13 07:47
↳ #119 No.109263864
Anonymous · 2026-07-13 12:51
>>109262598
MORTAL KOMBAT!!!!
↳ #120 No.109263895
Anonymous · 2026-07-13 13:00
>>109231461
pythoids will NEVER understand how cozy it is to program in a language without importing a a Schindlers list of libraries to "compete" with elegant simplicity and functionality of core lua.
写 python 的永远无法理解,在一个不需要导入一份“辛德勒名单”式的库列表就能“竞争”过 lua 核心优雅简洁性和功能性的语言里编程是多么舒适惬意。
↳ #121 No.109263959
Anonymous · 2026-07-13 13:13
>>109231461
>>game development
>>游戏开发
>https://love2d.org/
can LLMs into this shit? I do like how it's sort of simple to set up but it might be too obscure
能把 LLM 塞进这个坑里吗?我喜欢它设置起来那种简单的感觉,但可能它太冷门了
↳ #122 No.109263972
Anonymous · 2026-07-13 13:15
>>109263959
LLMs should have it in their training data, love2d is even less obscure than something like raylib.
LLM 的训练数据里肯定有它,love2d 甚至比 raylib 之类的不那么冷门。
But you can just give the docs to your AI slop agent anyway
不过你可以直接把文档喂给你的 AI 垃圾生成器就行
↳ #123 No.109264028
Anonymous · 2026-07-13 13:28
>>109263972
well yeah it's just that docs bloat context
嗯,问题是文档会膨胀上下文
that said python might need a lot of boilerplate to get what this love thing offers intrinsically so it's not so easy to decide
话说回来,python 可能需要写很多样板代码才能达到 love 这种内建就能提供的效果,所以不太好决定
↳ #124 No.109266637
Anonymous · 2026-07-13 20:16
I used to love Lua. I read the manual in bed at least once a month. I built a scriptable game engine in C using SDL2 and Lua for making the actual games once. I also used it on Garry's Mod a lot. But it's been a while since I've touched it.
我以前超爱 Lua。我至少每个月在床上读一次手册。我曾经用 C、SDL2 和 Lua 做过一个可脚本化的游戏引擎来做游戏。我也在 Garry's Mod 里大量使用它。不过有一阵子没碰它了。
↳ #125 No.109266671
Anonymous · 2026-07-13 20:20
>>109256924
Löve is great for building stuff fast and messing with it and having fun
Löve 特别适合快速构建东西、折腾它并享受乐趣
↳ #126 No.109266678
Anonymous · 2026-07-13 20:21
>>109263959
It should be in the dataset because it has been around for a very long time.
它应该出现在数据集中,因为它已经存在很长时间了。
↳ #127 No.109267915
Anonymous · 2026-07-13 23:11
>>109231473
Stop spamming, faggot.
别刷屏了,贱人。
↳ #128 No.109269415
Anonymous · 2026-07-14 04:21
↳ #129 No.109269653
Anonymous · 2026-07-14 05:42
>>109267915
>Stop spamming, faggot.
>别他妈刷屏了,杂种。
图片: https://i.4cdn.org/g/1784007740439787.png
↳ #130 No.109270192
Anonymous · 2026-07-14 08:27
thread adoption has been delayed
帖子领养已经延期了
↳ #131 No.109272216
Anonymous · 2026-07-14 15:06
>>109269653
SnailGODS won
蜗牛之神们赢了
↳ #132 No.109274329
Anonymous · 2026-07-14 19:58
>>109270192
many such cases
类似这种情况很多
↳ #133 No.109274333
Anonymous · 2026-07-14 19:59
My thread had a good life, and now it wants to die peacefully... please stop bumping it...
我的帖子有过一段美好的时光,现在它想安息了……求你别再顶贴了……
↳ #134 No.109274505
SmoothPorcupine · 2026-07-14 20:27
>>109274333
Excellent trips, sir. Would you like to have literally any one granted, inclusive of omnipotence over moderators?
精彩的行程,先生。您想获得任何一项特权吗,包括对版主的全知全能控制?
↳ #135 No.109274675
Anonymous · 2026-07-14 20:52
lua is based, 'tan' related stuff is cringe, simple as
lua 真他妈带感,‘tan’相关的东西太尬了,简单明了
↳ #136 No.109274724
Anonymous · 2026-07-14 21:00
↳ #137 No.109277039
Anonymous · 2026-07-15 03:02
>>109274724
>lua-tan
>卢阿坦
>no tan
>没有 tan
↳ #138 No.109277047
Anonymous · 2026-07-15 03:04
>>109272216
>snailcatGODS won
>蜗牛猫之神们赢了
图片: https://i.4cdn.org/g/1784084643493373.png
↳ #139 No.109277828
Anonymous · 2026-07-15 06:07
>>109231461
>1-indexed
>从1开始索引
>but index 0 can have data set manually
>但索引0可以手动设置数据
>but if you do, it doesn't contribute to the table length
>但如果你这么做了,它不会计入表的长度
your language is a fucking joke
你的语言就是个笑话
↳ #140 No.109277882
Anonymous · 2026-07-15 06:25
>>109277828
Table length isn't real, just set a property n
表长度根本不是真的,自己设个n属性就行
↳ #141 No.109278011
Anonymous · 2026-07-15 07:00
>>109234480
>anon has 1 thumb and 7 fingers
>匿名用户有一个拇指和七个手指
>one nut and no benis
>一个蛋蛋没有蛋囊
:DD:D
↳ #142 No.109279001
Anonymous · 2026-07-15 11:29
>>109277882
>Table length isn't real
>表长度不是真的
This
没错
↳ #143 No.109280055
Anonymous · 2026-07-15 14:39
>>109277882
>>109279001
your language is a fucking joke
你的语言就是个笑话
↳ #144 No.109281637
Anonymous · 2026-07-15 17:46
>>109280055
holy sneeding
真是瞎扯淡
↳ #145 No.109283795
Anonymous · 2026-07-15 22:46
>>109250382
good morning pythonic sir
早上好,充满Python风度的先生
图片: https://i.4cdn.org/g/1784155587478547.png
↳ #146 No.109285484
Anonymous · 2026-07-16 04:15
↳ #147 No.109285537
Anonymous · 2026-07-16 04:28
>>109231461
oh yeah the gmod language
哦对,gmod语言
图片: https://i.4cdn.org/g/1784176087828168.jpg
↳ #148 No.109285850
Anonymous · 2026-07-16 05:42
>>109285484
>mfw nobody backported fancy pyjeet torch to OG lua
>mfw 没人把华丽的 pyjeet 火炬后端移植回原生 lua
Sad
↳ #149 No.109287746
Anonymous · 2026-07-16 12:15
>>109285850
it's torchover
这叫 torchover
↳ #150 No.109289217
Anonymous · 2026-07-16 15:44
>>109231461
why is py tan so stupid?
py tan 为什么这么蠢?
↳ #151 No.109289522
Anonymous · 2026-07-16 16:28
>>109289217
>why is py tan so stupid?
>py tan 为什么这么蠢?
have you... programming in python yet?
你……写过 python 编程了吗?
图片: https://i.4cdn.org/g/1784219281079826.png
↳ #152 No.109291716
Anonymous · 2026-07-16 21:18
>>109289522
Guido is such faggot
Guido 真是个婊子
↳ #153 No.109291817
Anonymous · 2026-07-16 21:33
>>109249222
>>109248494
>safe navigation operator
>安全导航运算符
Holy fuck shoot me. Now instead of crashing on bad data your code can just make everything nil and limp along.
天杀的打死我吧。现在当数据出错时,代码不再是崩溃,而是把所有东西都变成 nil 然后勉强跑下去。
↳ #154 No.109291844
Anonymous · 2026-07-16 21:37
>>109231461
>WHY SHOULD I USE LUA?
That's irrelevant
这不相关
WHY SHOULD YOU NOT USE LUA
It was never hardened against anything, it's a meme scripting language not used for anything serious. It's a security accident if you as much as just run a single Lua LoC.
它从来没针对任何东西做过加固,它只是个梗脚本语言,不用于任何严肃场合。只要你哪怕只运行一行 Lua 代码,这就是个安全灾难。
↳ #155 No.109291885
Anonymous · 2026-07-16 21:44
>>109231461
I just loaded entire hyprland wiki + stubs/hl.meta.lua into the gemini pro context along with my freestyle prompt on how I want certain thing to be and it got me a fairy decent prototype that I could hack on.
我只是把整个 hyprland 维基 + stubs/hl.meta.lua 和我的自由式提示词(关于我想要某些东西如何运作)一起加载到 gemini pro 的上下文中,它给了我一个还不错的原型,我可以接着 hack 下去。
↳ #156 No.109292291
Anonymous · 2026-07-16 22:50
does C chan have huge jugs?
C 板子有巨乳吗?
↳ #157 No.109294449
Anonymous · 2026-07-17 05:19
↳ #158 No.109295690
Anonymous · 2026-07-17 09:30
>>109291817
Wrong, it's just a syntactic sugar for a common pattern (nested table access)
错,这只是一套常见模式(嵌套表访问)的语法糖
if foo?.bar?.nig is better to write than if foo and foo.bar and foo.bar.nig
如果 foo?.bar?.nig 比 if foo and foo.bar and foo.bar.nig 更好写
↳ #159 No.109295696
Anonymous · 2026-07-17 09:31
>>109291844
>It was never hardened against anything, it's a meme scripting language not used for anything serious
>它从来没针对任何东西做过加固,它只是个梗脚本语言,不用于任何严肃场合
Stupid nigger
愚蠢的种族歧视用语
https://en.wikipedia.org/wiki/OpenResty
↳ #160 No.109295756
Anonymous · 2026-07-17 09:44
>>109295696
> OpenResty
> 优于 OpenResty
Retarded faggot shill
脑残婊子托
图片: https://i.4cdn.org/g/1784281480510869.png
↳ #161 No.109296781
Anonymous · 2026-07-17 12:49
>>109295756
The critical one is the one opened 1 day ago, and not even Debian oldstable has patched that yet on the real nginx package.
最关键的是那个一天前公开的漏洞,甚至连 Debian oldstable 在真正的 nginx 包上都没打过补丁。
↳ #162 No.109296933
SmoothPorcupine · 2026-07-17 13:16
>>109231461
>"Uh-oh, it looks like python-tan is having trouble understanding the world again!"
>“哎呀,看来 python-tan 又搞不懂这个世界了!”
>"will you implement some rudimentary parsing to help her recognize 'that' and understand other languages?"
>“你会实现一些基本的解析功能来帮助她识别‘那个’并理解其他语言吗?”
>"Don't worry; despite her appearance here, she is actually quite intelligent! she won't need much"
>“别担心;尽管她出现在这里,她其实相当聪明!她不需要太多”
I dunno what is happening IRL right now, but if nothing is done I'm about to plow Python-tan
我不知道现实中现在发生了什么,但如果什么都不做,我打算艹翻 Python-tan
↳ #163 No.109296945
Anonymous · 2026-07-17 13:18
>>109295756
How many of these are caused by Lua?
其中有多少是 Lua 造成的?
>>109296781
First one is not even OpenResty's but upstream Nginx's
第一个甚至不是 OpenResty 的,而是上游 Nginx 的
↳ #164 No.109299219
Anonymous · 2026-07-17 18:03
>>109295756
Can't spell CVE without C
没有 C 就没法拼写 CVE
图片: https://i.4cdn.org/g/1784311394760244.jpg
↳ #165 No.109299360
Anonymous · 2026-07-17 18:24
>>109232952
Lua is JIT compiled and quite optimized. It is pretty fast
Lua 是 JIT 编译且相当优化。它非常快
↳ #166 No.109299947
Anonymous · 2026-07-17 19:38
>>109231461
just vibecoded a 4000 line lua module and it works quite well
只是跟着感觉写了一个 4000 行的 lua 模块,而且运行得相当好
↳ #167 No.109300251
Anonymous · 2026-07-17 20:19
>>109232966
In what ways is lua the language better than Javascript?
在哪些方面作为语言的 lua 比 Javascript 更好?
↳ #168 No.109300302
Anonymous · 2026-07-17 20:25
>>109248056
Yeah, most coders don't even bother to try lua and so don't complain about it at all.
是啊,大多数程序员甚至懒得去试 lua,所以根本不会抱怨它。
↳ #169 No.109300787
Anonymous · 2026-07-17 21:36
>>109300251
It does everything JS tries to do but better and simpler.
它把JS试图做的事都做得更好、更简单。
Tables and metatables are the same thing as objects/prototypes (not superficially) but with better semantics. Coroutines are actual cooperative multitasking implemented properly and more flexible than JS async. JS is like a soup of different solutions to the same problem melted together, Lua has only 1 feature for every task which makes it more elegant.
表和元表本质上就是对象/原型(而非表面相似),但语义更清晰。协程是真正正确实现且比JS的async更灵活的真实协作式多任务。JS就像把解决同一问题的不同方案炖成了一锅粥,而Lua每种任务只有一个特性,这使得它更加优雅。
It's also older than JavaScript. JS was influenced somewhat by Lua, but didn't get it right.
而且它比JavaScript更早出现。JavaScript在某种程度上受到了Lua的影响,但并没有学好。
If you use both, and you ignore how different the syntax is, Lua feels a bit like programming in JavaScript if all the cruft was removed .
如果你两者都用,忽略语法差异的话,Lua用起来就像去掉了所有累赘的JavaScript。
↳ #170 No.109300841
Anonymous · 2026-07-17 21:42
>>109231461
>1-based indexing
>基于1的索引
Or should I say
或者说
>1-cringe indexing
>1-尴尬索引
↳ #171 No.109300908
Anonymous · 2026-07-17 21:50
>>109300841
t. 0 coder
楼主是0号程序员
↳ #172 No.109301667
Anonymous · 2026-07-17 23:49
>>109231461
this is such a great picture, who drew it?
这张图太棒了,谁画的?
↳ #173 No.109302719
Anonymous · 2026-07-18 02:38
>>109300841
luajit has both 1-based and 0-based indexing ;)
luaJIT同时支持1-based和0-based索引 ;)
↳ #174 No.109302839
Anonymous · 2026-07-18 03:05
>>109231495
What would you scripting support in an emulator allow you to do?
在模拟器中使用脚本支持能让你做什么?
↳ #175 No.109302861
Anonymous · 2026-07-18 03:09
>>109302839
testing, macros, speedrunning, debugging, modding, maybe more I didn't imagine right now.
测试、宏、速通、调试、模组制作,可能还有我现在没想到的更多。
↳ #176 No.109303048
Anonymous · 2026-07-18 03:46
I spent an afternoon trying to figure out fennel, make it work with love2d, and connect it to a repl with emacs.
我花了一个下午试图搞懂Fennel,让它与LÖVE2D配合工作,并连接到Emacs的REPL。
Then I realized I have no ideas for building anything with it.
然后我意识到我没有任何用它构建东西的想法。
↳ #177 No.109303596
Anonymous · 2026-07-18 05:54
>>109302861
debugging makes sense, I wasn't thinking about the rest
调试说得通,我没想到其他的用途
now that you say it, it could be used to print text on ImGui widgets for debugging, testing, profiling, etc... about the state of the emulator, but for that you'd need access to all the internal data structures and memory areas of the emulator. I'm not sure how you'd implement that without a writing marshalling functions for each data sturcture, since a language like Lua couldn't directly read memory using pointer and if it could it would be oblivious of the struct types...
你这么一说,它可以用来在ImGui控件上打印文本,用于调试、测试、分析等……关于模拟器的状态,但为此你需要能访问模拟器所有的内部数据结构和内存区域。我不确定如何在不为每个数据结构编写编组函数的情况下实现这一点,因为像Lua这样的语言不能直接通过指针读取内存,即使可以,它也无法感知结构体类型……
↳ #178 No.109303600
Anonymous · 2026-07-18 05:55
>>109303048
Same I just like tinkering
一样,我就是喜欢瞎折腾
附件: https://i.4cdn.org/g/1784354108351129.webm
↳ #179 No.109303643
Anonymous · 2026-07-18 06:09
>>109303600
i had to close this when the skellington appeared
骷髅出现的时候我得关掉它
2spoopy4me
2个鬼怪,我受不了了(双关语:too spooky for me)
↳ #180 No.109303658
Anonymous · 2026-07-18 06:13
>>109303596
luajit has ffi built-in that lets you operate on raw memory pointers, for vanilla lua you'd need a separate ffi library.
luaJIT内置了ffi,允许你操作原始内存指针,对于原生Lua你需要一个单独的ffi库。
↳ #181 No.109303780
Anonymous · 2026-07-18 06:47
>>109303658
>ffi
>菲菲
of course ... it shouldn't be too much boilerplate compared to what I was thinking
当然……比起我刚才想的,样板代码应该不会太多
I was thinking it would be nice to have a systems language with an associated scripting language that could directly understand the types of the systems language, but it would be hard to make interact code with manual memory managment and the scripting code using a GC, in a memory safe way
我在想,如果有一种系统语言配上能直接理解该系统语言类型的关联脚本语言,那该多好,但要让带有手动内存管理的系统代码和使用GC的脚本代码以内存安全的方式交互,这很难实现
↳ #182 No.109303939
Anonymous · 2026-07-18 07:32
>>109303596
>I'm not sure how you'd implement that without a writing marshalling functions for each data sturcture, since a language like Lua couldn't directly read memory using pointer
>我不确定如何在不为每个数据结构编写编组函数的情况下实现这一点,因为像Lua这样的语言不能直接通过指针读取内存
It can actually, just take a look at CheatEngine which can be scripted from Lua and can read arbitrary data from pointers for debugging purposes.
实际上可以,看看CheatEngine,它可以用Lua脚本编写,并能出于调试目的从指针读取任意数据。
↳ #183 No.109303952
Anonymous · 2026-07-18 07:35
>>109303780
>I was thinking it would be nice to have a systems language with an associated scripting language that could directly understand the types of the systems language
>我在想,如果有一种系统语言配上能直接理解该系统语言类型的关联脚本语言,那该多好
Depending on what you mean by this, you might just be talking about userdata. Lua lets you create an arbitrary C object and have it be managed by Lua VM/GC, and you just write the metatables as C functions.
看你怎么理解这话了,你可能就是在说 userdata。Lua 允许你创建一个任意 C 对象并将其交由 Lua VM/GC 管理,你只需要把元表写成 C 函数就行。
https://www.lua.org/pil/28.1.html
If you mean "without any boilerplate at all" then no, the boilerplate is really small though.
如果你指的是“完全没有任何样板代码”,那不行,不过这些样板代码其实非常少。
↳ #184 No.109304086
Anonymous · 2026-07-18 08:12
>>109231508
the textadept creator has a degree in rocket science, not even kidding
textadept 的作者有火箭科学学位,没开玩笑
↳ #185 No.109305779
Anonymous · 2026-07-18 14:02
↳ #186 No.109306066
Anonymous · 2026-07-18 14:47
↳ #187 No.109308179
Anonymous · 2026-07-18 19:25
>>109231461
Sorry anon, Lua is a neat but unfortunately this is a #895129 thread so Python is preferred over any #FFFFFF language.
抱歉 anon,Lua 是个挺 neat 的语言,但不幸的是这是 #895129 线程,所以 Python 比任何 #FFFFFF 语言都更受欢迎。
↳ #188 No.109309078
Anonymous · 2026-07-18 21:22
>>109308179
Lua is Brazillian doe
Lua 是巴西产的老兄
↳ #189 No.109310334
Anonymous · 2026-07-19 00:47
>>109301667
sauce now OP
源码呢 OP
↳ #190 No.109310752
Anonymous · 2026-07-19 01:59
>>109303939
>CheatEngine which can be scripted from Lua and can read arbitrary data from pointers for debugging purposes
>CheatEngine 支持 Lua 脚本,并且可以出于调试目的从指针读取任意数据
read but not write?
只能读不能写?
>>109303952
>Depending on what you mean by this
>看你怎么理解这话了
What I mean is that when a C/C++ program use an embedded scripting language, the scripting language doesn't know the types of used by the program so if you want to read or write structs of the C program with the scripting language, you are forced to defined the struct definition a 2nd time in the scripting language for the FFI. Even if the scripting language is statically typed, has structs and arbitrary memory access with pointers castings, it still needs that duplicated struct definition. Each time the main application is changing, the Lua code or whatever will have to be kept in sync.
我的意思是,当 C/C++ 程序使用嵌入式的脚本语言时,脚本语言并不知道程序使用的类型。所以如果你想用脚本语言读取或写入 C 程序的结构体,就必须在脚本语言中为 FFI 重新定义一遍结构体。即使脚本语言是静态类型的,拥有结构体和带指针强制转换的任意内存访问功能,它仍然需要那份重复的结构体定义。每次主应用程序发生变更时,Lua 代码或其他什么代码都必须随之保持同步。
If the systems language had already the scripting language included in its syntax (or rather they would have mostly the same syntax but the scripting language's code would be lighter because it would use a GC and supposing the systems language is type inferred, the scripting language would need far less type annotations), then the same frontend could be used for both language, the systems language could directly call scripting language functions and vice versa, the scripting language could directly read and write the systems language data because they would share the same type system. No duplicate type definitions needed, no need to keep the 2 in sync, only one source of truth.
如果系统语言已经在其语法中内置了脚本语言(或者更准确地说,它们拥有基本相同的语法,但脚本语言的代码会更轻量,因为它使用 GC,而且假设系统语言是类型推断的,脚本语言需要少得多类型注解),那么可以使用相同的前端来编译这两种语言。系统语言可以直接调用脚本语言函数,反之亦然;脚本语言可以直接读写系统语言的数据,因为它们共享同一套类型系统。不需要重复的类型定义,不需要保持两者同步,只有一个唯一的真理源。
>Lua lets you create an arbitrary C object and have it be managed by Lua VM/GC, and you just write the metatables as C functions.
>Lua 允许你创建一个任意 C 对象并交由 Lua VM/GC 管理,你只需要把元表写成 C 函数。
What I'd like to have is receive a pointer to struct from C, which is already allocated by the C code, and being able to read/write its fields it directly (having prealably declared the struct definition with the FFI library) without converting the struct to a table first and then later converting the table back to the struct. Too much overhead.
我想要的是从 C 接收一个已由 C 代码分配的结构体指针,并在预先使用 FFI 库声明了结构体定义后,直接读写它的字段(而不是先将结构体转换为表,然后再把表转回结构体)。那开销太大了。
>If you mean "without any boilerplate at all"
>如果你指的是“完全没有任何样板代码”
yes
是的
↳ #191 No.109311273
Anonymous · 2026-07-19 03:52
>>109231461
I think Lua-tan is lightweight enough to apply the small angle approximation, so let's just call it Lua. Or is it bloated, that's why you call it Lua-tan? In than case I won't use it
我觉得 Lua-tan 够轻量,可以应用小角度近似,所以咱们就直接叫它 Lua 吧。还是说它太臃肿了,所以才叫 Lua-tan?如果是后者的话,我就不用了
↳ #192 No.109312696
Anonymous · 2026-07-19 09:31
>>109310752
>read but not write?
>只能读不能写?
It can do both.
两者皆可。
↳ #193 No.109312700
Anonymous · 2026-07-19 09:32
>>109310752
You might be interested in https://terralang.org/
Not a great language but a good proof of concept
不算什么好语言,但作为概念验证还行
↳ #194 No.109312732
Anonymous · 2026-07-19 09:36
>>109310752
>without converting the struct to a table first and then later converting the table back to the struct. Too much overhead.
>先要把结构体转成表,之后再转回结构体。开销太大了。
Userdata isn't fully within the criteria if what you're asking for, because the Lua VM manages the memory of a userdatum, but there is no conversion to a table when interacting from Lua. You write something like obj.foo = bar, and the Lua VM calls the __newindex metamethod, a C function. And the C function does Lua VM stack manipulation or reads data off the stack directly.
用户数据类型不太符合你要求,因为 Lua VM 管理用户数据的内存,但从 Lua 交互时并不涉及转成表的过程。你写 obj.foo = bar,Lua VM 会调用 __newindex 元方法,即一个 C 函数。而该 C 函数会对 Lua VM 栈进行操作,或直接读取栈上的数据。
↳ #195 No.109312736
Anonymous · 2026-07-19 09:37
>>109312732 (me)
obj in this case is an object with type "userdata" (not table) which is literally just a C pointer.
此处的 obj 是一个类型为“userdata”(而非表)的对象,它本质上就是一个 C 指针。
↳ #196 No.109314199
Anonymous · 2026-07-19 13:53
↳ #197 No.109314283
Anonymous · 2026-07-19 14:07
>>109299947
typescript and lua are good lang for slopcoding, idk why it sucked for vanilla js
TypeScript 和 Lua 很适合快速码代码,不知道为什么 Vanilla JS 感觉很差劲。
↳ #198 No.109315239
Anonymous · 2026-07-19 16:20
>>109231461
I am using Love2D to make a game because I am too stupid to install pygame.
我用 Love2D 做游戏,因为我太蠢了,连 pygame 都装不上。
It is what it is.
爱咋咋地吧。
↳ #199 No.109315666
Anonymous · 2026-07-19 17:05
>>109231461
>It's very fast and compatible because it's written in ANSI C
>它很快且兼容性好,因为它是用 ANSI C 写的
Actually- performance-wise Lua is utter shite. You need to rely on the unofficial LuaJIT runtime for compiled performance, a runtime which is now abandoned by its main developer and sole driving force behind keep its parity with the official runtime. LuaJIT is 5~10x more performant than the official runtime, and V8 - yes the JAVASCRIPT ENGINE V8, in Node.js, Chromium, etc. - runs circles around LuaJIT and has been doing so since 2022. Real-world benchmarking suites implemented in both Lua and JS show V8 at about 2.3x the performance of LuaJIT. In short, official Lua is up to TWENTY times slower than the best official supported embeddable JS runtime.
实际上——就性能而言,Lua 简直是一坨屎。你必须依赖非官方的 LuaJIT 运行时才能获得编译型性能,但该运行时已被其主要开发者弃用,而该开发者正是维持其与官方运行时兼容性的唯一动力。LuaJIT 的性能比官方运行时高出 5~10 倍,而 V8——没错,就是 Node.js、Chromium 等使用的 JAVASCRIPT 引擎 V8——自 2022 年以来就一直碾压 LuaJIT。在 Lua 和 JS 中实现的真实世界基准测试套件显示,V8 的性能约为 LuaJIT 的 2.3 倍。简而言之,官方 Lua 的性能比最佳官方支持的嵌入式 JS 运行时慢多达二十倍。
Furthermore, Lua's language revisions are hard-tied to runtime version and different minor language revisions have behavior that is neither backwards nor forwards compatible. The one cardinal sin worse than the runtime not being portable? The actual stuff you write in it, not being portable.
此外,Lua 的语言修订版本硬绑定到运行时版本,不同的细微语言修订版本存在既不相容向后也不相容向前的行为。比运行时不可移植更严重的原罪是什么?是你实际编写的代码不可移植。
Lua is a failure.
Lua 是个失败品。
It was originally written as a simple thought experiment for process-automation in chemical plants, and somehow it broke loose into the real world. It should've been put down like the mangy mutt it was, but then the videogame industry got its claw on it, in a time where Flash was on its way out.
它最初只是作为化工流程自动化中的一个简单思维实验而被写出来的,结果却意外地流向了现实世界。它本应像那条脏兮兮的杂种狗一样被淘汰,但随后视频游戏行业将它攥在了爪子里,那正是 Flash 逐渐退场的时候。
↳ #200 No.109315695
Anonymous · 2026-07-19 17:08
>>109231959
JavaScript also can, in non-strict mode. There if you assign to an undeclared local, it creates it on the global object. In strict mode, it will throw instead. As any good language should.
JavaScript 在非严格模式下也可以。如果在非严格模式下对未声明的局部变量赋值,它会在全局对象上创建该变量。在严格模式下,则会抛出异常。任何优秀的语言都应如此。
↳ #201 No.109315746
Anonymous · 2026-07-19 17:15
>>109300787
>Tables and metatables are the same thing as objects/prototypes (not superficially) but with better semantics.
>表和元表与对象/原型(绝非表面相似)是同一回事,但具有更好的语义。
Metatables are a very loose mechanism that you can use to express prototypal inheritance, for sure. But the looseness of metatables means you have zero guarantees of cross-compatibility with third-party code understanding how your prototypes work, and vice-versa. Method vs non-method function calls are also caller controlled, meaning whether or not you get passed the proper 'this' is up to caller responsibility, which means the caller also continuously needs awareness of which methods to call with period and which with colon. It's such a poor fucking language convention, it gives fucking PHP displaced embarassment.
元表确实是一个相当松散的机制,你可以用它来表达原型继承。但元表的这种松散性意味着你根本无法保证与第三方代码的跨兼容性——别人不一定理解你的原型是如何工作的,反之亦然。方法调用和非方法调用也由调用者控制,这意味着你是否能正确传递“this”完全取决于调用者的责任,这也意味着调用者必须始终清楚哪些方法要用点号调用,哪些要用冒号调用。这真是一种糟糕透顶的编程语言约定,简直让PHP都感到自愧不如。
Which also means that
这也意味着
>Lua has only 1 feature for every task which makes it more elegant.
>“Lua 每个任务只有一个特性,这让代码更优雅。”
deserves only one response, and that is: lol. lmao even.
这话只配得到一种回应:哈哈哈。甚至笑出猪叫。
↳ #202 No.109315787
Anonymous · 2026-07-19 17:20
>>109300841
It's actually not even 1-based indexing. Because Lua doesn't actually have arrays.
其实它连基于 1 的索引都算不上。因为 Lua 实际上根本没有数组。
It only has bool/string/number primitives, an associate hashmap object that it calls a 'table,' and a hacky add-on on top of that which mix-and-matches features of Symbol and Proxy in JS - which it refers to as meta-tables.
它只包含布尔值/字符串/数字等基本类型,一个它称为“表”的关联哈希映射对象,以及一个粗糙的附加层,融合了 JS 中 Symbol 和 Proxy 的部分特性——Lua 称之为元表。
It doesn't actually have arrays. Arrays are just a convention expressed through part of its standard library, for iterating over numeric looking table keys. The standard library functions expect iteration to start at 1, but it doesn't have to. It could start at 0 as well. Or at 5. Or at 42. Or, if you're a particularly crafty fucker publishing code modules as a third-party, who wants to fuck with people: -1.
它实际上并没有数组。数组只是标准库中通过部分功能表达出来的一种约定,用于遍历那些看起来像数字的表键。标准库函数期望迭代从 1 开始,但这并不是强制的。它也可以从 0 开始,或者从 5、42 开始。或者,如果你是个喜欢搞事的第三方代码模块发布者,想恶心一下别人:那就从 -1 开始。
↳ #203 No.109317159
Anonymous · 2026-07-19 20:35
>>109315746
>Method vs non-method function calls are also caller controlled, meaning whether or not you get passed the proper 'this' is up to caller responsibility,
>“方法调用和非方法调用也由调用者控制,这意味着你是否能正确传递‘this’完全取决于调用者的责任,”
This happens in every programming language tho
不过,这种情况在所有编程语言里都会发生。
↳ #204 No.109317255
Anonymous · 2026-07-19 20:46
>>109315666
>Lua is slower than the fastest and most mature scripting runtime in the world, therefore it's a failure
>“Lua 比世界上最快、最成熟的脚本运行库还要慢,因此它是个失败品。”
ok
↳ #205 No.109317397
Anonymous · 2026-07-19 21:07
Redpill me on brazilians
给我科普一下巴西人吧
↳ #206 No.109317420
Anonymous · 2026-07-19 21:09
↳ #207 No.109317713
Anonymous · 2026-07-19 21:56
↳ #208 No.109319642
Anonymous · 2026-07-20 03:30
↳ #209 No.109319854
Anonymous · 2026-07-20 04:09
>>109315666
and V8 is 50MB of slop while LuaJIT is like 2MB
而 V8 足足有 50MB 的臃肿垃圾,LuaJIT 却只有 2MB 左右。
↳ #210 No.109319994
Anonymous · 2026-07-20 04:38
↳ #211 No.109320650
Anonymous · 2026-07-20 07:29
>>109231461
oh, lua is brazilian?
哦,Lua 是巴西的?
↳ #212 No.109320658
Anonymous · 2026-07-20 07:31
i'm a bit interested because of neovim
我有点感兴趣,因为 Neovim。
i haven't migrated my vimscript config properly
我还没把我的 Vimscript 配置迁移好。
↳ #213 No.109322142
Anonymous · 2026-07-20 13:04
>>109319994
We need more Lua-tan art.
我们需要更多关于 Lua-tan 的艺术作品。
↳ #214 No.109323213
Anonymous · 2026-07-20 15:32
>>109320650
Correct
正确
>>109320658
Take the plunge
放手去搏吧。
↳ #215 No.109323712
Anonymous · 2026-07-20 16:40
>>109322142
I will make the logo
我来做 Logo。
↳ #216 No.109324132
Anonymous · 2026-07-20 17:42
↳ #217 No.109324175
Anonymous · 2026-07-20 17:45
>>109320658
It'a pretty meh for config; it's fine either way.
作为配置文件语言确实挺一般的;反正都行。
But as a scriptable interface, it's leagues better than the "run sequential ex commands to change your buffer" language that is Vimscript.
但作为一个可脚本化的接口,它比那种“运行顺序执行的 ex 命令来更改缓冲区”的语言——Vimscript——要好上几个数量级。
t. tried writing plugins in pure Vimscript and got frustrated at how autoload imposes a strict directory structure on you with terrible cross-submodule support
t. 试过用纯 Vimscript 写插件,结果被 autoload 强加的严格目录结构以及极其糟糕的子模块交叉支持搞得心烦意乱。
↳ #218 No.109325940
Anonymous · 2026-07-20 21:16
>>109319854
>V8 is 50MB of slop while LuaJIT is like 2MB
>“V8 足足有 50MB 的臃肿垃圾,LuaJIT 却只有 2MB 左右。”
brutal
残酷
↳ #219 No.109326022
Anonymous · 2026-07-20 21:25
>>109315666
>Actually- performance-wise Lua is utter shite.
>“实际上——性能方面 Lua 简直是一坨屎。”
I can write real time software in Prolog for modern computers. PUC-RIO Lua is perfectly fine.
我能在现代计算机上用 Prolog 编写实时软件。PUC-RIO 开发的 Lua 完全没问题。
↳ #220 No.109327586
Anonymous · 2026-07-21 01:08
HNiggas talking about Lua rn
HN 上的那些黑人现在又在聊 Lua 了。
https://news.ycombinator.com/item?id=48982011
↳ #221 No.109327739
Anonymous · 2026-07-21 01:33
>>109327586
Why are users on this website such insufferable faggots?
为什么这个网站的用户这么让人无法忍受的混蛋?
It's like reading linkedin, r*ddit, and lesswrong all at the same time.
感觉就像同时在看 LinkedIn、r*ddit 和 LessWrong。
图片: https://i.4cdn.org/g/1784597602710692.png
↳ #222 No.109327810
Anonymous · 2026-07-21 01:45
>>109263864
>loukamb
>卢卡姆
Liu Kang?
Liu Kang(刘康)?
↳ #223 No.109327835
Anonymous · 2026-07-21 01:49
>>109323712
We're waiting on the logo before we start with the project.
我们在项目启动前要等Logo出来。
↳ #224 No.109327857
Anonymous · 2026-07-21 01:52
I hate this language and the fact that it gets embedded into fucking everything.
我讨厌这种语言,更讨厌它被嵌进该死的一切东西里。
↳ #225 No.109327896
Anonymous · 2026-07-21 01:59
>>109327857
>I dislike that the popular language designed for embedding is frequently embedded into applications
>我讨厌那个专为嵌入而设计的流行语言经常嵌入到各种应用中
↳ #226 No.109327942
Anonymous · 2026-07-21 02:04
↳ #227 No.109327980
Anonymous · 2026-07-21 02:10
>>109327739
There are some based channers posting there though
不过那边确实有些“基佬看板”在发帖
↳ #228 No.109328067
Anonymous · 2026-07-21 02:26
>>109327980
>based channers
>基佬看板
Lmao. Please leave this website.
笑死,请离开这个网站。
↳ #229 No.109328138
Verification not required. · 2026-07-21 02:40
>>109231461
use case?
使用场景?
↳ #230 No.109328956
Anonymous · 2026-07-21 05:19
↳ #231 No.109329402
Anonymous · 2026-07-21 07:13
>>109328138
customizing behavior of stuff without recompiling said stuff.
在不重新编译目标代码的情况下自定义其行为。
↳ #232 No.109330969
Anonymous · 2026-07-21 12:24
>>109329402
ok nice usecase
行,挺棒的使用场景
↳ #233 No.109332234
Anonymous · 2026-07-21 15:32
↳ #234 No.109332287
Anonymous · 2026-07-21 15:40
>>109332234
Unexpected, top kek
意外,太搞笑了
↳ #235 No.109332308
Anonymous · 2026-07-21 15:42
↳ #236 No.109334554
Anonymous · 2026-07-21 20:12
>>109312700
>terralang
>特拉兰
heh
呵
↳ #237 No.109335120
Anonymous · 2026-07-21 21:16
>>109259608
>the superior alternative is being able to specify the bounds of the array on allocation
>更优越的方案是能在分配时指定数组的边界
>you can start from 0 or 1 or -50 or whatever you want to
>你可以从0或1或-50或任何你想要的地方开始
>t. fortran
> 擅长Fortran
why the fuck would you want this
你他妈为什么想要这个
↳ #238 No.109336646
Anonymous · 2026-07-22 00:24
>>109335120
Can you really see no use for this?
你真看不出这有任何用处吗?
I guess it requires having 115 IQ at minimum to realize the numeric value associated with a data point along an axis (something you'd use a list data structure like an array for) isn't always the same value as the data point's position relative to the list in the program's memory. But you are so cnile that your brain can't even separate those two concepts at all, even though they're very different things... I feel bad for you, it's like having a mental illness.
我想至少要115的智商才能意识到:轴上某个数据点关联的数值(你会用数组这种列表数据结构的东西)不一定等于该数据点在程序内存中相对于列表的位置。但你太脑残了,你的脑子完全无法区分这两个概念,尽管它们完全是两码事……为你感到悲哀,这就像有精神疾病一样。
↳ #239 No.109336741
Anonymous · 2026-07-22 00:40
>>109336646
>you are so cnile that your brain can't even separate those two concepts at all
>你太脑残了,你的脑子完全无法区分这两个概念
...even though programming in C necessitates that I do exactly that?
……虽然写C语言编程要求我必须完全那样做?
↳ #240 No.109336804
Anonymous · 2026-07-22 00:49
>>109292291
yes
是的
refer to the included image
请参考附图
图片: https://i.4cdn.org/g/1784681398520057.png
↳ #241 No.109336832
Anonymous · 2026-07-22 00:53
1-based indices actually have a property that starts at 0, that being the length. If I have 5 apples, I label them 1, 2, 3, 4, and 5, but if I don't have any apples, I have 0 apples (aka the length of the list is 0). So the number 0 isn't wasted in the case of a 1-based array.
1-based索引其实有一个以0开始的属性,那就是长度。如果我有5个苹果,我把它们标号为1、2、3、4、5,但如果我没有苹果,那就是0个苹果(即列表长度为0)。所以对于1-based数组来说,数字0并没有被浪费。
Whether it makes sense to start from 0 depends on the question you're asking, for example if you ask "how far away from me is the closest object?" a valid answer would be that it's 0 meters away from you. But if you ask how many objects there are, notice there HAS to be at least 1 object, otherwise the question of how far away the closest object is doesn't make any sense.
是否从0开始取决于你问的问题。比如你问“离我最近的物体有多远?”,一个有效的回答是“离你0米”。但如果你问有多少个物体,注意这里至少有1个物体,否则“最近的物体有多远”这个问题就不成立了。
The reason you index from 0 in C is because indexing an array with value n is asking "what is the nth repetition of this object?" which is closer to the question of distance. arr[4] in C is asking "give me the 4th repeated value" which happens to be the 5th value. The reason it's framed this way is because it's how you think about memory allocation (an array of type t and length n allocates sizeof(t)*n memory, and the index is a multiplication of sizeof(t)) but it's totally arbitrary.
C语言中从0开始索引的原因是因为用值n索引数组是在问“这个对象的第n次重复是什么?”,这更接近于距离的概念。arr[4]在C语言中是在问“给我第4次重复的值”,这恰好是第5个值。之所以这样设计,是因为这符合我们对内存分配的思考方式(类型为t、长度为n的数组会分配sizeof(t)*n的内存,而索引是sizeof(t)的倍数),但这完全是任意的。
图片: https://i.4cdn.org/g/1784681593563342.png
↳ #242 No.109336845
Anonymous · 2026-07-22 00:56
>>109336741
You can differentiate the two things in your code, but apparently you don't realize that means you can turn it into an abstraction without losing anything.
你可以在代码中区分这两个概念,但显然你没意识到这意味着你可以将其抽象化而不损失任何东西。
Just like when typing a string, you type "hello world" instead of "104 101 108 108 111 32 119 111 114 108 100".
就像输入字符串时,你输入的是"hello world"而不是"104 101 108 108 111 32 119 111 114 108 100"。
↳ #243 No.109336856
Anonymous · 2026-07-22 00:58
>>109336845
>without losing anything
>不损失任何东西
except all respect for myself that i found array indices too difficult to understand.
除了我对自己那点可怜的尊重外,我发现数组索引太难懂了。
↳ #244 No.109336874
Anonymous · 2026-07-22 01:02
>>109336856
I don't think you are fully committed to this logic unless you use ascii tables to write out strings and write 0 and 1 instead of true and false. In fact, you are probably stupid if you even so much as use indices, every value above 0 is an abstraction so it doesn't reflect the real data. You should be casting array+size+index to a pointer and dereferencing it directly, otherwise you're too stupid to understand pointers.
除非你用 ASCII 表来写出字符串,用 0 和 1 代替 true 和 false,否则我觉得你根本没完全践行这套逻辑。事实上,如果你敢用索引,那你就是个蠢货,因为所有大于 0 的值都是抽象,不能反映真实数据。你应该直接把 array+size+index 强转为指针并解引用,否则你就是蠢到连指针都搞不懂。
↳ #245 No.109336876
Anonymous · 2026-07-22 01:04
>>109336804
What does Haskell look like?
Haskell 长啥样?
↳ #246 No.109336937
Anonymous · 2026-07-22 01:17
>>109336874
the amount of autism in this post...
这帖里的自闭症浓度……
↳ #247 No.109337040
Anonymous · 2026-07-22 01:35
>>109336937
It's exactly what you sound like kek
你听起来就是那样,哈哈
↳ #248 No.109337786
Anonymous · 2026-07-22 04:07
>>109335120
you get rid of annoying conversion steps where you have to shift indices and can instead just insert directly at that index
你省去了那些恼人的转换步骤,不用移位索引,而是直接插入到该索引位置
you also reduce the chances of off by one errors and can use your mental energy on other stuff
你还降低了 off-by-one 错误(差一错误)的几率,可以把脑力用在别处
↳ #249 No.109339270
Anonymous · 2026-07-22 09:22
↳ #250 No.109340693
Anonymous · 2026-07-22 13:54
>>109336876
Purely functional (and useless).
纯函数式(而且没用)。
↳ #251 No.109341158
Anonymous · 2026-07-22 14:56
>>109337786
>you get rid of annoying conversion steps
>你省去了那些恼人的转换步骤
you didn't get rid of shit. you just hid it and now the computer has to do it for you, reducing your performance because you're a lazy fuck.
你啥也没省去。你只是把它藏起来了,现在得让计算机替你干,因为你这个懒惰的混蛋降低了性能。
↳ #252 No.109341267
Anonymous · 2026-07-22 15:10
>>109341158
>you didn't get rid of shit. you just hid it and now the computer has to do it for you
>你啥也没省去。你只是把它藏起来了,现在得让计算机替你干
you just described high level programming
你刚才描述的就是高级编程语言
↳ #253 No.109341749
Anonymous · 2026-07-22 16:04
>>109341158
When you do arr[3] your computer has to do *(type*)(arr+(sizeof(type)*3)) so it's the same thing, basically you're just making up fake reasons to justify baby duck syndrome
当你写 arr[3] 时,你的计算机得去算 *(type*)(arr+(sizeof(type)*3)),所以其实是一回事。基本上,你就是在编造些假理由来为“宝宝鸭综合征”(指追求过度简化/幼稚需求)辩护
↳ #254 No.109341847
Anonymous · 2026-07-22 16:15
>>109341749
>When you do arr[3] your computer has to do *(type*)(arr+(sizeof(type)*3))
>当你写 arr[3] 时,你的计算机得去算 *(type*)(arr+(sizeof(type)*3))
mov ebx, arr
mov esi, 3
移动ESI,3
mov eax, [ebx + esi * 4]
将 eax 赋值为 [ebx + esi * 4]
all that C mumbo jumbo horseshit you typed out is not real
你打出来的那些 C 语言胡扯根本不是真的
↳ #255 No.109341874
Anonymous · 2026-07-22 16:19
>>109341847
Even the most niggerlicious compiler will just calculate a single offset
哪怕是屎一样的编译器也只会计算单个偏移量
↳ #256 No.109341911
Anonymous · 2026-07-22 16:23
>>109341874
No shit if you use a compile time constant but I was trying to avoid cherry picking the best case scenario because most code uses variable offsets much more than immediate offsets
如果你用编译时常量,那当然啊。我只是想避免只挑最佳场景的例子,因为大部分代码用的都是变量偏移量,远多于立即数偏移量
↳ #257 No.109342854
Anonymous · 2026-07-22 18:08
↳ #258 No.109343511
Anonymous · 2026-07-22 19:24
C doesn't exist. Only the Assembly it compiles into exists.
C 语言不存在。只有它编译成的汇编才存在。
>inb4 it compiles into machine code
>先别急着说它编译成机器码
Assembly is machine code with words.
汇编就是带单词的机器码。
↳ #259 No.109344243
Anonymous · 2026-07-22 20:41
>>109343511
The assembly doesn't exist either, and neither does any other representation of the machine code. The only physical element at play is the electrons moving through your motherboard, riding motorcycles.
汇编也不存在,机器码的任何其他表示形式也不存在。唯一起作用的物理元素就是骑着摩托车在你的主板上跑来跑去的电子。
↳ #260 No.109345878
Anonymous · 2026-07-23 00:17
>>109277047
That image is some obscure reference.
那图是个很隐晦的梗。
Well done.
干得漂亮。
↳ #261 No.109348100
Anonymous · 2026-07-23 08:38
↳ #262 No.109349377
Anonymous · 2026-07-23 13:15
↳ #263 No.109351679
Anonymous · 2026-07-23 17:38
>>109336804
Ruby-chan ToT
Ruby-chan 哭哭
↳ #264 No.109353774
Anonymous · 2026-07-23 21:49
>>109344243
>only physical element at play is the electrons moving through your motherboard, riding motorcycles
>唯一起作用的物理元素就是骑着摩托车在你的主板上跑来跑去的电子
Wow
↳ #265 No.109354727
Anonymous · 2026-07-24 00:03
>>109353774
So why are you blatantly bumping the thread by posting empty replies such as this one? It's been going unnaturally like this for weeks. Please let it die.
那为什么你还要 blatantly 地发这种空洞回复来顶帖?这 unnatural 地拖了好几周了。让它死吧。
↳ #266 No.109354734
Anonymous · 2026-07-24 00:05
↳ #267 No.109355045
Anonymous · 2026-07-24 00:59
>>109354727
>why
>为什么
To make (You) seethe. Looks like it worked :-)
为了让 (You) 破防。看起来成功了 :-)
↳ #268 No.109355382
Anonymous · 2026-07-24 01:48
↳ #269 No.109355391
Anonymous · 2026-07-24 01:50
But moon outside is only a halfie not a fullie.
但外面的月亮只是半月不是满月啦。
图片: https://i.4cdn.org/g/1784857846141466.jpg
↳ #270 No.109355527
Anonymous · 2026-07-24 02:20
>>109274675
go back nigger.
滚回去,黑鬼。
↳ #271 No.109356676
Anonymous · 2026-07-24 06:39
>>109355382
>>109342854
Why is she doing weird arm things?
她为啥在做那些怪异的胳膊动作?
↳ #272 No.109356687
Anonymous · 2026-07-24 06:41
>>109356676
>stretching
>拉伸
>flexing
>摆姿势/展示肌肉
Do you think she should be in a T pose or something?
你觉得她该摆成 T 姿势之类的吗?
At least try harder with your fake bumps...
至少你那假顶帖也努力点啊...
↳ #273 No.109356716
Anonymous · 2026-07-24 06:47
>>109356676
she's stretching flexing and posing because she's staying fit and fast and strong
她伸展、秀肌肉、摆姿势,是为了保持身材苗条、速度敏捷和力量充沛
>inb4 someone branches "Fatass Lua"
>事先声明,有人要跑题去骂“Fatass Lua”了
↳ #274 No.109357710
Anonymous · 2026-07-24 10:51
I always loved Lua for its simplicity but as I've gotten older and more experienced I've realized dynamically typed languages just suck. I don't really see the point of it besides being a learning tool or a sandboxed environment for game mods.
我一直喜欢 Lua 的简洁,但随着年龄的增长和经验积累,我意识到动态类型语言真的不行。除了作为学习工具或在游戏模组的沙盒环境中,我真看不出它还有什么用处。
people always bitch about indexing from 1 and yeah that's bad, but the way metatables obscure what's happening is worse imo
人们总抱怨从 1 开始索引,没错,那确实不好,但在我看来,元表让行为变得隐蔽不清更糟糕
↳ #275 No.109359323
Anonymous · 2026-07-24 15:04
↳ #276 No.109359901
Anonymous · 2026-07-24 16:17
>>109231461
lua is a smol language. but this artist draws her as normal sized. i am disappoint.
lua 是个小巧的语言。但这画师把她画成了正常体型。我很失望。
↳ #277 No.109360252
Anonymous · 2026-07-24 16:56
>>109359901
She has big ambitions.
她有大志向。
↳ #278 No.109362600
Anonymous · 2026-07-24 21:43
>>109357710
>dynamically typed languages just suck
>动态类型语言真的不行
I guess it sucks if you're typeschizo like a Rustoddler or a Haskellfag. But not really.
大概如果你是个像 Rust 新手或 Haskell 老鸟那样对类型精神错乱的人,它会让你不爽。但说实话,也不一定。
↳ #279 No.109362839
Anonymous · 2026-07-24 22:22
>genderfluid dynamictrannies getting uppity
>性别流动的动态类型变性人开始趾高气扬
>i can be any type i want chud!!
>我想是什么类型就是什么类型,蠢货!!
your integer will never be a real string
你的整数永远变不成真正的字符串
↳ #280 No.109362923
Anonymous · 2026-07-24 22:33
>I must make everything in my life relate to trannies somehow, yes even integers
>我必须把我生活中的每件事都和变性人扯上关系,没错,甚至包括整数
/pol/ was a mistake.
/pol/ 是个错误。
↳ #281 No.109363224
Anonymous · 2026-07-24 23:29
>>109357710
lua is designed to be use to build configuration DSLs
lua 被设计用来构建配置领域的特定语言(DSL)
↳ #282 No.109364590
Anonymous · 2026-07-25 03:52
>>109363224
lua is designed
lua 是被设计
↳ #283 No.109364659
Anonymous · 2026-07-25 04:07
lua is based.
lua 很屌。
first programming langauge i taught myself when i was 15 so i could make games on roblox.
我 15 岁时自学的第一个编程语言,就是为了能在 Roblox 上做游戏。
↳ #284 No.109365056
Anonymous · 2026-07-25 05:25
>>109231461
>>109231492
>>109306066
>>109342854
I love Lua-tan pleaes keep making these!
我爱 Lua-tan,请继续做这种图!
↳ #285 No.109365433
Anonymous · 2026-07-25 06:56
>>109340693
Draw it as an animu?
画成动漫人物呢?
↳ #286 No.109365442
Anonymous · 2026-07-25 06:58
>>109336804
Where is Fortran?
Fortran 呢?
↳ #287 No.109365475
Anonymous · 2026-07-25 07:11
>>109362665
>let a value be the type that it is naturally
>让值保持它自然的类型
Which is...
也就是说……
↳ #288 No.109365737
Anonymous · 2026-07-25 08:15
>>109365475
A heterosexual variable simply has the type of the value that was assigned to it, and isn't worried about anything else.
异性恋变量仅仅拥有被赋值给它的值的类型,而不关心其他任何东西。
(如果你觉得这篇文章有启发,可以点击这里付费)
本站总访问量 次访客数 人