opening it up with Common Lisp

Favorite weblogs

Lisp Related

Bill Clementson

Finding Lisp


Planet Lisp



Talking Points Memo

This Modern World

Working for Change

Other home


Recent Readings

Book review: Darwinia
Reviewed: Friday, August 11, 2006

Summer reading: Spin
Reviewed: Saturday, August 5, 2006

Reviewed: Tuesday, July 18, 2006

the Omnivoire's Delimma
Reviewed: Wednesday, July 12, 2006

the Golem's Eye
Reviewed: Wednesday, May 31, 2006


Not announcing: CL-Markdown
Tuesday, January 24, 2006

I'm not announcing CL-Markdown because there's no there there. I did, however, get a few questions about it after I mentioned it earlier so here's some why and wherefore.

There are already many markup languages (here and here come to mind) and lots of HTML generators. Markdown is John Gruber's text-to-HTML conversion tool for web writers.

The overriding design goal for Markdown's formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions. While Markdown's syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown's syntax is the format of plain text email.

I like what Gruber has done in terms of making a "language" primarily for writing and reading that can also be converted to HTML. It's also nice that it's a "standard" (of sorts) and that there are tools that let you go from HTML back to it. I've been meaning to write a CL-Markdown for quite a while now and since I currently have many other more pressing things to do, i thought that now was a good time to start hacking at it -- ok, so that wasn't completely sane. Whatever.

I started looking at both the Perl and Python source and then decided I didn't understand Perl or Python well enough to translate easily and that the problem didn't seem that hard... (famous last words, right!). So what I do now is read in lines of input and chunk them into what is (roughly) the correct block structure. Then I go back over the blocks and handle the spans. My current output is a "document"; document is a list of chunks; a chunk is a list of lines and a line is a list of strings and conses representing markup. Chunks have types and levels (e.g., bullet, level 1 or blockquote, level 3). I'm currently rethinking this approach some because putting the linear structure back into its tree form is being more a pain that I expected... I also want to use Peter Seibel's HTML and PDF backends...

I'm probably going to have to let discretion be the better part of valour and drop the project for a week or two in order to finish some real work. Still, I'm pretty happy with how quickly it seems to be coming togehter...


Home | About | Quotes | Recent | Archives

Copyright -- Gary Warren King, 2004 - 2006