{"id":27056354,"url":"https://github.com/firedragon91245/lua-5.4.6-custom","last_synced_at":"2026-04-24T16:33:11.003Z","repository":{"id":221132064,"uuid":"748736209","full_name":"FireDragon91245/lua-5.4.6-custom","owner":"FireDragon91245","description":"A modifyed version of the lua.org interpreter aiming to add new metatable functionality","archived":false,"fork":false,"pushed_at":"2025-01-15T19:29:33.000Z","size":2870,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T10:17:06.639Z","etag":null,"topics":["customization","fork","interpreter","lua","lua-interpreter"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FireDragon91245.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-26T16:49:17.000Z","updated_at":"2025-01-15T19:29:35.000Z","dependencies_parsed_at":"2024-07-24T16:58:01.289Z","dependency_job_id":"d1033742-32ac-4a3c-9202-a4d9acc3b62c","html_url":"https://github.com/FireDragon91245/lua-5.4.6-custom","commit_stats":null,"previous_names":["firedragon91245/lua-5.4.6-custom"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/FireDragon91245/lua-5.4.6-custom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireDragon91245%2Flua-5.4.6-custom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireDragon91245%2Flua-5.4.6-custom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireDragon91245%2Flua-5.4.6-custom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireDragon91245%2Flua-5.4.6-custom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FireDragon91245","download_url":"https://codeload.github.com/FireDragon91245/lua-5.4.6-custom/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FireDragon91245%2Flua-5.4.6-custom/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32230952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["customization","fork","interpreter","lua","lua-interpreter"],"created_at":"2025-04-05T10:17:10.183Z","updated_at":"2026-04-24T16:33:10.968Z","avatar_url":"https://github.com/FireDragon91245.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# This is a modified version of the lua Interpreter\nOriginal Version Lua 5.4.6 from [here](https://www.lua.org/)\n[Download Page](https://www.lua.org/download.html)\n[Direct Download](https://www.lua.org/ftp/lua-5.4.6.tar.gz)\n\n## Modifications\n- Added '__override' metamethod that is called when a existing key in a table is asigned a new value\n- -\u003e If __override exists gets called and the default asignment is cancled\n\nExample:\n```lua\nlocal t = {}\nsetmetatable(t, {\n    __override = function(table, key, new_value, old_value)\n        print(\"override\", key, new_value, old_value)\n    end\n})\n\nt.a = 1\nprint(\"a value\", t.a)\nt.a = 2 -- __override gets called default asignment is cancled\nprint(\"a value\", t.a)\n\n-- stdout:\n-- a value 1\n-- override a 2 1\n-- a value 1\n```\n\n## Why?\n**🤓 am actualy you can use proxy tables**  \nyes youre correct you can recreate __override with proxytables\n```lua\nlocal table = {}\nlocal backing_table = {}\nlocal proxy = {\n    __index = function (t, k)\n        return backing_table[k]\n    end,\n    __newindex = function (t, k, v)\n        if backing_table[k] then\n            print(\"override\", k, v, backing_table[k])\n        else\n            backing_table[k] = v\n        end\n    end\n}\n\nsetmetatable(table, proxy)\n\n\ntable.a = 1\nprint(\"a value\", table.a)\ntable.a = 2\nprint(\"a value\", table.a)\n```\n\nexact same output as __override\n\n### BUT\ntry creating a proxyed proxy table on a table  \nthis simple example:\n```lua\nlocal table = {}\nlocal backing_table = {}\n\nlocal proxy = {}\nlocal backing_proxy = {\n    __newindex = function(self, key, value)\n        print(\"newindex in table\")\n        backing_table[key] = value\n    end,\n    __index = function(self, key)\n        print(\"index in table\")\n        return backing_table[key]\n    end\n}\n\nlocal proxy_proxy = {\n    __newindex = function(self, key, value)\n        print(\"newindex in proxy\")\n        backing_proxy[key] = value\n    end,\n    __index = function(self, key)\n        print(\"index in proxy\")\n        return backing_proxy[key]\n    end\n}\n\nsetmetatable(proxy, proxy_proxy)\nsetmetatable(table, proxy)\n\ntable.a = 0\n```\n\nobviously this wont work because how would table know about its metatable  \nits metatable is the backing_proxy  \nso it would need to do table -\u003e check for __index in its metatable (__index not found) -\u003e ckeck if the metatable of table has a metatable and if that metatable of the metatable has __index (and this step lua wont do)  \n\n**🤓 am actualy you can use recursive __index by defining __index as a table in proxy**\n\nyes you can define __index, in proxy to get a recusive call up to where you want but then the proxy table for __index wont work you cant detect if a __index is being overwritten becuase __index is already defined in proxy so __newindex of the poxy wont be called in the poxy_proxy  \n\nthats why __override exists, to make proxied proxy tables posible  \nby defining __override for the proxy you can catch __index for example, being overwritten  \n\n#### BUT WHY??!!\n\nits for my lua-oop project it makes heavy use of scopes,\n\na scope is just another layer of metatable pushed infront of the current _ENV while the old scope is set as __index of the new scope,\n\nso a scope could look like this (inner/current scope to outer/old scope)\n\n{ class = { name = \"\"} } =\u003e (__index) =\u003e { myImportedValue = 1, somotherimport = false } =\u003e (__index) =\u003e _ENV\n\n**but whats the problem?? why do you need proxied proxy tables?**\n\nwell what is when the user wants to define a custom metamethod??\n\nwell the user is out of luck, every _ENV already has the common metamethods because of the OOP scoping system so i implementetd \"mmtables\" (Muli Meta tables)  \n1 table can have more then 1 meta method of the same type by applying a poxy on the metatable, and because of the problem above a custom solution like __override is requred  \n\n# Original README\nThis is Lua 5.4.6, released on 02 May 2023.\n\nFor installation instructions, license details, and\nfurther information about Lua, see doc/readme.html.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiredragon91245%2Flua-5.4.6-custom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffiredragon91245%2Flua-5.4.6-custom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiredragon91245%2Flua-5.4.6-custom/lists"}