Skip to content

Instantly share code, notes, and snippets.

Josh Tilles MerelyAPseudonym

Block or report user

Report or block MerelyAPseudonym

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kowey / gist:2420144
Created Apr 19, 2012 — forked from cartazio/gist:1655271
Haskell GTK on 64 bit MacOS X
View gist:2420144


  • on lion (and snow leopard i suppose), make sure you are using a 64 bit install of ghc. Also, unless you are suggesting an edit to these directions, please go ask people on the relevant mailing list or wiki for help :)
  • Tested on ghc 7.2.2, assumes you have standard developer things installed on mac, like x11 and stuff
  • Also tested on GHC 7.0.4 (Haskell Platform) with XCode 4.3.
  • These notes were originally brought to you by Carter Schonwald; the “I” probably refers to him. Eric Kow will refer to himself in the third person).

GHC 7.4.x

  • gtk2hs 0.12.2 won't build with ghc 7.4.1, but the current darcs repo for gtk2hs does build
bendlas / bendlas.clj
Created May 9, 2015
An experiment with collection updates
View bendlas.clj
(ns user.bendlas
(:require [criterium.core :as crit]))
;; # Overview
;; ## Two new core operations
;; ### pretial -- partial for the first param
;; This is the main proposition: introduce an operation that lets one
View qi-mode.el
;;; qi-mode-el -- Major mode for editing Qi files
;;; qi-inferior-mode provided below
;; Author: Michael Ilseman
;; Created: 12 May 2007
;; Keywords: Qi major-mode
;; Copyright (C) 2007 Michael Ilseman
;; This program is free software; you can redistribute it and/or
mtnygard / ptable.clj
Created Feb 12, 2017
Randomly generate pairs from a table of pairwise weights.
View ptable.clj
(require [clojure.test.check.generators :as gen])
(defn ptable
[label cols & rows]
(let [ncols (count cols)]
(assert (= 0 (mod (count rows) (inc ncols))))
(fn [[r & vs]]
(map (fn [c v] [v [c r]]) cols vs))
(partition (inc ncols) rows))))
ctford / lenses.clj
Created Jul 12, 2014
A Clojure lens implementation based on focus and fmap.
View lenses.clj
(ns shades.lenses)
; We only need three fns that know the structure of a lens.
(defn lens [focus fmap] {:focus focus :fmap fmap})
(defn view [x {:keys [focus]}] (focus x))
(defn update [x {:keys [fmap]} f] (fmap f x))
; The identity lens.
(defn fapply [f x] (f x))
(def id (lens identity fapply))
ncase /
Last active Jul 5, 2017
The Common Project Project (version 0.1)

A country that's polarized is paralyzed. If we want any change in the coming years, we need to find a way to work together. However, you can't just unify people by holding hands and singing Kumbaya. No – rather than ignore or "put aside" our differences, let's use our different perspectives & interests & skills to tackle problems from all possible angles! For us to find common ground, we first need to find common goals.

This is the Common Project project.

Below, you'll find a list of projects, people, organizations, books, talks, movies, articles, and ideas that cross partisan lines to solve The Big Problems we face today. There's many such problems. And we'll need help from all sides.

bhauman / compiler-options-schema.clj
Last active Aug 8, 2017
A Schema for ClojureScript Options
View compiler-options-schema.clj
(ns cljs.compiler-options-schema
[clojure.spec :as s]
[clojure.string :as string]
;; for initial dev
[clojure.test :refer [deftest is testing]]))
(defn non-blank-string? [x] (and (string? x) (not (string/blank? x))))
(defonce ^:private registry-ref (atom {}))
View FizzBuzz.clj
;; try this form-by-form at a REPL
(require '[clojure.spec.alpha :as s])
;; create an inline DSL to describe the FizzBuzz world
(defmacro divides-by
[nm n]
`(s/def ~nm (s/and pos-int? #(zero? (mod % ~n)))))
;; specify FizzBuzz
(divides-by ::fizz 3)
aphyr / gist:0ad3458a1478db97517e7ac2faf2da00
Created Oct 5, 2017
Advice on benchmarking databases
View gist:0ad3458a1478db97517e7ac2faf2da00
Hi S-------. I'm not an expert in performance benchmarking--I focus on
correctness and safety--but I have a few pieces of advice here.
0. Pick multiple workloads that cover the gamut of behaviors in each DB.
*Don't* choose a completely sharded workload for VoltDB. Don't choose a
purely commutative workload for Cassandra. Cassandra's Paxos
implementation is slow and a good benchmark will demonstrate
that--however, it *doesn't* (I think?) require a global coordinator,
which means it might *scale* better than a single-coordinator system
like, say, VoltDB. Talk about those differences!
You can’t perform that action at this time.