Skip to content

Instantly share code, notes, and snippets.

View nobel-prize.txt
Nobel Prize
Like a beast in a pen, I'm cut off
From my friends, freedom, the sun,
But the hunters are gaining ground.
I've nowhere else to run.
Dark wood and the bank of a pond,
Trunk of a fallen tree.
There's no way forward, no way back.
It's all up with me.
// Got implicit conversion working the compiler!
// You implement it like this:
enum maybe<T> = none | some(T);
// `T?` is just sugar for `maybe<T>`
impl<T> T? {
// the colon prefix means function is static
fn :from(x: T) -> T? {
fn print<T>(x: T) {
// backticks inject Golang code directly. This isn't
// type-checked or processed by Axler. Any Axler variable
// must be marshalled via `<%=` and `%>`
`fmt.Printf("%v\n", <%= x %> )`
enum maybe<T> = none | some(T);
// `T?` is syntax sugar for `maybe<T>`. Just a convenient way
View age-of-em-review.markdown

Every piece of speculation about the future I've ever encountered broadly pattern-matches into one of four genres: forecasting, prophecy, literary works of fiction, and rants. Age of Em doesn't autocomplete into any of these, and I think both my irritation and fascination with it come from the same source -- the audacity of creating an entirely new genre of futurism.

Here are rough properties of the existing four genres:

  • Forescasting - narrow subject matter, falsifiable details that
View gist:80af67195b206e1eb035ce878f3f411c
### Keybase proof
I hereby claim:
* I am coffeemug on github.
* I am coffeemug ( on keybase.
* I have a public key whose fingerprint is 61D8 8768 ADF2 C641 6ED5 2E6A 045D F3C7 4618 7048
To claim this, I am signing this object:
- Inexplicable perversity of human nature.
- The clever machinations of MongoDB's marketing people.
- The AGPL license killed it.
- We spent too long development before monetizing.
- Bad performance.
- Numeric types limited to a 64-bit `float`.
- Great product, but didn't/couldn't translate to revenue.
- Bad business model.
- Failure in timezones/timestamp nuances.

Keybase proof

I hereby claim:

  • I am coffeemug on github.
  • I am coffeemug ( on keybase.
  • I have a public key whose fingerprint is 5925 55F9 CC4C 2D4E E82E 97AA A33E 7D8E 5279 41E9

To claim this, I am signing this object:

coffeemug / hn_rethink
Created Oct 7, 2014
Grab top stories into RethinkDB via Hacker News API
View hn_rethink
View Migrating to RethinkDB

Migrating to RethinkDB 1.12

There are a number of breaking changes in RethinkDB 1.12 you should be aware of before migrating.

Data migration

First, make sure to go through the regular data migration process, since the 1.12 file format isn't compatible with file formats generated by previous versions of RethinkDB.

Then, replace group_by and grouped_map_reduce commands in your applications with the new group command.

View gist:8034819
r.table('authors').filter(lambda author: