[HN Gopher] Lua, a Misunderstood Language
       ___________________________________________________________________
        
       Lua, a Misunderstood Language
        
       Author : soapdog
       Score  : 40 points
       Date   : 2025-03-24 17:27 UTC (5 hours ago)
        
 (HTM) web link (andregarzia.com)
 (TXT) w3m dump (andregarzia.com)
        
       | Lasher wrote:
       | This article really hit home for me. On Aardwolf MUD we replaced
       | "mobprog" scripting with Lua based progs back in 2007/2008 and it
       | has been the single best change we ever made in 25+ years of our
       | game.
       | 
       | The experiences that area builders have been able to create goes
       | way beyond anything we envisioned - with 40 or so LUA functions
       | integrated into the C codebase and basic access to
       | rooms/objects/players and NPCs from Lua they have been able to
       | make entire sub games.
       | 
       | I couldn't imagine trying to build a full application with Lua,
       | but for this use case, it is perfect.
        
       | gowld wrote:
       | > There is no situation where Lua team, or LuaRocks team, can
       | prevent you from doing what you want like the drama that has been
       | happening inside the Elm community.
       | 
       | more discussion here:
       | 
       | https://news.ycombinator.com/item?id=22821447
       | 
       | https://news.ycombinator.com/item?id=38151749
        
       | norir wrote:
       | For programs less than about 10k lines or so, Lua exists in a
       | class of its own. It offers nearly optimal start up latency and
       | the interpreter is fast enough that it can interpret said 10k
       | lines about as fast as python can run hello, world. This means
       | you can iterate by configuring your editor to save on every
       | keystroke and in a terminal run say `ls foo.lua | entr -c
       | lua(jit) foo.lua` and get nearly instantaneous feedback with
       | every keystroke.
       | 
       | I feel so much more empowered with this workflow than anything
       | else out there. It is like a persistent repl (though you do have
       | to teach yourself how not to write infinite loops regularly). The
       | setup is so much lighter weight than an lsp and is actually more
       | responsive. Indeed, when I get feedback this frequently and
       | quickly, I find that I have little need for more advanced
       | features.
       | 
       | Eventually though, the lack of a type system does become a
       | problem as refactoring becomes difficult. I also dislike some of
       | the syntax. But there is a great solution to both of these
       | problems: use Lua to write a compiler for a new language and fix
       | those problems. That's what I did, so now I don't use Lua
       | anymore. But without Lua, I don't think I would have gotten to
       | where I am now.
        
       ___________________________________________________________________
       (page generated 2025-03-24 23:02 UTC)