How I Know I Don’t Know Enough About Lisp Macros June 19th, 2009
Patrick Stein

I have a pretty good grasp on macros in Lisp, C/C++, TeX, m4, and nroff. Lisp macros are, far and away, the most powerful in that set. In fact, Lisp macros get a bad rap by sharing a name with macros in those other languages. Still, I often hit the same wall when trying to write a Lisp macro so I know that there’s more I have to learn.

A Quick Look at Macros

First, let’s review macros for a moment to make sure we’re all on the same page. The C/C++ macros are the simplest to understand so we’ll start there. The C and C++ compilers run in two stages. First, the C preprocessor runs to expand all of your macros. Then, the compiler runs to actually compile your code. In C and C++, macros are declared using the #define command to the preprocessor. For example, you might do something like the following:
Read the rest of this entry ⇒

Thinking in the Car June 18th, 2009
Patrick Stein

I think best while driving. Unfortunately, I rarely have time to get my thoughts down in text when I get back home.

There are a couple iPhone apps that claim to have voice-to-text: QuickVoice PRO w/Voice2Text, reQall, and Jott. It seems that reQall and Jott require me to sign up for their web services. reQall has both a free and a pay web service. Jott only seems to have a pay service. So, I will probably try them in that order until I find one that I like or get frustrated with the whole process.

It seems that QuickVoice PRO uses SpinVox to do their voice-to-text. I am not impressed with the test message. I said, This is just a test. open parenthesis foo close parenthesis. The email that I got back says:

This is just a test of open(?) friends to see who close friends to see. – spoken through SpinVox

Design of Everyday Parentheses June 15th, 2009
Patrick Stein

This weekend, I was reading The Design of Everyday Things by Donald Norman. At one point, he is talking about automatic behaviours:

Doing several things at once is essential even in carrying out a single task. To play the piano, we must move the fingers properly over the keyboard while reading the music, manipulating the pedals and listening to the resulting sounds. But to play the piano well we should do these things automatically. Our conscious attention should be focused on the higher levels of the music, on style, and on phrasing. So it is with every skill. The low-level, physical movements should be controlled subconsciously.

[Wow. In typing that paragraph out, I see all sorts of parallels to math, volleyball, cooking, and pretty much every other area of my life. But, for this essay, I'm just going to focus on what brought me here.]

People who are new to Lisp often end up complaining The parentheses. Man, too much with the parentheses. It’s an understandable complaint, but it’s just like complaining There are too many keys on this piano. It is a complaint that will go away after a small amount of practice.

Here is one sample from many, many similar threads in the Usenet news group comp.lang.lisp:

Ken Tilton wrote:
    Bill Dubuque wrote:
        Leo Sarasua wrote:
        Let's face it: all the ((((... and )))) in Lisp are awfully unreadable.
    Seasoned Lisp programmers see past parentheses just as a seasoned
    reader of a printed language sees past the individual characters
    comprising a word.
Parentheses? What parentheses? <g> Like you say, I stopped seeing them
after about a week of serious Lisp.
...
My retort to "what about all those parentheses?" is "do spaces between
words bother you?". <g>

The parenthesis are an unconscious action. They are part of the flow, not an interruption in it. Looking back on the programming classes that I took in high school and college, most everything was at the this is the next piano key level. Part of that is out of necessity. You have to learn where your feet are before you learn to walk or to run or to dance. [And, in a classroom setting, thirty people have to learn where their feet are before any of you can move on.] But, part of it is just tragic omission.

Teachers should share some glimpses of the future: the higher levels of the music, on style, and on phrasing. Teachers should talk about how some day, you’ll no longer be tripping over the parentheses. You will be dancing with them, complex dances, with grace and power.

Live coding demos? If you watch someone skilled at programming doing it, you see that this stuff doesn’t get in the way. With practice, the syntax becomes unconscious and automatic. So, I leave you with some live coding demos. The first is Andrew Sorensen performing with the scheme package Impromptu.

Day of the Triffords from Andrew Sorensen on Vimeo.

The second is Sven Van Caekenberghe implementing a Reddit clone in Lisp in twenty minutes:

TCLispers.org Up and Running June 15th, 2009
Patrick Stein

Just put up a little bit of a website for the Twin Cities Lisp User’s Group at tclispers.org. Right now, it’s light on content. I don’t expect it to be particularly high-volume. It should at least start accruing slides from meetings as we get more of those under our belts.

First TC Lispers Meeting A Success June 12th, 2009
Patrick Stein

The first meeting of the TC Lispers group was a big success, IMO. I was figuring on an attendance near 20. My estimate is that it was really right around 40. That left us a little cramped in the meeting room at the Cafe, but we managed. We also lost the room before the presentation portion of the meeting was completely done, so there wasn’t much time for mingling. Actually, there was apparently a patio where people mingled afterward. I didn’t see this and took off too early. Mea culpa.

The presentation at this first meeting was on NST (not an abbreviation or acronym, but a sound effect /unsst/) which is a testing framework for Common Lisp. John Maraist did the presentation. He was a lively presenter, definitely had a good grasp on some dark corners of Lisp (like exactly what’s involved in the underbelly of MOP). Being a Haskell hacker though, he had some strange opinion that Lisp would be better if only it had strong typing. Well, what can you do? I mean, it’s not like he kicks puppies, I suppose. 8^)

It was great to see so many Lispers at so many levels there. About six or seven folks worked at Honeywell at some point in the past. Apparently, Honeywell had lots of Lisp development at one point. Who knew? About six or seven folks (overlapping a bit with the previous group) currently work at SIFT. There were some University students, a University teacher, some Ruby folks who wanted to see what Lisp was all about, some Lisp hobbyists, some independent consultants, some folks who can get Lisp in under the radar in their jobs, and on and on.

The next meeting is going to be 6pm on Tuesday, July 14th at the Common Roots cafe on 26th and Lyndale in Minneapolis. The topic is not quite set yet, but it seems like it might be a series of short talks on introductory aspects of Lisp.

There’s much discussion going on on the mailing list about finding a bigger venue for August and onward. There’s much discussion about exact topics for next month’s meeting. If you’re able to make it to the Twin Cities on a Tuesday evening, mark your calendars and come on out.

(assert (>= tclispers-meeting +fun+))

Updates In Email

Email:

l