Drobe :: The archives
About Drobe | Contact | RSS | Twitter | Tech docs | Downloads | BBC Micro

New RiscLua book online

By Gavin Wraith. Published: 16th Jul 2006, 13:14:20 | Permalink | Printable

BASIC is stuck in the 1960s, is it time for a change?

Fresh from describing Lua scripting with StrongED, Gavin Wraith is in the process of writing an online beginner's guide to Lua, a flexible scripting language. More material may be added over time, and below is an edited extract from the opening chapters of the book. Lua is a straight forward, lightweight programming language used in games such as World of Warcraft and Baldur's Gate, as well as many other applications.

The aim of this booklet is to teach the elements of programming in RiscLua, a dialect of the scripting language, lua, which is especially tuned for RISC OS.

It has been traditional to use BASIC to demonstrate programming ideas, because it is already built into the RISC OS ROMs. In the early days of Acorn this made good sense, because memory constraints prevented the implementation of more modern programming languages.

The chief drawback nowadays of BASIC as a vehicle for learning about programming is that it misses out on ideas that have been accepted as central to programming many decades ago, simply because those ideas were developed long after BASIC was born in 1964. Computer science has simply moved forward, and BASIC is missing out.

Risclua logoAbout twenty years ago, so-called scripting languages started to become popular. These languages were originally intended as a sort of glue for binding applications together. They let you accomplish a lot of work for very little effort. The languages Lua, Perl, Python, Ruby and Tcl are leading examples today.

Lua is probably the fastest among them - a contentious matter which depends on which mix of benchmarks you take - but what is more important for our purposes is that it is the smallest, and has the simplest syntax. Different languages are designed for different purposes, so comparisons must always be taken with a pinch of salt.

Lua has its origins in a need for a simple data description format for surveyors working for Petrobras, the Brazilian state oil company. They were not expected to have any programming skills. What has been unique about the evolution of Lua has been its founders' determination to keep it simple. That has made it an appropriate language for beginners.

It is also one of the most popular languages in the commercial games programming community; knowing Lua has become a marketable skill. RiscLua differs from standard Lua in certain minor particulars.

You sometimes read that programs are like cooking recipes - that they consist of a list of instructions which the computer carries out one after the other. Unfortunately this is not really correct in general. However, as you will see, in Lua's case, this is a useful analogy.

Click on the link below to begin learning Lua.

Links

Lua programming book

Previous: 3D dog fight game first release
Next: Interview with a ROS Open shareholder

Discussion

Viewing threaded comments | View comments unthreaded, listed by date | Skip to the end

Thankyou Gavin for this book. I have copied it from screen to get easily a very well structured 30-page A4 manual. This manual will make it easier for me to have a look to RiscLua.

 is a RISC OS UserGollum on 16/7/06 10:11PM
[ Reply | Permalink | Report ]

Please login before posting a comment. Use the form on the right to do so or create a free account.

Search the archives

Today's featured article

  • Java and RISC OS
    Nick Brown explores the state of play and future options
     47 comments, latest by em2ac on 28/09/07 12:34AM. Published: 19 Sep 2007

  • Random article

  • RiscCAD returns to author
    Welcome back
     6 comments, latest by john on 4/11/04 12:36PM. Published: 3 Nov 2004

  • Useful links

    News and media:
    IconbarMyRISCOSArcSiteRISCOScodeANSC.S.A.AnnounceArchiveQercusRiscWorldDrag'n'DropGAG-News

    Top developers:
    RISCOS LtdRISC OS OpenMW SoftwareR-CompAdvantage SixVirtualAcorn

    Dealers:
    CJE MicrosAPDLCastlea4X-AmpleLiquid SiliconWebmonster

    Usergroups:
    WROCCRONENKACCIRUGSASAUGROUGOLRONWUGMUGWAUGGAGRISCOS.be

    Useful:
    RISCOS.org.ukRISCOS.orgRISCOS.infoFilebaseChris Why's Acorn/RISC OS collectionNetSurf

    Non-RISC OS:
    The RegisterThe InquirerApple InsiderBBC NewsSky NewsGoogle Newsxkcddiodesign


    © 1999-2009 The Drobe Team. Some rights reserved, click here for more information
    Powered by MiniDrobeCMS, based on J4U | Statistics
    "It does appear that inaccuracy is drobes [sic] house standard at the moment"
    Page generated in 0.0847 seconds.