3 ms·
Lua is a beautiful language, I'm glad the switch worked out for you guys!
by bitmadness 11y ago
Lua is a beautiful language, I'm glad the switch worked out for you guys!
- Latty 11y agoI really don't see the 'beautiful language' part. I tried LUA for the first time making a custom game mode for DOTA2 a while back (so admittedly not a huge amount of experience), and the language just seemed terrible to work with. Its focus on keeping the language simple meant that the standard library and language features are so bare-bones doing the most basic things was a huge chore.
- boultonmark 11y agoI agree. Horrible language. Size isn't everything
- ufo 11y agoI'm wondering what were the bigger pain points for you. I suspect that the bigger problem in your case is that you used Lua in an embedded setting with few libraries available (which is kinda intentional from the Dota devs)
- brimworks 11y agoHere are some things that I think are "beautiful" about Lua: [a] Here is the complete syntax of Lua: http://www.lua.org/manual/5.2/manual.html#9 http://www.lua.org/manual/5.2/manual.html#9 ...compare that to Perl where there is no "complete syntax" of Perl. This shows how simple it is and thus it is easier to write tools for and teach others how to use it. [b] The complete default API consists of ~200 functions: http://www.lua.org/manual/5.2/contents.html#index http://www.lua.org/manual/5.2/contents.html#index [c] The defacto book on learning the complete language (including the C interface) is 366 pages: http://www.amazon.com/dp/859037985X http://www.amazon.com/dp/859037985X Simplicity is beauty IMHO. I would expect any competent developer to get up to speed on the Lua language within a week, it would then take them another couple of weeks to get up to speed on the libraries we use with Lua. The real power in Lua comes when you couple it with competent APIs that do the "real" work. The Distelli Agent uses libuv for the OS interface, libcrypto (part of openssl) for the crypto primitives, zlib for compression, LPeg for parsing, sqlite for an embedded DB, etc. The job of the Lua code is simply to "tie" these core components together.