From 6445d27e6ab288b2d03bfb6c0d198f3c88a68824 Mon Sep 17 00:00:00 2001 From: Polite Kiwi Date: Fri, 5 Jan 2018 13:57:40 -0500 Subject: [PATCH 1/4] Update README.md --- README.md | 107 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 72 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 5d756b2..480d304 100644 --- a/README.md +++ b/README.md @@ -4,43 +4,80 @@ A simple, powerful lua console with the intent of replacing CMD and Terminal + L Works on Linux, Windows, and Mac. ### TODO -* Triple check buffer overflows and mem alignment and memleaks, as well as iffy -1 versus 1 when using lua\_\* -* Add LuaJIT as an external dependancy and create an overlay for functionality of LuaJIT... pretty much inherit -* Stack trace on error +* 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 +* Develop the additions package with more standard functions that lua could definitely use... maybe not idk +* Optimize REPL \- the code is meh +* Play with sigints and longjmps to see if it could bring a cool feature +* Support multiple lua states on separate threads +* I wonder if its possible to serialize a lua\_State sufficiently, would be nice to save an env +* português translation? # About -luaw -? -``` -Lua Console | Version: 12/31/2017 -Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio -LuaConsole Copyright MIT (C) 2017 Hydroque - -Supports Lua5.3, Lua5.2, Lua5.1 -5.2.x and 5.1.x assume that you have enough memory for initial functions. - - - Line by Line interpretation - - Files executed by passing - - Global variable defintions - - Dynamic module loading - - Working directory support - - Built in stack-dump - - Console clearing - -Usage: lua.exe [FILE_PATH] [-v] [-e] [-s START_PATH] [-p] [-a] [-c] [-Dvar=val] -[-Lfilepath.lua] [-b] [-?] [-n]{parameter1 ...} - --v Prints the Lua version in use --e Prevents lua core libraries from loading --s Issues a new root path --p Has console post exist after script in line by line mode --a Disables the additions --c No copyright on init --d Defines a global variable as value after '=' --l Executes a module before specified script or post-exist --b Load specified parameters by -n before -l modules execute --n Start of parameter section --? Displays this help message -``` +
lua -?

+Lua Console | Version: 1/5/2017
+Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio
+LuaConsole Copyright MIT (C) 2017 Hydroque
+ +Supports Lua5.3, Lua5.2, Lua5.1 + + - Files executed by passing + - Global variable defintions + - Dynamic module loading + - PUC-Lua compatibility support + - Working directory support + - Built in stack-dump + - Console clearing + +Usage: lua.exe [FILE_PATH] [-v] [-e] [-s START_PATH] [-p] [-a] [-c] [-Dvar=val] +[-Lfilepath.lua] [-b[a,b,c]] [-?] [-n]{parameter1 ...} + +-v Prints the Lua version in use +-e Prevents lua core libraries from loading +-s Issues a new root path +-p Has console post exist after script in line by line mode +-a Disables the additions +-c No copyright on init +-d Defines a global variable as value after '=' +-l Executes a module before specified script +-b[a,b,c] Load parameters arg differently. a=before passed -l's, b=give p +assed -l's a tuple, c=give passed file a tuple +-n Start of parameter section +-? Displays this help message +

+
+
luaw -?

+Lua Console | Version: 1/5/2017
+Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio
+LuaConsole Copyright MIT (C) 2017 Hydroque
+ +Supports Lua5.3, Lua5.2, Lua5.1 + + - Line by Line interpretation + - Files executed by passing + - Global variable defintions + - Dynamic module loading + - PUC-Lua compatibility support + - Working directory support + - Built in stack-dump + - Console clearing + +Usage: lua.exe [FILE_PATH] [-v] [-e] [-s START_PATH] [-p] [-a] [-c] [-Dvar=val] +[-Lfilepath.lua] [-b[a,b,c]] [-?] [-n]{parameter1 ...} + +-v Prints the Lua version in use +-e Prevents lua core libraries from loading +-s Issues a new root path +-p Has console post exist after script in line by line mode +-a Disables the additions +-c No copyright on init +-d Defines a global variable as value after '=' +-l Executes a module before specified script or post-exist +-b[a,b,c] Load parameters arg differently. a=before passed -l's, b=give p +assed -l's a tuple, c=give passed file a tuple +-n Start of parameter section +-? Displays this help message +

+
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. From 4747fccb644ef06bfae7169287fb346665229a57 Mon Sep 17 00:00:00 2001 From: Polite Kiwi Date: Fri, 5 Jan 2018 14:03:19 -0500 Subject: [PATCH 2/4] Update README.md --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 480d304..bfaf63f 100644 --- a/README.md +++ b/README.md @@ -123,9 +123,13 @@ testdll() -> Loaded successfully! 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! -For example,
->\>.
->(Syntax) | Stack Top: 1 | TTY | [string "."]:1: unexpected symbol near '.'
+For example, +> $luaw res/testing.lua +> (Runtime) | Stack Top: 1 | res/testing.lua:18: attempt to call a nil value (fie +> ld 'whatever') +> \-\- +> stack traceback: +>         res/testing.lua:18: in main chunk # Using with LuaRocks [Windows MinGW](https://github.com/Hydroque/LuaConsole/wiki/LuaRocks-Support-Windows-MinGW) From 9619c1ddabee5f3b1a3fc7cbfa42d5fb05bbf475 Mon Sep 17 00:00:00 2001 From: Polite Kiwi Date: Fri, 5 Jan 2018 15:08:37 -0500 Subject: [PATCH 3/4] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index bfaf63f..9ea7df5 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,9 @@ assed -l's a tuple, c=give passed file a tuple 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. +# Building +Just two steps, first one is getting Lua. The other is building LuaConsole. [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. + # Additions 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. From 7b116f7b4269a5f955f0d3ac6e4576ee243f51b3 Mon Sep 17 00:00:00 2001 From: Polite Kiwi Date: Fri, 5 Jan 2018 15:10:09 -0500 Subject: [PATCH 4/4] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9ea7df5..a886ece 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,10 @@ assed -l's a tuple, c=give passed file a tuple 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. # Building -Just two steps, first one is getting Lua. The other is building LuaConsole. [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. +Just two steps: +1. get Lua +2. build LuaConsole +[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. # Additions