this hook queues up store paths on a unix domain socket and then spawns a service to actually push the store path to the cache through socket activation
works on MacOS and Linux
| #!/bin/bash | |
| # Exit immediately if a command exits with a non-zero status | |
| set -e | |
| jj fix | |
| # Get the list of mutable branches that are reachable from the current branch | |
| # (i.e. that are between us and main). | |
| branches=$(jj branch list -r 'reachable(@,mutable())' --template 'name ++ "\n"') |
| {-# LANGUAGE RankNTypes, PatternSynonyms, GADTs, ViewPatterns, LambdaCase, ScopedTypeVariables #-} | |
| module Main where | |
| import Data.Map as Map | |
| import Control.Monad (ap, liftM) | |
| import Data.IORef | |
| data ComeFromOp a where | |
| Line :: Int -> ComeFromOp () | |
| LiftIO :: IO () -> ComeFromOp () |
| Person = new Class {{ | |
| firstName: :attr, | |
| lastName: :attr, | |
| fullName: function { | |
| `${this.firstName} ${this.lastName}` | |
| }, |
| { lib, config, pkgs, ... }: | |
| with lib; | |
| let | |
| veth = "veth-vpn"; | |
| hostIp = "10.0.0.1/24"; | |
| guestIp = "10.0.0.2/24"; |
| #ifndef __cplusplus | |
| # define decltype typeof | |
| # include <stdbool.h> | |
| #endif | |
| #include <assert.h> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #define TOKEN_CONCAT_EX(x, y) x##y | |
| #define TOKEN_CONCAT(x, y) TOKEN_CONCAT_EX(x, y) |
| Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
| ActivityTweet | |
| generic_activity_highlights | |
| generic_activity_momentsbreaking | |
| RankedOrganicTweet | |
| suggest_activity | |
| suggest_activity_feed | |
| suggest_activity_highlights | |
| suggest_activity_tweet |
by Bruce Pascoe - 1 May, 2019
"A monad is just a monoid in the category of endofunctors. What's the problem?" ~James Iry[^1]
The problem... is that there are several problems.
It's been said that monads bear a dreadful curse. Once you finally understand what they are, you begin to see them everywhere--but somehow become completely incapable of explaining them to anyone else. Many tutorial writers have tried to break the Great Curse--the Web is lousy with bold attempts and half successes that attest to this--and just as many have failed. Well, I'm here to address the elephant in the room[^2] and tell you that I intend to break the Great Curse once and for all.
There are basically two ways a monad tutorial tends to go. One is a paragraph or two of minimal descriptions of one or two common monads (Haskell's Maybe in particular is very popular), followed by a lot of intimidating Haskell syntax trying to explain--precisely--how it all fits together. This is well
| default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
| default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
| default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
This document contains some ideas for additions to the Nix language.
The Nix package manager, Nixpkgs and NixOS currently have several problems:
enableFoo, but there is no way for the Nix
UI to discover them, let alone to provide programmatic ways to