Skip to content

Commit dd032c3

Browse files
committed
Merge branch 'master' of https://github.com/Hydroque/LuaConsole
2 parents 0ccdf16 + 7b116f7 commit dd032c3

File tree

1 file changed

+85
-38
lines changed

1 file changed

+85
-38
lines changed

README.md

Lines changed: 85 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,89 @@ A simple, powerful lua console with the intent of replacing CMD and Terminal + L
44
Works on Linux, Windows, and Mac.
55

66
### 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
13+
* português translation?
1014

1115
# About
12-
luaw -?
13-
```
14-
Lua Console | Version: 12/31/2017
15-
Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio
16-
LuaConsole Copyright MIT (C) 2017 Hydroque
17-
18-
Supports Lua5.3, Lua5.2, Lua5.1
19-
5.2.x and 5.1.x assume that you have enough memory for initial functions.
20-
21-
- Line by Line interpretation
22-
- Files executed by passing
23-
- Global variable defintions
24-
- Dynamic module loading
25-
- Working directory support
26-
- Built in stack-dump
27-
- Console clearing
28-
29-
Usage: lua.exe [FILE_PATH] [-v] [-e] [-s START_PATH] [-p] [-a] [-c] [-Dvar=val]
30-
[-Lfilepath.lua] [-b] [-?] [-n]{parameter1 ...}
31-
32-
-v Prints the Lua version in use
33-
-e Prevents lua core libraries from loading
34-
-s Issues a new root path
35-
-p Has console post exist after script in line by line mode
36-
-a Disables the additions
37-
-c No copyright on init
38-
-d Defines a global variable as value after '='
39-
-l Executes a module before specified script or post-exist
40-
-b Load specified parameters by -n before -l modules execute
41-
-n Start of parameter section
42-
-? Displays this help message
43-
```
16+
<details><summary>lua -?</summary><p>
17+
Lua Console | Version: 1/5/2017<br>
18+
Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio<br>
19+
LuaConsole Copyright MIT (C) 2017 Hydroque<br>
20+
21+
Supports Lua5.3, Lua5.2, Lua5.1
22+
23+
- Files executed by passing
24+
- Global variable defintions
25+
- Dynamic module loading
26+
- PUC-Lua compatibility support
27+
- Working directory support
28+
- Built in stack-dump
29+
- Console clearing
30+
31+
Usage: lua.exe [FILE_PATH] [-v] [-e] [-s START_PATH] [-p] [-a] [-c] [-Dvar=val]
32+
[-Lfilepath.lua] [-b[a,b,c]] [-?] [-n]{parameter1 ...}
33+
34+
-v Prints the Lua version in use
35+
-e Prevents lua core libraries from loading
36+
-s Issues a new root path
37+
-p Has console post exist after script in line by line mode
38+
-a Disables the additions
39+
-c No copyright on init
40+
-d Defines a global variable as value after '='
41+
-l Executes a module before specified script
42+
-b[a,b,c] Load parameters arg differently. a=before passed -l's, b=give p
43+
assed -l's a tuple, c=give passed file a tuple
44+
-n Start of parameter section
45+
-? Displays this help message
46+
</p>
47+
</details>
48+
<details><summary>luaw -?</summary><p>
49+
Lua Console | Version: 1/5/2017<br>
50+
Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio<br>
51+
LuaConsole Copyright MIT (C) 2017 Hydroque<br>
52+
53+
Supports Lua5.3, Lua5.2, Lua5.1
54+
55+
- Line by Line interpretation
56+
- Files executed by passing
57+
- Global variable defintions
58+
- Dynamic module loading
59+
- PUC-Lua compatibility support
60+
- Working directory support
61+
- Built in stack-dump
62+
- Console clearing
63+
64+
Usage: lua.exe [FILE_PATH] [-v] [-e] [-s START_PATH] [-p] [-a] [-c] [-Dvar=val]
65+
[-Lfilepath.lua] [-b[a,b,c]] [-?] [-n]{parameter1 ...}
66+
67+
-v Prints the Lua version in use
68+
-e Prevents lua core libraries from loading
69+
-s Issues a new root path
70+
-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>
4481

4582
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.
4683

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+
4790
# Additions
4891

4992
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.
@@ -86,9 +129,13 @@ testdll() -> Loaded successfully!
86129

87130
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!
88131

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+
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;res/testing.lua:18: in main chunk
92139
93140
# Using with LuaRocks
94141
[Windows MinGW](https://github.com/Hydroque/LuaConsole/wiki/LuaRocks-Support-Windows-MinGW)

0 commit comments

Comments
 (0)