Skip to content

Instantly share code, notes, and snippets.

@chris-martin
chris-martin / nixos-from-ubuntu.md
Last active February 17, 2024 18:17
How to install NixOS from an Ubuntu liveCD

Standardized Ladder of Functional Programming

The LambdaConf Ladder of Functional Programming (LOFP) is a standardized progression of different concepts and skills that developers must master on their journey to becoming expert-level functional programmers. LOFP can be used to rank workshops, talks, presentations, books, and courseware, so that aspiring functional programmers have a better understanding of what material is appropriate for them given their current experience.

Fire Keramik

Concepts

  • Immutable Data
  • Second-order Functions
{
"[haskell]": {
"editor.defaultFormatter": "jkillian.custom-local-formatters"
},
"customLocalFormatters.formatters": [
{
"command": "fourmolu --stdin-input-file ${file}",
"languages": ["haskell"]
}
]
{ pkgs, config, ... }:
{
/* XMPP */
services.prosody = {
enable = true;
xmppComplianceSuite = false;
virtualHosts."internal" = {
[
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDFJ4UYsEh+JZQGCMdbNrKfjH1F3rwKBRewwgaehwnijBADYSJ8iwDZji09vVfCxSQSMjZJS54mEBtjcOBOpM7+mR585wI6jhsfdsNqNwzJdxV47Bi4jAkg7XlWf9IYv7EUhRzsKGdoSqefh/7bN6MPcJQ9ccHKqBxtmGJ6eHfgLmgnb8+ozwDlwQKz5QDtdEnt8TUqucUB4AOyReBV7GRnwkTyGCForb5nhTftuVi7GO1qApJKBIpYlC1gbuCWDX9CIl7IzfAMyng6u6Ty9x31ZWKA0sJzRIX5cw3e8Ct7sWzZB3O/2FOwjyYadqTRQdR472Dz/f6mqqIl1ioxzfXRfh33bREg2opLc6bnYaWTXY6aAc5/wUbC7z4CTKBGZJHxY5mrRSlpQ2Rn8EvgyyxgxokLdTZqoiKw/tSmE9Mlle5JGh+m8agGe41dszZxBf41j/ORE+N5p0k02fvUWuG0PL3aFE77qUbOgxxXOYMtBV0YiJPzeBXDGrkW1wqKC2voJ6PuCZWOHaLxDqkUDgAMYyGMKoj5C53OZneVeSMgZG+/lxygAduyBx/RfQYrt4WsPfPnhl95Kxx8PTYuFfLXmcMNMhZ7rYW+Thvo40W+VjiqTUSCxLHr16SFSOj2mGl0A29VPPHA3H+ckprCo8pldPo3AYrwkV/zHlyLjuEQfQ== renzo-1"
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDAu0nM8baJOgaBB44w/rCczNK7pST0b/B3isYtqYw8QI2nqkmp4zddAFTjqL/zyVgIC+I2iIINVdQrC6jRWWZc82VRBzHjUtcz3sPppkLvZvfVupSXli1bDtnKNLA73bGr+odZFyR2zWsgcPwpGkzaWotGVhsW/F/2J+6HwG/D+9pWTlFAPwK/OV2J3axdnWWcihXjMIWT5/5ksOPqQWUBQnrQDQt2Rtw+3Qg36UlAOQgj2SMmM
dir=$(mktemp -d dist-docs.XXXXXX)
cabal configure --builddir="$dir"
cabal haddock --builddir="$dir" --haddock-for-hackage --haddock-option=--hyperlinked-source
cabal upload --publish -d $dir/*-docs.tar.gz
{-# language NoImplicitPrelude, ScopedTypeVariables, TypeApplications #-}
import Relude
import Control.Monad.Trans.Resource
import List.Transformer
class Run f where
run :: f a -> IO ()
instance Run IO where
import qualified Text.Megaparsec as P
import qualified Text.Megaparsec.Char as P
type P a = P.Parsec Void Text a
match :: P a -> P Text
match = fmap fst . P.match
replace :: P Text -> Text -> Text
replace p t = x
import Control.Monad
import Data.Foldable
import Data.Functor
import Data.List
import Data.Maybe
import Data.Time.Clock
import System.Directory
import System.Process
main = listPackages >>= filterM needsUpdate >>= traverse_ update