https://github.com/users/TheIncgi/projects/2/views/1
- coroutines
- metatables
- standard lua
table,string,math, andbit32libraries pairs,ipairs- 5.3's
//idiv op - Bitwise operators
~,<<,|,&,>>,>>>(bit not, shift left, or, and shift right, logical shift right)\ - Auto pauses each tick, adjustable # of ops per tick (based on internal loops mostly)
- When doing formatting like
("%2d:%d"):format(hour, min)the first()can be skipped like this:"%2d:%d":format(hour, min) - Support for
[[foo]]/[=[foo]=]style strings - stack trace
continuein loops
- Support for
+=-=/=*=~=,<<=,|=,&=,>>=,>>>= - Custom searchers/loaders
- debug library (partially implemented)
This is the file
There's a huge amount of code here, but don't worry, the usage is pretty simple.
This code is designed to run in a Lua Program node in plasma (but you could run it elsewhere if you wanted)
and it basically just get's copied and pasted.
func: Loader.run() todo, single word name
| Pin | Type | Description |
|---|---|---|
| 1 | Str | Source code |
call Net.sourceCode() on network module completion
| Pin | Type | Description |
|---|---|---|
| 1 | Str | Source code from network module |
| Pin | Type | Description |
|---|---|---|
| 1 | Str | URL to githubusercontent |
TODO
return error"ioexception" for now
Note: These steps from .github/workflows/test_runner.yml show steps for linux.
Tests rely on another library of mine That's No Moon
- Download the code from the repo and unzip
- Linux:
export UNIT_TEST_LIB_PATH="<path/to>/thats-no-moon"
Windows:SET UNIT_TEST_LIB_PATH="<path/to>/thats-no-moon" - Install Lua5.2 if needed
- Navigate to the root of this project
lua TestLauncher.lua(lua52on my machine, check the executable)
I'm using Local Lua Debugger by Tom Blind and Lua by keyring
in your launch.json be sure to add in the env var for the test lib.
You could change "file" to point at TestLauncher.lua if you prefer.
(Also, second config entry might not do anything..)
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug Lua Interpreter",
"type": "lua-local",
"request": "launch",
"program": {
"lua": "lua52.exe",
"file": "${file}"
},
"env": {
"UNIT_TEST_LIB_PATH": "C:/Users/****/GitHub/That-s-No-Moon-"
}
},
{
"name": "Debug Custom Lua Environment",
"type": "lua-local",
"request": "launch",
"program": {
"command": "command"
},
"args": []
}
]
}Note: In some unusual cases an error may be thrown by the debugger in which clearing the breakpoints may fix it.
Error in standard lua
t = {}
for t.x = 1, 10 doMetatable events
t = {}
setmetatable(t, {
__index = function(t,k) .... end
})x = 10
y = 11
t = {
x, var = 100, y, --not assignment set in table declaration
foo = function()
return x, y --commas ok again here
end
}