[1]
Language idealist, lover of elegance and simplicity.
Challenge: Design and implement a tiny language that has it all. Oh, perhaps that's a bit hard for a casual challenge!
A bit of history: I first came across Lua because of my interest in virtual machines, and discarded it at once because its VM is language-specific. Not Lua's fault at all. Then I remembered it when I was doing some scripting and cursing Perl for the umpteenth time (I'm not a wizard; I simply can't remember all that magic!) and discovered what a lovely language it is. Now I do most of my scripting in it.
Lua interests:
- Programming: I love the way you can do functional and object-oriented programming in Lua. This is reflected in my contributions to SampleCode. I used Lua for application development at Protechnic Exeter [2] where I wrote a thin OO Lua layer over a vast and ancient C application.
- Libraries: I have implemented [bitwise] and [regex] (PCRE and POSIX) extension libraries for Lua. These are used all over the place including in LuaCheia and RPM. I also have a merge sort replacement for the sort function, but I think I can do better, by writing a stable variant of the built-in quicksort (merge sort is rather slow). I also run the [stdlib] project.
- Language: I have fantasised about how Lua itself could be improved, but with few concrete ideas (but see LocalByDefault) and no results; Sol [3] is much better for that. One idea I did have, though, was to write Lua in Lua, to make experiments easier. This has now been done by [Yueliang].
- Porting: I maintain an EPOC port, which comes as a DLL, with an OPX, so it can be used from C/C++ and OPL. I used to maintain a Linux RPM (tailored to Fedora), now maintained by Andre Costa, and I did an early RISC OS port, but deferred to the more energetic and capable GavinWraith.
- Thanks for the sample code, some very good material. getopt is a beast and a half! :-) --NickTrout
- I agree! Any lua code I can get a look at is great, but this is phenomenal. --JamesHearn
- I agree that Perl is a horror. I assume you must have come across Python? I just wondered why you chose Lua over Python, especially for system/parsing scripts. -- You have experience with functional languages, I do not. Which is a good one to learn to get a feel for them? Perhaps there should be a HowLuaComparesWithOtherLanguages? page? Sometimes its nice to see a comparison of features. It also drives people to try and implement the features in Lua. Erm, I'm suggesting that here because I think you're far more qualified to start a page like that if you felt like it ;-) --NickTrout
- I've often thought about trying Python, but was put off by the sheer size of it. I probably should try it. OCaml [4] is probably the best functional language to learn to get a feel, as it combines a rich language with an excellent compiler. Haskell [5] is more purely functional, with lazy evaluation and proper functional I/O, but it'll take a bit longer to get your head around. --ReubenThomas
- Python is a good language to learn. It's easy to learn (I should think it'll take you about an afternoon), and supports many programming styles, including functional programming. Sadly its lambdas are restricted in syntax and variable access (remember read-only upvalues?). The libraries of Python are big, but the language itself is fairly small. It has enough novel features to make it worth while for the collector of languages. --DavidJones
FindPage · RecentChanges · preferences
edit · history
Last edited October 18, 2006 10:41 pm GMT (diff)