Skip to content

Instantly share code, notes, and snippets.

View Mark-Marks's full-sized avatar

Magic Mark-Marks

View GitHub Profile
@Mark-Marks
Mark-Marks / loader.luau
Created December 18, 2025 09:56
Roblox module loader with topological sorting via dependency resolution
type Array<T> = { T }
type Map<K, V> = { [K]: V }
type Graph<T> = Map<T, Array<T>>
-- Based on Kahn's algorithm
local function toposort<T>(graph: Graph<T>): Array<T>
local in_degree: Map<T, number> = {}
for node, neighbors in graph do
in_degree[node] = 0
for _, neighbor in neighbors do
@Mark-Marks
Mark-Marks / palette.luau
Last active September 28, 2025 12:39
Van Kanagawa
local palette = {
base = "#1a1a22",
surface = "#1F1F28",
overlay = "#2A2A37",
muted = "#707b77",
subtle = "#707b77",
text = "#d7d6c6",
red = "#a9471a",
yellow = "#d3b04f",
cyan = "#a2d0d2",
@Mark-Marks
Mark-Marks / pesde.schema.json
Last active January 4, 2025 20:40
pesde toml schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"required": ["name", "version", "target"],
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"pattern": "[a-zA-Z0-9_]+\\/[a-zA-Z0-9_]+",
"title": "The name of the package.",
@Mark-Marks
Mark-Marks / framework.luau
Created April 28, 2024 12:23
A tiny module loader with lifecycles for Roblox
export type Singleton = {
start: (() -> ())?,
[string]: any,
}
local Framework = {}
Framework.modules = {} :: { ModuleScript }
Framework.started = false