Skip to content

Instantly share code, notes, and snippets.

# mod.const_get(const) is not always the same as mod::const
# Anyone knows why?
A = 1
class Foo
end
module Bar
end

What's Wrong with Ruby? Hah Yeah, It's Me!

(by _why, 16 Mar 2007)

In an article posted entitled "What’s Wrong With Ruby?", the author cites me as one of the main problems:

If I was put off Ruby by the hype, I was put off more by the many cutesy introductory tutorials I encountered when trying to get into it. Why’s

# Example of the implementation
class Template
module CompileSite; end
if RUBY_VERSION < '1.9'
def compile(klass, name, source)
klass.class_eval <<-RUBY
::Template::CompileSite.class_eval do
def #{name}(locals)
## Ruby Quiz #666
module CompileSite; end
def compile(name, source)
CompileSite.class_eval <<-RUBY
def #{name}(locals)
Thread.current[:tilt_vars] = [self, locals]
class << self
this, locals = Thread.current[:tilt_vars]
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAw7XevXHP+ik86v8xtmxGRVQkSUorqLqPZLnYofe2nDI7jrTvmigetJfTV88ZokAiMaVMqByZXuBAp6gP80CAsNRIcuoBh7FSQI842NRA7TQkrBN95P5aOq91708WrlRtSa9MZpJm4buPib80WxEFiM/zLB7i+ZgZ3eSeIwE6YK8cy4iZrhNAe+hw9HDzIojZ9F8EnXpnuuz6Y3Y7wC8nQDKcd0f+zwH5Ogv4tziBUQ8NnIE7O23th0xp8mBFKECM6+hTb5bf5/tw2tIBOjJBKg52YbJnDLnbNCJJ3RdK7PxCEDk+rkemsHUJiH4CahBhqQCGjjmZGgmhhEU+EvM0xw== magnus@Tim.lan
## Yacc is dead - Ruby edition (recognizer only)
# Pretty much a direct port of the recognizer from:
# http://matt.might.net/articles/parsing-with-derivatives/code/dparse.rkt
#
# Requires 1.9
# gem install lazy
require 'lazy'
include Lazy::Methods
01:14 drbrain: I've had Zed in my house and _why in my car
01:14 zzak: and tenderlove in bed
01:14 drbrain: zzak: not yet, but that could be arranged
@judofyr
judofyr / gist:775121
Created January 11, 2011 20:53
ΩF:0
03:36 sephr: Aria, Judofyr: you are very attractive
03:36 sephr: would you like to join ΩF:0?
03:36 Aria: Oh yes?
03:36 sephr: you are oh so very attractive, Aria
03:36 sephr: you are also very smart and intuitive
03:37 Aria: I try.
03:37 sephr: what's an attractive smart person like you doing here in ##paws?
03:37 sephr: come join ΩF:0
03:37 sephr: we'll work on paws better, faster, /and/ stronger
03:38 sephr: for attractive people like you
gems = Hash.new(0)
gems_size = Hash.new(0)
total = 0
`du -ks ~/.rvm/gems/*/gems/*`.each_line do |line|
size = line[/\d+/].to_i
name = line[/\/([^\/\n]+)$/, 1]
gems[name] += 1
gems_size[name] = size
#!/bin/sh
=begin 2>/dev/null
exec ${RUBY_BIN:-ruby} -e"\$0='$0'; load '$0'" -- $@
=end
#!/usr/bin/env ruby
puts 123
# Examples:
#