Everyone and their dog loves Edi Weitz’s Lisp software (unless they don’t use Lisp, that is). Not without reason—Edi’s libraries are solid, well-designed and robust pieces of software. CL-PPCRE is unbeatable (it parses Perl’s regular expressions faster than Perl, when properly compiled, and is more compatible with Perl 5.8 than Perl 5.8 is with Perl 5.6), and Hunchentoot seems to be the best and most hassle-free HTTP server library available for Lisp. Hunchentoot is also most popular server, and many people using it, automatically use Edi’s CL-WHO for HTML output, and HTML-Template for templating, which—I think—are not the best libraries available for this, and I will explain now, why.
I worked for about a year on an UnCommon Web-based application. This was an interesting experience; UCW provides a great way to express complex behaviour in a Web application, as it is continuation-based, which enabled me to code app’s logic as regular control flow, complete with looping, conditions, etc., from time to time presenting user a form and receiving user-supplied values (form presentation was as simple as calling out to a function, which returned values supplied by user). Cool, huh? Currently, UCW seems to be mostly a dead project, and there is an alternative, which may be more interesting—namely, Weblocks—but I didn’t check that out yet. What’s more, UCW, with all its complexity, had very little documentation, and what was avalilable, was mostly outdated, as the framework was constantly evolving at that time. Not so cool, but it forced me to learn to RTFS when needed (with Slime‘s
M-. it was not as hard as it seems). But I digress; UCW made use of some other projects of Bese (UCW developers seemed to have quite a bad case of NIH), including HTML output and templating library Yaclml—Yet Another Common Lisp Markup Language—which I really loved, and which, in my opinion, surpasses CL-WHO + HTML-Template in many ways. Unfortunately it is almost undocumented, which is what I’ll try to fix in this article, along with comparing Yaclml to its Ediware counterparts. Continue reading
Brian Carper described a few days ago, how Clojure is better (for him) than Common Lisp (actually, SBCL). I managed to dig through ensuing flame war, but it seems like nobody in the flame war realized (or it wasn’t stressed enough) that original post is actually comparing apples to oranges, a serious language to a toy language.
A language, to be considered serious, needs to be self-sufficient, a serious language can’t be a mere parasite on some host language or environment, and its bus factor can’t be finite. That translates to just a couple of features:
- A serious language has to have a defining standard, it can’t be implementation-defined. A good standard bumps language’s bus factor to aleph null: after a nuclear catastrophe, archæologists of future generations should be able to re-implement the language on any hardware, including the Calculor;
- A serious language has to be self-hosting, or at least have some self-hosting implementations. Only then language stops being dependent on other languages.
darcs get http://common-lisp.net/project/bese/repos/parse-html/