Skip to content

Instantly share code, notes, and snippets.


Nick Partridge nkpart

  • Brisbane, Australia
View GitHub Profile
nkpart /
Last active February 25, 2020 03:57
Issues calling C function from Haskell on aarch64

Using GHC 8.8.1 cross compiler, targeting aarch64-apple-ios.


type ArgType = Int32
foreign import ccall safe "f32" f32 :: ArgType -> ... 31 more times -> IO ()

runMe :: IO ()
runMe =
\version "2.18.2"
title = "Cam's Clootch is Awee"
composer = "Partro"
\include ""
\paper {
View .config_nvim_init.vm
call plug#begin('~/.local/share/nvim/plugged')
Plug 'rafi/awesome-vim-colorschemes'
Plug 'NLKNguyen/papercolor-theme'
Plug '/nix/store/dwxiva3adj5931g49scw9zip64n8ip9i-fzf-0.17.3/share/go/src/'
Plug 'junegunn/fzf.vim'
" Plug 'nbouscal/vim-stylish-haskell'
Plug 'alx741/vim-hindent'
View deriving_strategies.txt
Prelude> :set -XDerivingStrategies
Prelude> :set -XGeneralizedNewtypeDeriving
Prelude> newtype Foo = Foo Int deriving newtype Show
Prelude> Foo 3
Prelude> newtype BFoo = BFoo Int deriving Show
Prelude> BFoo 3
BFoo 3
View nix-darwin-png-cairo-haskell-trubs.txt
Linking dist/build/test/test ...
running tests
Running 1 test suites...
Test suite test: RUNNING...
dyld: Symbol not found: __cg_png_create_info_struct
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /nix/store/g23c1b3k7qqx3j78iqlbvyy9s0gfcvni-libpng-apng-1.6.34/lib/libpng16.16.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
View Don't use
∴ cat cabal.project
packages: tools/work-common/

I did the expected thing, and tried to build everything:

∴ cabal new-build
View default.nix
{ nixpkgs ? import <nixpkgs> {}
inherit (nixpkgs) pkgs;
python = let
packageOverrides = self: super: {
# sklearn tests fail on darwin
scikitlearn = super.scikitlearn.overridePythonAttrs(old: rec {
doCheck = false;
∴ gsp
remote: Counting objects: 64, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 64 (delta 32), reused 35 (delta 32), pack-reused 26
Unpacking objects: 100% (64/64), done.
9d1135d..e71cbc3 master -> origin/master
Successfully rebased and updated refs/heads/master.
nkpart / Joining CSV Tables in
Last active June 27, 2019 16:27
Joining CSV Tables in Haskell
View Joining CSV Tables in

Joining CSV Tables in Haskell

This article describes a technique for joining (in an SQL-style) lists of haskell data structures.

Maybe not the fastest, maybe not the smartest, but it works.

Why I like it

View try-reflex error
∴ ./try-reflex
If you have any trouble with this script, please submit an issue at
Entering the reflex sandbox...
building path(s) ‘/nix/store/8p1h37cb5466p6g2nxyr6pirpg3fr0c5-all-cabal-hashes-2b0bf3ddf8b75656582c1e45c51caa59458cd3ad-src’
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 176 0 176 0 0 176 0 --:--:-- 0:00:01 --:--:-- 128