viernes, 12 de junio de 2015

My first post on Lua

Lua is a programming language that always intrigued me but that I never spend time on trying to learn...

This has changed of course -;) As I have start reading Beginning Lua Programming...

So...what is Lua exactly?'s is a powerful, fast, lightweight, embeddable scripting language.

A simple description for a simple language...and nope...I'm not implying simple as "useless" but rather as simple on its learning curve and its design...Lua is indeed pretty powerful and you will be more than surprised if you know where its being used...just search and get amazed -;)

The syntax pretty much reminds me of Python or it's fairly easy to get used to it...

As an is my Fibonacci numbers example...

function fib(num,a,b)
 local result = ""
 if a > 0 and num > 1 then
  result = result .. (a+b) .. " " .. fib(num-1,a+b,a)
 elseif a == 0 then
  result = a .. " " .. b .. " " .. (a+b) .. " " .. fib(num-1,a+b,b)
 return result

io.write("Enter a number: ")
num = tonumber(

Here's a couple of tests -:)


Development Culture.