The Esoteric Year – 2012

Well, here it is, the end of another year. December 21st came and went, and the earth’s crust did not open up and swallow us all, unless it did and we’re all now in purgatory waiting to sort things out.

For my part, I spent the year relearning how to program. That’s an odd statement coming from someone who’s been programming professionally for about 25 years. Towards the end of 2011, I decided to pick up the Lua language as a tool for doing rapid prototyping and whatnot. I chose it because it’s a fairly minimalist language, very tiny runtime, runs everywhere, etc.

My editor of choice for much of the year was SciTe. At some point, I switched away from that and started using NotePad++. Finally, I’m settling into Sublime Text 2, because it works on the Mac, as well as Windows.

For most of the time, I did not use any IDE, or any specialized debugging tools, other than a ‘print()’ function. This is pretty much the same way that I programmed before the days of GDB. It imposes a certain amount of discipline, and forces you to program in a very succinct way.

I found that I was more thoughtful about my designs. I worried more about very basic data structures, and getting some very small things right. I wrote a lot of code, and a lot of it has references in my Summaries page. I visited things as basic as endianness when reading and writing integers to streams. I explored interfacing to the Kinect, playing with Windows Cryptography, Next Generation (Win CNG), and I played around a lot with the Raspberry Pi.

My primary development environment is Windows, and there’s a lot of positives I experience from being on that platform. I have found that Lua has been the tool that makes exploration of any platform the most productive. You can easily create simple interfaces to underlying COM and C interfaces which otherwise require quite a lot of code.

One nice thing is that I discovered some very esoteric libraries related to hash functions, data structures, and the like. I put some of those discoveries into my LAPHLIBS project. You can find things like a minimal CRC32 function which does not require a giant table of integers like most implementations. I had initially started writing my own version of atoi, because I wasn’t happy with the native one provided by Lua, but then the LuaJIT version improved dramatically, so I gave up on my own. Similarly with random number generator. LuaJIT has a great one that works across all platforms LuaJIT runs on.

Another path that I really explored deeply was networking. With all the excitement of Node.js and the underlying LibUV library, I wanted to see how hard it was to do the same purely in Lua. Well, it turns out that doing the whole epoll thing on Linux, or the equivalent in Windows, is pretty straight forward using LuaJIT and its FFI. So, no need for LibUV, at least not for interfacing with epoll or io completion ports. Just go to them directly from LuaJIT, and you’re all set. I think this actually makes for a more compact and maintainable system, but it’s definitely not mainstream.

One of the benefits I found in using LuaJIT is portability to very small devices. As it turns out, Node.js is fairly capable, even on routers that have only 64Mb of RAM. But, LuaJIT is even faster on such small devices. It turns out that many router manufacturers include it as part of their distributions. That makes for interesting theatre.

Lastly, I explored the world of the tiny devices. The most recent exploration is looking at the Odroid-U2. A very tiny device indeed. It runs Linux and Android, and I think can be the basis of many small and powerful computing projects. It may turn out that something like Microsoft’s Drawbridge shows up on these devices, bringing a wealth of Win32 programs along with it, or it might just be a Linux and Android world. Or, it might be something else altogether. One thing is for sure, computing is definitely getting interesting.

In short, it’s been an interesting year, and I’ve explored a lot of esoteric stuff. I believe now I am actually in a position to start stitching things together in meaningful ways, which is essentially a reset on my programming capabilities to fit with the modern world.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s