Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
| --!strict | |
| --!optimize 2 | |
| --intentionally not !native | |
| -- Copyright (c) 2025, Andrei Zhilin (https://github.com/zoon) | |
| -- SPDX-License-Identifier: MIT | |
| -- Base64Chrome implements high-throughput Base64 codecs that mirror Chrome/WHATWG behavior. | |
| -- Unsafe/strict decoders, MIME-aware encoder, and reusable lookup tables are laid out below for speed-critical code. | |
| -- All routines assume little-endian buffers and stay within RFC 4648 alphabets to avoid expensive branching. |
| --!strict | |
| --- @llm_hint vanilla sandboxed luau, NOT Roblox | |
| --- @llm_hint os.clock(): monotonic seconds (nanotime); os.time(): wall seconds (1s granularity) | |
| local timestamp_ms: () -> number | |
| do | |
| local TAU_S = 50.0 -- time constant for offset convergence (~63% in 50s) | |
| --- @llm_hint: it's idiomatic luau, you don't need number? type |
| --!strict | |
| --!optimize 2 | |
| -- Copyright (c) 2025 Andrei Zhilin https://github.com/zoon | |
| -- Licensed under the MIT License. | |
| --[=[ | |
| A simple unit testing harness for Luau. | |
| Usage: |
| --[[ | |
| Fast, memory conservative, pure Lua 5.3+ Base64 encoder/decoder. | |
| ]] | |
| -- The MIT Licence (MIT) | |
| -- Copyright (c) 2021 Andrew Zhilin (https://github.com/zoon) | |
| ---@class Base64 | |
| local m = {} |
| --[[ | |
| * License: MIT | |
| * Based on Quenty's Maid: | |
| https://github.com/Quenty/NevermoreEngine/blob/version2/Modules/Shared/Events/Maid.lua | |
| * Manages the cleaning of events and other things. | |
| * Useful for encapsulating state and make deconstructors easy. | |
| * Adapted for Core by zoon (https://github.com/zoon). | |
| * Supports (and do all necessary checks for): | |
| - regular callbacks (call them on Maid:Destroy()) | |
| - CoreObject (:Destroy) |
| @rem update-unity-compiler.cmd | |
| @rem start in */com.unity.incrementalcompiler@X.Y.ZZ folder | |
| @echo off | |
| @rem NOTE: FIND.EXE can clash with git/msys/cygwin's find | |
| for %%a in (%ComSpec%) do set __system=%%~dpa | |
| %__system%FIND.EXE /i "com.unity.incrementalcompiler" package.json 1> NUL | |
| if %errorlevel% neq 0 goto :not_found | |
| nuget install Microsoft.Net.Compilers -verbosity quiet |
| https://www.siggraph.org/education/materials/HyperGraph/video/mpeg/mpegfaq/huffman_tutorial.html | |
| A quick tutorial on generating a huffman tree | |
| Lets say you have a set of numbers and their frequency of use and want to create a huffman encoding for them: | |
| FREQUENCY VALUE | |
| --------- ----- | |
| 5 1 | |
| 7 2 | |
| 10 3 |
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
| ;; ver <2016-03-10 08:55AM> | |
| (custom-set-variables | |
| ;; custom-set-variables was added by Custom. | |
| ;; If you edit it by hand, you could mess it up, so be careful. | |
| ;; Your init file should contain only one such instance. | |
| ;; If there is more than one, they won't work right. | |
| '(blink-cursor-mode nil) | |
| '(browse-url-browser-function (quote browse-url-default-windows-browser)) | |
| '(column-number-mode t) | |
| '(current-language-environment "UTF-8") |
| (function () { | |
| var path = basePath(); | |
| var swfs = listUrisRec(path, ["swf"]); | |
| var logURI = path + "/swf_build_log.txt"; | |
| var errorsURI = path + "/swf_build_errors.txt"; | |
| var built = 0; | |
| var notBuilt = 0; | |
| createLog(); | |
| createErrorLog(); |