🕷 zenspider.com

by ryan davis



sitemap
Looking for the Ruby Quickref?

RubyConf, Here I Come!

Published 2005-06-30 @ 22:11

Tagged ruby, metaruby, parsetree, ruby2c, rubyinline, toys

My rubyconf 2005 presentation proposal was accepted!

I plan on talking about all the technologies and toys that have spawned out of the metaruby project. The whole fam.

I plan on illustrating the family’s usefulness and power through examples including: an example of RubyInline, a language extension for RubyInline, aparse tree complexity metric grapher, a simple example of ruby2c translation, amaintainable and fast profiler, a Ruby obfuscator, and a dynamic Ruby optimizer that requires zero effort to use.

For fun, here is something I scratched up tonight with Eric to play with the idea of lisp-like ruby posted on redhanded (replaced with archive.org) recently. Check it, real s-expressions in ruby:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'ruby2ruby'

class Module
  def _(sexp)
    self.module_eval RubyToRuby.new.process(sexp)
  end
end

class Foo
  _ [:defn, :example, [:args], [:call, [:lit, 1], :+, [:array, [:lit, 1]]]]
end

p Foo.new.example
=> 2