Skip to content

Instantly share code, notes, and snippets.

@rgrinberg
rgrinberg / README.md
Created September 23, 2016 13:39 — forked from whitequark/README.md
A simple symbolizer for caml-inspect.

Caml-inspect symbolizer

Symbolizes closure blocks. Works only on native executables.

Build

ocamlfind ocamlopt -syntax camlp4o -package lwt -package lwt.syntax -package lwt.unix str.cmxa -linkpkg symbolizer.ml -o symbolizer
ocamlfind ocamlopt -package inspect -linkpkg foo.ml -o foo

Use

# unregister broken GHC packages. Run this a few times to resolve dependency rot in installed packages.
# ghc-pkg-clean -f cabal/dev/packages*.conf also works.
function ghc-pkg-clean() {
for p in `ghc-pkg check $* 2>&1 | grep problems | awk '{print $6}' | sed -e 's/:$//'`
do
echo unregistering $p; ghc-pkg $* unregister $p
done
}
# remove all installed GHC/cabal packages, leaving ~/.cabal binaries and docs in place.

Give me back my sanity

One of the many things I do for my group at work is to take care of automating as many things as possible. It usually brings me a lot of satisfaction, mostly because I get a kick out of making people's lives easier.

But sometimes, maybe too often, I end up in drawn-out struggles with machines and programs. And sometimes, these struggles bring me to the edge of despair, so much so that I regularly consider living on a computer-less island growing vegetables for a living.

This is the story of how I had to install Pandoc in a CentOS 6 Docker container. But more generally, this is the story of how I think computing is inherently broken, how programmers (myself included) tend to think that their way is the way, how we're ultimately replicating what most of us think is wrong with society, building upon layers and layers of (best-case scenario) obscure and/or weak foundations.

*I would like to extend my gratitude to Google, StackOverflow, GitHub issues but mostly, the people who make the