Reg Braithwaite raganwald

View wtf.js
1 2 3 4 5 6 7 8 9 10
// I'm in the middle of a method, and I decide that I'll use an
// Immediately Invoked Function Expression ("IIFE") to create a new
// block scope so that I don't have to pollute the entire thing with
// resultJSON and contentJSON variables that would otherwise get
// hoisted.
//
// The current object DOES have a toJSON method, and so does the object called content.
// _.isFunction(this.toJSON) ==> true
// _.isFunction(content.toJSON) => true
View All.js
1 2 3 4 5 6 7 8 9 10
function mapConcat (choices) {
return function (list) {
return _.map(choices, function (choice) {
return list.concat([choice])
})
}
}
 
function flatMapWith (fn, list) {
return _.reduce(list, function (acc, element) {
View bound.js
1 2 3
function bound(object, fn) {
return object[fn].bind(object);
}
View gist:5334010
1 2 3 4 5
I searched Google for "raganwald." The top link was:
 
https://www.google.ca/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&sqi=2&ved=0CC8QFjAA&url=https%3A%2F%2Ftwitter.com%2Fraganwald&ei=pDZiUYORKMSi2wXM8YH4CQ&usg=AFQjCNHRVgeFXjNcWtJ8_I6Yc69RrXckWg&sig2=vcrLpvJwepPmFC2aNPOCZg&bvm=bv.44770516,d.b2I
 
I shit you not.
View problem.md

This is the problem I'm having. I've written a Combinatory Logic interpreter in the oscin.es library. It works with combinators (defined as upper-case letters) and unknowns (lower-case letters). You can write things like this:

interpret('Txy')

And get this:

'yx'

I write this as:

View xenops.js
1 2 3 4 5 6 7 8 9 10
function Xenops (fn) {
return fn(
function S (a) { return function S__ (b) { return function S_ (c) {
return a(c)(b(c))
}}}
)(
function K (a) { return function K_ (b) {
return a
}}
)
View bluebird.js
1 2 3 4 5 6 7 8 9 10
function bluebird (a) {
return function (b) {
return function (c) {
return a(b(c))
}
}
}
 
function hard (str) { return "hard " + str }
function rock (str) { return "rock " + str }
View speaker_proposal.md

Be different, be unique, be yourself. Inspire us.

I've already proposed Succeeding with Ruby in a Post-Rails World. This is a second proposal. I'm quite prepared to deliver either or both of these talks.

The subject of this talk is Everything you always wanted to know about Ruby Combinators, but were afraid to ask. It will begin with a review of combinatory logic and some of the straightforward applications in Ruby such as .tap, .into, and hopelessly egocentric null objects.

The first part of the talk is covered in "Kestrels, Quirky Birds, and Hopeless Egocentricity" (If you are a conference organizer, and you haven't read it, please email reg@braythwayt.com and I'll send you a copy). The second part of the talk will move in some new directions, talking about applying combinators to contemporary patterns such as DCI and method combinators.

View speaker_proposal.md

Be different, be unique, be yourself. Inspire us.

Hello, this is Reg Braithwaite, also known to Rubyists as raganwald. You may know me from such conferences as RubyFringe, Stack Overflow Tech Days, CUSEC, and Øredev. I'm passionate about programming and I'll go anywhere to share that passion, like Microsoft Tech Days and True North PHP where I delivered a keynote.

Enough about me. Here's my talk: Succeeding with Ruby in a Post-Rails World.

I propose to talk about working with Ruby in a world where Rails has become a legacy application, where JavaScript, CoffeeScript, Go, and TypeSafe vying to become the new hotnesses, and the patterns we learned writing Rails applications seem dated in a world where programmers are thinking in promises, reactive programming, and big data.

View gist:3976679
1 2 3 4 5 6 7 8 9 10
class Store
constructor: () ->
@services = []
@reservations = []
@requests = []
 
class Service
constructor: (@name, @time) ->
 
class Request
Something went wrong with that request. Please try again.