3 ms·
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
by genter 3y ago
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.
- sctb 3y agoWould you mind elaborating on this? I'm perusing the source to try to make sense of this comment and all I see is... C.
- genter 3y agoLiterally any header file in https://github.com/lua/lua https://github.com/lua/lua In particular, https://github.com/lua/lua/blob/master/ldo.h https://github.com/lua/lua/blob/master/ldo.h
- alberth 3y agoAre you referring to Lua, the language? Or its implementation details (written in C)? If the later, how does that make Lua, the language, bad?
- genter 3y agoI'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.
- JonChesterfield 3y agoThat 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.
- Rochus 3y agoI would be more concerned about the high percentage of assembler than the build process.