Instantly share code, notes, and snippets.

# Benedict Eastaughbeastaugh

• Sort options
Created Apr 15, 2013
WordPress plugin to hide post and page author names in the Tarski theme.
Created Dec 3, 2012
New parser for Hatt with support for associativity and operator precedence
View hatt-parser2.hs
 module Data.Logic.Propositional.Parser2 where import Data.Logic.Propositional import Text.Parsec.Prim ((<|>), (), runPT) import Text.Parsec.Char (char, letter, spaces, string) import Text.Parsec.Expr parseExpr' = runPT expr ()
Created Sep 29, 2011
WordPress plugin to move Tarski's comments link from the post metadata to the end of the post.
Created Sep 8, 2011
What is the weakest system that proves Dedekind's categoricity theorem for second-order arithmetic?
View gist:1204509

Q. What is the weakest system that proves Dedekind's categoricity theorem for second-order arithmetic?

In his classic essay 'Was sind und was sollen die Zahlen?', Dedekind proved the categoricity of the second-order Peano axioms, i.e. that all simply infinite systems---in modern terminology, models of those axioms---are isomorphic to one another. This proof was carried out in Dedekind's informal system of set theory.

Feferman and Hellman (1995) carried out a proof of this result in their system EFSC, the "Elementary theory of Finite Sets and Classes". This system has an

Created Sep 1, 2011
Drop consecutive elements of a list if they're the same, e.g. "AAABBACDDD" => "ABACD"
View DropConsec.hs
 module Data.List.DropConsec ( dropConsec ) where import Data.List (dropWhile) dropConsec :: Eq a => [a] -> [a] dropConsec [] = [] dropConsec (x:xs) = x : dropConsec (dropWhile (== x) xs)
Created Aug 24, 2011
Installing GHC 7.2 on Mac OS X 10.7 Lion
View installing-ghc7.2-osx10.7.md

# Installing GHC 7.2 on Mac OS X

This is a brief and bare-bones guide to getting GHC 7.2 and the `cabal-install` tool (the two basic things you'll need to do Haskell development) up and running on a new Mac OS X 10.7 install.

The instructions given here worked for me, but YMMV.

Created Aug 22, 2011
Figure out if your Mac is running a case sensitive filesystem.
View case_sensitive.c
 #include #include int main(void) { if (pathconf("/", _PC_CASE_SENSITIVE)) { printf("The file system is case sensitive\n"); } else { printf("The file system is case insensitive\n"); }
Created Jul 11, 2011
Convert a file from ISO-8859-15 to UTF-8
View iso-8859-15_to_utf-8.rb
 #!/usr/bin/env ruby file = ARGV.shift contents = File.read(file, {:encoding => "ISO-8859-15", :mode => "rb"}) contents.encode!("UTF-8") File.open(file, 'w') do |f| f.write(contents)
Created Apr 26, 2011
Script to count how many different packages use particular licenses on Hackage.