5 ms·
I discovered this technique only a few months ago, and couldn't agree more. I also cannot believe I've missed out on it for so long, having been a software eng
by stakhanov 4y ago
I discovered this technique only a few months ago, and couldn't agree more. I also cannot believe I've missed out on it for so long, having been a software engineer professionally for 13 years now, with 10 years of computer science specific education before that. How is this not taught in every computer science curriculum?
- aa-jv 4y agoI think it once was taught, but was considered passé in various places during the "Java" revolution, and in general I think there is a degradation of capabilities in most comp-sci programs, a consequence of interference by market players who invest in the schools in order to keep their technologies relevant. If anyone reading this wants to see what the fuss is, you can get started very easily with antirez' (Redis fame) simple toy project, LOAD81 - which is a great example of just how powerful things can get when you bring Lua into your life. (http://github.com/antirez/load81.git http://github.com/antirez/load81.git) - note that this is a great project to learn this technique, but if you do anything interesting in the load81 context - please push it back to LOAD81. :)
- stakhanov 4y agoThere's also the book "Creating Solid APIs with Lua" by Tyler Neylon [1,2] which seems to be quite specifically addressing this idea of embedding lua in something so as to implement highly-movable application logic in lua rather than the something you started out with. [1] https://www.oreilly.com/library/view/creating-solid-apis/9781491986301/ https://www.oreilly.com/library/view/creating-solid-apis/978... [2] https://github.com/tylerneylon/APIsWithLua https://github.com/tylerneylon/APIsWithLua
- aa-jv 4y agoGreat references, thanks for that! I'll add that book to my library and give it to folks when I recommend they learn the VM+execution environment technique.
- eliasdaler 4y agoThanks a lot! Never heard of this book. Will read it and mention it in the article if I enjoy it. :)
- eliasdaler 4y agoIt's a shame that Java (and JavaScript) replaced the "Lua with C/C++/whatever" approach. JavaScript is incredibly hard to write in a "correct" way. It has way too many quirks and an incredibly complex tooling system (npm, etc.). Lua is pretty much a "minimal" language which gets things done. It's not perfect, but it certainly doesn't suffer from the bloat which many other languages have.
- aa-jv 4y agoI agree with you completely, Javascript has been a step backwards from what could have been, had we been teaching teenagers to glom the VM onto C/C++ layers. This is just a much better approach than 'npm all the things' .. although Lua isn't without its warts: LuaJIT, LuaRocks, 5.1, 5.2, 5.3 ..