HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
Bogdanp
racket-lua
Racket2022–2022
Bogdanp / racket-lua

racket-lua

A #lang implementation of Lua 5.4 for Racket.

2Distinct people
2Mentions
0Explicit recommenders
58GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A #lang implementation of Lua 5.4 for Racket.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by hour2 dated mentions

Observed mentions: 2022-11-13 06:08:41 UTC to 2022-11-13 16:14:16 UTC.

012022-11-13 06:00:00 UTC to 2022-11-13 07:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsNov 13, 06:002022-11-13 07:00:00 UTC to 2022-11-13 08:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-13 08:00:00 UTC to 2022-11-13 09:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-13 09:00:00 UTC to 2022-11-13 10:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-13 10:00:00 UTC to 2022-11-13 11:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-13 11:00:00 UTC to 2022-11-13 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsNov 13, 11:002022-11-13 12:00:00 UTC to 2022-11-13 13:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-13 13:00:00 UTC to 2022-11-13 14:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-13 14:00:00 UTC to 2022-11-13 15:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-13 15:00:00 UTC to 2022-11-13 16:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-13 16:00:00 UTC to 2022-11-13 17:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsNov 13, 16:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Nov 13, 06:002022-11-13 06:00:00 UTC2022-11-13 07:00:00 UTC101
Nov 13, 07:002022-11-13 07:00:00 UTC2022-11-13 08:00:00 UTC000
Nov 13, 08:002022-11-13 08:00:00 UTC2022-11-13 09:00:00 UTC000
Nov 13, 09:002022-11-13 09:00:00 UTC2022-11-13 10:00:00 UTC000
Nov 13, 10:002022-11-13 10:00:00 UTC2022-11-13 11:00:00 UTC000
Nov 13, 11:002022-11-13 11:00:00 UTC2022-11-13 12:00:00 UTC000
Nov 13, 12:002022-11-13 12:00:00 UTC2022-11-13 13:00:00 UTC000
Nov 13, 13:002022-11-13 13:00:00 UTC2022-11-13 14:00:00 UTC000
Nov 13, 14:002022-11-13 14:00:00 UTC2022-11-13 15:00:00 UTC000
Nov 13, 15:002022-11-13 15:00:00 UTC2022-11-13 16:00:00 UTC000
Nov 13, 16:002022-11-13 16:00:00 UTC2022-11-13 17:00:00 UTC101

What Hacker News says

2 sources
> 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
Read the rest
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.)
In #lang Lua
> How much of the standard Lua test suit can your implementation pass? 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 optimization
Read the rest
s, 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/
In #lang Lua

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.