UMBC ebiquity
programming languages

Lisp in 96 lines of Python: Maxwells equations of software

September 30th, 2010, by Tim Finin, posted in Programming

Peter Norvig has exquisite tastes in programming, is a Lisp guru and is also a great Python hacker. Put that together and what do you get? Lis.py, an interpreter for the core of the Lisp dialect Scheme in 96 lines of Python. Norvig mentions Alan Kay’s view of Lisp as “Maxwell’s Equations of Software” in a 2004 interview with Stu Feldman:

SF: If nothing else, Lisp was carefully defined in terms of Lisp.

AK: Yes, that was the big revelation to me when I was in graduate school—when I finally understood that the half page of code on the bottom of page 13 of the Lisp 1.5 manual was Lisp in itself. These were “Maxwell’s Equations of Software!” This is the whole world of programming in a few lines that I can put my hand over.

There is also a companion essay, (How to Write a ((Better) Lisp) Interpreter (in Python)), that shows how to add other features, like macros, quasi-quote, tail recursion optimization and continuations. Sadly, this bloats the code to well over 200 lines.

A review of the Google Go programming language

November 12th, 2009, by Tim Finin, posted in Google, Programming

Mark Chu-Carroll is a Google software engineer who’s written a long, detailed and informed review of Google’s new programming language Go. It’s worth a read if you are interested in understanding what it’s like as a programming language. Here’s a few points that I took note of.

    “The guys who designed Go were very focused on keeping things as small and simple as possible. When you look at it in contrast to a language like C++, it’s absolutely striking. Go is very small, and very simple. There’s no cruft. No redundancy. Everything has been pared down. But for the most part, they give you what you need. If you want a C-like language with some basic object-oriented features and garbage collection, Go is about as simple as you could realistically hope to get.”

    “The most innovative thing about it is its type system. … It ends up giving you something with the flavor of Python-ish duck typing, but with full type-checking from the compiler.”

    “Go programs compile really astonishingly quickly. When I first tried it, I thought that I had made a mistake building the compiler. It was just too damned fast. I’d never seen anything quite like it.”

    “At the end of the day, what do I think? I like Go, but I don’t love it. If it had generics, it would definitely be my favorite of the C/C++/C#/Java family. It’s got a very elegant simplicity to it which I really like. The interface type system is wonderful. The overall structure of programs and modules is excellent. But it’s got some ugliness. … It’s not going to wipe C++ off the face of the earth. But I think it will establish itself as a solid alternative.”

Go sounds like a language that will help you grow as a computer scientist if you use it. That’s a good enough recommendation for me.

Measuring programming language popularity

December 4th, 2008, by Tim Finin, posted in Programming

What programming language skills are most in demand? Which languages are hot and which ones are in decline? Is COBOL on the endangered language list? Such questions are of interest to all of us in the IT field and maybe especially to students preparing for careers.

TIOBE programming language trends November 2008The TIOBE Programming Community Index tracks the popularity of popularity of 150 programming languages, from ABC to XSLT, based on the number of hits for a simple query (“ programming”) run against five web search engines. The top ten in their November 2008 index are, in order: Java, C, C++, Basic, PHP, Python, C#, Delphi, Perl and JavaScript.

They also provide trend data since 2001 for the top twenty languages (e.g., Logo) and an composite overview of the top ten. Finally, they provide some aggregate information by paradigm and type regimen as well as some analysis and observations.

“There are number of interesting changes this month. First of all Perl is at an all-time low, whereas Delphi is still on the rise. Delphi is competing for TIOBE’s “Language of the Year 2008 Award” together with C++ and Python. Another interesting trend concerns visual programming languages. These languages are becoming really popular. Most of them have an educational nature for new programmers. Logo, certainly the oldest visual programming language, enters the top 20 this month. The new StarLogo TNG implementation from MIT is probably one of the major causes of this success. Alice, developed by Carnegie Mellon, is new at position 34, whereas Lego Mindstorms’ programming language NXT-G is at position 37. In the tables below some long term trends are listed about categories of languages. The object-oriented paradigm is at an all time high with 57.9%. The popularity of dynamically typed languages seems to be stabilizing (see trend diagram below).”

This is a good resource, although their methodology only measures some aspects of language popularity and seems to include variations due to changes in the underlying search engines on which they rely. In the past when I have taught our undergraduate programming languages course, I used to estimate the demand for language-specific programming skills by running a set of queries against monster.com. For students, knowing the current demand for skills is obviously of special interest.