Skip to content

Instantly share code, notes, and snippets.

View cdornan's full-sized avatar

Chris Dornan cdornan

View GitHub Profile
@cdornan
cdornan / description.md
Created December 28, 2022 22:01
gpgme/libgpg-error build issue

I have just spent quite a while building bindings-gpgme for macOS (with stack and homebrew) — it telling me that it could not find header files/libraries, no matter what steps I took to make them available.

It turns out the issue was with the libgpg-error header files not being installed on the include path, causing the inclusion of gpgme.h to fail. This 2018 nixpkgs issue eventually put me on the right path.

You might want to leave this issue open to warn others.

@cdornan
cdornan / Phantoms.hs
Created July 2, 2022 02:21
Between Haskell2010 and GHC2021
{-# LANGUAGE DerivingVia #-}
module Phantoms where
import Data.Typeable
class C a where
cmethod :: Proxy a -> ()
@cdornan
cdornan / keybase.md
Created February 22, 2022 12:10
Keybase Id

Keybase proof

I hereby claim:

  • I am cdornan on github.
  • I am cdornan (https://keybase.io/cdornan) on keybase.
  • I have a public key ASBoTtA3Kfkc51i2ExqeMeJ32sa0wfuk2nLJ4Ad_2Ln4Kwo

To claim this, I am signing this object:

@cdornan
cdornan / lts.md
Last active December 13, 2021 12:20
Haskell SWG LTS Scenarios

LTS Scenarios

These are the GHC/base releases we have made between GHC-8.8.1 and GHC-9.0.1:

GHC     Base      Release
8.8.1   4.13.0.0  2019-08-25
8.8.2             2020-01-16
8.8.3             2020-02-04
8.8.4             2020-07-15
@cdornan
cdornan / spiral.hs
Created May 5, 2021 08:51
spiral puzzle answer
-- check the test vector and print out the lookup tables associating
-- the each n with its coordinates
main :: IO ()
main = case spiral_25==check of
True -> mapM_ print $ zip [zero..] spiral_25
False -> error "does not compute"
where
spiral_25 :: [(Int,Int)]
spiral_25 = take 25 spiral
mergeIM :: (Int->a->Maybe b->c) -> IM.IntMap a -> IM.IntMap b -> IM.IntMap c
mergeIM = case True of
True -> mergeIM_s
False -> mergeIM_f
mergeIM_s :: (Int->a->Maybe b->c) -> IM.IntMap a -> IM.IntMap b -> IM.IntMap c
mergeIM_s f im im' = IM.mapWithKey g im
where
g k x = f k x $ IM.lookup k im'
@cdornan
cdornan / lts-9.15.bash
Created December 3, 2017 22:35
lts-9.15 build commands
# The first build that succeeded, then stopped with ^C
CONSTRAINTS='--constraint "stack<0" --constraint "Agda<0" --constraint "gogol-compute<0" --constraint "gogol-shopping-content<0" --constraint "gogol-dfareporting<0" --constraint "hsdev<0" --constraint "language-python<0" --constraint "idris<0" --constraint "c2hs<0.28.3" --constraint "persistent<2.7.2" --constraint "hscolour<1.24.3" --constraint "persistent-sqlite<2.6.3.1" --constraint "hledger-api<0" --expect-test-failure folds --expect-haddock-failure clash-lib --expect-haddock-failure servant-swagger-ui --expect-test-failure stratosphere' ./build.sh lts-9.15
# The command line that built lts-9.15
CONSTRAINTS='--add-package stack --add-package Agda --add-package gogol-compute --add-package gogol-shopping-content --add-package gogol-dfareporting --constraint "hsdev<0" --constraint "language-python<0" --constraint "idris<0" --constraint "c2hs<0.28.3" --constraint "persistent<2.7.2" --constraint "hscolour<1.24.3" --constraint "persistent-sqlite<2.6.3.1" --
@cdornan
cdornan / Agda.txt
Last active November 29, 2017 13:22
lts9.15 build failures
Agda: Process exited with ExitFailure (-9): ./Setup build (pending: 745, failures: 0)
> /tmp/stackage-build12$ stack unpack Agda-2.5.3@gitsha1:82d11286c281716649dc25e0820b3e25214af971
Unpacked Agda-2.5.3 to /tmp/stackage-build12/Agda-2.5.3/
> /tmp/stackage-build12/Agda-2.5.3$ ghc -clear-package-db -global-package-db -package-db=/var/stackage/work/builds/lts-9/pkgdb Setup
[1 of 1] Compiling Main ( Setup.hs, Setup.o )
Linking Setup ...
> /tmp/stackage-build12/Agda-2.5.3$ ./Setup configure --package-db=clear --package-db=global --package-db=/var/stackage/work/builds/lts-9/pkgdb --libdir=/var/stackage/work/builds/lts-9/lib --bindir=/var/stackage/work/builds/lts-9/bin --datadir=/var/stackage/work/builds/lts-9/share --libexecdir=/var/stackage/work/builds/lts-9/libexec --sysconfdir=/var/stackage/work/builds/lts-9/etc --docdir=/var/stackage/work/builds/lts-9/doc/Agda-2.5.3 --htmldir=/var/stackage/work/builds/lts-9/doc/Agda-2.5.3 --haddockdir=/var/stackage/work/builds/lts-9/doc/Agda-2.5.3
Configuring Agda
@cdornan
cdornan / review.md
Last active August 29, 2015 14:19
Notes for review of Handle incomplete duals
[Unit]
Description=The Atlas Service
After=network.target
[Service]
Type=simple
WorkingDirectory=/var/lib/atlas
ExecStart=/usr/bin/atlas -i --user nobody server
ExecStop=/bin/kill -INT ${MAINPID}
# disable forcible termination