Skip to content

Instantly share code, notes, and snippets.

@eregon
Created August 19, 2010 21:25
Show Gist options
  • Save eregon/538962 to your computer and use it in GitHub Desktop.
Save eregon/538962 to your computer and use it in GitHub Desktop.
# encoding: utf-8
require "io/console"
def ⌛() STDIN.getch end
alias λ lambda
alias ✎ puts
def ❄() λ { |e| ✎ e } end
Fiber.new { |b = -> w { ✎ w }|
loop do
b[Fiber.yield]
end
}.tap { |worker|
Fiber.new { |π = [:Here, :the, ?o+?n], ∆|
worker.resume if ∂ = π.zip(∆.()).each
loop do
⌛ and worker.resume ∂.next
end
}
.resume -> { %w(begins WTF Ruby1.9 ❄) }
} and ✎
singleton_class.class_eval { alias is ✎ }
is a: Hash, with: -> cool { keys }
✎ "「ソニニノzアノフニセ"
.encode('SJIS')
.codepoints
.map(&->c{c-90})
.pack('U*')
def m m
secret = "\nthis can not be known, right ?"
send(m)
end
✎ m(:binding).eval("secret")
class Hash
def m &b
b.call(self, &❄)
end
end
7.times.reverse_each.map.with_index.with_object({}) { |(e,i),h| h[e] = i }.m(&λ { |a,&b| b.call(a) })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment