racket-lua
lffiutils
racket-lua | lffiutils | |
---|---|---|
2 | 1 | |
52 | 9 | |
- | - | |
8.0 | 10.0 | |
4 months ago | over 6 years ago | |
Racket | Shell | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
racket-lua
-
Lang Lua
> On these programs, the overhead is usually somewhere around 2-3x.
Nice!
> It's also possible that the way I'm compiling things down to Racket is defeating optimizations, but I haven't yet dug in.
Part of the secret of the reimplementation Racket on top of Chez Scheme is that there are many macros pretending to be functions. The optimization pass inlines some of the functions, but sometimes the heuristic is not good enough, and you must cheat using a macro. (And sometimes the "obvious" improvements are wrong, and using a macro to force the expansion of the code has a worse result.)
For example in https://github.com/Bogdanp/racket-lua/blob/master/lua-lib/pr... I'd try using a macro to inline the fast case where both numbers are exact integers, and then call a real function for the slow cases. (Is it common that someone wants to use 7.0 to do bit operations? Perhaps it's better to inline more. That's the tricky part, understanding which is the best split. I'm not sure. Probably only Matthew knows.)
lffiutils
What are some alternatives?
TypeScriptToLua - Typescript to lua transpiler. https://typescripttolua.github.io/
tl - The compiler for Teal, a typed dialect of Lua
quickjs - Public repository of the QuickJS Javascript Engine.
haxe - Haxe - The Cross-Platform Toolkit
lua-languages - Languages that compile to Lua