Skip to content

Instantly share code, notes, and snippets.

View brianknapp's full-sized avatar

Brian Knapp brianknapp

View GitHub Profile
@brianknapp
brianknapp / message.rb
Last active December 17, 2015 16:19
Making your code more obvious with descriptive message passing
require 'objective-ruby'
class Sandwich
end
me = Object.new
cheese_sandwich = Sandwich.new
puts "With Objective Ruby:"
@brianknapp
brianknapp / hello.mirah
Last active December 20, 2015 18:49
Playing with basic Obvious ideas in different languages
class Entity
def initialize(input:String)
@data = input
end
def get_output
@data
end
@brianknapp
brianknapp / develop.sh
Created September 15, 2013 14:31
Go project autoreload on OS X. Replace 'your_go_app' with whatever your app name is You run develop.sh to have it watch the project folder and run rebuild when files change.
#!/bin/bash
fswatch ./ ./rebuild.sh
@brianknapp
brianknapp / gist:cafdb0320e4c2cba6970
Created October 10, 2014 16:09
Ruby Benchmarks, The Final Frontier

#Ruby Benchmarks, The Final Frontier

This is a pitch for a talk I was planning on giving at RubyConf, maybe I'll give it somewhere else

Abstract

Lets go on a journey across space and time to build the fastest possible Ruby applications. Explore the vast universe of Ruby Gems to find what frameworks, databases, algorithms, and runtimes can make high performance Ruby a reality.

Details

@brianknapp
brianknapp / message.rb
Created December 1, 2014 19:55
Messages
## This is an experiment in stronger message handling protocols in Ruby.
module BasicProtocol
def method_missing(method, *args, &block)
if respond_to? :handle_missing_method
return handle_missing_method(method, *args, &block)
else
return { error: "no method found!" }
end