[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Development Environments/Tools
- From: "Guido Sohne" <guido@...>
- Date: Wed, 19 Jul 2006 16:09:50 +0000
I'm on OS X. I use TextMate as my editor. Beyond having a good editor
(I'm sure Emacs and vi would work very well here), and having lua
interpreter running in a shell window and using print() statements for
debugging, I don't think Lua 'needs' an IDE.
In Lua itself, you probably want to develop/find a little useful
library for debugging, so that you can simply (selectively) dump out
your data structures instead of a million little print statements.
The Programming in Lua book has a little routine I adapted to print
out my data structures (my changes were to not blow up when there's a
function in the hash table). I don't have cyclic references, so I
didn't care to make it handle that case ...
function pos.util.serialize(o)
if type(o) == "number" then
io.write(o)
elseif type(o) == "string" then
io.write(string.format("%q", o))
elseif type(o) == "table" then
io.write("{")
for k,v in pairs(o) do
io.write(" ")
pos.util.serialize(k)
io.write(" = ")
pos.util.serialize(v)
io.write(",")
end
io.write("}")
elseif type(o) == "function" then
io.write(tostring(o))
--error('can\'t serialize functions')
else
error('won\' serialize object of unknown type!')
end
end
I'm certain there are other great debugging tools/functions and I
guess if I were you, I would look for more things like that, lua code
that helps in your interactive session, and not the editor part of it
:-)
To the rest of the list. Could you share your little lua
tips/tricks/functions for interactive lua use especially debugging
code and tracing program execution? I know about the stuff listed on
http://lua-users.org/wiki/DebuggingAndTesting but I would be
interested to hear what people actually find useful that's not in
there ...
-- G.
-- G.
On 7/19/06, Stefan Brantschen <sbr@acm.org> wrote:
Hi list members -
What are your recommendations as regards development environments and
tools (for LUA 5.1) for Mac OS X (besides 'lua' and 'luac', of course)?
Thanks for your support.
With regards
- Stefan
--
Stefan Brantschen
sbr@acm.org