Pure Danger Tech


Another fun night at the Lounge

08 Jan 2009

Last night was the second meeting of the St. Louis Lambda Lounge and we had another great meeting. I know there were a few that left early or came late but I think there were about 40 people there total, including probably 15 new folks. We were chatting afterward that we really need to get pictures next time, so someone remind me!

I have to give huge thanks to Appistry for hosting the meetings – they’ve been just awesome in providing space, setting up chairs, and providing beer, pizza, and other food. Without someplace to gather, there is no way to have the group, so again, thanks.

In the open question period at the beginning of the meeting there was some discussion of the classic book Structure and Interpretation of Computer Programs by Abelson, Sussman, and Sussman. Mario Aquino mentioned that he has been watching some classic videos of these guys talking about the material and enjoying it. I’ve also in the past listened to some of the lectures from Berkeley’s CS 61a class, which uses this book as a text (also available as podcast on iTunes U). Mario mentioned this picture from Corey Hain‘s tweet about receiving a used copy of SICP for $4 and discovering a surprise inside.

I also meant to mention but forgot that I recently ran across this classic video called Erlang: The Movie which is just awesomely and unintentionally campy. If you’re interested in Erlang and/or laughing, you should check it out.

We had three very different and wide-ranging talks last night:

Apple Dashboard Widget Development

Mario talked about an Apple Dashboard widget he’s working on called BudgetMinder (available on GitHub). The widget is intended to provide a budget gauge that he and his wife can both use to deplete the monthly budget. The data is shared by storing it in a Google Docs spreadsheet.

The widget itself was built using Apple’s dev tool Dashcode and uses some Javascript in the UI. The widget calls out to the shell to run some Ruby that uses a Ruby gem to read and update the spreadsheet ln the web. Mario showed some of the key glue code and some of his favorite bits of Ruby from the project. Kyle Cordes pointed out that we saw examples of Javascript, Ruby, bash, and regex in the talk so Mario proved he was a polylglutton (n. A developer with an unhealthy appetite for learning and using more languages).

Mario’s talk also included several gratuitous robot pictures for no apparent reason.

Objective-C 2.0

David walked through some of the history of where Objective-C came from and how it got to where it is today. Objective-C is used pretty heavily by Apple for development of a lot of software in OS X, the iPhone, etc. It comes out of trying to bleed Smalltalk-style OO message-passing into C (and later C++).

I’ve never seen any Objective-C code before and I was surprised to find that it’s even more verbose than my mother tongue, Java. As a language, there seems to be a lot to dislike about it. :) But apparently the reason people like Objective-C is because of the interesting bindings available and what you can do with it.

David finished by showing an iChat visualization he put together using Quartz Composer. Quartz is a 4GL that allows you to wire together Objective-C components to build stuff and is heavily used for things like OS X screen savers, iTunes visualizers, and so on. David’s passed the video image from the camera through a pixellated, Lego-block filter which was really fun. Hopefully he can make it available somewhere. I had heard of Quartz but had no clue what it was, so this was a fun example. David will probably do a Quartz talk at some point in the future.


Mark Volkmann arrived with a colossal Clojure slide deck he’s been putting together for a variety of future talks but cut it down to a manageable number for the Lambda Lounge venue. He gave a nice overview of the Clojure REPL and the core of the language. Most importantly, he showed enough code to start to get a feel for what Clojure looks like in a real application (specifically a Snake game).

Mark made heavy use of an idiom that I gather is maybe not particularly popular in the Clojure/LISP community but does make the code quite a bit more readable to my taste. Instead of simply calling a function with a long series of arguments, Mark instead nested that function call inside a (let ) and bound the arguments into local variables. The benefit is that all of this arguments then get named meaningfully at the call site, instead of just embedded within another function call.

For example, instead of writing:

(defn eat-apple? [game]
  (same-or-adjacent-cell? (first (snake :body)) (game :apple)))

Mark wrote this:

(defn eat-apple? [game]
  (let [apple (game :apple)
        snake (game :snake)
        head (first (snake :body))]
    (same-or-adjacent-cell? head apple)))

This is (I think) identical, but using let here allowed him to name apple, snake, and head which adds meaning to the code. This addresses one common issue with functional and dynamic programming where the lack of meta information (fewer names and/or types) can make the code harder to understand if you weren’t the one that wrote it (or if it’s been a while). Lots of attention has been paid over the years to readability and maintainability in imperative languages like C, C++, and Java but I can’t say I’ve seen the same level of attention paid in the functional and dynamic communities. That could just be due to a lack of my attention but as these kinds of languages increase in use, this seems like an important area to develop.

Coming attractions

Next month at the February meeting Nate Young from Asynchrony will be presenting on functional programming in Javascript, a topic of which I know little but am looking forward to learning more about. Also, I will be presenting a talk on Actor Concurrency which will primarily use Erlang and Scala. I’m doing this same talk tomorrow at CodeMash in a slightly longer form that pulls in some Java too.

In March we have Ken Sipe planning to talk on F#, the new functional language from Microsoft and in April Kyles Cordes has offered to talk about Factor. These are great topics and both guys are excellent seasoned speakers so this is a fantastic schedule. If anyone would like to talk in March or April, we have a slot available each month. Some possible new topics that came to my mind last night were Lego Mindstorms (I have no idea what kind of language or bindings exist for it), continuations (what are they and what languages support them), and component programming (what languages provide or target component assembly). If anyone outside St. Louis is interested in traveling in to talk about a topic (at your own expense), drop me a line.

We’re also starting the planning for some kind of language shoot-out sometime in mid-year. I’m thinking we would have a bunch of folks prepare a small app and present the app and choice parts of the code for a bunch of different languages. But thats to be decided.

Thanks all for coming and hope to see everyone again next month!