lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Dec 13, 2009 at 10:56 AM, Luis Carvalho wrote:
> I'm releasing LuaHelp, a simple manual page system for the Lua interpreter.
> LuaHelp is under public domain and contains lhp (Lua Help Pages)

Some observations:

- Is there a reason help.c is written in C rather than Lua?

- What's the name of the syntax the help pages are written in?  It
appears markdown inspired.

- One alternative to help"math.sqrt" is to support help(math.sqrt).
[4] does the latter, and Python supports both [1-3] as well as things
like help("keywords").  help(getname(math.sqrt)) might be another
approach.  To distinguish package functions and object methods, e.g.
io.write and file:write, I see LuaHelp currently uses help"io.write"
and help"file.write", which could become ambiguous, though I'm not
sure what the ideal way to uniquely name object methods is
("<io>:write"?).

- Python invokes the pager (less) rather than just a print.  In Lua,
someone can always redefine print to obtain a similar effect: function
print(s) local f = io.popen("less", "w"); f:write(s); f:close() end .

[1] http://docs.python.org/library/functions.html#help
[2] http://www.python.org/dev/peps/pep-0257/
[3] http://www.ibm.com/developerworks/library/l-pyint.html
[4] http://lua-users.org/wiki/DecoratorsAndDocstrings