about photos bookshelf portfolio blog home
Begin main content

Simple Smalltalk/Seaside Blog

Given my current business, I'm unlikely to build a new site using Seaside any time soon (despite professing my web development epiphany last year), but I wanted to get the following links on record for my, and your, future enjoyment.

First is a screencast titled Screencast: How to Build a Blog in 15 Minutes with Seaside, second is a followup by the same author Mapping Seaside Blog to PostgreSQL with Glorp.

The simple blog makes use of the Seaside web framework and Magritte Meta-programming framework (no doubt such a package is unnecessary in Lisp...).

06:11 PM, 18 Mar 2007 by Mark Aufflick Permalink

Curious

What makes you think such a framework wouldn't be required in Lisp? It certainly would be required, Lisp doesn't natively generated validated web forms. That's what Magritte was being used for. If you did this with objects in Lisp, you'd use CLOS, which itself is a framework for meta programming. The only thing Lisp has over Smalltalk are macros. Macros allow Lisp code to be pretty and simple, but Smalltalk has this ability as well, but takes a different approach. Smalltalk has a unique method call syntax and the cleanest syntax for lambdas around. With such a syntax, you have little need for macros because you never have to hide ugly code, a common use for macros. Note I said little need, not no need. Consider implementing "if" as a macro. (if condition (print "true case") (print "false case")) OK, if can't be a function because functions evaluate their args prior to being called, so it has to be a macro to delay evaluation of the cases. Smalltalk does the same thing by passing lambdas instead... condition ifTrue: [Transcript show: 'true case'] ifFalse: [Transcript show: 'false case'] Just as clear, while staying true to Smalltalk's OO nature using only objects and polymorphic method calls. How about another common macro use with the added complexity of introducing a new variable binding into the lexical environment... (with-some-resource (value) (print resource)) Just as clean using objects and lambdas instead of macros in Smalltalk... SomeResource arg: aValue with: [:resource | Transcript show: resource] Lisp is slightly more powerful than Smalltalk, but just barely, and Smalltalk's development environment is second to none, not even Lisp comes close here.

by Unregistered Visitor on 03/26/07

Meta me timbers

I was only thinking of the underlying object organisation of Magritte, which sounds a lot like Common Lisp MOP (Meta Object Protocol). I'm sure Paul Graham could no doubt whip up all of the Magritte functionality in CLOS by lunchtime ;) I really like your clear comparison of Lisp macros to Smalltalk OO. The Smalltalk environment certainly is superior to pretty much anything else (one day XCode/ObjC will get there and Apple will have returned to 1980 :) I would further say that the beauty of not needing to "hide ugly code" in macros is that with Smalltalk nothing is magic. Everything is very straightforward, clean and short. In Lisp (or, for that matter, Perl) when you finish a fiendish piece of magical glue code that allows your main application code to be clean and expressive, you appreciate the genius behind it and feel glad that you're not stuck in an inflexible language that prevents you getting down and dirty when you have to. With Smalltalk you just write methods that are so brief and clear they seemingly do nothing, and yet together they achieve the near impossible. It's only later that you realise you haven't needed any magic.

by Mark Aufflick on 03/26/07

Add comment