Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Book Reviews Books Media

Beginning Lua Programming 173

Simon P. Chappell writes "These days, Brazil is no longer just on the map for its fine coffee and martial arts. They have a few other reasons and one of them is called Lua. Lua is an open-source scripting language that was originally designed for small size and excellent portability to support its use in embedded systems. Like anything good, it didn't take long for it to be discovered by others looking for a small and efficient scripting language."
Beginning Lua Programming
author Kurt Jung, Aaron Brown
pages 400
publisher Wiley
rating 9
reviewer Simon P. Chappell
ISBN 0470069171
summary A great introduction to Lua with solid writing and explanations of the concepts


This is definitely a book targeted at those new to Lua. While it begins gently, it picks up speed quite quickly and takes its reader through a full range of Lua usage. This book is unusual, for the more mass-market beginner books, in that it does not treat the reader like an idiot. I found the tone to be very respectful of the reader's intelligence. This aspect alone, makes the book stand out in a crowded beginners market.

This book is also a very good introduction to Lua for programmers experienced with one or more other programming languages. I found it very easy to pick up the concepts with my previous programming experience.

The first chapter of most books like this, will typically cover getting setup with the language. This book delivers well, with not only explaining how to install the binary version, but also covers compilation under Unix-styled operating systems and a number of development environments for Microsoft Windows. Guidelines are given for building Lua on Windows using Visual C++, Tiny C and MinGW.

Chapter two is called "First Steps" and is a walkthrough of all of the core language. This is well done and there are plenty of examples where a Lua command is typed and the resulting display from the Lua environment is shown. Chapter three is dedicated to the art of the Lua function. Functions are first class values and have enough power and complexity that they deserve their own chapter. Did you know that Lua automatically recognises tail recursion and handles it appropriately? It does. So if your looking to experiment with some of the trendy functional techniques that tend to swamp Reddit these days, Lua would be a good place to try it.

Chapter four explores Lua's only data structure, the table. What's a table, you ask? My best description, as far as I've managed to get my head around it, would be that it's a Swiss-Army Knife style Hash Table with multiple personalities, alternatively thinking that it's an array, a list, an Erlang-style tuple or a tree structure. However you decide to use it, this chapter explains it and provides lots of examples. Chapter five brings us that ultimate datatype, the string. As with tables, Lua can do many things with the humble string and this chapter will make sure that you can work with substrings, handle user input, read and write files and use the built-in pattern matching available in the language.

Chapter six covers "Handling and Avoiding Errors". I know, I know, we don't have errors anymore, now that we've all discovered the benefits of agile development using scripting languages. Except that we do and circumstances external to our programs can still bring pain to our code. Users type the wrong things, network connections die, power can go out suddenly and, of course, sometimes there are parts of our programs that aren't as imperfect as we'd like to think they are. Chapter seven is about "Using Modules" and explains Lua's interfaces and implementations together with guidelines on modularising scripts and calling those modules.

Any agile language worth its electrons is going to have meta-programming facilities within it. Lua has them and chapter eight is where we learn about "Extending Lua's Behaviour with Metamethods". Chapter nine examines Lua's ability to handle events using coroutines. This is a powerful feature and enables Lua applications to manage concurrent tasks with ease.

Chapter ten explores the fascinating world of Lua internals. While Lua is a scripting language, it does use a virtual machine, this chapter shows how scripts can be pre-compiled to the appropriate bytecode. It also covers memory management and implementation details for tables and strings. Chapter eleven is somewhat reference-like, covering the standard libraries supplied with Lua. Chapter twelve is a good compliment, describing some of the available libraries from the Lua community.

Chapter thirteen addresses the matter of interfacing Lua with other languages. If your language can handle C-style calling conventions, then it can be used by your Lua programs. Chapter fourteen is for everyone that wishes to store information in a database now and then. Lua has bindings for connecting to a number of popular database systems and this chapter will help you use them.

My favourite chapter is number fifteen, where using Lua for web applications is explained. There are several alternatives for the budding Lua web application programmer, ranging from that humble and faithful technique, the CGI script, to the Kepler web server environment with the convenience of LuaPages. In this highly-connected world, it is important to be able to communicate over a network and if chapter fifteen didn't tip you off, then chapter sixteen will make you absolutely certain that Lua is ready for networks. Chapter sixteen explores networking from LuaSockets to email and webpages.

Lua is very popular among video games designers. While not generally used to write the frameworks, it is often used for in-game scripting. Chapter seventeen recounts many of the ways that Lua can be used within video games. Chapter eighteen will appeal to the Palm carrying geeks in the house. If you've been looking for a programming language for your Palm PDA, then Plua may be just what you were looking for. Plua (actually Plua2, but they call it Plua) is an implementation of Lua 5.0 for the Palm OS. It gives full access to both data and graphics and is programmable on the Palm; no need to be tethered. Finally, chapter nineteen addresses the subject of "Fitting into the Lua Community".

That's a long list of chapters. Phew! After all of that, let's see what was worth noting along the way.

The writing style is good. Light without being flippant and respectful of the readers intelligence. I like that. I liked the fact that the topics were broken down into appropriately sized chapters. It meant that this book has more chapters than usual, but each one is nicely partitioned, so it doesn't feel over-whelming. I also like the fact that this book seems like it will continue to be useful in the medium term as well. Some beginners books stop being useful quite quickly after you've learned the basics from them, but this one covers quite a number of topics that will useful at the mid-level of Lua skills.

I have very little negative to say about the book. While I normally don't care for books much larger than 300 pages, this one doesn't feel like it has any gratuitous stuffing in it. There is an appendix with answers to the programming questions asked here and there in the chapters, but other than that, everything feels like it should be there.

As a typography and layout nut, I did feel that the layout was a little cramped and the primary type size was a little small. The program listings were generally well done, although I'm not sure that every single one needed a gray background to help separate it from the body text.

The title of chapter nineteen, "Fitting into the Lua Community" seemed a little patronizing to me. I understand the need for maintaining community values, but most communities do that fairly well without the aid of authors playing the heavy. Apparently the community lasted this long without the book. Let's hope they make it a little longer, now that the masses know about it.

All in all, this is a great introduction to Lua. It has solid writing and explanations of the concepts, with plenty of examples. Recommended.


You can purchase Beginning Lua Programming from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
This discussion has been archived. No new comments can be posted.

Beginning Lua Programming

Comments Filter:
  • LUA in WoW (Score:5, Informative)

    by Anonymous Coward on Monday April 02, 2007 @03:00PM (#18577529)
    Blizzard uses LUA as the scripting language for macros and UI controls in the World of Warcraft MMORPG.
    • Not trying to troll, but in all honesty with tons of other proven languages out there, why did blizzard bank on this one? what makes this language so great? i read the wiki article, but it seems like this is a relative new comer with very limited documented use in the production world (no pun intended), let alone a scaling application like WoW. Does anybody know?
      • Re: (Score:3, Interesting)

        by XO ( 250276 )
        The Far Cry and Crysis engines also use it. It's pretty popular, from what I've heard.

        I've looked at it and it looks like it'd be something really nice to incorporate into projects where you'd like to give people scripting abilities, but it's got some really really annoying things:

        It looks like a cross between Pascal and BASIC

        OK, well, that's all I could think of.
        It almost makes my head hurt.

        I suppose if I had been doing VB over the past decade instead of using all C-like languages, I could wrap my head ar
        • C and derivatives have one of the least consistent syntaxes out there. About the only thing worse is BASIC.

          As for Lua, it's neither BASIC nor Pascal syntax-like. Syntactically it's probably closest to Modula without semicolons (which is a good thing, very clean syntax), or Ruby for something more modern to compare to. Semantically it's somewhere between Scheme and JavaScript.

      • It's popular because it's designed to be embedded. Other scripting languages are designed around being run as the top-most context of executiong, e.g. being run from the command line or when a user requests a web page. Lua is very easy to embed in your own app, so that for example you can write a script which can access the variables and functions of your running application. This is extremely useful for games in particular.

        You can easily hook up a Lua method to access a variable in your containing applicat
    • The vendetta-online [vendetta-online.com] space MMORPG also uses Lua at it's core.
  • Yeah... (Score:3, Funny)

    by phasm42 ( 588479 ) on Monday April 02, 2007 @03:01PM (#18577539)

    These days, Brazil is no longer just on the map for it's fine coffee and martial arts.
    I pretty much stopped reading after that.
    • Re: (Score:1, Troll)

      by syphax ( 189065 )

      That struck me as odd, too. A joke? I always thought Brazil was on the map for the Amazon, Carnaval, and fine women (see: Carnaval). I suppose you can also add ethanol and insane gang and prison violence.
    • Re: (Score:3, Funny)

      by Threni ( 635302 )
      >>These days, Brazil is no longer just on the map for it's fine coffee and martial arts.

      >I pretty much stopped reading after that.

      Exactly. If theres one thing I cant s'tand its people who dont know how to us'e punctuation.
    • Re:Yeah... (Score:5, Funny)

      by Eccles ( 932 ) on Monday April 02, 2007 @03:10PM (#18577655) Journal
      I was thinking of a particular, uh, "haircut" myself...
    • I was going to add "bathing suits, bikini wax, and babes" but it looks like my esteemed colleagues here have beaten me to it...
  • WoW (Score:2, Informative)

    by dsraistlin ( 901406 )
    It is also the scripting language that is used for WoW mods.
    • LUA in games (Score:2, Informative)

      by mkithara ( 589429 )
      It's also the scripting language used by Supreme Commander.
      • Re: (Score:2, Interesting)

        by koxkoxkox ( 879667 )
        Lua is not only used in games.

        As another example of what you can do with Lua, it is used in Ion, a window manager (http://modeemi.fi/~tuomov/ion/ [modeemi.fi]). Granted, it is a little known window manager, intended for people who dislike mouse and fancy graphic effects, but it has been designed to be a lightweight solution and that's why Lua had been chosen.

        http://www.yzis.org/ [yzis.org] uses it also.
  • What advantage does Lua have over perl/python/ruby/other existing scripting languages that makes it worth investing the time to learn?
    • by Anonymous Coward on Monday April 02, 2007 @03:14PM (#18577707)
      It's very lightweight and used in fields where a full language is needed but the overhead of a Perl/Python/Ruby is unacceptable. Plus the 'sole' datatype is pretty flexible (can be used to code OO (prototypical & definition), Modules, namespaces &c.). It's also pretty damn fast, and quite solid for general use. The wikipedia entry has a decent list of games & apps that it's being used in.

      I must agree though that this article didn't do too much in terms of selling the language, which is probably what the book is supposed to do.
    • by Jimmy_B ( 129296 ) <<gro.hmodnarmij> <ta> <mij>> on Monday April 02, 2007 @03:17PM (#18577745) Homepage

      What advantage does Lua have over perl/python/ruby/other existing scripting languages that makes it worth investing the time to learn?

      Lua is useful because it's easy to fold into other programs. Lua is what you pull out when you're writing an application in a non-scripting language but you decide to make part of it user-scriptable. Conversely, you may be using one of those applications, in which case there are Lua scripts around for you to play with.
      • by Anonymous Coward on Monday April 02, 2007 @05:04PM (#18579161)
        Lua's C API is rather stellar. It makes it very easy to jump between Lua and C code near-infinitely, to access C functions from Lua and Lua functions from C, often nested multiple times that way.

        It's also extremely small in terms of memory size and footprint, making it ideal for some embedded applications. I've used it to create a (yes, really) AJAX-enabled web-UI for configuring small Linux boards.

        I had to write some sqlite bindings for Lua to do it (sorry, closed source, GRRR) but it really wasn't even remotely hard.

        On the downside, most Lua projects start to feel like Lisp as you start to add your own language support for things that aren't in the core, and it's best to avoid the object/module support -- that's rather hairy stuff.
    • IIRC, Lua is the scripting language used for World of Warcraft user interface modifications. A decent practical reason, at least!
      • Re: (Score:2, Informative)

        by Anonymous Coward
        It's also used to configure damn near everything in Homeworld 2. You can tweak anything with just notepad.
    • by FooAtWFU ( 699187 ) on Monday April 02, 2007 @03:25PM (#18577849) Homepage
      You use Lua for your in-game scripting of your computer games. Can you fit your Perl/Python/Ruby interpreter in 150 kilobytes? I didn't think so. Can you get it under a MIT license? I don't think you can.

      Should you use it for your online web application backend, or your system administration scripts? Probably not.

      • Re: (Score:3, Insightful)

        by winkydink ( 650484 ) *
        I believe I can get perl under the Artistic License. How does the MIT license differ in a way that is advantageous?
        • Re: (Score:3, Informative)

          by acidrain ( 35064 )

          Did you just get modded up for not being able to type "MIT license" into google?

          MIT is BSD-style without any clause that would stop it from being re-used in a commercial product. And sorry guys, this is a requirement for use in games right now.

      • Can you fit your Perl/Python/Ruby interpreter in 150 kilobytes?

        Does it matter?

        Here, let me fix this for you:

        You use Lua for your in-game scripting of your computer games which are written in statically-compiled languages.

        If the game had been written in Perl/Python/Ruby in the first place, no additional scripting language would be needed. Granted, Python is probably the only one of those that's reasonably fast enough, but still...

      • Can you fit your Perl/Python/Ruby interpreter in 150 kilobytes?

        No, but SIOD [delphiforums.com] fits into 75K, has a track record with the Gimp and game extension, and has a use-it-any-way-you-want license. I've used it for web-related stuff and sysadminish things, too.
      • by dkf ( 304284 )

        You use Lua for your in-game scripting of your computer games.

        A potential competitor here is Tcl, which, like Lua, has an embedding background.

        Can you fit your Perl/Python/Ruby interpreter in 150 kilobytes? I didn't think so.

        You can't fit Tcl into that space either these days. But you do get more functionality out of the box, and it's trivial to profile that functionality for specific application usage too (very useful for embedded use).

        Can you get it under a MIT license? I don't think you can.

        Tcl uses the

        • by cpeterso ( 19082 )
          Games are performance-critical. At least Lua code compiles down bytecode. Tcl is interpreted. Even Tcl numbers are strings.
    • by pavon ( 30274 ) on Monday April 02, 2007 @03:33PM (#18577913)
      If you want to add scripting functionality to an existing application Lua is by far the easiest way to do so, and it has an added benifit being more efficient (both in terms of memory consumption and execution speed) than python or ruby. It is fairly easy for power-users to learn, as it is simular to javascript in many ways, and yet is also powerfull, as it is a complete functional language. For these reasons, you are seeing it being used more and more in open source desktop applications as well as many big name games such as WoW.

      I don't know that I would go out of my way to learning it just to learn it, but I would love to see it become the defacto scripting language for linux desktop apps.
    • Asking what Lua has over Perl/python is like asking what YAML has over XML. You can do more in XML but it's not a lightweight format. YAML is clean and human readable, and fast to parse. It's so lightweight that I actually use it in my Python program to define complex structures of constants, since it's actually a cleaner syntax than the python code itself!

      Indeed there are extremely few XML applications I have seen that would not be much better served by YAML. for example, .plist files on macs ought to
      • Finally someone with a brain! I thought I was the only guy who sees XML for the bloated non-solution that it is! Of course, the internets love acronyms (see AJAX). Personally, I prefer fast and lean binary encoding (with complete documentation of its structures) but all these late generation programmers are allergic to anything that existed before 1998 :P
        • I prefer fast and lean binary encoding (with complete documentation of its structures)

          You put that in parentheses as a secondary characteristic, but that's the very distinguishing reason why XML was invented. You're not supposed to need complete documentation for using a XML file format, they should mostly self-documenting - it was designed as a flexible format for interchange. Binary and XML are for different goals, you preferring one over the other is like saying that you prefer cars over railways because
    • Lua works on Lego robots http://www.hempeldesigngroup.com/lego/pbLua/ [hempeldesigngroup.com]

      Java does too http://lejos.sourceforge.net/ [sourceforge.net]

      I don't think there are python or ruby ports though, possibly because these devices are very limited.

    • There are two things that make Lua different/better than existing scripting languages, IMO:

      1) It's designed to be embedded in applications.
      2) It's a data-management language.

      Other languages can be embedded, but it's harder to do (at least when I last looked), and I have yet to see an embedded language as lightweight as Lua with equivalent features. It also has the advantage of being a self-describing human-readable data format (plain-text), but it has an advantage that it's ALSO a language. While all la
    • Lua's not bad as a very trivial sort of scripting language, but the problem with it is that you cannot extend it with structures without writing underlying C code.

      That makes it a pretty poor choice to do anything that's fairly complex, because under the covers you're still going to write a significant amount of C. All the flexibility of a scripting language, all the danger of C code is not a place I like to spend my time.

      Lua is a tiny, tiny scripting language, which is pretty cool. However, it also has an e
    • by grumbel ( 592662 )
      ### What advantage does Lua have over perl/python/ruby/other existing scripting languages that makes it worth investing the time to learn?

      When it comes to day to day scripting, I don't think its worth to learn, since it just doesn't provide much in that area, its just not what is was build for. What LUA however is very good at is getting embedded in other applications, in that area it just is way superior to perl/python/ruby/etc.

      Its not just a matter of size, but mainly a matter of flexibility, i.e. if you
  • by wordisms ( 624668 ) on Monday April 02, 2007 @03:04PM (#18577581)
    Great example of how lua can extend the functionality of a program. Check out the Nmap Scripting Engine [insecure.org].

    With lua and NSE, nmap can now do things like vulnerability testing. Why not download nmap [insecure.org] now and give it a try?
  • Supreme Commander (Score:3, Informative)

    by maeltor ( 679257 ) on Monday April 02, 2007 @03:06PM (#18577613)
    Its also used in Supreme Commander, to script a lot of the in game AI and unit actions as well as define the attributes of moddable units.
  • Small? (Score:3, Insightful)

    by shmlco ( 594907 ) on Monday April 02, 2007 @03:09PM (#18577639) Homepage
    "Like anything good, it didn't take long for it to be discovered by others looking for a small and efficient scripting language."

    Small and efficient? Sure, for now. But wait until the rest of the OSS community gets done with it. I give it two years tops before, like PHP, it's been "extended" with 1.67 million indecipherable functions.
    • by Sneftel ( 15416 )
      Ah, but that's the beauty of it. Luiz has shown an incredible resilience against the forces of bloat. IIRC, the language syntax is actually a little simpler now than it was two years ago.
    • by Anonymous Coward
      >> Small and efficient? Sure, for now. But wait until the rest of the OSS community gets done with it.

      No, that won't happen. To understand why, you first have to understand what the reviewer meant by "Fitting into the Lua Community". This was a mighty unusual chapter to find in a book, and many will have wondered what was behind it. Well, there is no substitute for experiencing it yourself directly, but here's a small explanation by way of preview.

      The Lua community is odd, very odd. It contains ma
  • After reading over the Lua home page as well as the wikipedia entry, I'm left wondering if Lua is merely a language for writing extensions or if it's intended for building things (like, say, application frameworks?). The other thing I hope someone here can answer is this: are there no other languages designed for extending other applications? Why can't this be done in Ruby or Python or Perl or JavaScript? Not to offend the tens of Lua programmers reading this, but what's the point? What is it that Lua does
    • Re: (Score:2, Informative)

      by Nanidin ( 729400 )
      Speed [timestretch.com] and size [lua-users.org] to name a few... it's also easily integrable into C/C++ programs. The second link actually has a long list of Lua benefits.
    • Ruby/Python/Perl/JavaScript are much more heavy than your average embedded Lua interpreter while still providing decent language feature set. Add to this ease of customization (practically every application that uses Lua as an embedded scripting language, customizes portions of the interpreter), ability to embed not just interpreter but precompiled scripts too and ease of interaction between Lua scripts and C/C++ host program and it becomes product with maybe not large but noticeable market niche.
    • by ukpyr ( 53793 )
      As you can do almost anything in any language, it's all about ease of task. Ruby is great for writing complex applications in (i've found), where as bash is great for copying some files around to launch an april fools day version of my company's website via cron.

      I find that when I'm writing stuff in ruby, I enjoy it a tad more, than say, perl or php. I've not measured it but I think there is a correlation between enjoyment and efficency. Maybe only in that I get sick of the project I'm working on at a later
    • by grumbel ( 592662 )
      ### Why can't this be done in Ruby or Python or Perl or JavaScript

      Can't say about all of them, but most of them only allow you a single VM, which just isn't good enough when you want to keep your scripts apart from each other and secure (i.e. in a game a users script shouldn't crash the engine or change the behavior of other unrelated scripts). In Lua on the other side you can have as many VMs as you want and you never run the risk that any scripts breaks out of its little sandbox. You might be able to repl
    • by peterpi ( 585134 )
      Others have mentioned the speed and size benefits. Although it's fair to say that it is niche, within that niche it is completely dominant. It's the default choice in the games industry for the sort of code that is not best done in C (or even; not best done by a programmer).

      Let's say your're working on the PSP. You've got 24MB to start with. Take away 4MB for the executable and static data, 5MB for your core geometry & textures (player, car, whatever.) 2MB for sound, half a meg or so for display lis
    • by lahvak ( 69490 )
      are there no other languages designed for extending other applications?

      Yes, about zillion od them. My impression is that lua is more powerful than s-lang, easier to learn than scheme, and smaller and more portable than ruby/python/perl.
  • by MyIS ( 834233 ) on Monday April 02, 2007 @03:20PM (#18577791) Homepage

    What's with the "base index of 1" array conventions in their standard library?

    I love Lua, and have played around with it quite a bit, but that part of their specs always annoyed me. Interestingly, it is flexible enough to allow custom "standard lib" code that uses base index of zero. Also, custom scriptable objects can define their own conventions, including relying more on the iterator interfaces, which forces things to be theoretically cleaner.

    But still, just having that even as a possibility irks me.

    • by CastrTroy ( 595695 ) on Monday April 02, 2007 @04:08PM (#18578431)
      If you look at languages like C then having an array start at 0 makes sense, because the array index is the offset from the beginning of the array. However, if you don't have pointers, it's really unintuitive to have arrays starting at 0.
      • Indexes starting at 0 might be unintuitive to people who aren't programmers, but it gets rid of a lot of +1s and -1s in your source code.
      • if you don't have pointers, it's really unintuitive to have arrays starting at 0
        Not really, I typically find that when calculating an offset into a 1-based array, I have to add one to whatever offset I come up with to compensate for the base. Using zero-based arrays tends to result in more natural solutions.
      • I wondered this myself, learning Java. Since Java abstracts from memory and hides pointers from us, why do array indices start with 0? However, building Tetris, I became very glad of this. (Think about the position of the blocks). I'm sure there are other reasons it makes sense....
        • Re: (Score:3, Insightful)

          by Sique ( 173459 )
          It has to do with two very basic properties of natural numbers: Cardinality and Ordinality.
          If your natural numbers start with 0, then the Ordinality of n (the position number in the sequence of natural numbers) is equal to the Cardinality of n (the amount of numbers, that are smaller than n).

          So whenever you have to talk about both position in (ordered) sets and size of sets, starting to count with 0 has its advantages.
      • by MyIS ( 834233 )

        There are a few replies to your post about merits of a base index of zero. But I wanted to elaborate on the collections framework thing.

        Lua, being a new language, should have right away very heavily discouraged the use of anything but abstracted opaque collection types such as unordered sets and collections and iterators. Sure, those seem a little clunky and slow compared to the iconic for(int i = 0; i < n; i++) but they actually allow for faster and more streamlined implementations when the traditiona

  • to turn it into a bloated monstrosity because it would be so much more useful if it just did this one tiny little additional thing.

     
  • by rrohbeck ( 944847 ) on Monday April 02, 2007 @03:34PM (#18577935)
    >'Lua' means 'moon' in Portuguese and is pronounced LOO-ah.

    I guess all the Americans here didn't get it.
  • Step up to Lua (Score:1, Insightful)

    by Anonymous Coward
    Having spent many years with Perl, then Python, and finally Ruby, I discovered Lua recently at v5.1, and *love* the language. Lots of people already mentioned that it is used heavily as an embedded language, but, it was designed as an 'extensible' language, lending itself to creating DSLs with ease. One of the fastest scripting languages, it is also one of the smallest: the whole distribution fits on a floppy disk (if you still use those).
    Although there is good progress with the Kepler project, there is not
  • I got on the Lua bandwagon last year, and for what it is designed to do, it is quite good.

    Before I start cheerleading, some comments on the book. Beginning Lua Programming (BLP) is a very good book on the subject, especially for people new to Lua or perhaps even to programming. I own this book as well as the "Programming in Lua" (PIL) book by Roberto Ierusalimschy, the latter of which I think has some of the best technical writing I've seen in a computer book and is on par with the likes of the late W. Ri

  • The syntax is just way too overblown - but then us Smug Lisp Weenies [c2.com] know that anything more than parens and a few lexical markers is overblown.
  • What advantage does Lua have over Scheme?
    • One advantage over Scheme is ease of integration with C/C++, both due to the lightweight implementation, and the lack of full continuations. Also, a syntax that doesn't scare your average programmer.

      A stripped-down Scheme which offered a one-shot alternative to Scheme continuations, more like Lua's coroutines, might help. To compete with Lua, it would also need to be implemented as a bytecode interpreter. Existing Schemes like MzScheme and Guile are relatively heavyweight. TinyScheme isn't bytecode-based
    • by reaper ( 10065 )
      (((Less) lexical) clutter) and (you (can (add, two))) things
      with (an, addition, operator)
  • Appropriately enough called ``LuaTeX'':

    http://www.luatex.org/ [luatex.org]

    Makes easy a lot of things which had required some bizarre texniques.

    William
  • Why would you go to this rather than rebol? Which seems to have the advantage of offering easy to make guis as well. Whereas for a user interface don't you have to go to something like murgalua with Lua? Or are there other short cut gui designer environments for Lua?
  • by PHAEDRU5 ( 213667 ) <instascreedNO@SPAMgmail.com> on Tuesday April 03, 2007 @07:03AM (#18585459) Homepage
    Hello? Anybody in there? Rio is known for Chicks! And tiny thongs! And Ipanema! And Copacabana! And Samba!

    Geeks. Geez.
  • Honestly, I wonder in which caves some people live ....

Love may laugh at locksmiths, but he has a profound respect for money bags. -- Sidney Paternoster, "The Folly of the Wise"

Working...