Snow Captain on Nostr: I'm not sure Lua fits those requirements. You can probably restrict or remove its I/O ...
I'm not sure Lua fits those requirements. You can probably restrict or remove its I/O abilities, but I don't think it's designed to be computation-budgeted (if I understand what that's supposed to mean). Lua uses a byte-code virtual machine with a very clean, simple C ABI interface (and C library bindings to go with it). Indeed, I would be so bold as to equate Lua to "C script": it's small, simple, and powerful. C focuses on global/static variables, functions, and arrays. Lua focuses on global variables, functions, and tables (Lua tables are really key-value maps). Lua seems to answer the question "what if we turned C into a scripting language that could be re-executed at runtime without recompiling to machine code?" And for that purpose, Lua is great. My gripes with Lua stem from its simplicity and lack of safeguards around certain patterns, very similar to C. For embedded systems, I don't think Lua is a good idea; for games and other "non-critical" software that needs to support quick development and iteration of code and ideas, it's a very solid choice.
Published at
2023-12-08 20:52:20Event JSON
{
"id": "c666f0a46b57e4c2ffac0a321c410d5d6bcfd28ae03129c5b788177893e65612",
"pubkey": "811c17be8db3263fb0abb48fb7b416fcfa6681bb6eb0945c551e01394d1a262b",
"created_at": 1702068740,
"kind": 1,
"tags": [
[
"e",
"8299635a858cf023015b2414f2ff73967144102928d6b3fad2abd7cea0e21683",
"",
"root"
],
[
"e",
"eb0bb74288a1576f738d8042ea4bfe13d2f5f645392a4132e0c9b68c5ce930ce",
"wss://nos.lol/",
"reply"
],
[
"p",
"019edd0fc87f472d014cd2fb439b974d7a399d32b0e36840785dce528425e335"
]
],
"content": "I'm not sure Lua fits those requirements. You can probably restrict or remove its I/O abilities, but I don't think it's designed to be computation-budgeted (if I understand what that's supposed to mean). Lua uses a byte-code virtual machine with a very clean, simple C ABI interface (and C library bindings to go with it). Indeed, I would be so bold as to equate Lua to \"C script\": it's small, simple, and powerful. C focuses on global/static variables, functions, and arrays. Lua focuses on global variables, functions, and tables (Lua tables are really key-value maps). Lua seems to answer the question \"what if we turned C into a scripting language that could be re-executed at runtime without recompiling to machine code?\" And for that purpose, Lua is great. My gripes with Lua stem from its simplicity and lack of safeguards around certain patterns, very similar to C. For embedded systems, I don't think Lua is a good idea; for games and other \"non-critical\" software that needs to support quick development and iteration of code and ideas, it's a very solid choice.",
"sig": "40881afe50fbdc10071f03c72567451f7f8721626670006c2f8237fa1d1543325f568810ae15e8563b055f391e4da25ce9ac4693934783a63f604f5e27d1e45a"
}