Skip to content

Instantly share code, notes, and snippets.

View JaRoLoz's full-sized avatar
🤫

Jaime Rodrigo JaRoLoz

🤫
  • Madrid, Spain
  • 19:48 (UTC +01:00)
View GitHub Profile
@meepen
meepen / lujlu.lua
Last active February 25, 2026 15:10
LuaJit VM in Lua. Comes with fully operational bytecode interpreter. License is: contact me before using it commercially. - Now runs itself inside itself and itself inside itself inside itself
local bytecodes = {}
local BC, run_function = {}
local VARG_CONST = {}
local lujlu_mt_funcs
local lujlu_cache = setmetatable({}, {__mode = "k"})
local lujlu_identifier_mt = {
__tostring = function(self)
return tostring(lujlu_cache[self].data)
end,
-- The base object `Object`
local Object = {}
Object.meta = {__index = Object}
-- Create a new instance of this object
function Object:create()
local meta = rawget(self, "meta")
if not meta then error("Cannot inherit from instance object") end
return setmetatable({}, meta)