[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANNOUNCE] LTN 10 - Weave your own description languages
- From: rrt@...
- Date: Fri, 07 Sep 2001 10:21:29 +0100
> Gavin Wraith has sent an interesting LTN about weaving HTML pages with Lua.
> See http://www.lua.org/notes/ltn010.html .
Yes, that's good, although I still like the idea of being able to
embed Lua in HTML a la CGILua, because it looks nicer when editing it.
Since LTN010 (congrats on the double figures; it's nice to see the
series taking off; soon you'll have to start categorising them) cites
LTN009 as an influence, which I think I missed, I read that too. Nice.
One other thing it could mention: if you're doing lots of string
concatenation because you're processing a file, then a different, and
perhaps simpler way to avoid the inefficiency (and also make your
program work much better on long files!) can be (if possible) to
process the file a line at a time. This can trade a very slight
decrease in readability for a vast increase in speed and efficiency
(and no extra tricks needed).
Or maybe everyone writes like that anyway, since it's the way such
programs used to be written...but I find myself thinking in more
idealistic terms (and why not? Lua lets you write many file processing
operations very simply with a single gsub) and only using such
"tricks" when necessary.