I haven't tried it yet, but I don't believe it would get very far since I haven't yet exposed ways to load Lua code from Lua modules (`dofile`, `load`, `require`, etc.). I've been building up my own test suite[1] while working through the reference manual[2]. I had never really used Lua before this, so it's been pretty interesting learning the language while implementing it.
> Do you have some benchmarks to compare the speed?
I've been using programs from the benchmarks game[3] and comparing them against regular Lua on my machine. On these programs, the overhead is usually somewhere around 2-3x. I believe that's mostly because these programs tend to be very mutation heavy. It's also possible that the way I'm compiling things down to Racket is defeating optimizations, but I haven't yet dug in.
If you're curious, you can get it to print the code it generates for any given module by setting the `RACKET_LUA_DEBUG` env var to `x` before running some code. Eg:
$ echo -e '#lang lua\nprint(1)' > test.lua
$ env RACKET_LUA_DEBUG=x racket test.lua
<<test.lua>>
'((#%provide #%chunk)
(#%define _ENV (#%global))
(#%load-stdlib! _ENV)
(#%define (#%lua-module . #%rest) (#%begin (#%begin (print 1)) (#%values)))
(#%define #%chunk (#%adjust (#%lua-module))))
1
> What is the problem with scientific notation? Racket can parse floating point numbers, including some weird cases [1], but I guess Lua has a slightly different set of weird cases.Yup. I just haven't gotten around to it. My goal this week has been to get it to a usable spot for embedding in my app and then iterate from there.
[1]: https://github.com/Bogdanp/racket-lua/tree/master/lua-test/l...
[2]: https://www.lua.org/manual/5.4/manual.html
[3]: https://benchmarksgame-team.pages.debian.net/benchmarksgame/