[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua Observations/Questions
- From: Ken Rawlings <krawling@...>
- Date: Wed, 23 Jun 1999 16:05:33 -0500 (EST)
On Tue, 22 Jun 1999, Luiz Henrique de Figueiredo wrote:
> In 3.2, there's only *one* "printf", in errorFB, and this is supposed to
> be overridden by whatever is appropriate for systems that do not have consoles.
I've been concentrating on 3.1, and hadn't downloaded the 3.2 beta. Is
there a general timeframe for the 3.2 release?
> > * Lua doesn't appear to have any knowledge of Unicode strings, since
> Yes, but this is not a simple issue, so don't hold your breath.
That's great news. My concern here is mainly long-term, knowing that
Unicode is a priority to be supported in a future release.
> > * Is it possible to do binary I/O in Lua? The iolib seems to be
> Strings in Lua are actually simply byte arrays.
It looks like I was running into the Win32 issue where files are opened
in text mode. This is being changed for 3.2, correct?
Speaking of strings being byte arrays, are there any plans to add
more operators to work with raw binary data?
> > * Lua does not appear to be properly tail-recursive, which makes
> You mean, it will be slow?
No, speed isn't a huge concern, since it's so easy to call a C
function. The problem is that the following function will blow up
the stack with a large n:
function tailR(n, curr)
if n == 0 then
return 1 * curr
return tailR(n-1, n*curr)
> The overhead of interpreting bytecodes is actually very high -- and even then,
> Lua is one of the fastests languages around.
My experience so far has shown it to be surprisingly fast for an
interpreter -- on the order of 3 times faster than TCL and Perl, and
about 50% faster than Python.
> > wary of the "stutter" normally associated with Garbage Collection.
> I haven't seen people complaining about this yet.
Has anyone done any work with Lua in soft-realtime applications? Does
the GC seem to keep up relatively well over the long haul?
Thanks for your reply,
_Ken Rawlings (firstname.lastname@example.org)