Maemo (as used on the Nokia N900) :
On the device, tap the menu button, then tap "Xterm"
Type in 'nano helloworld.py'
Enter the text 'print "Hello, World!"'
Ctrl-x, ctrl-s to save the file
Enter 'python helloworld.py' and press enter
Of course, as Maemo is based on Debian, you can easily install Ruby, PHP or even a C compiler.