Skip to content

Instantly share code, notes, and snippets.

Gabriel439 / Main.hs
Created Sep 2, 2021
Haskell livestream - Subprocess management
View Main.hs
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Concurrent.Async (Concurrently(..))
import Data.Foldable (traverse_)
import Data.List.NonEmpty (NonEmpty(..))
import Data.Text (Text)
import Foreign.C

As I come out as trans to people, most are supportive, but a few people remain skeptical and question my feelings and experiences. I try to field their concerns to the best of my ability, but one particular concern they raise is so common and so far off the mark that I feel compelled to share my thoughts on this. My intention is not to shame them, but rather to use this as an opportunity to share my own experiences.

Their concern typically goes like this: they believe that many people who transition do so because they are too easily suggestible and that they have been over-exposed to trans role models (either friends or people on social media).


I'm writing this post to publicly come out as trans (specifically: I wish to transition to become a woman).

This post won't be as polished or edited as my usual posts, because that's kind of the point: I'm tired of having to edit myself to make myself acceptable to others.

I'm a bit scared to let people know that I'm trans, especially because I'm not yet in a position where I can transition (for reasons I don't want to share, at least not in public) and it's really shameful. However, I'm getting really

Gabriel439 / Main.hs
Created Apr 8, 2021
Example use of GHC generics to derive datatype parser
View Main.hs
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE EmptyDataDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
Gabriel439 /
Created Mar 8, 2021
How to get in touch with your emotions

How to get in touch with your emotions

I wanted to share something I've learned in the course of therapy that I felt might benefit others. Specifically, I'd like to share how to better listen to one's emotions.

Why should we do this?

You might wonder why would we want to be in better touch with our emotions. One reason why is that everybody builds a metaphor or narrative for themselves

Gabriel439 / pulumi-as-dhall.dhall
Created Jan 23, 2021
Translating Pulumi example to Dhall
View pulumi-as-dhall.dhall
let sesDomainIdentity = "DomainIdentity" { domain }
let verificationTokenRecord =
{ zoneId = cloudflareDnsZoneId
, name = "NAME"
, type = "TXT"
, value = sesDomainIdentity.verificationToken
Gabriel439 / csv.hs
Created Jan 7, 2021
CSV decoding example
View csv.hs
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeApplications #-}
module Main where
import Data.Csv (FromField, FromNamedRecord)
import Data.Text (Text)
import Data.Map (Map)
Gabriel439 / Bool.hs
Created Jan 3, 2021
Church-encoding of Bool type
View Bool.hs
{-# LANGUAGE RankNTypes #-}
import Prelude hiding (Bool(..))
type Bool = forall a . a -> a -> a
false :: Bool
false = \true_ false_ -> false_
true :: Bool
Gabriel439 / concurrent-map.hs
Created Dec 3, 2020
Low-tech concurrent hashmap
View concurrent-map.hs
module ConcurrentMap where
import Control.Concurrent.STM.TVar (TVar)
import Control.Concurrent.STM (STM)
import Data.Hashable (Hashable)
import Data.HashMap.Strict (HashMap)
import Data.Vector (Vector)
import qualified Control.Concurrent.STM.TVar as TVar
import qualified Data.Hashable as Hashable
Gabriel439 / livestream-nixos-vm.nix
Last active Dec 4, 2020
Code used for Kafka livestream example
View livestream-nixos-vm.nix
nixpkgs = builtins.fetchTarball {
url = "";
sha256 = "0wsplccl8bv522zh3y8affacw9pmzsxm18i5hdgz78gxh8m7k933";
nixos = import "${nixpkgs}/nixos" {
system = "x86_64-linux";
configuration = { pkgs, ... }: