Concurrency, Templates and Higher-Order Abstract Syntax
I don't blog as much as I should. It's because lately I have my fingers in a lot of different pies, and I don't know how interested the DobbsCodeTalk.com audience would be in my areas of investigation. Anyway, I think its time that I opened up and let you see a bit more into my world.
I am interested in a lot of different areas of computer science and programming. My endeavors take me down a lot of different avenues. I enjoy that, but sometimes it makes it hard for me to find a single community that I can relate to, or a single topic to master.
For example I consider myself knowledgeable about programming language design, but when it comes down to the theory of language semantics and type systems, the folks at Lambda-the-Ultimate.org leave me in the dust. Luckily I managed to get some interesting discussion occur at a level that I could almost follow when I posted a link to an article entitled A Type-theoretic Foundation for Programming with Higher-order Abstract Syntax and First-class Substitutions.
In my day job, I recently wrote a large number of plug-ins in C++ for 3ds Max, and had to find a way to share code between 38 different plug-in types. The problem was that each plug-in type had to derive from a different base-class, but most has a common shared ancestry of classes. The solution I used was to use template classes that derive from the template parameter. A small but powerful trick, that reduced the need for a lot of boiler plate code in the samples. I wrote more about this, and the dangers of cut and paste programming on my 3ds Max SDK Blog.
In my programming language project, I am working on providing primitive operations for piping data from producer classes to consumer classes, but doing so safely and asynchronously. It is relatively easy to parallelize under the hood. All it takes is a fast non-blocking queue to share data. Like the one described in this DDJ article by Herb Sutter. The only problems are that I am using .NET, and I wanted my queue to be a linked list of arrays (which I think/hope should be more efficient). So I developed one, but I am not sure that it is correct. I posted my code here on StackOverflow.com to see what others have to say.
In more mundane news, I have been continuing to slog away at the core Heron implementation writing more and more unit tests. Most of the language works. It is like running a Java interpreter but with higher-order functions (and which blows up a lot). The only interesting development, is a rudimentary debugger, so that I can easily examine the call stack when the editor throws an error. I am holding back making an official release, until I can increase the number of passing unit and feature tests.
Phew, it feels good to get all of that off my chest. I hope there is something of interest to you in all of this!