Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Towards a shared implementation of Mustache, Handlebars, Liquid and Django Templates?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Magnus Holm  
View profile  
 More options Sep 10 2010, 1:11 pm
From: Magnus Holm <judo...@gmail.com>
Date: Fri, 10 Sep 2010 19:11:38 +0200
Local: Fri, Sep 10 2010 1:11 pm
Subject: Towards a shared implementation of Mustache, Handlebars, Liquid and Django Templates?
Hey folks,

There's several context-stack-based template engines now: The main
idea with them is that instead of using Ruby, you write in a custom
markup language and there's an implied stack which changes the lookup:

Example from Mustache/Handlebars.js:

{{name}} <- Refers to a top-level name-attribute
{{#projects}}
  # The stack is pushed with the projects data.
  {{name}}  <- Could refer to the name of a project, or a top-level
name-attribute
{{/projects}}
# The stack is popped
{{name}} <- Refers to the top-level name-attribute again

Liquid:

{% for a in b %}
  # The stack is pushed with `a`
  {{ a.name }}
{% endfor %}
# The stack is popped, `a` is no longer available

There's probably several places where all of these engines can share
code (maybe only have different parsers) and by doing this the
Temple-way they can all take advantage of different optimizations. For
instance, I've written Handlebars-JIT which speeds up Mustache with
2x, but the same idea can also be applied to all of these engines.

Supporting both Mustache and Handlebars.js (by wycats) would the first
goal, but as it's written we should build it in such a way that it's
simple to include support for Liquid and other context-stack-based
template engines.

Any thoughts?

// Magnus Holm


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Timothy N. Tsvetkov  
View profile  
 More options Oct 17 2010, 5:26 am
From: "Timothy N. Tsvetkov" <timothy.tsvet...@gmail.com>
Date: Sun, 17 Oct 2010 02:26:43 -0700 (PDT)
Local: Sun, Oct 17 2010 5:26 am
Subject: Re: Towards a shared implementation of Mustache, Handlebars, Liquid and Django Templates?
I forked Liquid and extended a bit. My fork now works in production
well for us but it is slow because Liquid is slow. Our response time
is ok for our customers, but I start working on boosting my fork of
Liquid. And now looking for libs for compiling it or maybe I should
write my own one? Have you tried Temple? What do you think about it?

On Sep 10, 9:11 pm, Magnus Holm <judo...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Magnus Holm  
View profile  
 More options Oct 18 2010, 5:12 am
From: Magnus Holm <judo...@gmail.com>
Date: Mon, 18 Oct 2010 11:12:55 +0200
Local: Mon, Oct 18 2010 5:12 am
Subject: Re: Towards a shared implementation of Mustache, Handlebars, Liquid and Django Templates?

Hey Timothy,

I have started the work on a Liquid clone (called "Solid") which compiles to
Temple and works pretty well. There are some minor differences in the syntax
though, but they're mostly for the better. If you're interested I can try to
clean it up and publish it.

As the author of Temple, I'll have to say that it's pretty awesome ;-)

// Magnus Holm

On Sun, Oct 17, 2010 at 11:26, Timothy N. Tsvetkov <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »