This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---@class MultiPrecisionInteger | |
---@field sign boolean|nil | |
local mpi = {} | |
mpi.__mt = {__index = mpi, __name = "MultiPrecisionInteger"} | |
local floor = math.floor | |
mpi.zero = setmetatable({0}, mpi.__mt) | |
mpi.one = setmetatable({1}, mpi.__mt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Train schedule DSL by JackMacWindows | |
Example: | |
cyclic | |
to "Station 1" { | |
wait 5m, powered | |
time = 14:00 daily | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- VeriCode 2 - Easy code signing for ComputerCraft | |
-- By JackMacWindows | |
-- | |
---@module vericode | |
-- | |
-- Code signing uses encryption and hashes to easily verify a) that the sender of | |
-- the code is trusted, and b) that the code hasn't been changed mid-transfer. | |
-- VeriCode applies this concept to Lua code sent over Rednet to add a layer of | |
-- security to Rednet. Just plainly receiving code from whoever sends it is | |
-- dangerous, and invites the possibility of getting malware (in fact, I've made |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Taskmaster: A simple and highly flexible task runner/coroutine manager for ComputerCraft | |
-- Supports adding/removing tasks, early exits for tasks, event white/blacklists, automatic | |
-- terminal redirection, task pausing, promises, and more. | |
-- Made by JackMacWindows | |
-- Licensed under CC0 in the public domain | |
--[[ | |
Examples: | |
- Run three functions in parallel, and wait for any to exit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <discord.h> | |
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <filesystem> | |
#include <thread> | |
#include <chrono> | |
namespace fs = std::filesystem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- TOML library for Lua/CC | |
-- From Phoenix libsystem serialization.toml | |
-- | |
-- MIT License | |
-- | |
-- Copyright (c) 2024 JackMacWindows | |
-- | |
-- Permission is hereby granted, free of charge, to any person obtaining a copy | |
-- of this software and associated documentation files (the "Software"), to deal | |
-- in the Software without restriction, including without limitation the rights |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Memory-Mapped Filesystem for ESP32 | |
* A performance-oriented filesystem driver designed for read-only partitions. | |
* | |
* Copyright (c) 2024 JackMacWindows. Licensed under the Apache 2.0 license. | |
*/ | |
#include <errno.h> | |
#include <fcntl.h> | |
#include <esp_partition.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
registers: 0 = data table, 1 = data pointer, 2 = function temp, 3 = current data (4 total) | |
expects `get(): number` and `put(n: number)` global functions | |
init code | |
GETGLOBAL R(0), K("setmetatable") | |
NEWTABLE R(1), 0, 0 | |
NEWTABLE R(2), 0, 1 | |
CLOSURE R(3), KP(0) | |
SETTABLE R(2), K("__index"), R(3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- DEFLATE-ANS: A variant of DEFLATE that uses asymmetrical numeral systems | |
-- instead of Huffman coding, increasing decompression speed with similar | |
-- compression ratios. | |
-- | |
-- The block format matches RFC 1951 DEFLATE, with some minor adjustments: | |
-- * Bit fields are always stored most significant bit first, and bytes are | |
-- stored most significant byte first. This is for convenience in the bit | |
-- decoder. | |
-- * Huffman-encoded blocks are replaced with tANS-encoded blocks. These blocks | |
-- start with an initial X value (which is R bits long), followed by the codes |
NewerOlder