News for hackers. Stuff that matters.
Re:Utterly sensible HTML templating in Common Lisp by zachbeane on Tuesday November 16, 2010 @04:00PM (#1911632)
You should learn about WITH-OUTPUT-TO-STRING.

(string-downcase (string thing)) should be written (string-downcase thing)

The fdefinition trick is not a good one. Define the functions at compile-time, not at runtime.

Re:Utterly sensible HTML templating in Common Lisp by chaitanya on Tuesday November 16, 2010 @04:14PM (#1911700)
> (string-downcase (string thing)) should be written (string-downcase thing)

I learnt this trick only after working on CL for a couple of years!

Re:Utterly sensible HTML templating in Common Lisp by zachbeane on Tuesday November 16, 2010 @04:18PM (#1911718)
Maybe http://l1sp.org/search/designator will teach you a few more tricks and save you some time...
Re:Utterly sensible HTML templating in Common Lisp by chaitanya on Tuesday November 16, 2010 @11:25PM (#1912904)
Nice. Today I learnt about the file position designator :)
Re:Utterly sensible HTML templating in Common Lisp by sgrove on Tuesday November 16, 2010 @04:20PM (#1911724)
I was originally using macros, but I prefer to use functions instead. I'll give it some thought, you may be right in this case.

And thanks for the (string-downcase thing) trick, I'll update that right now :)

Re:Utterly sensible HTML templating in Common Lisp by zachbeane on Tuesday November 16, 2010 @07:31PM (#1912375)
Functions are good. Defining them at runtime with (setf (fdefinition ...) ...) is rarely good.