…San Francisco Lua meetup group, and enjoys open-source development, building games, writing Mustache templates, and coffee connoisseurism (these interests often coincide.) Jack lives in San Francisco with his wife and two daughters.
Q. What first got you excited about technology?
I've always been excited about and around computers — there's an old picture of a very young Jack with a bowl cut and tacky sweater playing DOS games at my uncle's house. My stepfather …
Packing bits for a trip takes at least as much time as packing atoms.
Punch - The latest offering for building brochure sites, this one using Mustache templates with .
Hosted NoSQL - A rundown of some of the available commercial offerings.
Two New AWS Getting Started Guides - One each for and showing how the load balancing and scaling pieces fit together.
Fubar - error-tracking and logging service taking beta signups now.
…community does a lot to discourage putting logic inside views and I think it goes well. We could go with Mustache or other logic-less templating systems, but it's assuming that we can't trust programmers. Welcome back to stop hating Java ;)? ,
is the problem
First of all, Rails is not MVC . Second, the MVC ( ) is fine for monolithic apps that are (yay!) going to the past. The future is in viewless, backends with …
…add-in sort of like for and , with integration back to your account.
Graylog2 0.9.6-beta - Lots of new stuff in this log collection tool this time around.
Hogan.js - A compiler for the Mustache templating language, from Twitter.
Tools of the Trade - A collection of links and bookmarklets for designers.
…default view class is created but if you need more control over what variables are available in the Mustache template you can extend it. # in app/views/greetings/greeting.rb
module Greetings class Greeting < Poirot::View def time Time.now end end end
The greeting mustache template would now also have access to the current time.
Using HTML5 pushState in combination with re-useable templates can provide a good starting point for more degradable and accessible …
…I had about my vision for the ideal simple blog generator. I'm happy with the result. It uses Mustache for its templating language, and I'm a little torn about that decision. Mustache is impressive, but the inability to send arguments along with template tags is frustrating, as well as the expectation that your template files will have .mustache as their suffix. (I know you can change the latter, but it's not as clean as I'd like it.) Still, Mustache is cool and I'm …
…chapters covering broad topics like strings, character, IO, files, and objects in general. Notably, the book is heavily focused on syntax rather than instruction.
The book's source files are hosted on GitHub if you want to get involved. The build process involves Mustache, , , and Compressor, so it's not for the light of heart.
The first extension to Mustache is "extended paths". In Mustache, paths are always relative to the current context (which can change with iteration), and are always a single key. For instance, the url path from the above example references the url key in the current post that Mustache is iterating over.
Extended paths allow you to go deeper into the Object ( byline/name ) or up the hierarchy ( ../title ). This doesn't diverge from the core Mustache philosophy of avoiding …
…Solving this problem would probably let us implement syntax highlighting and other similar concepts in Mustache, too.
Here's what we got: Higher Order Sections.
Some expensive stuff.
How? If the value of cache_by_user_id is a lambda or function, Mustache will pass the unrendered block of text to it. The block can then do whatever it wants and its return value replaces the block.
Here's how we might do caching in Ruby:
class MyView < Mustache def cache_by_user_id lambda …
If you're upgrading from Mustache 0.7.0 or lower please note that the settings have changed very slightly. This diff is an example of one app I upgraded to 1.0 + Mustache 0.9 -- pretty painless, and the settings all have better names (finally).
Anyway, Mustache 0.9.0 works great with Sinatra 1.0 and even provides some big improvements:
The first time a Mustache template is rendered it is compiled into pureand cached, even if there's …