[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Moonscript as a useful notation for Lua users
- From: Dirk Laurie <dirk.laurie@...>
- Date: Tue, 13 Aug 2013 09:01:00 +0200
2013/8/13 steve donovan <steve.j.donovan@gmail.com>:
> But I do find myself more impatient at the interactive prompt....
The Lua Reference Manual has this to say about the Lua executable:
The Lua distribution includes a sample host program called `lua`,
which uses the Lua library to offer a complete, standalone Lua
interpreter, for interactive or batch use.
Regards those words: "sample host program".
There have been several attempts to provide a more convenient
alternative. None of them has ever tempted me to use them for
longer than the day or two it takes me to experiment. Here are
some possible reasons:
1. `lua` is not that inconvenient.
2. The alternative is not as well documented, well maintained, reliable
and portable as `lua`.
3. The alternative offers features appealing to its author but not
the ones enough other users really want.
Here is my wish list. The general rule is that the alternative must
be at least as much more convenient than `lua` as `ipython` is than
`python`.
1. On playback, the original code as typed must appear, not the
modified version showing what the REPL did to it (`lua` only
changes '=' to 'return ', and even that is mildly annoying).
2. Context-dependent name completion (`lua` with 'readline' does it
for file names only.
3. One-keystroke help (e.g. '?coroutine') for all keywords and standard
libraries, and a well-defined mechanism for providing that with
modules.
4. Installing it must be no harder than compiling `lua`. I.e. type
`make linux`, `make mingw` or whatever in the directory in which
the distribution is unpacked, and NO DEPENDENCIES. I.e. supply
the whole Lua source if needed.
Things like syntax extensions are way off my list, but I won't complain
if the author puts them in.