repo stringclasses 350
values | file_path stringlengths 29 200 | language stringclasses 2
values | file_type stringclasses 4
values | code stringlengths 2 1.01M | tokens int64 2 598k |
|---|---|---|---|---|---|
pesde-pkg/scripts | pesde-pkg-scripts-ee149e2/.lune/lib/channel.luau | luau | .luau | --- An MPSC synchronization primitive powered by Lua upvalues which retains only
--- one value at a time.
--- ## Usage
--- ```luau
--- local send, recv = watch((nil :: any) :: string)
--- task.delay(5, send, "hello, world!")
--- task.spawn(function()
--- local value = recv()
--- print("received value:", value)... | 264 |
pesde-pkg/scripts | pesde-pkg-scripts-ee149e2/.lune/lib/exec.luau | luau | .luau | --> lib: Builder pattern class to spawn child processes
local process = require("@lune/process")
local stdio = require("@lune/stdio")
local CommandBuilder = {}
export type CommandBuilder = typeof(setmetatable(
{} :: CommandBuilderFields,
{ __index = CommandBuilder }
))
type CommandBuilderFields = {
program: strin... | 669 |
pesde-pkg/scripts | pesde-pkg-scripts-ee149e2/.lune/lib/manifest.luau | luau | .luau | local fs = require("@lune/fs")
local serde = require("@lune/serde")
export type SPDXLicense =
"MIT"
| "Apache-2.0"
| "BSD-2-Clause"
| "BSD-3-Clause"
| "GPL-2.0"
| "GPL-3.0"
| "LGPL-2.1"
| "LGPL-3.0"
| "MPL-2.0"
| "ISC"
| "Unlicense"
| "WTFPL"
| "Zlib"
| "CC0-1.0"
| "CC-BY-4.0"
| "CC-BY-SA-4.0"
| "BSL-... | 561 |
pesde-pkg/scripts | pesde-pkg-scripts-ee149e2/.lune/tests/init.luau | luau | .luau | --> Run tests using frktest runner
local fs = require("@lune/fs")
local process = require("@lune/process")
local frktest = require("../luau_packages/frktest")
local reporter = require("@self/reporter")
-- HACK: Cast require to allow for dynamic paths in strict mode
-- A more proper solution would be to use luau.load... | 617 |
pesde-pkg/scripts | pesde-pkg-scripts-ee149e2/.lune/typecheck.luau | luau | .luau | --> Run luau-lsp analysis to check for type errors
local process = require("@lune/process")
local CommandBuilder = require("./lib/exec")
process.exit(
CommandBuilder.new("luau-lsp")
:withArg("analyze")
:withArgs({ "--settings", ".vscode/settings.json" })
:withArgs({ "--ignore", "'**/.pesde/**'" })
:withArgs... | 125 |
pesde-pkg/scripts | pesde-pkg-scripts-ee149e2/src/generators/argon/sync_config.luau | luau | .luau | local rojoSyncConfig = require("../rojo/sync_config")
export type TreeProperties = rojoSyncConfig.TreeProperties
export type TreeBase = rojoSyncConfig.TreeBase
export type TreeNormal = rojoSyncConfig.TreeNormal
export type TreeService = rojoSyncConfig.TreeService
export type DataModelTree = rojoSyncConfig.DataModelTre... | 228 |
pesde-pkg/scripts | pesde-pkg-scripts-ee149e2/src/generators/rojo/sync_config.luau | luau | .luau | local fs = require("@lune/fs")
local process = require("@lune/process")
local serde = require("@lune/serde")
export type TreeProperties = {
Name: never?,
Parent: never?,
}
export type TreeBase = {
["$className"]: string?,
["$ignoreUnknownInstances"]: boolean?,
["$path"]: string | { optional: string }?,
["$prope... | 843 |
pesde-pkg/scripts | pesde-pkg-scripts-ee149e2/src/init.luau | luau | .luau | return {
generators = {
rojo = {
sourcemap = require("@self/generators/rojo/sourcemap"),
syncConfig = require("@self/generators/rojo/sync_config"),
},
argon = {
sourcemap = require("@self/generators/argon/sourcemap"),
syncConfig = require("@self/generators/argon/sync_config"),
},
},
}
| 101 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/.config.luau | luau | .luau | return {
luau = {
languagemode = "strict",
lint = { ["*"] = true },
linterrors = true,
aliases = {
batteries = "./Packages/lute/batteries",
src = "./src",
std = "~/.lute/typedefs/0.1.0/std",
},
},
}
| 82 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/.lute/generate.luau | luau | .luau | -- Run with: lute run generate
-- Unicode data files live in unicode-data/ and are refreshed with: lute run fetch-data
local fs = require("@std/fs")
local path = require("@std/path")
local config = require("./lib/config")
local emitModule = require("./lib/emit-module")
local parseProperties = require("./lib/parse-pro... | 3,030 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/.lute/lib/config.luau | luau | .luau | local UNICODE_VERSION = "17.0.0"
return {
UNICODE_VERSION = UNICODE_VERSION,
UNICODE_BASE_URL = "https://www.unicode.org/Public/" .. UNICODE_VERSION .. "/ucd/",
UNICODE_DATA_DIR = "unicode-data",
UNICODE_FILES = {
"auxiliary/GraphemeBreakProperty.txt",
"auxiliary/WordBreakProperty.txt",
"auxiliary/SentenceBr... | 156 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/.lute/lib/emit-module.luau | luau | .luau | local fs = require("@std/fs")
local base64 = require("@src/base64")
type EmitOptions = {
categories: { string },
rangeBuffer: buffer,
asciiBuffer: buffer,
}
local function encodeBuffer(data: buffer): string
return buffer.tostring(base64.encode(data))
end
local function renderDataModule(options: EmitOptions): st... | 374 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/.lute/lib/fuzz-word.luau | luau | .luau | local base64 = require("@src/base64")
local fs = require("@std/fs")
local segmenter = require("@src")
local wordData = require("@src/generated/word-data")
local BYTES_PER_RANGE = 8
local CODEPOINT_MASK = 0x1FFFFF
local CATEGORY_SHIFT = 21
local MAX_CODEPOINT = 0x10FFFF
local SURROGATE_START = 0xD800
local SURROGATE_E... | 2,277 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/.lute/lib/parse-properties.luau | luau | .luau | local function trim(value: string): string
return (value:gsub("^%s+", ""):gsub("%s+$", ""))
end
local function parseRangeToken(token: string): (number | nil, number | nil)
local rangeStart, rangeEnd = token:match("^(%x+)%.%.(%x+)$")
if rangeStart == nil then
rangeStart = token:match("^(%x+)$")
rangeEnd = rangeS... | 694 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/.lute/lib/parse-tests.luau | luau | .luau | local function isSurrogate(codepoint: number): boolean
return codepoint >= 0xD800 and codepoint <= 0xDFFF
end
local function codepointsToString(codepoints: { number }): string
local parts = table.create(#codepoints)
for index, codepoint in codepoints do
parts[index] = utf8.char(codepoint)
end
return table.conc... | 460 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/src/base64.luau | luau | .luau | --!native
--!optimize 2
local lookupValueToCharacter = buffer.create(64)
local lookupCharacterToValue = buffer.create(256)
local alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
local padding = string.byte("=")
for index = 1, 64 do
local value = index - 1
local character = string.byte(... | 1,875 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/src/core.luau | luau | .luau | --!native
--!optimize 2
local alphabeticData = require("./generated/alphabetic-data")
local graphemeData = require("./generated/grapheme-data")
local incbData = require("./generated/incb-data")
local numericData = require("./generated/numeric-data")
local sentenceData = require("./generated/sentence-data")
local types... | 1,771 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/src/generated/alphabetic-data.luau | luau | .luau | -- This file was @generated by .lute/generate.luau. Do not edit.
local base64 = require("../base64")
local rangeData = base64.decode(
buffer.fromstring(
"QQAAAFoAIABhAAAAegAgAKoAAACqACAAtQAAALUAIAC6AAAAugAgAMAAAADWACAA2AAAAPYAIAD4AAAAwQIgAMYCAADRAiAA4AIAAOQCIADsAgAA7AIgAO4CAADuAiAARQMAAEUDIABjAwAAdAMgAHYDAAB3AyAAegM... | 5,230 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/src/generated/emoji-data.luau | luau | .luau | -- This file was @generated by .lute/generate.luau. Do not edit.
local base64 = require("../base64")
local rangeData = base64.decode(
buffer.fromstring(
"qQAAAKkAIACuAAAArgAgADwgAAA8ICAASSAAAEkgIAAiIQAAIiEgADkhAAA5ISAAlCEAAJkhIACpIQAAqiEgABojAAAbIyAAKCMAACgjIADPIwAAzyMgAOkjAADzIyAA+CMAAPojIADCJAAAwiQgAKolAACrJSAAtiU... | 1,201 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/src/generated/incb-data.luau | luau | .luau | -- This file was @generated by .lute/generate.luau. Do not edit.
local base64 = require("../base64")
local rangeData = base64.decode(
buffer.fromstring(
"FQkAADkJIABNCQAATQlAAFgJAABfCSAAeAkAAH8JIACVCQAAqAkgAKoJAACwCSAAsgkAALIJIAC2CQAAuQkgAM0JAADNCUAA3AkAAN0JIADfCQAA3wkgAPAJAADxCSAAlQoAAKgKIACqCgAAsAogALIKAACzCiAAtQo... | 767 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/src/generated/numeric-data.luau | luau | .luau | -- This file was @generated by .lute/generate.luau. Do not edit.
local base64 = require("../base64")
local rangeData = base64.decode(
buffer.fromstring(
"MAAAADkAIACyAAAAswAgALkAAAC5ACAAvAAAAL4AIABgBgAAaQYgAPAGAAD5BiAAwAcAAMkHIABmCQAAbwkgAOYJAADvCSAA9AkAAPkJIABmCgAAbwogAOYKAADvCiAAZgsAAG8LIAByCwAAdwsgAOYLAADyCyAAZgw... | 1,118 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/src/generated/word-data.luau | luau | .luau | -- This file was @generated by .lute/generate.luau. Do not edit.
local base64 = require("../base64")
local rangeData = base64.decode(
buffer.fromstring(
"CgAAAAoAIAELAAAADACgAQ0AAAANAEAAIAAAACAAIAIiAAAAIgBgACcAAAAnAAACLAAAACwAYAEuAAAALgCAATAAAAA5AMABOgAAADoAQAE7AAAAOwBgAUEAAABaACAAXwAAAF8AoABhAAAAegAgAIUAAACFAKABqgA... | 7,698 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/src/grapheme.luau | luau | .luau | --!native
--!optimize 2
local core = require("./core")
local graphemeData = require("./generated/grapheme-data")
local types = require("./types")
type Segment = types.GraphemeSegment
local categories = graphemeData.categories
local GC_ANY = categories.Any
local GC_CR = categories.CR
local GC_CONTROL = categories.Con... | 1,304 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/src/init.luau | luau | .luau | local core = require("@self/core")
local grapheme = require("@self/grapheme")
local graphemeData = require("@self/generated/grapheme-data")
local sentence = require("@self/sentence")
local sentenceData = require("@self/generated/sentence-data")
local types = require("@self/types")
local word = require("@self/word")
loc... | 536 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/src/sentence.luau | luau | .luau | --!native
--!optimize 2
local core = require("./core")
local sentenceData = require("./generated/sentence-data")
local types = require("./types")
type Segment = types.SentenceSegment
local categories = sentenceData.categories
local SC_ATERM = categories.ATerm
local SC_CR = categories.CR
local SC_CLOSE = categories.... | 1,999 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/src/types.luau | luau | .luau | export type Range = {
from: number,
to: number,
category: number,
}
export type Segment = {
segment: string,
index: number,
}
export type WordSegment = {
segment: string,
index: number,
isWordLike: boolean,
}
export type SentenceSegment = Segment
export type GraphemeSegment = Segment
return nil
| 73 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/src/word.luau | luau | .luau | --!native
--!optimize 2
local core = require("./core")
local emojiData = require("./generated/emoji-data")
local types = require("./types")
local wordData = require("./generated/word-data")
type WordSegment = types.WordSegment
local categories = wordData.categories
local WC_ANY = categories.Any
local WC_ALETTER = ca... | 3,323 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/tests/codegen.test.luau | luau | .luau | local fs = require("@std/fs")
local test = require("@std/test")
local base64 = require("@src/base64")
local core = require("@src/core")
local parseProperties = require("../.lute/lib/parse-properties").parseProperties
local parseTests = require("../.lute/lib/parse-tests").parseTestData
local emitModule = require("../.... | 675 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/tests/grapheme.test.luau | luau | .luau | local test = require("@std/test")
local segmenter = require("@src")
local testData = require("./test-data")
test.suite("GraphemeBreakTest", function(suite)
for index, entry in testData.grapheme do
suite:case(`case_{index}`, function(assert)
local result = segmenter.splitGraphemes(entry.input)
assert.eq(entry... | 815 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/tests/sentence.test.luau | luau | .luau | local test = require("@std/test")
local segmenter = require("@src")
local testData = require("./test-data")
test.suite("SentenceBreakTest", function(suite)
for index, entry in testData.sentence do
suite:case(`case_{index}`, function(assert)
local result = segmenter.splitSentences(entry.input)
assert.eq(entry... | 368 |
BrookenRecord/unicode-segmentation | BrookenRecord-unicode-segmentation-5087607/tests/word.test.luau | luau | .luau | local test = require("@std/test")
local segmenter = require("@src")
local testData = require("./test-data")
local types = require("@src/types")
local wordRuntime = require("@src/word")
local function collectWordLike(input: string): { string }
local segments = segmenter.words(input)
local output = {}
for _, entry i... | 2,298 |
EgoMoose/ordered-dictionary-luau | EgoMoose-ordered-dictionary-luau-2aa02e8/lune/jest-test.luau | luau | .luau | local fs = require("@lune/fs")
local serde = require("@lune/serde")
local roblox = require("@lune/roblox")
local run = require("@utils/run")
local function enableFFlagEnableLoadModule()
local hadFolder = true
local pathToStudio = roblox.studioApplicationPath():gsub("\\", "/")
local clientSettingsFolderPath = pathTo... | 370 |
EgoMoose/ordered-dictionary-luau | EgoMoose-ordered-dictionary-luau-2aa02e8/lune/wally-install.luau | luau | .luau | local fs = require("@lune/fs")
local run = require("@utils/run")
run("wally", { "install" })
for _, folderName in { "Packages", "DevPackages", "ServerPackages" } do
if not fs.isDir(folderName) then
fs.writeDir(folderName)
end
end
run("rojo", { "sourcemap", "develop.project.json", "-o", "sourcemap.json" })
for _,... | 154 |
EgoMoose/ordered-dictionary-luau | EgoMoose-ordered-dictionary-luau-2aa02e8/src/init.luau | luau | .luau | --[=[
@class OrderedDictionary
A generic dictionary that preserves the order in which keys are inserted.
Entries are stored in a doubly linked list, so insertion, replacement, and
removal are all O(1). Positional lookups (`keyAtIndex`/`indexAtKey`) are
served from an index cache that is rebuilt lazily on the fir... | 2,908 |
EgoMoose/ordered-dictionary-luau | EgoMoose-ordered-dictionary-luau-2aa02e8/tests/TestRunner/ServerRunner/init.server.luau | luau | .luau | require(script.Parent)
| 4 |
EgoMoose/ordered-dictionary-luau | EgoMoose-ordered-dictionary-luau-2aa02e8/tests/TestRunner/init.luau | luau | .luau | local Tests = game.ReplicatedStorage.DevPackages.Tests
local runCLI = require(game.ReplicatedStorage.DevPackages.Jest).runCLI
local processServiceExists, ProcessService = pcall(function()
return game:GetService("ProcessService")
end)
local status, result = runCLI(Tests, {
ci = false,
passWithNoTests = true,
}, { T... | 163 |
biggaboy212/Marionette | biggaboy212-Marionette-998840f/tests/breakpointClosures.luau | luau | .luau | local function run()
print("start")
debugger.halt()
print("next")
local function nested()
debugger.halt()
print("done")
end
nested()
end
run() | 44 |
biggaboy212/Marionette | biggaboy212-Marionette-998840f/tests/breakpoints.luau | luau | .luau | local num = 10
debugger.watch("num", function(set: any?) -- add the var "num" to watch stack as "num"
if set ~= nil then
num = set
end
return num
end)
--[[ debugger.watchBatch{ -- add a set of vars to the watch stack
num = function(set: any?)
num = set or num
return num
end,
} ]]
debugger.halt() -- brea... | 135 |
biggaboy212/Marionette | biggaboy212-Marionette-998840f/tests/infiniteBreakPoints.luau | luau | .luau | local function run()
debugger.halt()
run()
end
run() | 16 |
Word30210/luau-hangul | Word30210-luau-hangul-abb31ba/scripts/build.luau | luau | .luau | -- scripts/build.luau
local process = require("@lune/process")
local multitarget = require("../lune_packages/multitarget")
local result = multitarget.build(
"pesde.toml",
{
luau = true;
lune = true;
roblox = true;
},
"dist",
{
"src";
},
"LUA_ENV"
)
if resul... | 169 |
Word30210/luau-hangul | Word30210-luau-hangul-abb31ba/src/core/assemble.luau | luau | .luau | --#[ Head Variables ]#--
local module = {}
--#[ Mdules ]#--
local super_table = require("@luau_pkg/super_table")
local hangul = require("../internal/hangul")
local disassemble = require("../core/disassemble")
--#[ Variables ]#--
--
--#[ Functions ]#--
--
--#[ Main ]#--
function module.assemble(
fragments: { str... | 201 |
Word30210/luau-hangul | Word30210-luau-hangul-abb31ba/src/core/canBe.luau | luau | .luau | --#[ Head Variables ]#--
local module = {}
--#[ Modules ]#--
local constants = require("../internal/constants")
--#[ Variables ]#--
local canBeChoseongCache: { [string]: boolean } = {}
local canBeJungseongCache: { [string]: boolean } = {}
local canBeJongseongCache: { [string]: boolean } = {}
--#[ Functions ]#--
--
... | 382 |
Word30210/luau-hangul | Word30210-luau-hangul-abb31ba/src/core/combine.luau | luau | .luau | --#[ Head Variables ]#--
local module = {}
--#[ Mdules ]#--
local constants = require("../internal/constants")
--#[ Variables ]#--
--
--#[ Functions ]#--
--
--#[ Main ]#--
function module.combineCharacter(
choseong: string,
jungseong: string,
jongseong: string?
): string
local choseongIndex = table.... | 470 |
Word30210/luau-hangul | Word30210-luau-hangul-abb31ba/src/core/disassemble.luau | luau | .luau | --#[ Types ]#--
export type DisassembledCompleteCharacter = {
choseong: string;
jungseong: string;
jongseong: string;
}
--#[ Head Variables ]#--
local module = {}
--#[ Modules ]#--
local super_table = require("@luau_pkg/super_table")
local constants = require("../internal/constants")
--#[ Variables ]#--
... | 844 |
Word30210/luau-hangul | Word30210-luau-hangul-abb31ba/src/core/getChoseong.luau | luau | .luau | --[[Error 500 (Server Error)!!1500.That’s an error.There was an error. Please try again later.That’s all we know.]]
--#[ Head Variables ]#--
local module = {}
--#[ Mdules ]#--
local super_table = require("@luau_pkg/super_table")
local disassemble = require("../core/disassemble")
--#[ Variables ]#--
--
--#[ Function... | 174 |
Word30210/luau-hangul | Word30210-luau-hangul-abb31ba/src/core/hasBatchim.luau | luau | .luau | --#[ Head Variables ]#--
local module = {}
--#[ Modules ]#--
local constants = require("../internal/constants")
--#[ Variables ]#--
--
--#[ Functions ]#--
--
--#[ Main ]#--
function module.hasBatchim(
string: string
): boolean
if utf8.len(string) == 0 then
return false
end
local charCode = ... | 534 |
Word30210/luau-hangul | Word30210-luau-hangul-abb31ba/src/core/init.luau | luau | .luau | local assemble = require("@self/assemble")
local canBe = require("@self/canBe")
local combine = require("@self/combine")
local disassemble = require("@self/disassemble")
local getChoseong = require("@self/getChoseong")
local hasBatchim = require("@self/hasBatchim")
local josa = require("@self/josa")
local removeLastCha... | 151 |
Word30210/luau-hangul | Word30210-luau-hangul-abb31ba/src/core/josa.luau | luau | .luau | --#[ Types ]#--
type JosaOption = "이/가"
| "을/를"
| "은/는"
| "으로/로"
| "와/과"
| "이나/나"
| "이란/란"
| "아/야"
| "이랑/랑"
| "이에요/예요"
| "으로서/로서"
| "으로써/로써"
| "으로부터/로부터"
| "이라/라"
--#[ Head Variables ]#--
local module = {}
--#[ Modules ]#--
local disassemble = require("../core/disas... | 645 |
Word30210/luau-hangul | Word30210-luau-hangul-abb31ba/src/core/removeLastCharacter.luau | luau | .luau | --#[ Head Variables ]#--
local module = {}
--#[ Mdules ]#--
local canBe = require("../core/canBe")
local combine = require("../core/combine")
local disassemble = require("../core/disassemble")
--#[ Variables ]#--
--
--#[ Functions ]#--
local function excludeLastElement<V>(
array: { V }
): ({ V }, V)
local la... | 456 |
Word30210/luau-hangul | Word30210-luau-hangul-abb31ba/src/init.luau | luau | .luau | local core = require("@self/core")
local number = require("@self/number")
return {
core = core;
number = number;
} | 30 |
Word30210/luau-hangul | Word30210-luau-hangul-abb31ba/src/internal/constants.luau | luau | .luau | --#[ Modules ]#--
local super_table = require("@luau_pkg/super_table")
--#[ Variables ]#--
local COMPLETE_HANGUL_START_CHARCODE = utf8.codepoint("가")
local COMPLETE_HANGUL_END_CHARCODE = utf8.codepoint("힣")
local COMPLETE_HANGUL_ALPHABET_START_CHARCODE = utf8.codepoint("ㄱ")
local COMPLETE_HANGUL_ALPHABET_END_CHARCODE ... | 1,950 |
Word30210/luau-hangul | Word30210-luau-hangul-abb31ba/src/number/days.luau | luau | .luau | --#[ Head Variables ]#--
local module = {}
--#[ Variables ]#--
local DAYS_MAP = {
[1] = "하루";
[2] = "이틀";
[3] = "사흘";
[4] = "나흘";
[5] = "닷새";
[6] = "엿새";
[7] = "이레";
[8] = "여드레";
[9] = "아흐레";
[10] = "열";
[20] = "스무";
}
local DAYS_ONLY_TENS_MAP = {
[10] = "열흘";
[20] ... | 397 |
Word30210/luau-hangul | Word30210-luau-hangul-abb31ba/src/number/init.luau | luau | .luau | local days = require("@self/days")
local numberToHangul = require("@self/numberToHangul")
local susa = require("@self/susa")
return {
days = days;
numberToHangul = numberToHangul;
susa = susa;
} | 60 |
Word30210/luau-hangul | Word30210-luau-hangul-abb31ba/src/number/numberToHangul.luau | luau | .luau | --#[ Head Variables ]#--
local module = {}
--#[ Modules ]#--
local super_table = require("@luau_pkg/super_table")
local constants = require("../internal/constants")
--#[ Variables ]#--
--
--#[ Functions ]#--
local function formatNumber(
number: number
): string
local sign, integer, decimal = string.match(tos... | 1,425 |
Word30210/luau-hangul | Word30210-luau-hangul-abb31ba/src/number/susa.luau | luau | .luau | --#[ Head Variables ]#--
local module = {}
--#[ Modules ]#--
local numberToHangul = require("./numberToHangul")
--#[ Variables ]#--
local SUSA_MAP = {
[1] = "하나";
[2] = "둘";
[3] = "셋";
[4] = "넷";
[5] = "다섯";
[6] = "여섯";
[7] = "일곱";
[8] = "여덟";
[9] = "아홉";
[10] = "열";
[20] =... | 1,106 |
dphfox/scoped | dphfox-scoped-bde8b0a/example_usage.luau | luau | .luau | --!strict
local scoped = require("./scoped.luau")
local scoped, doCleanup = scoped.scoped, scoped.doCleanup
local constructors = {}
function constructors.Person(
cleanup: scoped.CleanupTable,
name: string
)
local self = {
name = name
}
table.insert(cleanup, function()
print(name, "has left the building!")
... | 138 |
malice-nz/Splice | malice-nz-Splice-2be7467/Lowerer.luau | luau | .luau | local Opcodes = require("./Opcodes")
local Lowerer = {}
local LOP = Opcodes
local EncodeABC = Opcodes.EncodeABC
local EncodeAD = Opcodes.EncodeAD
local EncodeE = Opcodes.EncodeE
local function CreateFunctionState(Parent: any?, NumParams: number, IsVararg: boolean): any
local FS = {
Parent = Parent,
FreeReg = 0,... | 13,592 |
malice-nz/Splice | malice-nz-Splice-2be7467/Opcodes.luau | luau | .luau | local Opcodes = {}
Opcodes.LOP_NOP = 0
Opcodes.LOP_BREAK = 1
Opcodes.LOP_LOADNIL = 2
Opcodes.LOP_LOADB = 3
Opcodes.LOP_LOADN = 4
Opcodes.LOP_LOADK = 5
Opcodes.LOP_MOVE = 6
Opcodes.LOP_GETGLOBAL = 7
Opcodes.LOP_SETGLOBAL = 8
Opcodes.LOP_GETUPVAL = 9
Opcodes.LOP_SETUPVAL = 10
Opcodes.LOP_CLOSEUPVALS = 11
Opcodes.LOP_GET... | 2,067 |
malice-nz/Splice | malice-nz-Splice-2be7467/Parser.luau | luau | .luau | local Parser = {}
local UNARY_PRIORITY = 7
local BinaryPriority = {
["+"] = { 5, 5 },
["-"] = { 5, 5 },
["*"] = { 6, 6 },
["/"] = { 6, 6 },
["//"] = { 6, 6 },
["%"] = { 6, 6 },
["^"] = { 9, 8 },
[".."] = { 4, 3 },
["=="] = { 3, 3 },
["~="] = { 3, 3 },
["<"] = { 3, 3 },
["<="] = { 3, 3 },
[">"] = { 3, 3 }... | 5,155 |
malice-nz/Splice | malice-nz-Splice-2be7467/Sandbox.luau | luau | .luau | local Sandbox = {}
local _moduleScript: any = script
local _game: any = nil
do
local current: any = _moduleScript
while current and current.Parent do
current = current.Parent
end
_game = current
end
local RobloxGlobalValues: { [string]: any } = {}
RobloxGlobalValues.game = _game
if _game then
pcall(function()... | 2,097 |
malice-nz/Splice | malice-nz-Splice-2be7467/Serialiser.luau | luau | .luau | local Serialiser = {}
local LUAU_BYTECODE_VERSION = 6
local LBC_CONSTANT_NIL = 0
local LBC_CONSTANT_BOOLEAN = 1
local LBC_CONSTANT_NUMBER = 2
local LBC_CONSTANT_STRING = 3
local LBC_CONSTANT_IMPORT = 4
local LBC_CONSTANT_TABLE = 5
local LBC_CONSTANT_CLOSURE = 6
local LBC_CONSTANT_VECTOR = 7
local function WriteVarIn... | 3,248 |
malice-nz/Splice | malice-nz-Splice-2be7467/VM.luau | luau | .luau | local Opcodes = require("./Opcodes")
local Sandbox = require("./Sandbox")
local VM = {}
local DecodeOp = Opcodes.DecodeOp
local DecodeA = Opcodes.DecodeA
local DecodeB = Opcodes.DecodeB
local DecodeC = Opcodes.DecodeC
local DecodeD = Opcodes.DecodeD
local DecodeE = Opcodes.DecodeE
local LOP = Opcodes
local function ... | 6,358 |
malice-nz/Splice | malice-nz-Splice-2be7467/init.luau | luau | .luau | local Lexer = require(script.Lexer)
local Parser = require(script.Parser)
local Lowerer = require(script.Lowerer)
local VM = require(script.VM)
local Serialiser = require(script.Serialiser)
local Sandbox = require(script.Sandbox)
local Splice = {}
function Splice.Compile(Source: string): any
local Tokens = Lexer.Tok... | 231 |
bytexenon/luau-rng-cracker | bytexenon-luau-rng-cracker-56c8911/main.luau | luau | .luau | --[[
Reconstruct the initial state of Luau's global PCG32 generator.
In luau/VM/src/lmathlib.cpp, luaopen_math seeds global_State::rngstate as:
uint64_t seed = uintptr_t(L);
seed ^= time(NULL);
seed ^= clock();
pcg32_seed(&L->global->rngstate, seed);
From Luau, the only term that is not directly obser... | 1,739 |
Scythe-Technology/glfw-luau | Scythe-Technology-glfw-luau-8db9978/src/c.luau | luau | .luau | --!strict
local fs = zune.fs;
local ffi = zune.ffi;
local process = zune.process;
local GLFW_TRUE = 1;
local GLFW_FALSE = 0;
local LIBRARY_PATH = `./libs/glfw/build/src/{ffi.prefix}glfw.{ffi.suffix}`;
if (process.os == "windows") then
LIBRARY_PATH = `./libs/glfw/build/src/{
if (fs.stat(`./libs/glfw/build/... | 7,691 |
Scythe-Technology/glfw-luau | Scythe-Technology-glfw-luau-8db9978/src/gl.luau | luau | .luau | --!strict
local constants = {
DEPTH_BUFFER_BIT = 0x00000100,
STENCIL_BUFFER_BIT = 0x00000400,
COLOR_BUFFER_BIT = 0x00004000,
FALSE = 0,
TRUE = 1,
POINTS = 0x0000,
LINES = 0x0001,
LINE_LOOP = 0x0002,
LINE_STRIP = 0x0003,
TRIANGLES = 0x0004,
TRIANGLE_STRIP = 0x0005,
TRIANG... | 44,142 |
Scythe-Technology/glfw-luau | Scythe-Technology-glfw-luau-8db9978/src/init.luau | luau | .luau | --!strict
local ffi = zune.ffi
local c = require("@self/c");
local glfw = c.glfw;
local window = require("@self/window");
local module = {};
module.gl = require("@self/gl");
module.D = c.defined;
function module.init(): ()
if (glfw.glfwInit() == glfw.GLFW_FALSE) then
module.emitError();
end
end
... | 521 |
Scythe-Technology/glfw-luau | Scythe-Technology-glfw-luau-8db9978/src/window.luau | luau | .luau | --!strict
local ffi = zune.ffi;
local c = require("./c");
local glfw = c.glfw;
local window = {};
window.__index = window;
function window.init(ptr: FFIPointer)
return setmetatable({
handle = ptr::FFIPointer?,
callbacks = {}::{[string]: FFIPointer?},
}, window);
end
--[=[
Returns the ti... | 2,734 |
jiwonz/pesde-multitarget | jiwonz-pesde-multitarget-40488af/scripts/example.luau | luau | .luau | local lib = require("../src/lib")
lib.build(
"pesde.toml",
{
luau = true,
lune = true,
roblox = true,
},
"dist",
{
"src",
},
"LUA_ENV",
"pkg"
)
| 64 |
jiwonz/pesde-multitarget | jiwonz-pesde-multitarget-40488af/src/bin.luau | luau | .luau | local argparse = require("../lune_packages/argparse")
local multitarget = require("./lib")
local pathfs = require("../lune_packages/pathfs")
local fs = pathfs.fs
local stdio = require("@lune/stdio")
local serde = require("@lune/serde")
local process = require("@lune/process")
local chalk = require("../luau_packages/cha... | 2,791 |
jiwonz/pesde-multitarget | jiwonz-pesde-multitarget-40488af/src/lib.luau | luau | .luau | local stdio = require("@lune/stdio")
local serde = require("@lune/serde")
local pathfs = require("../lune_packages/pathfs")
local fs = pathfs.fs
local gt = require("../lune_packages/greentea")
local glob = require("../lune_packages/glob")
local process = require("@lune/process")
local darklua = require("../lune_package... | 3,594 |
h465855hgg/noctalia-lyrics | h465855hgg-noctalia-lyrics-e7b4e8c/lyrics_selector.luau | luau | .luau | --!nonstrict
local candidateState = noctalia.state.get("lyrics_candidate_state") or {}
local track = noctalia.state.get("track")
local requestCounter = 0
local dirty = true
local function trackKey(value)
if type(value) ~= "table" then return "" end
local durationSeconds = math.floor((tonumber(value.duration) or 0... | 1,407 |
h465855hgg/noctalia-lyrics | h465855hgg-noctalia-lyrics-e7b4e8c/lyrics_shortcut.luau | luau | .luau | --!nonstrict
function onActivate()
noctalia.togglePanel("h465855hgg/lyrics:selector")
end
| 28 |
R-unic/tether | R-unic-tether-0c861e7/.lune/tests.luau | luau | .luau | local roblox = require("@lune/roblox")
local fs = require("@lune/fs")
local luau = require("@lune/luau")
local process = require("@lune/process")
local task = require("@lune/task")
local signal = require("./mock-signal")
local testPlacePath = process.args[1]
local game = roblox.deserializePlace(fs.readFile(testPlaceP... | 1,303 |
R-unic/tether | R-unic-tether-0c861e7/src/emitters/contextual-emitter.ts | roblox-ts | .ts | import type { MessageEmitter } from "./message-emitter";
import type { BaseMessage, MessageCallback, FunctionMessageCallback } from "../structs";
import { RunService } from "@rbxts/services";
import { Error } from "../logging";
type Cleanup = () => void;
export abstract class ContextualEmitter<MessageData> {
public... | 584 |
R-unic/tether | R-unic-tether-0c861e7/src/relayer.ts | roblox-ts | .ts | import { ReplicatedStorage, RunService } from "@rbxts/services";
import { getAllPacketsWhich, isReliable, isUnreliable, shouldBatch } from "\./utility";
import type { BaseMessage, MessageEvent, PacketInfo, SerializedPacket } from "./structs";
import type { MessageEmitter } from "./emitters/message-emitter";
export ty... | 1,439 |
R-unic/tether | R-unic-tether-0c861e7/src/serdes.ts | roblox-ts | .ts | import type { Modding } from "@flamework/core";
import type { Serializer, SerializerMetadata } from "@rbxts/serio";
import createSerializer from "@rbxts/serio";
import { createMessageBuffer } from "./utility";
import type { BaseMessage, SerializedPacket } from "./structs";
export class Serdes<MessageData> {
public ... | 486 |
R-unic/tether | R-unic-tether-0c861e7/src/structs.ts | roblox-ts | .ts | import type { Modding } from "@flamework/core";
import type { SerializerMetadata, SerializedData, StripMeta } from "@rbxts/serio";
export type MessageCallback<T = unknown> = ServerMessageCallback<T> | ClientMessageCallback<T>;
export type FunctionMessageCallback<T = unknown, R = unknown> = ServerFunctionMessageCallbac... | 321 |
R-unic/tether | R-unic-tether-0c861e7/tests/src/run-tests.server.ts | roblox-ts | .ts | import { TestRunner } from "@rbxts/runit";
const testRunner = new TestRunner(game.GetService("ReplicatedStorage").WaitForChild("Tests"));
testRunner.run({ colors: true }).await(); | 43 |
R-unic/serio | R-unic-serio-1313e44/.lune/fix-lcov-paths.luau | luau | .luau | local fs = require("@lune/fs") :: fs
local path = "coverage/lcov.info"
local lcov = fs.readFile(path)
lcov = lcov:gsub("\\", "/")
fs.writeFile(path, lcov)
| 47 |
R-unic/serio | R-unic-serio-1313e44/.lune/tests.luau | luau | .luau | local roblox = require("@lune/roblox") :: roblox
local fs = require("@lune/fs") :: fs
local luau = require("@lune/luau") :: luau
local process = require("@lune/process") :: process
local serde = require("@lune/serde") :: serde
local task = require("@lune/task") :: task
local signal = require("./mock-signal")
local te... | 1,140 |
R-unic/serio | R-unic-serio-1313e44/src/deserializer.ts | roblox-ts | .ts | import { sizeOfNumberType, sign, CF__add } from "./utility";
import { f24 } from "./utility/f24";
import { f16 } from "./utility/f16";
import { u24 } from "./utility/u24";
import { u12 } from "./utility/u12";
import { i24 } from "./utility/i24";
import { i12 } from "./utility/i12";
import { AXIS_ALIGNED_ORIENTATIONS, C... | 3,375 |
R-unic/serio | R-unic-serio-1313e44/src/info-processing.ts | roblox-ts | .ts | import { SerializerSchema } from "./types";
import { getSortedEnumItems } from "./utility";
const { max, ceil } = math;
const enum IterationFlags {
Default = 0,
SizeUnknown = 1 << 0,
Packed = 1 << 1
}
export interface ProcessedInfo {
readonly flags: IterationFlags;
readonly schema: SerializerSchema;
read... | 1,558 |
R-unic/serio | R-unic-serio-1313e44/src/serializer.ts | roblox-ts | .ts |
import { sizeOfNumberType, sign, CF__index, fuzzyEq, isNumberType, assertNumberRange, isNaN } from "./utility";
import { f8 } from "./utility/f8";
import { f16 } from "./utility/f16";
import { f24 } from "./utility/f24";
import { u12 } from "./utility/u12";
import { u24 } from "./utility/u24";
import { AXIS_ALIGNED_OR... | 4,913 |
R-unic/serio | R-unic-serio-1313e44/src/utility/fastcalls.luau | luau | .luau | local info = debug.info
local identity = CFrame.identity
local lune = string.sub(_VERSION, 1, 4) == "Lune"
local _, CF__index = xpcall(function()
return identity[nil]
end, function()
return info(2, "f")
end)
local _, CF__add = xpcall(function()
return identity + nil
end, function()
return info(2, "f")
end)
if lu... | 216 |
R-unic/serio | R-unic-serio-1313e44/src/utility/index.ts | roblox-ts | .ts | import { IS_LUNE } from "../constants";
import type { NumberType, Primitive } from "../types";
const { sort } = table;
const { magnitude } = vector;
export * from "./fastcalls";
export function assertNumberRange(n: number, sizeInBytes: number, signed: boolean, note?: string): void {
const sizeInBits = 8 * sizeInBy... | 708 |
R-unic/serio | R-unic-serio-1313e44/tests/src/run-tests.server.ts | roblox-ts | .ts | import { TestRunner } from "@rbxts/runit";
import { instrument, istanbul } from "@rbxts/coverage";
const http = game.GetService("HttpService");
const replicated = game.GetService("ReplicatedStorage");
instrument([replicated.WaitForChild("Library")]);
const testRunner = new TestRunner(replicated.WaitForChild("Tests"))... | 170 |
R-unic/serio | R-unic-serio-1313e44/tests/src/utility.ts | roblox-ts | .ts | import type { Modding } from "@flamework/core";
import { Assert } from "@rbxts/runit";
import type { Serializer, SerializerMetadata, SerializedData, String, Vector, u8, i32, u16 } from "../src/index";
import createSerializer from "../src/index";
export type NullableLiteralUnion = TestLiteralUnion | undefined;
export ... | 991 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/.lune/tests.luau | luau | .luau | local roblox = require("@lune/roblox")
local fs = require("@lune/fs")
local luau = require("@lune/luau")
local process = require("@lune/process")
local stdio = require("@lune/stdio")
local task = require("@lune/task")
local signal = require("mock-signal")
local testPlacePath = process.args[1]
local game = roblox.dese... | 636 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/base-components/base-button-animation.ts | roblox-ts | .ts | import type { OnStart } from "@flamework/core";
import { BaseComponent } from "@flamework/components";
import { Janitor } from "@rbxts/janitor";
export default abstract class BaseButtonAnimation<A extends {} = {}, I extends GuiButton = GuiButton> extends BaseComponent<A, I> implements OnStart {
protected readonly in... | 247 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/base-components/button-tween-animation.ts | roblox-ts | .ts | import type { OnStart } from "@flamework/core";
import type { TweenInfoBuilder } from "@rbxts/builders";
import BaseButtonAnimation from "./base-button-animation";
export default abstract class ButtonTweenAnimation<A extends {} = {}, I extends GuiButton = GuiButton> extends BaseButtonAnimation<A, I> implements OnStar... | 112 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/base-components/camera.ts | roblox-ts | .ts | import { BaseComponent } from "@flamework/components";
import { Workspace as World } from "@rbxts/services";
const { rad } = math;
export class CameraComponent<A extends {} = {}> extends BaseComponent<A, Camera> {
protected readonly offsets: CFrame[] = [];
public toggle(on: boolean): void {
World.CurrentCame... | 204 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/classes/procedural-animation-host.ts | roblox-ts | .ts | import { getChildrenOfType } from "@rbxts/instance-utility";
import { processDependency } from "@rbxts/flamework-meta-utils";
import Object from "@rbxts/object-utils";
import { createMappingDecorator, getInstanceAtPath } from "shared/utility/meta";
const { min } = math;
type ProceduralAnimationDecoratorArgs = [targe... | 532 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/classes/procedural-animations/mouse-sway.ts | roblox-ts | .ts | import Iris from "@rbxts/iris";
import { Singleton } from "shared/decorators";
import { Spring } from "shared/classes/spring";
import { doubleSidedLimit } from "shared/utility/numbers";
import { ProceduralAnimation, BaseProceduralAnimation, ProceduralAnimationTarget } from "../procedural-animation-host";
import type {... | 519 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/classes/procedural-animations/walk-cycle.ts | roblox-ts | .ts | import Wave from "@rbxts/wave";
import { Singleton } from "shared/decorators";
import { Spring } from "shared/classes/spring";
import { ProceduralAnimation, BaseProceduralAnimation, ProceduralAnimationTarget } from "../procedural-animation-host";
import type { CharacterController } from "client/controllers/character"... | 507 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/cmdr.client.ts | roblox-ts | .ts | import { CmdrClient as Cmdr } from "@rbxts/cmdr";
Cmdr.SetActivationKeys([Enum.KeyCode.F2]); | 28 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/components/cameras/aerial.ts | roblox-ts | .ts | import { Dependency, type OnRender } from "@flamework/core";
import { Component, type Components } from "@flamework/components";
import { Workspace as World } from "@rbxts/services";
import { $nameof } from "rbxts-transform-debug";
import { Player } from "client/utility";
import { CameraComponent } from "client/base-... | 358 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/components/cameras/default.ts | roblox-ts | .ts | import { Dependency } from "@flamework/core";
import { Component, type Components } from "@flamework/components";
import { Workspace as World } from "@rbxts/services";
import { $nameof } from "rbxts-transform-debug";
import { Player } from "client/utility";
import { CameraComponent } from "client/base-components/came... | 204 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/components/cameras/first-person-animated.ts | roblox-ts | .ts | import { Dependency, type OnRender } from "@flamework/core";
import { Component, type Components } from "@flamework/components";
import { Workspace as World } from "@rbxts/services";
import { $nameof } from "rbxts-transform-debug";
import { ProceduralAnimationHost } from "client/classes/procedural-animation-host";
im... | 318 |
R-unic/flamework-template | R-unic-flamework-template-ce0854c/src/client/components/cameras/first-person.ts | roblox-ts | .ts | import { Dependency } from "@flamework/core";
import { Component, type Components } from "@flamework/components";
import { Workspace as World } from "@rbxts/services";
import { $nameof } from "rbxts-transform-debug";
import { Player } from "client/utility";
import { CameraComponent } from "client/base-components/came... | 334 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.