Training, Open Source computer languages

PerlPythonMySQLTclRubyC & C++LuaJavaTomcatPHPhttpdLinux

Search our site for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
If you are learning Lua, here are some more examples

During some courses, I write few (if any) new examples in front of my delegates, rather relying on the standard ones in the training notes (which I wrote anyway!) and making small changes and adjustments to illustrate how things work. On other courses, though, I write a some new examples from scratch - and such was the case during last Thurday and Friday's two day Lua training class.

Here - primarily for the delagates in that class - are links to the many of the new examples, which I have added to our on line resource. If you follow the links to any of these, you'll be offered links to other related examples too!

Lua Fundamentals

Comments in Lus
Simple sting.format example
for loop example in Lua
strip.rep to repeat a string
getting the minimum value from a table in Lua
Pattern Matching -getting names from amongst a stream of punctuation

Lua functions and modules

Variable number of arguments to a function
Lua functions to return larger of two values and largest of a table of values
How sorting works in Lua - looking under the counter
A Lua program that calls in a module and the module itself
An function which could usefully be turned into a coroutine and that example amended to run as a coroutine

Towards Object Orientation in Lua

A reminder of tables
Adding Lusa's metables to change functionallity
Creating and using a table of Lua 'objects'
Redefining operator behaviour on tables in Lua

Lua is a really excellent language with a small "footprint" - the more I use it, the more I like it (and I like it a lot!). You won't find the "bloat" of other open source languages, but you WILL find nifty and useful features which come together to make it a very valuable programming tool; it's this feature set that has led to its widespead adoption in the games industry where (for example) it's used in "The world or Warcraft" to customise the user interface.
(written 2008-07-06 11:13:25)

 
Associated topics are indexed under
U101 - Introduction to Lua.
U102 - Lua - Numbers and the Math library.
U106 - Lua - Functions.
U109 - Lua - Modules
U107 - Object Orientation - the Lua way
U114 - Lua - Threading and Coroutines.

Back to
Dealing with The Press
Previous and next
or
Horse's mouth home
Forward to
FTP server on Fedora Linux
Some other Articles
Perl ... adding to a list - end, middle, start
Running operating system commands in Perl
Training Course and Business Conference Technology
FTP server on Fedora Linux
If you are learning Lua, here are some more examples
Dealing with The Press
Sorting in lua - specifying your own sort routine
Saying NOT in Perl, PHP, Python, Lua ...
Lua Course - here is the index
Defensive coding techniques in PHP?
1829 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

© WELL HOUSE CONSULTANTS LTD., 2008: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 0800 043 8225 or 01225 708225 • FAX: 0845 8382 405 or 01225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho