Tenoch's dev stuff - More info

Languages

I started programming, years ago, by learning C. I still believe today that it's the best language to start with. It teaches you not only algorithms but also the internal working of a computer, memory management, addressing, building your own data structures. It forces you to be rigorous, which is always good to start with. Furthermore, C is still not a deprecated language. It seems important to me to know a powerful language that made the history of computers.

Owning a Macintosh at home, I naturally became interested in Objective-C when Mac OS X was released. I find Objective-C to be a very clean language (strict superset of C, unlike C++), very simple to learn, and nothing more than what it pretends to be: C with objects. Note however that I have never used it with the big frameworks that made its fame, such as Cocoa and GNUStep. Since GCC compiles it, it is quite as portable as C++, and makes in my opinion a very fine object oriented language to learn the concept and use it afterwards.

I know C++ reasonnably well, being the main language I use at work, but I am definitely not a huge fan. I would say that its main flaw is the fact that it brings a great deal of complexity to its C basis, but tries at the same time to hide a big part of it. It is very easy to create fairly intricate and elegant designs in C++, but also to shoot yourself in the foot continuously because of little details in the language design that seem perfectly absurd. Despite this, I did use C++ for personnal projects a few times, when I coded an effect for Inkscape, or to wrap a library for LÖVE. It is also the language I picked for my sool compiler.

Then came the revelation of Lua. For some reason I got tired of strongly typed languages, of compiling, of annoying building toolchains, of portability nightmares, etc. I got interested in "scripting" languages, as they call them. Ruby seemed to have too many features, as did C++, Python was weird (still can't get my head around syntactic indentation). I finally found Lua and it was everything I wanted.

  • Very simple. The syntax is obvious. You can learn it in an afternoon, and it is very well documented. The standard libraries are very small. There is only one type for numbers, and only one complex type: the table.
  • Interpreted. No more compiling. Oh, well, why did I lose all my time before?
  • Fast. I haven't encountered performance issues yet, except obviously for heavy numerical computations.
  • Very flexible. You can implement OOP in it, or functional programming. You can add constructs from other languages if you really need them. You don't like a standard behavior, change it. Many simple things make your life easier, and allow you to use the language as you like it.
  • The table. Index anything with anything. Don't worry about the rest, they did it for you.

I could go on for ages about how it changed my programming life. It is just pure pleasure coding in Lua. Idea -> code -> works.

Lua also has its pitfalls, notably the fact that it gives too much freedom to messy programmers like me. Big projects tend to require a strict coding discipline that is easy to forget in Lua. In my quest to the ultimate language, I ended up desiging and implementing my own.

Libraries

For user input and graphics, I use SDL, which is in C, portable, popular, and quite easy to use.

A cool thing would have been a Lua wrapper for SDL, but the few that exist are not perfect, some are outdated. The LÖVE game engine is a lot more than that. It makes simple all the stuff that takes so long to write in C+SDL. It is perfect for game developpement in Lua. Plus, I have been a developer on the project (I helped wrap a physics library).

For more application-like programs, I needed a GUI toolkit with widgets and stuff. My choice went to wxWidgets, which is portable, and especially wxLua, which makes programming apps amazingly easy.

Tools

GCC to compile C, Objective-C and C++, as well as MinGW for its Windows counterpart. My project of creating my own compiler got me interested in LLVM and its sister project Clang, the source of which I've been studying with a lot of interest.

I like SCons as a building system, which is far easier to use than make.

My current editor of choice is Geany, lightweight, it has some qualities as IDE and doesn't get in my way. In the past I have used with satisfaction gEdit, jEdit, and always have nano and vim within arms reach when working remotely.

I prefer Bazaar for the version control, but have been using Git as well.