[racket] Dynamic Templates?

From: Erik Pearson (erik at adaptations.com)
Date: Thu Jun 6 11:46:19 EDT 2013

I have nothing against Scribble. For me it is practical -- I have tons
of mustache templates created for another web server, so I want to
(mostly) just drop in a Racket web app to take over.  Also, I need to
support client side templates. Mustache (or as I like to remind myself
c-templates) so something of a lingua franca. At least in my problem
domain, c-template/mustache is a good match for data drawn from json
document stores like couchdb.

On Thu, Jun 6, 2013 at 8:01 AM, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
> I'm curious why you think Mustache is better than Scribble (and the
> full power of Racket) in your templates?
> On Thu, Jun 6, 2013 at 8:53 AM, Joe Gibbs Politz <joe at cs.brown.edu> wrote:
>> On Wed, Jun 5, 2013 at 9:37 PM, Erik Pearson <erik at adaptations.com> wrote:
>>> @joe I have a relatively simple implementation of "mustache" templates
>>> that I use for web server templating.
>>> Something similar to your example would be
>>> (render "Welcome {{username}}" #hasheq((username . "erik")))
>>> where the data is a jsexpr (as in the json module).
>>> If you are interested, I can send it. You could rip it apart and use
>>> it. I do plan on (kinda, sorta, eventually) releasing it into the
>>> planet and/or github, but it still needs more work, has not been
>>> tested (other than being used and any bugs fixed.)
>> Please do share!  I'd like to give it a whirl; when I sent this
>> message I was somewhat hoping to hear about a package for Mustache in
>> Racket :-p
>> ____________________
>>   Racket Users list:
>>   http://lists.racket-lang.org/users
> --
> Jay McCarthy <jay at cs.byu.edu>
> Assistant Professor / Brigham Young University
> http://faculty.cs.byu.edu/~jay
> "The glory of God is Intelligence" - D&C 93

Erik Pearson
;; web form and function

Posted on the users mailing list.