Skip to content

Instantly share code, notes, and snippets.


Fintan Halpenny FintanH

View GitHub Profile
FintanH / lwwmap.hs
Last active February 9, 2023 14:18
View lwwmap.hs
RGA + LWW + Counter -- combining we get Automerge!
So let's start with a List CRDT.
type LWWMap
set :: Key -> Value -> LWWMap -> LWWMap
delete :: Key -> LWWMap -> LWWMap
FintanH / denotational_automerge.hs
Created November 19, 2022 13:17
denotational automerge
View denotational_automerge.hs
type OpSet
type Op
type Value = Map Id (Either (Seq ElemId Elem) (Map Key ShallowValue))
type Map k v
type Seq
type Register = Map Id (Either Id Primitive)
type ElemId = Either Head Id
type Elem = ShallowValue
type ShallowValue = Register
type Primitive
FintanH / shell.nix
Created August 29, 2021 16:13
Rust Nix Shell
View shell.nix
nixpkgs = import <nixpkgs> {};
rtc = (nixpkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain);
rust = rtc.override {
extensions = [ "rust-src" "rust-analysis" ];
with nixpkgs;
mkShell {
name = "rust";
View gist:24e9bbd36f361ba4f6f7eaf9275ff914
TRACE librad::net::protocol > Run::Discovered remote.addrs=[]
INFO librad::net::protocol > establishing connection remote.addr=
INFO librad::net::protocol > New outgoing connection
WARN librad::net::protocol > new outgoing ejects previous connection to hyngjacascfg3crwxrb4nrydk4izo4wqfo41z7i8ce3cz7nbf4h6cq@
INFO librad::net::gossip > ejecting peer hyngjacascfg3crwxrb4nrydk4izo4wqfo41z7i8ce3cz7nbf4h6cq
TRACE librad::net::gossip > recv stream is done
INFO librad::net::gossip > closing recv stream from peer hyngjacascfg3crwxrb4nrydk4izo4wqfo41z7i8ce3cz7nbf4h6cq
DEBUG librad::net::gossip > ignoring recv IO error: closed
INFO librad::net::protocol > msg="Disconnecting" remote.addr=
TRACE librad::net::gossip >
View disconnect crash
INFO coco::git_helper > Copied git remote helper to: "/home/haptop/.radicle/bin/git-remote-rad"
INFO librad::net::protocol::io > discovered; remote_id=hybz9gfgtd9d4pd14a6r66j5hz6f77fed4jdu7pana4fxaxbt369kg
INFO librad::net::protocol::io > connect; remote_id=hybz9gfgtd9d4pd14a6r66j5hz6f77fed4jdu7pana4fxaxbt369kg
INFO librad::net::protocol::io > establishing connection remote_addr=
INFO librad::net::protocol::io > send_rpc; remote_id=hybz9gfgtd9d4pd14a6r66j5hz6f77fed4jdu7pana4fxaxbt369kg remote_addr=
DEBUG librad::net::protocol::membership::hpv > connection_established; info=GenericPeerInfo { peer_id: hybz9gfgtd9d4pd14a6r66j5hz6f77fed4jdu7pana4fxaxbt369kg, advertised_info: None, seen_addrs: {} }
DEBUG librad::net::protocol::membership::hpv > connection established
WARN librad::net::protocol::membership::periodic > nothing to shuffle
WARN librad::net::protocol::membership::periodic > nothing to promote
WARN librad::net::protocol::m
View configuration.nix
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
# Edit this configuration file to define what should be installed on
# Edit this configuration file to define what should be installed on
{ config, pkgs, options, ... }:
imports =

Keybase proof

I hereby claim:

  • I am fintanh on github.
  • I am fintohaps ( on keybase.
  • I have a public key ASDpR11o9Ot9E0HrXIT87R9RkdCn016gNqZMHjLG2R4abwo

To claim this, I am signing this object:

View flip-check.hs
{-# LANGUAGE FlexibleInstances #-}
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
newtype Flip f a b = Flip (f b a) deriving (Eq, Show)
instance (Arbitrary a, Arbitrary b, Arbitrary (f b a)) => Arbitrary (Flip f a b) where
arbitrary = do
FintanH /
Last active January 17, 2018 08:38
Proposal for LC

Abstract Title: Read The Functional Manual: But First We Need to Write It

Abstract Topic: Documentation Writing, Community Interaction, Open Source Contributions

Submission Type: Educational Session (50m)

Abstract Summary:


People who work with software libraries, whether in-house or open source, rely on the documentation of these libraries. The original author(s) were able to express the functionality of this library via code but this not necesarrily mean that a new onlooker can use it immediately. This where documentation, tutorials and blog posts come in.