The A-Z of Programming Languages: Shakespeare
- 27 June, 2011 11:50
Computerworld Australia recently caught up with the Swedish creators of the Shakespeare Programming Language. Jon Aslund and Karl Wiberg, took the time to give us the low-down on what motivated them to create an esoteric programming language in the space of almost one night, the challenges they faced in its creation, and where they see programming languages heading in coming years.
Like other esoteric languages, such as Brainf**k (missing letters: c, u), Sorted!, Malbolge and INTERCAL, Shakespeare wasn’t created for mainstream use. However, both Aslund and Wiberg were excited with the popularity Shakespeare has experienced, especially as both were still at university when it was created.
The aim of the Shakespeare Programming Language (SPL) is to create a language with beautiful source code that resembles Shakespeare's plays — including a title, characters, acts and scenes, enter and exit directives, lines and so on.
[Computerworld Australia is undertaking a series of investigations into some of the most widely used programming languages — as well as some of the more obscure ones. Previously, we’ve spoken to Brad Cox, the man behind Objective-C, Python creator , Alfred v. Aho of AWK fame, Chet Ramey about his experiences maintaining Bash, MATLAB's Cleve Moler, and Bjarne Stroustrup of C++ fame. Be sure to check out all the interviews in our A to Z of programming languages index.]
Can you tell me what motivated you to create a new programming language?
Karl Wiberg (K): We took a syntax analysis course together at the Royal Institute of Technology in Stockholm, Sweden [kth.se]; for the fifth and final lab project of that course, there were a handful of options to choose from, one of which was to do whatever we liked to how show off what we'd learned. That sounded like fun. So while pulling an all-nighter to finish the fourth lab project (which wasn't as much fun), due to be demonstrated at 9am the following morning (even less fun), we wound up spending rather more time inventing the Shakespeare Programming Language (SPL) than meeting our deadline.
In other words, a genesis story not so different from that of other, successful programming languages. (Note: The comma between "other" and "successful" is intentional.)
When was it created and how long did the process take?
K: In February 2001. Most of the language design was done that first night, but a lot of details (and the implementation) was hashed out over the following weeks. We finally made the 1.0 release on August 21, announcing it on the school and asking people to write and submit SPL programs. On August 31, SPL was featured on Slashdot.
Jon Aslund (J): I especially remember the days before the release, which I think was also the extended deadline we had been given for the final lab. That was when most of it was written and tested. We used all 24 hours of the day, coding at my place. I collapsed on my bed, Karl continued for a few hours, finished the grammar. I woke up, Karl went home to sleep and I started writing documentation and examples. I then went to his place, we had breakfast, polished the documentation, wrote more examples and continued like that until it was done. Fun times!
How did the name come about?
K: Well, "SPL" (for "the Shakespeare Programming Language") seemed to be the obvious choice for a Shakespeare-based programming language.
Others have since started referring to it as "Shakespeare" instead, most likely because the language never got popular enough that the acronym became well known.
Do you remember any other names that you threw up there?
I think "SPL" was pretty much our first and only candidate.
What made you settle on Shakespeare?
We settled on a Shakespearean play style for the programs because it was a structured, reasonably well-defined form that no one would expect to be used for this purpose and one that would be easily recognisable to most people.
The name pretty much followed from that.
Did you feel there were holes in the already existing programming languages that you wanted to fill with Shakespeare?
K: Not particularly, no. SPL belongs to a class of programming languages usually called "esoteric programming languages", these languages aren't meant to be seriously useful. One can think of them as clever toys, or sometimes parodies of existing languages — but an important point is that they are technically real programming languages, and in principle one could program anything in them — this is called Turing completeness — which is what computer scientists end up doing when attempting to have a good time.
SPL does seem to be less technical than many esoteric programming languages, in that one does not have to know that much about programming languages to appreciate it. The programs are, after all, written in the Bard's own plain English.
What challenges did you encounter in the process?
K: Given our skills at the time, I'm glad to say there weren't many.
J: The course we took gave us the tools and tricks needed to write parsers, but after we had our nice syntax tree we didn't actually know how to run it, so we took the easy way out and made the compiler output c code, which you then had to compile to get something running.
Join the Computerworld Australia group on Linkedin. The group is open to IT Directors, IT Managers, Infrastructure Managers, Network Managers, Security Managers, Communications Managers.
- Shakespeare Programming Language
- The A-Z of Programming Languages: INTERCAL
- The A to Z of programming languages: Objective-C
- The A-Z of Programming Languages: AWK
- The A-Z of Programming Languages: BASH/Bourne-Again Shell
- The A-Z of Programming Languages: MATLAB
- The A-Z of Programming Languages: C++
- A to Z of programming languages index
- ACM's third History of Programming Languages conference, San Diego 2007
- Twitter: @chloe_CW
- Twitter: @ComputerworldAU
Verizon, Jennifer Lopez partner on Latino-focused wireless stores
Santos migrates to Windows 7 before XP support ends
Australia remains black spot for Vodafone
WikiLeaks Party closer to registering
AusCERT 2013: NBN users need security professionals’ help, says Google