Skip to content

Instantly share code, notes, and snippets.

View metatablecat's full-sized avatar
🏳️‍⚧️
trans rights

T 'Filtered' C metatablecat

🏳️‍⚧️
trans rights
View GitHub Profile
@metatablecat
metatablecat / b64.lua
Last active May 2, 2024 17:26
The fastest luau base64 library in the west. This has been benchmarked within Roblox Luau, results may vary
local SEQ = {
[0] = "A", "B", "C", "D", "E", "F", "G", "H",
"I", "J", "K", "L", "M", "N", "O", "P",
"Q", "R", "S", "T", "U", "V", "W", "X",
"Y", "Z", "a", "b", "c", "d", "e", "f",
"g", "h", "i", "j", "k", "l", "m", "n",
"o", "p", "q", "r", "s", "t", "u", "v",
"w", "x", "y", "z", "0", "1", "2", "3",
"4", "5", "6", "7", "8", "9", "+", "/",
}
@metatablecat
metatablecat / Create.lua
Created February 6, 2024 18:53
A tiny tree object creator dervived from Create.lua syntax, RBXCreate is provided as an example.
local Create = {}
local function fastMixedTableSplit(t)
local l = #t
if l == 0 then return {} end
local out = table.move(t, 1, l, 1, {})
table.move({}, 1, l, 1, t)
return out
end