background preloader

Ruby

Facebook Twitter

Rails

Ruby AST for Fun and Profit. By Ilya Grigorik on December 11, 2008 Anytime you execute a Ruby application, or any language for that matter, the parser has to scan the source, split it into recognizable tokens, and construct an Abstract Syntax Tree (AST) before the instructions can be turned into executable machine code.

Ruby AST for Fun and Profit

Sometimes this is done as a separate preprocessing step (compiled languages), and sometimes it is done on the fly (dynamic languages). Now the less academic version: an AST to a program is what the DOM is to a web-page - and we all know how useful that is! It turns out that having access to the AST of a program can be incredibly powerful. Ever wondered how your IDE populates the method names in a separate window? Nokogiri. Box2DFlashAS3 - HotRuby - Ruby on JavaScript & Flash. Why’s (poignant) guide to ruby. Read This Paragraph At my local Barnes and Noble, there is a huge wall of Java books just waiting to tip over and crush me one day.

why’s (poignant) guide to ruby

And one day it will. At the rate things are going, one day that bookcase will be tall enough to crush us all.