Life and Löve

The first thing I try to do when learning a new language is to code-up a version of Conway's Game of Life.It's a good way of getting familiar with syntax and how a language handles some core elements like data-structures, flow control and graphics. I've done it now in Scheme, Python, Java, C++, even Haskell. (The latter being an interesting but ultimately masochistic exercise. Perhaps bf should be the next stop.) Python's still my goto language (geddit?) but I've got to say I have never found this exercise so easy and intuitive as I just did with my new-found Löve.

Löve is a 2d game engine for the Lua scripting language. It provides hooks for the key processes of graphical applications like loading, updating, event handling and drawing, and some great libraries for handling other common tasks. And the developers and community appear to have quite the cute sense of humour.

I've not coded in Lua before but I am getting to like its clean, clean syntax and minimalist approach. There aren't a million types and structures with their own rules to learn about. In fact there's really only one structure, the table, which is something like a Python dictionary. Functions in Lua are first-class objects so you can stick them in a table along with other stuff if you like it OO-ey. And it does tail-call elimination for when you want to get recursive.

You should definitely check out Löve if you like that sort of thing. If you're curious, you can find my life implementation here. Now I'm off to start prototyping that killer app. (Hint: it involves cats. And aliens.)