Archive for May, 2008

May 30th, 2008

Iterating Sparse Arrays in Lua 5.1

The Lua programming language is a scripting language that is light-weight (in terms of both syntax and size), fast, and easily embedded. I won’t spend a lot of time introducing Lua here (though I may do that in another article). If you haven’t used it, but you’re interested in getting started, a good place to look is the well-written Lua documentation.

I’m currently writing a library of higher-order functions in Lua called lua-functional. One of the early challenges was how to allow iteration over sparse arrays. Out of the box, Lua doesn’t stops iteration after reaching the first nil value. This article explores a two possible solutions to this problem and their consequences.

(more…)

May 13th, 2008

Samsarin PHP Widget 1.3.2

I’ve just posted the latest update to the Samsarin PHP Widget. This version adds the ability to clear out the contents of one or all widgets with the click of a button. It was also qualified with Wordpress 2.5.1 in Firefox, Safari, and Internet Explorer.

Thanks go to Kris for help in testing this feature.

May 5th, 2008

Cool learning software: Mnemosyne

A couple weeks ago I came across an article about learning through spaced-repetition. The article claims that when you first learn something new you will tend to forget it rather quickly, but if you recall it at an optimal time (near when you would forget it) you will remember it for an even longer interval. As you continue to recall this information at these critical points the interval grows longer and longer, until it is measured in years. The article refers to software called SuperMemo, which can be purchased for the Windows operating system, but is not available for OSX, which I happen to use.

The idea of spaced-repetition was interesting enough for me to experiment. Initially I thought I might be stuck writing my own software, but fortunately I came across a very cool open source project called Mnemosyne, which works similarly to SuperMemo: it uses flash cards that quiz you on a piece of knowledge at critical times determined by its algorithm. Here’s an example of one of the cards in my system (from the European geography card deck):

Mnemosyne Screenshot

Cards can include graphics, sounds, or text. You can import card decks or you can create your own. I’ve been using it for about about two weeks to study European geography and Spanish (in combination with LiveMocha). So far, I’ve found the system to be very helpful with both subjects, so I will continue the experiment. If you’re interested in learning a new subject, I would definitely recommend taking a look at this.

(more…)