http://tinyurl.com/josh-lightning-talks
- Present trip to RDRC
- How to contribute to F/OSS
- Ruby method overloading
Chem timer- Land of Lisp book review
- Metaprogramming Ruby book review
- Cucumber Watir example
# backend app | |
require 'sinatra/base' | |
require 'json' | |
class UsersController < Sinatra::Base | |
get '/users/:id' do | |
JSON.dump id: params[:id].to_i, name: "Josh" | |
end | |
end | |
*PURPOSE: | |
This is a test to evaluate the underlying difference between references and pointers. | |
*PROCESS: | |
The session can be seen in this image http://grab.by/Jbi | |
First: | |
Create a file that uses references (references.cpp), then duplicate it using pointers(pointers.cpp) |
http://tinyurl.com/josh-lightning-talks
/* The problem with phrases like "pass by value", "pass by object reference", and "pass by reference" | |
* is that they are utterly meaningless becaues there are three perspectives one can take when trying | |
* to classify these things. | |
*/ | |
typedef struct { int value; } Object; | |
/* PERSPECTIVE 1: The parameters of the function being called (this is the one that _should_ matter) */ | |
void function_by_value (Object o) { } |
require 'ripper' | |
Ripper::SexpBuilder.instance_methods.grep(/error/i) # => [:on_alias_error, :on_assign_error, :on_class_name_error, :on_param_error, :on_parse_error] | |
class DemoBuilder < Ripper::SexpBuilder | |
instance_methods.each do |meth_name| | |
next unless meth_name =~ /^on_/ | |
super_meth = instance_method meth_name | |
define_method meth_name do |*args| | |
super_meth.bind(self).call(*args).tap do |result| |
require 'yaml' | |
require 'base64' | |
require 'erb' | |
class ActiveSupport | |
class Deprecation | |
def initialize() | |
@silenced = true | |
end | |
class DeprecatedInstanceVariableProxy |