Stand alone Playdate extended Lua interpreter

I'm running my unit tests outside of the PlaydateSimulator as it's easier to capture and compare output, and it's just faster. I'm currently using the upstream Lua interpreter. However to do this, I can't use any of the Playdate extensions; in particular the additional assignment operators (+=, -=, and friends). That's slightly annoying. It also presents a challenge when using class("Name").extends(), as the class library itself relies on the extensions. I'm coping for now by using a modified copy of CoreLibs/object.lua, but that feels like I'm setting myself up for unpleasant future surprises.

Given all of that, it would be nice to have a standalone Lua interpreter that understood the Playdate extensions.

See Re: compound assignment patch for 5.4.0-beta

And lua-users wiki: Lua Power Patches

Which might get you most of the way there.

1 Like

ugh. Looks like they moved files around and my update to the compound assignment patch for 5.4.3 is MIA. I have another fix for it so I'll add that and put it somewhere they can't lose it. The 5.4.0-beta patch won't work on 5.4.3/4 as far as I recall.

1 Like

A out-of-the-box solution would be nice, but I can work with a source patch to the standard interpreter. I've never built Lua myself, but my understanding is that it's very boring ANSI C designed to be highly portable. It certainly can't be messier than the code I deal with for my day job. :smiley: