Re:LuaJIT Uses Rolling Releases
by keb_ on Friday August 25, 2023 @04:50PM
(#37266863)
I like Lua the language, but why is it and LuaJIT terrible to work with in your experience?
[ Parent
| on HN ]
I haven't looked at LuaJIT, but Lua is written in this weird bastard language using the C preprocessor. All of the terseness of Lisp, with no type system (since it's the C preprocessor), and the added fun of pointer arithmetic.
Would you mind elaborating on this? I'm perusing the source to try to make sense of this comment and all I see is... C.
Literally any header file in https://github.com/lua/lua
In particular, https://github.com/lua/lua/blob/master/ldo.h
Are you referring to Lua the language?
Or its implementation details (written in C)?
If the later, how does that make Lua, the language, bad?
I'm criticizing the implementation.
I have no complaints about the language (other than arrays starting at 1). I'm just salty because other people have said the implementation was really clean C, so I decided to spend a week porting it to C#, and I gave up. I could not figure out how closures were actually implemented, and I spent a day trying to understand it.
Re:LuaJIT Uses Rolling Releases
by JonChesterfield on Friday August 25, 2023 @06:56PM
(#37268064)
That weird bastard language is called C. It's really easy to hack on the lua codebase, either adding stuff to it or using it as the base for other languages. Provided you can read C, anyway.
Luajit has a really complicated build process. I'm more nervous about changing that codebase.