Dusting off my Growl Library December 21st, 2011
Patrick Stein

I’ve spent the last few hours dusting off my Common Lisp Growl client library. The last time I worked on it was before the Mac Growl Application supported GNTP (Growl Notification Transport Protocol).

Today, working on it, I’m not quite sure what’s up, but I am not succeeding in communicating with the server using encryption. I’ll have to look more closely. Last time that I worked on it, I extended Ironclad, but I never got those changes pushed fully into Ironclad’s main line. But, I think I’m using the same version of Ironclad that I was using when I tested against the Windows Growl Application. *shrug*

I’ve also run into a snag with the Callbacks. Essentially, your Lisp program could get a callback when the user has clicked on your Growl notification. This actually works except for the fact that I am calling READ-SEQUENCE into a buffer that is longer than the message. The server, I believe, is supposed to close the socket after the callback. But, it does not. So, I am stuck waiting for more bytes that will never come.

Now, I either have to do one of the following:

  • refactor it to use READ-LINE instead
  • switch from using USocket to using IOLib (and hope that :dont-wait works as expected)
  • extend USocket to support SOCKET-RECEIVE even on TCP sockets

Anyone have a preference?

CL-Growl patched for CCL April 29th, 2010
Patrick Stein

Alexandre Paes submitted a patch for my CL-Growl library so it now works with CCL (aka. Clozure, formerly OpenMCL), too.

Here is the source tarball: cl-growl_1.1.2010.04.29.tar.gz and the corresponding GPG signature: cl-growl_1.1.2010.04.29.tar.gz.asc. For other ways to access this code, see the CL-Growl page.

Thank you, Alex!

CL-Growl Slides April 23rd, 2010
Patrick Stein

On Monday, I am giving a lightning talk at the TC Lispers meeting about my Common Lisp Growl client library.

Here are the slides with presenter notes and the accompanying sample code.

CL-Growl client library released April 12th, 2010
Patrick Stein

Growl is a notification system for Mac OS X. You run a Growl server on your machine. Then, applications can send notifications that will be displayed on your desktop. Growl supports a thin network protocol called Growl Talk that programs can use to send notifications to the Growl server (and hence, to your desktop).

Growl is incredibly useful for any program that operates asynchronously with the user. If you want to be notified when some portion of your job completes or when there is a critical error in your web application, Growl is a great tool to have at your disposal.

I wrote an implementation for Common Lisp of the client protocol. Here is a simple example of how you might use it:

(let ((growl:*growl-default-app* "My Lisp Application")
      (growl:*growl-default-host* "localhost")
      (growl:*growl-default-password* "my-growl-password"))
  (growl:register :enabled (list "Warn" "Error")
                  :disabled (list "Info"))
  (growl:notify "Program starting up..."
                :notification "Info")
  (unless (connect-to-database ...)
    (growl:notify "Cannot connect to database!"
                  :title "Critical Error!"
                  :notification "Error"
                  :sticky t
                  :priority 2)))

For more complete usage information and to learn how to obtain the library, see the CL-Growl web page.

Updates In Email