Skip to content

Instantly share code, notes, and snippets.

@ehaliewicz
ehaliewicz / tail-recur.lisp
Created October 28, 2012 00:49
Tail-recursion and mutual recursion macros
;; A couple of silly macros for a language that has defmacro but no tail-recursion
;; the mutual recursion macro is even worse, because you can only really 'call' one of the functions
(defmacro recur (arg-pairs &body body)
(let ((arg-names (mapcar #'car arg-pairs)) ;; extract loop variable names
(arg-vals (mapcar #'cadr arg-pairs))) ;; extract start values
;; block to return from
`(block nil
@kljensen
kljensen / fingerprint_cluster.py
Created December 15, 2010 16:09
Basic fingerprint algorithm from Google Refine
#!/usr/bin/env python
# encoding: utf-8
"""
fingerprint_cluster.py
Based on http://code.google.com/p/google-refine/wiki/ClusteringInDepth
Created by Kyle Jensen on 2010-12-15.
"""
import re
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.