Skip to content

Instantly share code, notes, and snippets.

sqlite> .mode column
sqlite> .width 40
sqlite> .headers on
sqlite> select lex_trade_VBEchange_DU1 as key, count(*) as count from tbl group by key order by count desc;
key count
---------------------------------------- ----------
__nil__ 15527
givable 2747
receivable 942
mixte 432
@kowey
kowey / gist:2420144
Created April 19, 2012 10:29 — forked from cartazio/gist:1655271
Haskell GTK on 64 bit MacOS X

Notes

  • 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
{-# LANGUAGE OverloadedStrings #-}
import Control.Exception
import Control.Monad ( liftM, ap )
import Control.Monad.IO.Class
import Data.Conduit
import Data.Conduit.Lazy
import Data.IORef
import Network.HTTP.Types (statusOK, status400, Header, Ascii)
import Network.Wai
Notational tricks:
* iff a merger has mergers as both children, break them up with a newline
* use L/R for "left" and "right" repo
* use capital letters for the hunk patches
* normalise m(R L) to m(L R)
* normalise m(m(...) X) to m(X m(...))
* normalise m(m(R..) m(L..)) to m(m(L..) m(R..))
* normalise m(.. t) to m(t ..)
* save repeated trees as tN