# Damian Conway's talk on Sufficiently Advanced Technologies

Posted on
Tags:

Over the weekend I attended Damian Conway’s talk on Sufficiently Advanced Technologies, hosted by the Pittsburgh Perl Mongers and presented at CMU.

This was my first Damian Conway talk, and it was great. I don’t know how Damian manages to give a killer talk immediately after suffering a long, international flight and the associated time-zone changes, but he did it. If you ever get the chance to see Damian speak, don’t miss it.

The idea behind the talk was Arthur C. Clarke’s bit about sufficiently advanced technologies being indistinguishable from magic. When it comes to programming, Damian argued, “sufficiently advanced” technologies ought not to impose programming taxes upon us; gaining their benefits should be transparent and free – otherwise, we won’t use them.

One example that Damian provided to illustrate this idea was an updated version of Lingua::EN::Inflect that automatically looks into interpolated strings and rewrites them on the fly to ensure that they represent sensible English. Thus if you wrote code like this:

print "$count errors were found\n" Lingua::EN::Inflect would ensure that the right thing happens for different values of $count:

0 errors were found
1 error was found
2 errors were found

Why do this? Because we already have easy ways to get the inflections right – a simple test and the ?: operator is all it takes - and yet we don’t do it; thus, the cost of doing it must be too high. In other words, the existing technology must not be sufficiently advanced, and we ought to improve upon it.

Damian argued that Perl was a great language for creating Sufficiently Advanced Technologies (SATs). To help make his case, he cited Xavier Noria’s Acme::Pythonic, which changes Perl’s syntax to use Python’s whitespace conventions. (I thought that this was an interesting example because a couple of years ago I had written a horrifying Perl module (LayoutRule.pm) to bring Haskell’s layout rule to Perl.) If sweeping changes like this took only a few pages of code, he argued, many other SATs were within reach. (He jokingly said that it was a little scary how close Perl was to the darkness that is Python. This got a big laugh.) And, he said, Perl 6 is going to make Perl an ideal language for creating SATs.

He showed us some other examples of SATs he was working on. One was a library for gathering user input that infers from its context how it is being used and adjusts its behavior accordingly. Another was a Smart Comments module that lets comments hold assertions, aid in debugging, and generate progress bars.

In sum, it was a fun talk that made a clear argument for reducing the costs imposed by the interfaces we create for our libraries. The talk made me feel better about some of my more recent attempts to lower the cost of doing things that I find too expensive in Perl, such as specializing functions and testing algorithmic code. The talk also convinced me to place more effort on optimizing the interfaces of my code for use, rather than for some distant “best practice” notion of what makes a good interface.

The talk made me want to change something, and that’s a pretty good thing to say about a talk.