Lua experiment

For some reasons, I had the opportunity to test the LUA language. I spent one evening on it, then switched to Squirrel (which is very close). What I appreciate the most with scripted languages is that the classic C++ turnaround loop (Stop — Debug — Compile — Link — Start) is made a lot easier.

I took a moment to see how basic scripting turns out in LUA, then practicing things like tables, list, sort, file IO, it ended up in this :

Table / Linked list test : put values in a table, then in a list, display them.

Sort table of values : put randomized values in a table, sort it, and display it.

Bitmap output : throw RGB pixels in a binary file. This creates a RAW file, that you can open in Photoshop as long as you know its size & depth. The purpose of this was to be able to render a Mandelbrot figure to a file.

Mandelbrot fractal : using the previous routine, this sample simply computes the famous Mandelbrot figure. Left is the result.