[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: 99 Bottles of Beer...
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 7 Dec 2000 13:55:37 -0200 (EDT)
>> >real token (ie. doesn't generate a specific bytecode, or
>> something like that).
>> `^' does generate a specific bytecode.
>OK, but I meant `:' probably doesn't generate a specific bytecode.
Again, it does:
% luac -
% luac -l
main <0:@(stdin)> (4 instructions/16 bytes at 0x8051f48)
0 params, 2 stacks, 0 locals, 2 strings, 0 numbers, 0 functions, 2 lines
1  GETGLOBAL 0 ; a
2  PUSHSELF 1 ; x
3  CALL 0 0
4  END
>As somebody which have just finished reading the Lua 4.0 manual, I also think
>a tutorial (or more!) would be useful.
Roberto is working on a book about Lua and plans to release draft versions
for comment. This should happen "soon".
>I am playing with the idea of writing a Lua tutorial myself, but I fear lack
>of time will prevent it.
>As a Lua beginner, I may not be the most qualified person to do it, but I use
>to think that the beginner state is useful for such things, as we are aware of
>the problems, pitfalls, and traps where we can trip. Now, Lua is quite an open
>community, so one can write such a tutorial, and submit it to public review,
>to improve it and add the view of more seasoned Lua programmers.
>What I have in mind is to write a full program, like an HTML pre-processor,
>showing the various steps, introducing more and more advanced concepts, etc.
>I would introduce the tags quite later, the base libraries progressively from
>the beginning, drop alternate syntax (like f"string") or give them later.
That sounds like a great project. Literate programming in Lua is a good way
to teach the basics of the language.