I hereby claim:
- I am dirk on github.
- I am dirk (https://keybase.io/dirk) on keybase.
- I have the public key with fingerprint 30B2 92C2 31E4 F85D 4B82 97CE DC57 4905 5034 B546
To claim this, I am signing this object:
syntax = r''' | |
<ts> := [ \t]* | |
# Variable delcarations | |
local_var := [a-z], [a-z0-9_]* | |
global_var := [A-Z], [a-z0-9_]+ | |
# The chain of indexes and properties for objects | |
tail := (index/property/func_call)+ | |
index := "[", expression, "]" |
use std; | |
use time; | |
import result::{ok, err}; | |
import to_str::*; | |
// Count the number of live neighbors for a given cell. | |
// Neighbors are cells adjacent vertically, horizontally, or diagonally. | |
fn live_neighbors(board: [[bool]], row: int, column: int) -> int { |
config.gem "toml", :version => "0.0.4" | |
class BlankSlate | |
class << self | |
# Hide the method named +name+ in the BlankSlate class. Don't | |
# hide +instance_eval+ or any method beginning with "__". | |
def hide(name) | |
# CHANGED: if instance_methods.include?(name.to_s) and | |
if instance_methods.include?(name.to_sym) and | |
name !~ /^(__|instance_eval)/ | |
@hidden_methods ||= {} |
#!/usr/bin/env ruby | |
version = `wget -O - -q http://commondatastorage.googleapis.com/chromium-browser-continuous/Mac/LAST_CHANGE`.strip | |
puts "Downloading Chromium continuous build version: #{version}" | |
STDOUT.flush | |
`wget -O "chromium-mac-continuous-#{version}.zip" http://commondatastorage.googleapis.com/chromium-browser-continuous/Mac/#{version}/chrome-mac.zip` |
class StateMachine | |
def initialize | |
@transitions = {} | |
end | |
def transition(opts, &block) | |
from = opts[:from] | |
to = opts[:to] | |
@transitions[from] ||= {} | |
@transitions[from][to] = block | |
end |
class Module { | |
forwards_unary_ruby_methods | |
def [constant_name] { | |
""" | |
@constant_name Name (@String@) of constant's name. | |
@return @constant_name's value. | |
Returns the value of the constant with the given name in @self. | |
""" |
# Fast nested constant implementation | |
class FastNestedConstant : Fancy AST NestedConstant { | |
def initialize: @line string: @string { | |
names = @string split: "::" | |
@toplevel = false | |
if: (@string =~ /^::/) then: { @toplevel = true; names shift } | |
@names = names map: |n| { n to_sym } | |
} | |
def bytecode: g { |
$('p').each(function() { | |
if($(this).html() == '' && $(this).text() == '') { | |
$(this).remove() | |
} | |
}); |
# Pipe command to this to open in the browser (eg. bundle help install | pb) | |
alias pb="col -b | open -a /Applications/Chromium.app -f" |
I hereby claim:
To claim this, I am signing this object: