3 ms·
Checking the Github repo, it says 92.3% C[1], 2.6% Lua[2], why does the author claim it's a "text editor written in Lua" instead? [1]: https://github.com/rxi/l
by devy 6y ago
Checking the Github repo, it says 92.3% C[1], 2.6% Lua[2], why does the author claim it's a "text editor written in Lua" instead?
[1]: https://github.com/rxi/lite/search?l=c https://github.com/rxi/lite/search?l=c
[2]: https://github.com/rxi/lite/search?l=lua https://github.com/rxi/lite/search?l=lua
- ccmcarey 6y agoIt seems to include the entirety of Lua - https://github.com/rxi/lite/tree/master/src/lib/lua52 https://github.com/rxi/lite/tree/master/src/lib/lua52 Which is written in C.
- moonchild 6y agoOdd that they chose lua 5.2. The most popular luas nowadays are 5.1 (the version that luajit implements), and 5.3 (which was for a long time the 'latest and greatest', though it's been superseded by 5.4).
- aeosynth 6y ago5.4 hasn't officially released (it's in the RC stage) so 5.3 is still the latest stable/supported version.
- codemac 6y agoThey have all of the lua implementation checked in, which they didn't write. Most of the implementation is oddly in the "data" folder.
- hawski 6y agoIf you check the C sources you'll find that it's Lua itself and libSDL.
- pentlander 6y agoProbably because that C code is the embedded Lua interpreter. See the lua.h file, there's the copyright notice at the bottom.
- LukeShu 6y agoBecause it has complete copies of Lua 5.2 (src/lib/lua52), stb truetype (src/lib/stb), and SDL2 (winlib/SDL2-2.0.10) checked in. Excluding those, it's 1369 lines of C (.c or .h), and 5389 lines of Lua (.lua), and 112 lines of other files (license, readme, build scripts...); or 78.4% Lua, 19.9% C, and 1.6% other. I didn't count fonts or images (.ttf, .ico, or .inl).