Skip to content

Instantly share code, notes, and snippets.

View tristil's full-sized avatar

Joseph Method tristil

  • Western Massachusetts
View GitHub Profile
# Based on Dave Koelle's Alphanum algorithm
# Rik Hemsley, 2007
# WegoWise Inc., 2013
# See also http://rikkus.info/arch/sensible_sort.rb
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or any later version.
require 'benchmark'
require 'natural_sort'
require 'naturally'
require 'natcmp'
require './lib/sort_authority'
require './lib/sort_authority/ext/enumerable'
require './sensible_sort'
def randomish_string
(0...20).map do
require 'benchmark'
require 'natural_sort'
require 'naturally'
require 'natcmp'
require './lib/sort_authority'
require './lib/sort_authority/ext/enumerable'
require './sensible_sort'
ary = ['x 1'] * 100_000
1.9.3p194 :001 > module Smell
1.9.3p194 :002?> def initialize
1.9.3p194 :003?> puts "oh man this smells"
1.9.3p194 :004?> end
1.9.3p194 :005?> end
=> nil
1.9.3p194 :006 > class Fart
1.9.3p194 :007?> include Smell
1.9.3p194 :008?> def initialize who_dealt_it
1.9.3p194 :009?> super
@tristil
tristil / attempt.js
Created March 17, 2012 18:50
Wait, how does this work again?
this.testFunctions = function()
{
var launcher = this;
var tests = [];
var i = 0;
while(i < 100)
{
(function (i)
{
var func = function(callback)