Tag Archives: ruby

Links: Parsing in Ruby and JavaScript

I’ve been reading quite a bit about parsing and templating in ruby as I attempt to port a templating engine from JavaScript to Ruby. Here are some scattered links: Jison Jison is a parser generator for JavaScript that has separate lex and bnf definitions. It’s used by Handlebars.js. Treetop Treetop is a parser generator for [...]

the one-line sinatra app

The five-line sinatra app on http://www.sinatrarb.com/ is pretty damn impressive: require ‘rubygems’ require ‘sinatra’ get ‘/hi’ do “Hello World!” end I can do four lines better than that, though: require ‘sinatra’ So what does that get you? batkin:cholla ben$ ruby -rubygems cholla.rb == Sinatra/0.9.0.4 has taken the stage on 4567 for development with backup from [...]

Practice

I just watched Corey Haines’ lightning talk from this year’s acts_as_conference: He makes a lot of really good points in a short amount of time. One of the things he says is that if we have to look at documentation for a technique, we’re unlikely to use that technique when we’re in a time crunch. [...]