<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hyperextended Metaphor &#187; Programming Languages</title>
	<atom:link href="http://innocuous.org/articles/tag/programming-languages/feed/" rel="self" type="application/rss+xml" />
	<link>http://innocuous.org</link>
	<description>Richard Tibbetts on Various Topics</description>
	<lastBuildDate>Sat, 12 Feb 2011 14:19:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Project Euler, MIT Mystery Hunt Edition</title>
		<link>http://innocuous.org/articles/2010/01/10/project-euler-mit-mystery-hunt-edition/</link>
		<comments>http://innocuous.org/articles/2010/01/10/project-euler-mit-mystery-hunt-edition/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 03:52:32 +0000</pubDate>
		<dc:creator>tibbetts</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[MIT]]></category>
		<category><![CDATA[Programming Languages]]></category>

		<guid isPermaLink="false">http://innocuous.org/articles/2010/01/10/project-euler-mit-mystery-hunt-edition/</guid>
		<description><![CDATA[The MIT Mystery Hunt starts this Friday at noon, and I&#8217;ll be participating seriously for about my 10th year. In the hunt, teams solve a collection of puzzles to discover the location of a gold coin hidden somewhere on campus. The puzzles may be numerous (sometimes over 100), are generally provided without instructions (except when [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.mit.edu/~puzzle/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mit.edu');">MIT Mystery Hunt</a> starts this Friday at noon, and I&#8217;ll be participating seriously for about my 10th year. In the hunt, teams solve a collection of puzzles to discover the location of a gold coin hidden somewhere on campus. The puzzles may be numerous (sometimes over 100), are generally provided without instructions (except when they are provided with <a href="http://members.bellatlantic.net/~devjoe/dk2/dk2.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/members.bellatlantic.net');">painfully explicit instructions</a>), and the overall structure of the hunt is also unknown at the start. Hunt is nearly always finished before Monday, but during the 60 hours starting Friday at noon, many highly capable teams, some with several dozen members, will try their hardest to solve some very challenging puzzles.</p>
<p><a href="http://projecteuler.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/projecteuler.net');">Project Euler</a> is a neat website that presents a series of computer science problems suitable for students and non-students to practice the skill of writing algorithms to solve numerical puzzles. It&#8217;s a great way to learn a new programming language, or just to kill time in a mentally engaging way.</p>
<p>Two of the peculiarities of the MIT Mystery Hunt are that the puzzles are drawn from a wide range of domains, and that there are no restrictions on what resources can be brought to bear on a puzzle. The result is both puzzles that are explicitly about software (e.g. perl program cryptograms) as well as puzzles that are best solved by writing some kind of program. Many of my favorite puzzles over the years have come from this category. Some hunts have few, some hunts have many, but every year there is a call to write some kind of software solution to a puzzle.</p>
<p>The programming skills required to write puzzle solving programs in high pressure situations are different from those normally required to write software, and so it can be useful to practice them. I have collected and categorized here all of the software puzzles since the 2000 hunt. In most cases, I recommend attempting to solve the puzzle, knowing that software is likely the best way. But because the solutions are available, if you are stumped it can still be interesting to read the solution and attempt to duplicate it in software. In most cases the solution is linked from the puzzle page; where it is not I have provided a link. The categories here are presented from least elegant to most elegant, in my opinion. Feel free to jump around and do puzzles which you find attractive.</p>
<h2>Just Decompile It<br /></h2>
<p>A useful trick is to decompile any java applet or flash thing that you are given in a puzzle. The answer might just be in a string constant, though more likely it will just give you a different puzzle to solve.</p>
<ul>
<li><a href="http://web.mit.edu/puzzle/www/05/setec/maze/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Maze (2005)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/03/www.acme-corp.com/teamGuest/4/4_7.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">String Theory (2003)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/03/www.acme-corp.com/teamGuest/R/7_175/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Gnireenigne Lab (2003)</a> This reverse engineering puzzle is pretty challenging. Only one team solved it during the longest hunt on record.</li>
<li><a href="http://web.mit.edu/puzzle/www/02/green/B/Puzzle.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Cubology (2002)</a> Unfortunately decompiling this one doesn&#8217;t really help, but what the hey. (<a href="http://web.mit.edu/puzzle/www/02/green/B/Solution.txt" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">answer</a>)</li>
<li><a href="http://web.mit.edu/puzzle/www/08/twisty_little_passages/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Twisty Little Passages (2008)</a> Not quite decompilation, but pulling the whole maze down to your local machine is the best way to handle this puzzle.</li>
</ul>
<h2>MIT Computing</h2>
<ul>
<li><a href="http://web.mit.edu/puzzle/www/06/puzzles/kuala_lumpur/some_trolleys_named_lust/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Some Trolleys Named Lust (2006)</a> The title clues Moira, the computer system that does configuration management for MIT Athena, which has command line utilities named after characters from A Streetcar Named Desire. This puzzle contains components which are no longer online, so you are limited to reading through the solution.</li>
</ul>
<h2>Mathematical Manipulation and Brute Force Enumeration</h2>
<p>Many search problems can be solves on modern hardware with brute force enumeration, or maybe slightly smart enumeration.</p>
<ul>
<li><a href="http://web.mit.edu/puzzle/www/05/setec/bars_of_soap/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Bars of Soap (2005)</a> Unfortunately the puzzle isn&#8217;t available, only the solution, though it still provides a useful programming exercise.</li>
<li><a href="http://web.mit.edu/puzzle/www/05/setec/ginormous/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Ginormous (2005)</a> Prime factorization is always a fun thing to do with numbers.</li>
<li><a href="http://web.mit.edu/puzzle/www/03/www.acme-corp.com/teamGuest/2/2_5.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">The Road Signs Of Unspeakable Chaos (2003)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/01/phase3/7/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Mathophobia (2001)</a> (<a href="http://web.mit.edu/puzzle/www/01/Solutions/mathophobia.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">answer</a>)</li>
</ul>
<h2>Text Manipulation</h2>
<p>Sometimes a program is the easiest way to do a bulk text manipulation. Particularly when you need to experiment with various transforms, or might need to do them repeatedly. This includes basically all cryptograms, which I am not including here, though software often comes in handy solving them.</p>
<ul>
<li><a href="http://www.mit.edu/~puzzle/07/puzzles/blather/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mit.edu');">Blather (2007)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/06/puzzles/buenos_aires/decode_this/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Decode This (2006)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/06/puzzles/buenos_aires/long_division/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Long Division (2006)</a> Not so much text manipulation as diagram manipulation, but you can get the diagram as postscript, which makes it easy to extract the data. Doesn&#8217;t help you figuring out the algorithm, but it does make trying out variations easier.</li>
<li><a href="http://web.mit.edu/puzzle/www/05/setec/shotgun_wedding/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Shotgun Wedding (2005)</a> Gene sequencing also comes up occasionally. There are some pretty simple text matching algorithms that turn out to be critical parts of that work.</li>
<li><a href="http://web.mit.edu/puzzle/www/04/timbuktu/h2H/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Lost (2004)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/04/neotokyo/gE5/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Reminders World (2004)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/03/www.acme-corp.com/teamGuest/Training/tp-c.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Whoa &#8212; I have a Migraine! (2003)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/02/round8/02/Puzzle.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Famous First Words (2002)</a> (<a href="http://web.mit.edu/puzzle/www/02/round8/02/Solution.txt" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">answer</a>)</li>
<li><a href="http://web.mit.edu/puzzle/www/00/set2/1/Puzzle.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Lions and Tigers and Bears (2000)</a> My first attempt to solve a puzzle with software, this one wasn&#8217;t very successful, partly because of the challenge of getting the grid and the source data accurately input, and partly because of a slow algorithm. The fact that computers were notably slower in 2000 might have also been relevant. I think the most powerful machine available to me was an <a href="http://en.wikipedia.org/wiki/Ultra_5/10" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">Ultra 10</a>. In the end people doing it by hand finished first. (<a href="http://web.mit.edu/puzzle/www/00/set2/1/Solution.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">answer</a>)</li>
</ul>
<h2>File Identification and Manipulation<br /></h2>
<p>Many puzzles require you to identify files, or to do interesting manipulations to entire files. Often both at the same time. Sometimes the files are programs written in other languages.</p>
<ul>
<li><a href="http://www.mit.edu/~puzzle/09/puzzles/hyperextensions/PUZZLE/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mit.edu');">Hyperextensions (2009)</a></li>
<li><a href="http://www.mit.edu/~puzzle/09/puzzles/surgical_files/PUZZLE/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mit.edu');">Surgical Files (2009)</a> This puzzle triggered a programming language race, between Perl and Haskell. The race ended in a tie, but I learned some cool Haskell tricks from a teammate in the process.</li>
<li><a href="http://web.mit.edu/puzzle/www/06/puzzles/paris/white_noise/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">White Noise (2006)</a> Being able to manipulate audio files with programs or tools is also important.</li>
<li><a href="http://web.mit.edu/puzzle/www/04/neotokyo/3wX/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Noise in the Air (2004)</a> Knowing your off the shelf cryptography tools (ie, openssl) is sometimes helpful</li>
<li><a href="http://web.mit.edu/puzzle/www/04/vegas/gR3/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Two-Timer (2004)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/03/www.acme-corp.com/teamGuest/2/2_7.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">A Problem With Printing (2003)</a> This is probably my favorite mystery hunt software puzzle. It&#8217;s written in the postscript language, which is a great language for puzzlers to know, and makes use of the peculiarities of that language.</li>
</ul>
<h2>Programming Language Identification and Cryptograms</h2>
<p>Many puzzles come down to identifying obscure or not very obscure programming languages. One thinng to be on the lookout for is knitting notation, which can often look like a programming language. Of course, writing programs is often still more efficient than knitting an actual object. Adding complexity, often the programs you are given are cryptograms, or otherwise obfuscated.</p>
<ul>
<li><a href="http://www.mit.edu/~puzzle/08/tragedy/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mit.edu');">Tragedy (2008)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/06/puzzles/kuala_lumpur/badness_10000/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Badness 10000 (2006)</a> Unfortunately no longer online, but I like the structure. You can read the solution.</li>
<li><a href="http://web.mit.edu/puzzle/www/05/setec/square_mess/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Square Mess (2005)</a> presents you with a machine language and a set of constraints on the notation used for a program in it.</li>
<li><a href="http://web.mit.edu/puzzle/www/04/yukon/Kiz/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Who&#8217;s There (2004)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/04/timbuktu/LsD/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Sixty Degrees of Separation (2004)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/04/pirates/2K2/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">What Do You Do With A Genteel Sailor (2004)</a> <a href="http://web.mit.edu/puzzle/www/04/timbuktu/LsD/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');"></a></li>
<li><a href="http://web.mit.edu/puzzle/www/03/www.acme-corp.com/teamGuest/Training/tp-q.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Whoa &#8212; I Know Knitting! (2003)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/02/round7/__/Puzzle.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">A Nugget of Wisdom (2002)</a> (<a href="http://web.mit.edu/puzzle/www/02/round7/__/Solution.txt" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">answer</a>)</li>
<li><a href="http://web.mit.edu/puzzle/www/02/round2/05/Puzzle.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Use of Gothicism Considered Harmful (2002)</a> (<a href="http://web.mit.edu/puzzle/www/02/round2/05/Solution.txt" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">answer</a>)</li>
</ul>
<h2>Honorable Mention</h2>
<p><a href="http://web.mit.edu/puzzle/www/06/puzzles/washington/blue_steel/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Blue Steel (2006)</a> You can try to solve, but you probably just want to read the solution. It will remind you not to think so hard sometimes.</p>
<p><i>[Edited 2010-01-11 to add Twisty Little Passages (2008). Feel free to add other missing puzzles in the comments.]</i></p>
]]></content:encoded>
			<wfw:commentRss>http://innocuous.org/articles/2010/01/10/project-euler-mit-mystery-hunt-edition/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>kdb+ now available for free download</title>
		<link>http://innocuous.org/articles/2008/04/12/kdb-now-available-for-free-download/</link>
		<comments>http://innocuous.org/articles/2008/04/12/kdb-now-available-for-free-download/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 14:05:24 +0000</pubDate>
		<dc:creator>tibbetts</dc:creator>
				<category><![CDATA[Programming Languages]]></category>

		<guid isPermaLink="false">http://new.innocuous.org/index.php/2008/04/12/kdb-now-available-for-free-download/</guid>
		<description><![CDATA[ If you&#8217;ve talked to me about programming languages and Wall Street in the last 4 years, I&#8217;ve probably mentioned kx. This is a company which makes a combination programming environment and database based on a language called q which is derived from APL. (Yes, APL, the language invented in 1957 before there was a [...]]]></description>
			<content:encoded><![CDATA[<p> If you&#8217;ve talked to me about programming languages and Wall Street in the last 4 years, I&#8217;ve probably mentioned <a href="http://kx.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/kx.com');">kx</a>. This is a company which makes a combination programming environment and database based on a language called q which is derived from <a href="http://en.wikipedia.org/wiki/APL_(programming_language)" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">APL</a>. (Yes, APL, the language invented in 1957 before there was a computer to run it on.) And this environment is in turn used by many of the top quants on Wall Street (and other parts of the financial world) for both research and production systems. Becoming a kx programmer is a good way to double your salary and quadruple your job security.</p>
<p>Well, it&#8217;s been going around my corner of the blogosphere that kdb+ is now free for personal use. I first heard about it from <a href="http://magmasystems.blogspot.com/2008/04/kdb-is-free-for-personal-use.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/magmasystems.blogspot.com');">Marc Adler</a>. You can go download it from the <a href="http://kx.com/developers/software.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/kx.com');">kx download page</a>. This represents a big step towards openness, which I think will be good for everyone.</p>
<p>The q environment is impressive, you have to give them that. There is an emphasis on brevity; the OSX binary of kdb+ is only 227K. That&#8217;s smaller than the ncurses library it ships with. And brevity doesn&#8217;t stop there. Utterances in the language are well known for their complexity and <a href="http://kx.com/q/e/book.q" onclick="javascript:pageTracker._trackPageview('/outbound/article/kx.com');">impenetrable internal logic</a>. A lot of q code makes obfuscated perl look clear and verbose. It doesn&#8217;t help that the culture of kx programmers discourages commenting. Error handling is tricky at best, and modularity and maintainability are in short supply. For confusion, q adds a bunch of SQL keywords on top of the previous language, k, in an almost but not quite fully compatible way.</p>
<p>But for all the faults you can kind find some really interesting features in q. And if nothing else, it is an example of a novel programming language, tightly integrated with a data management system, finding commercial success, which is always nice to see. And if  you learn it, you might find a sweet job on wall street as a result.</p>
]]></content:encoded>
			<wfw:commentRss>http://innocuous.org/articles/2008/04/12/kdb-now-available-for-free-download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OOPSLA 2007: New Ideas, Good Quotes, and Cynical Self-Satisfaction</title>
		<link>http://innocuous.org/articles/2007/10/28/oopsla-2007-new-ideas-good-quotes-and-cynical-self-satisfaction/</link>
		<comments>http://innocuous.org/articles/2007/10/28/oopsla-2007-new-ideas-good-quotes-and-cynical-self-satisfaction/#comments</comments>
		<pubDate>Sun, 28 Oct 2007 12:26:00 +0000</pubDate>
		<dc:creator>tibbetts</dc:creator>
				<category><![CDATA[Programming Languages]]></category>

		<guid isPermaLink="false">http://new.innocuous.org/index.php/2007/10/28/oopsla-2007-new-ideas-good-quotes-and-cynical-self-satisfaction/</guid>
		<description><![CDATA[ I&#8217;m still in Montreal, and still thinking about a lot of what I saw and learned at OOSPLA. But I wanted to jot down some links while the cool things were still fresh in my mind. So here is a short set of links worth following that I picked up while at OOPSLA.


There was [...]]]></description>
			<content:encoded><![CDATA[<p> I&#8217;m still in Montreal, and still thinking about a lot of what I saw and learned at OOSPLA. But I wanted to jot down some links while the cool things were still fresh in my mind. So here is a short set of links worth following that I picked up while at OOPSLA.</p>
<p><span id="more-21"></span></p>
<ul>
<li>There was of course the <a href="http://www.codefarms.com/OOPSLA07/workshop/index.htm" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.codefarms.com');">workshop on associations</a> as a first class language construct, which I already blogged about <a href="http://innocuous.org/articles/2007/10/23/oopsla-2007-the-popularity-cycle-of-graphical-tools-uml-and-libraries-of-associations-not-the-workshop-i-expected" onclick="">he</a><a href="http://innocuous.org/articles/2007/10/23/oopsla-2007-the-popularity-cycle-of-graphical-tools-uml-and-libraries-of-associations-not-the-workshop-i-expected" onclick="">r</a><a href="http://innocuous.org/articles/2007/10/23/oopsla-2007-the-popularity-cycle-of-graphical-tools-uml-and-libraries-of-associations-not-the-workshop-i-expected" onclick="">e</a>.</li>
<li>As part of that, Jiri Soukup talked about his project <a href="http://incode.sourceforge.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/incode.sourceforge.net');">IN_CODE</a> and in particular his <a href="http://incode.sourceforge.net/laytutor.htm" onclick="javascript:pageTracker._trackPageview('/outbound/article/incode.sourceforge.net');">UML Layout</a> tool, which attempts to provide sufficiently good graphical layout of UML that the machine-generated layout can be the only layout. The theme of graphical languages with a single canonical display was recurring. I picked it up again from <a href="http://alarmingdevelopment.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/alarmingdevelopment.org');">Jonathan Edwards</a> (author of <a href="http://subtextual.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/subtextual.org');">Subtext</a>), who has been working on a canonical visual representation for conditional constructs, and presented it as <a href="http://www.oopsla.org/oopsla2007/index.php?page=sub/&amp;id=6" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.oopsla.org');">No Ifs, Ands, or Buts</a>. While I missed the talk, I like the ideas.</li>
<li>I saw a demo of <a href="http://www.oopsla.org/oopsla2007/index.php?page=sub/&amp;id=315" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.oopsla.org');">AmbientTalk/2</a>, which is a cute language that makes event-driven programming the norm. The big idea is that all objects belong to a specific thread of control (an actor), and their methods can only be executed in that thread. At method call sites the caller explicitly calls either synchronously (with a &#8216;.&#8217; operator) or asynchronously (with a &#8216;&lt;-&#8217; operator). These ideas may have originated in earlier languages with which I was not familiar (<a href="http://en.wikipedia.org/wiki/E_programming_language" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">E</a> was mentioned). This definitely buys a chunk of attractive simplicity. However, the demo failed to present any complicated synchronization patterns. I&#8217;m forced to wonder if we need better benchmarks for the expressivity of parallel languages. Building an IM system just isn&#8217;t very hard.</li>
<li>Erik Meijer&#8217;s <a href="http://www.oopsla.org/oopsla2007/index.php?page=sub/&amp;id=4" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.oopsla.org');">Confessions of a Used Programming Languages Salesman</a> was pretty clever, mostly talking about his experience trying to bring fire down off the mount to Visual Basic programmers. Computer Scientists need regular injections of reality when it comes to things like industrial adoption (usually non-adoption) of their ideas. It was also one of several talks at OOPSLA about <a href="http://en.wikipedia.org/wiki/Linq" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">LINQ</a> and <a href="http://msdn.microsoft.com/msdnmag/issues/07/06/CSharp30/" onclick="javascript:pageTracker._trackPageview('/outbound/article/msdn.microsoft.com');">how awesome C# 3.0 is</a>. I&#8217;m definitely envious of some of the features of C#, and I hope Java catches up soon (1.7 is looking pretty good in some ways, but certainly not all). Erik talked a lot about the extension points added to C#, but I&#8217;m at the moment unable to find anything on the web that tells me how to add LINQ-style keywords to the language for arbitrary languages, like say an extended version of SQL.</li>
<li>The <a href="http://www.oopsla.org/oopsla2007/index.php?page=program/panels/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.oopsla.org');">Domain Specific Languages panel</a> was entertaining, but neither conclusive nor particularly inspired. It was the first place the phrase <a href="http://en.wikipedia.org/wiki/No_silver_bullet" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">&#8220;Silver Bullet&#8221;</a> came up, but far from the last. Unfortunately (and ironically) everyone seems to have a different idea of what a Domain Specific Language (DSL) is, leading to wildly different concerns. More on this in a future post.</li>
<li><a href="http://lamp.epfl.ch/~mcdirmid/" onclick="javascript:pageTracker._trackPageview('/outbound/article/lamp.epfl.ch');">Sean McDirmid</a>&#8217;s talk and live coding demo of <a href="http://lamp.epfl.ch/~mcdirmid/papers/mcdirmid06superglue.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/lamp.epfl.ch');">SuperGlue</a> was the most impressive new thing I saw at the show. SuperGlue is an event driven language and a live programming environment. As you edit programs (in Eclipse, of course) the program is continuously executed and re-executed. Sean built up a game of Pac-man, Julia-Child-style. As each new block of code was added to the program, the game gained new behavior. Even, thanks in part to eclipse, responding to typing successive characters of a numeric constant, like &#8220;330&#8243;. I really hope that he makes his code, or at least videos, available. Unfortunately, I&#8217;m afraid that Sean&#8217;s demonstration and discussion of the benefits of live programming overshadowed his more theoretical contribution of object-oriented signalling. His paper from ECOOP 2006, <a href="http://lamp.epfl.ch/~mcdirmid/papers/mcdirmid06superglue.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/lamp.epfl.ch');">SuperGlue: Component Programming with Object-oriented Signals</a> may discuss that in more detail. Sean is unlikely to keep working on SuperGlue, which is implemented in Scala on Eclipse, as he is going to work for Microsoft.</li>
<li>Sharing the stage with Sean, linked in the minds of the organizers because both talks had &#8220;live&#8221; in their title, was <a href="http://www.oopsla.org/oopsla2007/index.php?page=sub/&amp;id=9" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.oopsla.org');">Living in the Comfort Zone</a>, which proposes restricting program inputs using a &#8220;rectifier&#8221; in order to avoid exposing programs to inputs that, while legal, might be unexpected and trigger bugs. Interesting idea.</li>
<li>The Tuesday night performance of <a href="http://www.oopsla.org/oopsla2007/index.php?page=sub/&amp;id=267" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.oopsla.org');">50 in 50 by Guy Steele and Dick Gabriel</a> was indescribably awesome. I expect a video, and will post a link when it becomes available. Various people compared it to Steele&#8217;s 1998 performance-essay <a href="http://citeseer.ist.psu.edu/steele99growing.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/citeseer.ist.psu.edu');">Growing a Language</a>, which I had not previously seen and which I can now recommend (you may not understand what he is getting at until page 4).</li>
<li>Tony Kay presented <a href="http://www.oopsla.org/oopsla2007/index.php?page=sub/&amp;id=17" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.oopsla.org');">a way to punctuate transactional-memory transactions to make them nest</a>, which just further convinced me that transactional memory is far from the solution to the difficulty of threaded programming. Their model might be better, but it is at best a patch which solves only some of the problems caused by an insufficient underlying abstraction.</li>
<li><a href="http://www.oopsla.org/oopsla2007/index.php?page=sub/&amp;id=41" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.oopsla.org');">StreamFlex</a> was definitely interesting. Inspired by <a href="http://www.cag.csail.mit.edu/streamit/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cag.csail.mit.edu');">StreamIT</a> and other stream processing work, it provides an events-and-operators model not unlike <a href="http://www.cs.brown.edu/research/aurora/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cs.brown.edu');">Aurora</a> (the prototype for <a href="http://www.streambase.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.streambase.com');">StreamBase</a>), where the operators are kernels of Java code. The main contribution, to me, was the approach to real-time semantics. They instrumented their virtual machine to provide some simple transactional memory features, and then use them to assure real-time performance of the real-time thread. All method calls into objects shared with the real-time thread are logged using transactional memory. In any conflict between the real-time thread and another thread, the transaction is aborted for the non-real-time thread. However, to make this work they introduce a somewhat complicated object-ownership system, enforced by compile-time typechecking. Combining the real-time approach with the object ownership of AmbientTalk I mentioned above might be interesting.</li>
<li><a href="http://www.mm.informatik.tu-darmstadt.de/staff/kuehne/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mm.informatik.tu-darmstadt.de');">Thomas Kuehne</a> tried to answer the question <a href="http://www.oopsla.org/oopsla2007/index.php?page=sub/&amp;id=36" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.oopsla.org');">Can Programming be Liberated from the Two Level Style?</a>, but I remained unconvinced. The two level style means classes and objects. In many programs, the <a href="http://www.ksc.com/article3.htm" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.ksc.com');">&#8220;item-description pattern&#8221;</a> is used to allow a richer set of &#8220;is-a&#8221; relationships than the class hierarchy generally affords. While I support the idea of <a href="http://c2.com/cgi/wiki?AreDesignPatternsMissingLanguageFeatures" onclick="javascript:pageTracker._trackPageview('/outbound/article/c2.com');">turning design patterns into language features</a>, the mechanics of DeepJava failed to inspire me with a desire to teach them to the average 6.170 student. Inheritance is tricky enough without meta-inheritance.</li>
<li><a href="http://www.oopsla.org/oopsla2007/index.php?page=sub/&amp;id=11" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.oopsla.org');">No Silver Bullet Reloaded</a> was the Panel Of The Stars at OOPSLA, with Fred Brooks, David Parnas, and other panelists who would have seemed famous in other company. Martin Fowler, in particularly, put on a fabulous performance as The Werewolf (who spent much of his time gloating). The forgone conclusion was that no, there had been no successful silver bullet in the 10 years since Mythical Man Month was updated. As for discussion of what we should do about it, the general idea was that we should do all those good things software engineering pundits have been telling us for years, and that we should make sure to employ smart people. Interestingly, panelists from industry were the ones pushing for employing only smart people, which seems like an ineffective strategy when you are trying to develop software in the large at a company like Cisco. The attitude of cynical self-satisfaction (&#8220;industry just needs to do what we already told them to do, which they will never do&#8221;) seemed distressingly pervasive at OOPSLA this year.</li>
<li>I caught the end of a talk by <a href="http://en.wikipedia.org/wiki/John_McCarthy_%28computer_scientist%29" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">John McCarthy</a> about <a href="http://www-formal.stanford.edu/jmc/elephant/elephant.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www-formal.stanford.edu');">Elephant 2000</a>, a new language which he has been developing for over a decade. I didn&#8217;t really follow his description of Elephant, and after talking to others about it I think it is ill conceived. The second question was, roughly, &#8220;Could you talk about your experience inventing LISP instead?&#8221;. McCarthy seemed happy to do that, and what followed was 30 minutes of entertaining anecdotes about early computing.</li>
<li>There were a number of interesting projects presented only on posters at the conference. <a href="http://www.sable.mcgill.ca/~cpicke/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.sable.mcgill.ca');">Chris Pickett</a> of McGill presented <a href="http://www.sable.mcgill.ca/~cpicke/papers/pickett-07-software-SRC-abstract.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.sable.mcgill.ca');">Software Speculative Multithreading for Java</a>, which not only contained several interesting ideas, but was the most interactive poster I&#8217;ve seen (<a href="http://www.sable.mcgill.ca/~cpicke/papers/pickett-07-software-SRC-poster.jpg" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.sable.mcgill.ca');">photo here</a>), being made of movable felt pieces that could be used to talk through demonstrations. The general idea was that at each method call site, come up with a result predictor, and spawn a speculation thread that will continue the computation as if that result had been returned. Speculation can be running several levels deep at a time. This required significant VM modification, which he is now turning into a library so that it can be added to the IBM JVM. There is also a lot of work to be done on heuristics for choosing call sites for speculation, and choosing predictors.</li>
<li>Talking to people about startups versus large companies, I got an interesting anecdote from someone involved in VoIP at Nortel: In their estimation, it takes them 2 years from project start to get a product into the marketplace, while it takes their startup competitors only 1 year. However, after 2 years they have a product which meets the needs of their customer base, while it takes the startup 3.5 years. Makes me wonder what these constants look like in other product areas.</li>
<li>I attended the <a href="http://www.seaside.st/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.seaside.st');">Seaside</a> <a href="http://en.wikipedia.org/wiki/Birds_of_a_Feather_%28computing%29" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">BoF</a>. I find a lot of the Seaside technology very interesting, but as befits their roots in the Smalltalk community, they have a lot of difficulty marketing themselves. I ended up serving as a resident heretic, which I hope was helpful, as their main topic of discussion was how to make Seaside adoption as easy as Ruby on Rails adoption. My heresies included &#8220;What do you mean I have to use a special smalltalk editor instead of emacs?&#8221;, &#8220;Are continuations really scalable? Why can&#8217;t I get a straight answer?&#8221; and &#8220;How am I supposed to choose a runtime/database/editor/etc when I don&#8217;t know anything about Smalltalk yet?&#8221; This turned into some extensive discussions about the adoption curve of destabilizing development tools, which I will try to write up later.</li>
<li>I had a slow morning on Thursday and missed <a href="http://www.oopsla.org/oopsla2007/index.php?page=sub/&amp;id=265" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.oopsla.org');">Context, Perspective and Programs</a>, which for many people was something of a religious (or drug-induced) experience. That&#8217;s what I get for not reading speaker bios in addition to abstracts. Hopefully there will be a video.</li>
<li>I sat in on a talk titled <a href="http://www.oopsla.org/oopsla2007/index.php?page=sub/&amp;id=341" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.oopsla.org');">Neovictorian Computing</a>, which had a lot of good quotes, but didn&#8217;t say a whole lot. The best quote, which reflected a lot of what went on at OOPSLA, was <em>&#8220;The pedagogy of software engineering is almost entirely about guilt.&#8221;</em> The speaker is the creator of <a href="http://www.eastgate.com/Tinderbox/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.eastgate.com');">Tinderbox</a>, a tool for keeping personal notes. The thrust of the talk was that we need to empower our users to be craftspeople, and to produce small software systems that meet their own unique needs. Tinderbox, as described in the talk, seemed potentially the right system for my contact management needs (I&#8217;ve been unsatisfied with all off the shelf contact managers). Unfortunately, I found it difficult to use and not nearly as interesting as the talk had made it seem. Maybe it is the best we can do, when targeting end user programmers (the tool is used mostly by authors to manage book notes), but I would hope we could do better.</li>
<li>I had a couple of talks with Canadians about how their country could benefit from more startups. Unfortunately, most encouragement of startups seems to be government funding, which I think is fundamentally flawed. More on this later.</li>
<li>The <a href="http://www.oopsla.org/oopsla2007/index.php?page=sub/&amp;id=342" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.oopsla.org');">final talk of OOPSLA was Brian Foote</a>, revisiting his paper <a href="http://en.wikipedia.org/wiki/Big_ball_of_mud" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">Big Ball of Mud</a>, about the commonness of evolved software systems. He is a very good speaker, and it was an entertaining talk. His focus was on finding the right metaphors to communicate how something is working. My favorite was &#8220;sustainable development&#8221;, suggesting that many deadline-driven software projects take unsustainable shortcuts, much like some farmers in the Amazon, prematurely depleting a programs maintainability. But he was also quick to point out that some techniques that software engineering pundits disdain, like cut and paste, are a fundamental part of nearly all software development, and that when you let reuse become the overriding concern, you can end up with something highly inefficient, like the Space Shuttle (the reuse of the machine, not the software, in that case). He also described at length about how we are losing the &#8220;War on Bugs&#8221;, how attempts to crack down on domestic production have merely driven bug production overseas. Programmers start with &#8220;gateway bugs&#8221; like unchecked error codes and undocumented exceptions, and move on to harder bugs like cross cutting dependencies and threading. Foote went on like that for a while. I may just pull the quotes out of my notes and post them separately.</li>
</ul>
<p>That&#8217;s it for my train of consciousness notes from OOPSLA 2007. It inspired a lot of thoughts, so you may be hearing more from me on some of these topics.</p>
]]></content:encoded>
			<wfw:commentRss>http://innocuous.org/articles/2007/10/28/oopsla-2007-new-ideas-good-quotes-and-cynical-self-satisfaction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OOPSLA 2007: &#8220;The Popularity Cycle of Graphical Tools, UML, and Libraries of Associations&#8221; &#8211; not the workshop I expected</title>
		<link>http://innocuous.org/articles/2007/10/23/oopsla-2007-the-popularity-cycle-of-graphical-tools-uml-and-libraries-of-associations-not-the-workshop-i-expected/</link>
		<comments>http://innocuous.org/articles/2007/10/23/oopsla-2007-the-popularity-cycle-of-graphical-tools-uml-and-libraries-of-associations-not-the-workshop-i-expected/#comments</comments>
		<pubDate>Tue, 23 Oct 2007 13:59:24 +0000</pubDate>
		<dc:creator>tibbetts</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Programming Languages]]></category>

		<guid isPermaLink="false">http://new.innocuous.org/index.php/2007/10/23/oopsla-2007-the-popularity-cycle-of-graphical-tools-uml-and-libraries-of-associations-not-the-workshop-i-expected/</guid>
		<description><![CDATA[ Today was my first day at OOPSLA 2007 in Montreal. After a brief exposure to the amazing &#8220;Underground City&#8221; (really a shopping mall that is infecting downtown like a cancer), I crashed a workshop for which I had not signed up, and had a completely different experience than I had planned at The Popularity [...]]]></description>
			<content:encoded><![CDATA[<p> Today was my first day at <a href="http://www.oopsla.org/oopsla2007/index.php?page=home/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.oopsla.org');">OOPSLA 2007</a> in Montreal. After a brief exposure to the amazing &#8220;Underground City&#8221; (really a shopping mall that is infecting downtown like a cancer), I crashed a workshop for which I had not signed up, and had a completely different experience than I had planned at <a href="http://www.codefarms.com/OOPSLA07/workshop/index.htm" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.codefarms.com');">The Popularity Cycle of Graphical Tools, UML, and Libraries of Associations</a>.</p>
<p>The title implied it was the workshop about graphical programming languages and tools. As an author of a graphical programming language, <a href="http://www.streambase.com/developers/docs/latest/concepts/canvas.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.streambase.com');">StreamBase StreamSQL EventFlow</a>, it seemed like the place to be. My plan had been to pick up some contacts in the graphical languages space, and learn about what has come before. However, the participants (with one vocal exception) had already accepted as a given that UML would eventually decline in popularity, to be replaced by a and they were focused on what would come next.</p>
<p><span id="more-22"></span></p>
<p>In fact, the general agreement about what comes next is first class associations. An association is a relationship between two classes that relates instances of the first with instances of the second. These are the lines in UML diagrams. The focus of the workshop was on creating language constructs to allow realization of these lines (associations) in code and the creation of libraries of types of associations.</p>
<p>In UML, most boxes are realized concretely as a Class. This makes translation to and from UML diagrams and other models straightforward for classes. But most lines are realized in an implementation dependent and error prone fashion. For example, there might be a pointer from objects of one class to the other. Or there might be pointers in both directions. Or a set of pointers, or an externally stored map.</p>
<p>Any of these implementations requires maintenance logic, generally embedded in one or both class definitions. This logic is error prone and can get out of sync. If the association is subject to additional constraints, such as a graph being acyclic or conforming to some security model, the maintenance logic can get very complex. At some point a separate class might be created just to track instances of the relationship, but this is a discontinuous change to the program, and impacts all clients of the relation. Much better if there were a concrete realization of associations somewhere in the program, where changes to the association could be made.</p>
<p>Three concrete implementations were presented, for C++, Java, and C#. The C++ implementation, by <a href="http://www.codefarms.com/about.htm" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.codefarms.com');">Jiri Soukup</a> and called <a href="http://incode.sourceforge.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/incode.sourceforge.net');">incode</a>, was implemented via code generation. The Java and C# systems, presented by <a href="http://www.mcs.vuw.ac.nz/people/James-Noble" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mcs.vuw.ac.nz');">James Nobel</a> and <a href="http://www.itu.dk/people/kasper/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.itu.dk');">Kasper Østerbye</a> respectively, utilized Aspect Oriented Programming (AOP) tools to inject required logic into classes at runtime. Kasper&#8217;s work is described in a paper, <a href="http://www.itu.dk/people/kasper/papers/osterbye_R11.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.itu.dk');">Associations as a Language Construct</a>, James&#8217;s in <a href="http://www.mcs.vuw.ac.nz/~djp/files/PN-EPLOP06.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mcs.vuw.ac.nz');">Relationship Aspect Patterns</a>. <a href="http://www.elvis.ac.nz/brain?People#StephenNelson" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.elvis.ac.nz');">Stephen Nelson</a> also described but did not present his work, and <a href="http://www.opusedge.com/mikeh.aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.opusedge.com');">Mike Heffernan</a> presented an in-house system he has developed at <a href="http://www.opusedge.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.opusedge.com');">OpusEdge</a>.</p>
<p>The OpusEdge system, in particular, focused on using associations and the objects they related to control database schema generation and database access. In this case the associations and objects form a Model in the context of <a href="http://en.wikipedia.org/wiki/Model_view_controller" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">Model, View, Controller</a>. His system, implemented in .NET, provided transparent network access to the model from clients, as well as server side access.</p>
<p>While this was not the workshop I had intended to attend, it was all very interesting to me. The interplay between databases and programming languages, and between the relational model and object oriented models, is a subject which holds long-term interest to me. The question of whether associations should be binary or N-ary is similar to the question of <a href="http://en.wikipedia.org/wiki/Resource_Description_Framework" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">RDF</a> versus fully-relational in databases.</p>
<p>If we expand language functionality to enable associations, or just let the AOP beast out of its cage all together, it would greatly improve the rapid-development experience. Today, many MVC frameworks create degenerate views given a model, and some even take a programming by exception approach to generating more interesting views. WIth associations as first class manipulable constructs, the model can be enriched with more information (by using a library of association subtypes). This can in turn drive better automatic behavior in areas such as view generation, model validation, and persistence.</p>
<p>We are going to continue conversations about associations, electronically, in a forum moderated by Stephen Nelson. I will be interested to see what progress is made. I have two burning questions: How can we leverage associations to improve database interactions? And, once we have associations, what traditional programming language constructs can we drop?</p>
]]></content:encoded>
			<wfw:commentRss>http://innocuous.org/articles/2007/10/23/oopsla-2007-the-popularity-cycle-of-graphical-tools-uml-and-libraries-of-associations-not-the-workshop-i-expected/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Transactional Memory Not Solution To All Problems</title>
		<link>http://innocuous.org/articles/2006/12/01/transactional-memory-not-solution-to-all-problems/</link>
		<comments>http://innocuous.org/articles/2006/12/01/transactional-memory-not-solution-to-all-problems/#comments</comments>
		<pubDate>Sat, 02 Dec 2006 00:10:19 +0000</pubDate>
		<dc:creator>tibbetts</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Programming Languages]]></category>

		<guid isPermaLink="false">http://new.innocuous.org/index.php/2006/12/01/transactional-memory-not-solution-to-all-problems/</guid>
		<description><![CDATA[I was at MIT today and so I ended up going to an invited talk on computer architecture, Subtle Semantics and Unrestricted Implementation of Transactional Memory. Transactional Memory is a very hot topic in systems and architecture. It is perceived to be a better model for programmers, so language designers like it. And there are [...]]]></description>
			<content:encoded><![CDATA[<p>I was at MIT today and so I ended up going to an invited talk on computer architecture, <span class="textbold"><a href="http://www.csail.mit.edu/events/eventcalendar/calendar.php?show=event&amp;id=1298" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.csail.mit.edu');">Subtle Semantics and Unrestricted Implementation of Transactional Memory</a>. <a href="http://en.wikipedia.org/wiki/Transactional_memory" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">Transactional Memory</a> is a very hot topic in systems and architecture. It is perceived to be a better model for programmers, so language designers like it. And there are a variety of options for pure-software and hardware-assisted implementations. And because it enables optimistic concurrency control, transactional memory can help make programs faster and more scalable on new multi-core architectures. There is every reason to believe that processor vendors will begin including some form of hardware support for transactional memory.</span></p>
<p>The focus of the talk was on the subtle issues that come from this. It dismissed a few of the more positive myths about transactional memory:</p>
<ul>
<li>Programs using locks cannot be trivially converted to use transactions. In fact, a correctly behaving program using locks to manage things like inter-thread communication can easily deadlock or livelock when using transactions.</li>
<li>Transactions are not perfectly composable or nestable, as is often claimed. This means heirarchical or nested transactions, where there is a program-level transaction wrapping several library-level transactions, can lead to deadlock or livelock.</li>
<li>Whether a transactional system is weak (non-transactional code executes concurrently with transactional code, with side effects visible between) or strong transactional (a transaction is atomic not just from the perspective of other transactions, but also to other non-transactional code) can have a significant effect on program behavior. Not only can a program designed for strong transactions have problems under weak transactions, but a program that behaves correctly in a weak transactional system may deadlock in a strong transactional system.</li>
</ul>
<p>This leads me to two primary conclusions, with which I think the speaker would agree: First, transactional memory can have significant confusing side effects, just like locks, and so it is not a solution to the difficulties of multithreaded programming. Second, if processor vendors implement, and many programmers use, weak transactions then we may never get strong transactions.</p>
<p>I&#8217;d like to take this one step further. I think language designers and computer architects who are excited about transactional memory are missing the point. They are trying to create a single concurrency control mechanism that can solve everyone&#8217;s problems. In fact, I think there are two separate classes of problem that are best addressed separately: Concurrency control for systems programming, and concurrency control for application programming.</p>
<p>Systems programmers are close to the hardware, inside or right on top of the operating system. They are the people who are most comfortable with the concurrency control mechanisms of today (<a href="http://en.wikipedia.org/wiki/Pthreads" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">pthreads</a> and <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/package-summary.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/java.sun.com');">java.util.concurrent</a>). Transactional Memory should be targetting these users. The goal is not to give them an easy way to do concurrency, but to make optimistic concurrency control possible and efficient. Continuing to discuss the merits of strong and weak transactions is reasonable, but it should be in the context of what most efficiently represents the capabilities of the hardware.</p>
<p>Application programmers generally work on top of a platform, and don&#8217;t have to think about concurrency in the same way. if they don&#8217;t work on a platform then they should. For example, application programmers are often writing business applications as web services on top of J2EE. By using platforms, they can work with much higher level management and concurrency control. The most common idiom for concurrency control is the database transaction (or distributed transaction). It is able to handle most concurrency problems in traditional RPC-and-datastore systems.</p>
<p>To help application programmers, we need to develop additional idioms. Not all programs can utilize the J2EE style of platform. I expect to see a significant advance in scientific computing tools like MATLAB to take advantage of multiprocessor systems (in my ideal world it would be by vectorizing based on static and dynamic analysis, but I digress). Furthermore, there are a large set of event processing (stream processing, complex event processing) which are also not well served by J2EE-type platforms and database-transactions. Which is why I work on <a href="http://www.streambase.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.streambase.com');">StreamBase</a> (and on <a href="http://streamsql.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/streamsql.org');">StreamSQL</a>), which is creating next generation programming models for those kinds of applications, to enable parallelization, managability, and scalability.&lt;/shameless-plug&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://innocuous.org/articles/2006/12/01/transactional-memory-not-solution-to-all-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

