Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Christopher Diggins

Dr. Dobb's Bloggers

Concurrency, Templates and Higher-Order Abstract Syntax

October 08, 2009

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! 

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.