19 April 2014

The Ruby Reflector

Topic

Mustache

  Source Favicon
By Thea Lamkin of New Relic 6 months ago.
Email

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 …

newrelic.com Read
  Source Favicon
By Mike Gunderloy of A Fresh Cup 2 years ago.
Email

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 JSON.

Hosted NoSQL - A rundown of some of the available commercial offerings.

Two New AWS Getting Started Guides - One each for Linux and Windows showing how the load balancing and scaling pieces fit together.

Fubar - New error-tracking and logging service taking beta signups now.

afreshcup.com Read
  Source Favicon
By Andrzej Krzywda of Andrzej on Software over 2 years ago.
Email

…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 Java? BTW, stop hating Java ;)

MVC is the problem

First of all, Rails is not MVC . Second, the Rails MVC ( Model2) is fine for monolithic apps that are (yay!) going to the past. The future is in viewless, API-based backends with …

andrzejonsoftware.blogspot.com Read
  Source Favicon
By Mike Gunderloy of A Fresh Cup over 2 years ago.
Email

Browser add-in sort of like Readability for Firefox and Chrome, with integration back to your Evernote 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.

afreshcup.com Read
  Source Favicon
By olivern of Bamboo Blog 3 years ago.
Email

…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.

Conclusion

Using HTML5 pushState in combination with re-useable templates can provide a good starting point for more degradable and accessible …

blog.new-bamboo.co.uk Read
  Source Favicon
By Headmaster of Viget.com Blogs over 3 years ago.
Email

…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 …

viget.com Read
  Source Favicon
By Peter Cooper of Ruby Inside over 3 years ago.
Email

…chapters covering broad topics like strings, character encoding, 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, Nokogiri, Pygments, OptiPNG and YUI Compressor, so it's not for the light of heart.

rubyinside.com Read
  Source Favicon
By wycats of Katz Got Your Tongue? over 3 years ago.
Email

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 …

yehudakatz.com Read
  Source Favicon
On ones zeros majors and minors almost 4 years ago.
Email

…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 …

ozmm.org Read
  Source Favicon
Email

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 Sinatra 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:

Caching

The first time a Mustache template is rendered it is compiled into pure Ruby and cached, even if there's …

ozmm.org Read