You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+85-38Lines changed: 85 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,46 +4,89 @@ A simple, powerful lua console with the intent of replacing CMD and Terminal + L
4
4
Works on Linux, Windows, and Mac.
5
5
6
6
### TODO
7
-
* Triple check buffer overflows and mem alignment and memleaks, as well as iffy -1 versus 1 when using lua\_\*
8
-
* Add LuaJIT as an external dependancy and create an overlay for functionality of LuaJIT... pretty much inherit
9
-
* Stack trace on error
7
+
* Add LuaJIT as an external dependancy and create an overlay for functionality of LuaJIT... pretty much inherit... probably front end or a modified build to DLL or something idk
8
+
* Develop the additions package with more standard functions that lua could definitely use... maybe not idk
9
+
* Optimize REPL \- the code is meh
10
+
* Play with sigints and longjmps to see if it could bring a cool feature
11
+
* Support multiple lua states on separate threads
12
+
* I wonder if its possible to serialize a lua\_State sufficiently, would be nice to save an env
-p Has console post exist after script in line by line mode
71
+
-a Disables the additions
72
+
-c No copyright on init
73
+
-d Defines a global variable as value after '='
74
+
-l Executes a module before specified script or post-exist
75
+
-b[a,b,c] Load parameters arg differently. a=before passed -l's, b=give p
76
+
assed -l's a tuple, c=give passed file a tuple
77
+
-n Start of parameter section
78
+
-? Displays this help message
79
+
</p>
80
+
</details>
44
81
45
82
A console whose code is much easier to look at and handle than the one provided native with Lua. Has more functionality with native lua console. Supports everything Lua's console does except multiline support in-post-exist. Runs compiled source without a problem. Use -? to get a list of the switches above (different depending on how you build it). Support for LuaRocks is in the wiki. Want to contribute? Submit a pull request. Want to report a bug? Start an issue. Ideas? Start an issue.
46
83
84
+
# Building
85
+
Just two steps:
86
+
1. get Lua
87
+
2. build LuaConsole
88
+
[Here are instructions.](https://github.com/Hydroque/LuaConsole/wiki/Build-Instructions) I didn't exactly go into detail, but you can use build.lua with the outdated PUC-Lua interpreter if you edit it and define `plat=Windows` or `plat=Linux` or `plat=MacOSX` before the requires as a global. Call it extra insult to injury if you want, but its cute.
89
+
47
90
# Additions
48
91
49
92
There is an 'additions' module to this interpreter, which is completely up to the user to utilize. You can temporarily disable them with the -a switch, or even keep them out of your build. Doing so will take away the added `os.getcwd()` and `os.setcwd(string)` and `stackdump(...)` and `os.clear()` functions, which let you set the current working directory and view your stack. A clear function also has been added, which uses the nasty system() call as well as use clear (cls only on windows). Lua Console acts much like a console now that the additions were added.
Added very comprehensive error feedback, which tells you about the stack (stack dumps, too, if not just the error is on the stack), the type of error (syntax/runtime), and the regular lua feedback string with the line number sammich'd between two colons. Now with file name!
88
131
89
-
For example, <br>
90
-
>\>. <br>
91
-
>(Syntax) | Stack Top: 1 | TTY | [string "."]:1: unexpected symbol near '.' <br>
132
+
For example,
133
+
> $luaw res/testing.lua
134
+
> (Runtime) | Stack Top: 1 | res/testing.lua:18: attempt to call a nil value (fie
135
+
> ld 'whatever')
136
+
> \-\-
137
+
> stack traceback:
138
+
> res/testing.lua:18: in main chunk
0 commit comments