This file contains hidden or 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
| local variables = {} | |
| local program = {} | |
| local running = false | |
| local totalMemory = 38911 -- Pamięć BASIC w Commodore 64 w bajtach | |
| local basicBytesFree = totalMemory | |
| local programName = "" | |
| -- Funkcja do obliczania ilości wolnej pamięci | |
| local function calculateFreeMemory() | |
| local usedMemory = 0 |
This file contains hidden or 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
| -- LOP_BREAK, LOP_COVERAGE and LOP_NOP aren't possible without the C API | |
| -- Vector constants are supported but need to be commented in and need the ctor renamed | |
| -- LOADKX and JUMPX support can be commented out | |
| --------------------------------------------------------------------------------------- | |
| -- PREPVARARGS | |
| local a = "hello world"; -- LOADK | |
| a,a,a,a,a,a = nil, true, false, 1, 9e9, function() --[[ RETURN ]] end; -- LOADNIL, LOADB 1, LOADB 0, LOADN 1, LOADK 9e9, DUPCLOSURE (no captures) | |
| FUNC_GLOBAL = newproxy; -- GETIMPORT, SETGLOBAL | |
| local t = { }; -- NEWTABLE 1 1 | |
| local function stub() -- NEWCLOSURE (ref, val, ref captures) |
This file contains hidden or 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 hidden or 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
| local function luaVersion() | |
| local f = function() | |
| return function() end | |
| end | |
| if 0xffffffffffffffffffffffffffffffffffffffffffffff == 2 ^ 64 then | |
| return "Luau" | |
| end | |
| if ({nil,[1] = true})[1] then |
This file contains hidden or 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
| local function getOptimizeLevel() | |
| local function dupclosure() | |
| return function() end | |
| end | |
| local O0 = dupclosure() ~= dupclosure() | |
| local function inlinefunction() | |
| return debug.info(1, "f") | |
| end |
This file contains hidden or 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
| -- Advanced Encryption Standard (AES) libary for CC: Tweaked | |
| -- ©️ 2024 afonya All rights reserved. | |
| -- MIT License | |
| -- Link: https://gist.github.com/afonya2/489c3306a7d85f8f9512df321d904dbb | |
| -- Documentation: https://gist.github.com/afonya2/489c3306a7d85f8f9512df321d904dbb#file-docs-md | |
| -- Last updated: February 25 2024 | |
| local SBox = {[0]=99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, | |
| 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, | |
| 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, | |
| 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, |
This file contains hidden or 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
| local functions = {} | |
| for v in ("ABS ATN COS EXP INT LOG RND SIN SQR TAN "):gmatch("(.-) ") do | |
| functions[v]=true | |
| end | |
| for c in ("ABCDEFGHIJKLMNOPQRSTUVWXYZ"):gmatch("(.)") do | |
| functions["FN"..c]=true | |
| end | |
| local statements = {} | |
| for v in ("LET PRINT END READ DATA GOTO IF FOR NEXT GOSUB RETURN DEF DIM REM STOP INPUT "):gmatch("(.-) ") do | |
| statements[v]=true |
This file contains hidden or 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
| -- Tabled Asymmetrical Numeral Systems (aka Finite State Entropy) for Lua 5.2 | |
| -- | |
| -- MIT License | |
| -- | |
| -- Copyright (c) 2023 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 | |
| -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains hidden or 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
| -- MIT License | |
| -- | |
| -- Copyright (c) 2018-2022 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 | |
| -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| -- copies of the Software, and to permit persons to whom the Software is | |
| -- furnished to do so, subject to the following conditions: |
This file contains hidden or 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
| --[[ | |
| base64 -- v1.5.3 public domain Lua base64 encoder/decoder | |
| no warranty implied; use at your own risk | |
| Needs bit32.extract function. If not present it's implemented using BitOp | |
| or Lua 5.3 native bit operators. For Lua 5.1 fallbacks to pure Lua | |
| implementation inspired by Rici Lake's post: | |
| http://ricilake.blogspot.co.uk/2007/10/iterating-bits-in-lua.html |
NewerOlder