5 ms·
I got the impression during my deep dive that it was elegantly designed and written code that solved problems that were a good two levels above my current exper
by camperman 10y ago
I got the impression during my deep dive that it was elegantly designed and written code that solved problems that were a good two levels above my current experience. I don't think it's the place to go if you want to understand how Lua works or how JITs work. If you have a good working knowledge of those (I'm getting there) then you will be able to appreciate the codebase more.
- armitron 10y agoOne should not need good working experience of how Lua works or how JITs work in order to rapidly achieve a basic understanding of the codebase. I am being downvoted because people can't look past personal likes/dislikes and are conditioned to look uncritically at software that they like/depend on. Yet the obvious point I'm making here has nothing to do with the quality of LuaJIT as a tool that can solve problems. There are lots of examples of powerful, high-quality software that sits on an atrocious, impossible-to-understand codebase (e.g. pretty much anything by fabrice bellard, which ironically enough, some even consider as _good_ C) and while LuaJIT may not be at that level, it's not currently _good enough_. I think we need to move past personality-worship and start striving for quality where it matters. Read this thread and you'll find numerous posts referring to Mike Pall as an alien/god-of-coding and so on. This is not at all helpful. A software project that is positioned as something with staying power and a base for others to build on should be judged more on its ability to attract and maintain a community around it rather than its creator/profit that it generates/other superficial attributes. It is for this reason that a well-documented codebase that facilitates understanding is of _paramount importance_.
- dream-on 10y agoAre there not many projects that cater to what your preferences? Why would you care to comment about this one? Maybe Google, Microsoft, Facebook or some other worshipped employer has a "well-documented codebase" project that "facilitates understanding" for you to work on. Sometimes software written by only one person turns out to be the best software available for the job, because it is the smallest and fastest. No one is forcing anyone to use it. We should be thankful for persons who do this work that they share it with us. On the contrary, there is a cargo cult mentality that pervades the large, popular languages where online discourse continually devolves into attempts to persuade people to use the popular language as a solution for every problem.
- dang 10y ago> I am being downvoted because people can't Please don't go on about downvotes as a rhetorical device. That's a variant of the complaining that the site guidelines ask us all not to do: https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html.
- camperman 10y agoGood points. Perhaps Luajit does need to be refactored into something more understandable to attract more people if it's going to survive in the long term. The major problem that I see is that we need another Mike Pall but with the added ability of writing code comprehensible by mere mortals.
- dividuum 10y agoI'm not sure you can refactor away the complexity of LuaJIT. It will always end up somewhere as a complete jit'ing compiler with no external dependencies just is inherently a complex beast. What might make sense it to have a more accessible documentation on how LuaJIT works. There are blog posts, mailing list posts and source code comments that probably give an almost complete picture, but there is not central place to find it all.
- mikemike 10y agoNo. You DO need a good understanding of a computer language and of JIT compilers to understand the code base for any just-in-time compiler for that computer language. LuaJIT is not a toy compiler from a textbook. There's a lot of inherent complexity in a production compiler that employs advanced optimizations and needs to work on various CPU architectures and operating systems. This reflects in the code.