Skip to content

Instantly share code, notes, and snippets.

Andreas Herrmann aherrmann

Block or report user

Report or block aherrmann

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
aherrmann /
Created Dec 7, 2018
Test Bazel's hash function for hash collisions on artificially inflated set of Stackage package names that only differ by case.
#!/usr/bin/env bash
# This script tests Bazel's builtin hash function to determine if it is
# sufficient to disambiguate Stackage package names that only differ by case
# on a case insensitive file system.
# Fetch the lts-12.4 snapshot and extract the package names into a Bazel readable format.
yaml2json < lts-12.4.yaml | jq -r '.packages|keys|.[]' > lts-12.4-package-names
aherrmann /
Created Oct 4, 2018
Comparing the GHC optimizer on MTL vs Capability

Comparing the GHC optimizer on MTL vs Capability

Only considering very simple examples. GHC Core produced with the following alias and passing -O.

alias ghc-core="ghc -ddump-simpl -dsuppress-idinfo \
    -dsuppress-coercions -dsuppress-type-applications \
    -dsuppress-uniques -dsuppress-module-prefixes"
aherrmann /
Last active Jul 5, 2019
Fully persistent Nix shell
# This is free and unencumbered software released into the public domain.
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
aherrmann / first_attempt
Created Jul 18, 2014
View first_attempt
$ nixops deploy --show-trace -d trivial
webserver> creating VirtualBox VM...
webserver> Virtual machine 'nixops-9b06f219-0e9b-11e4-b973-f01faf13e875-webserver' is created and registered.
webserver> UUID: 30de8820-3dcd-4844-92ba-03af85c23dab
webserver> Settings file: '/home/user/VirtualBox VMs/nixops-9b06f219-0e9b-11e4-b973-f01faf13e875-webserver/nixops-9b06f219-0e9b-11e4-b973-f01faf13e875-webserver.vbox'
webserver> creating disk ‘disk1’...
webserver> 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
webserver> Clone hard disk created in format 'VDI'. UUID: 27e971d3-5cb3-418b-b69e-9083ba9971c1
webserver> attaching disk ‘disk1’...
webserver> Waiting for VM "nixops-9b06f219-0e9b-11e4-b973-f01faf13e875-webserver" to power on...
You can’t perform that action at this time.