Skip to content

Instantly share code, notes, and snippets.

View spencerjanssen's full-sized avatar

Spencer Janssen spencerjanssen

View GitHub Profile
@spencerjanssen
spencerjanssen / error evaluating .jobsets
Last active January 31, 2022 22:31
trying hydra-github-jobsets-generator
in job ‘jobsets’:
error: access to canonical path '/nix/store/57904rflsfh46y7fxi62rzc7sidc9vmq-user-environment' is forbidden in restricted mode
@spencerjanssen
spencerjanssen / error message from hydra
Created January 31, 2022 20:46
declarative project
in job ‘jobsets’:
error: access to canonical path '/nix/store/57904rflsfh46y7fxi62rzc7sidc9vmq-user-environment' is forbidden in restricted mode
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE StandaloneKindSignatures #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
import Data.Kind (Type)
import GHC.Generics (K1, M1, Meta (MetaSel), R, S, (:*:))
import GHC.TypeLits (Symbol)
import Generic.Data.Microsurgery (GSurgery, Generically (..), Surgery, Surgery' (..))
[33030.333173] BTRFS info (device dm-0): disk space caching is enabled
[33030.333175] BTRFS info (device dm-0): has skinny extents
[33030.412070] BTRFS error (device dm-0): parent transid verify failed on 108202508288 wanted 22637 found 17310
[33030.412077] BTRFS error (device dm-0): failed to read block groups: -5
[33030.432798] BTRFS error (device dm-0): open_ctree failed
@spencerjanssen
spencerjanssen / failed, from fresh host boot
Created September 5, 2018 20:38
VM starts every other time
2018-09-05 20:33:59.347+0000: starting up libvirt version: 4.5.0, qemu version: 3.0.0, kernel: 4.18.5, hostname: ungoliant.lan
LC_ALL=C PATH=/run/libvirt/nix-emulators:/nix/store/mdm7f4mka3dqdkvj1nz8gckzzad1hqqq-iptables-1.6.2/bin:/nix/store/adv7z6p3ns738dbn47byd1ccfq14k958-iproute2-4.18.0/bin:/nix/store/0vpf80hbzhbbbx3cgb4i0ky8n7ad7fkg-pm-utils-1.4.1/bin:/nix/store/4mhqcm3laqr6qp8xwhi6144ddciqjv6a-numad-0.5/bin:/nix/store/qsvyz09nl9qcgkjqn1ljxzcjnynr1f2b-numactl-2.0.12/bin:/nix/store/0k60brnmbvzvg6qcqvr0nbr1k0smhykh-bridge-utils-1.5/bin:/nix/store/qsm949m8mhashzzyx4qi7r6kyqwv9kn6-dmidecode-3.1/bin:/nix/store/az90jpkq4r4h97pjlf1jyzdpa9hd1fcq-dnsmasq-2.79/bin:/nix/store/4ar5i4266i4q5ndsywm541g4rd37b60m-ebtables-2.0.10-4/bin:/nix/store/1743p67gikszmyyf6s1195lqahwygiql-qemu-3.0.0/bin:/nix/store/wm8va53fh5158ipi0ic9gir64hrvqv1z-coreutils-8.29/bin:/nix/store/g5dlpwd44kd75i71nwzii8w4bp4inxwk-findutils-4.6.0/bin:/nix/store/9f89z51na7w931aja8lqlmhqny9h16cj-gnugrep-3.1/bin:/nix/store/ny5p32137wfyzdm485xfdck21w1gyl3g-g
@spencerjanssen
spencerjanssen / config.nix
Last active April 29, 2016 03:32
trying to override kernel patches
nixpkgs.config.packageOverrides =
let kp =
let p = name: path: {patch = path; name = name;};
in
[ pkgs.kernelPatches.bridge_stp_helper
(p "cam" /home/sjanssen/Downloads/debian/patches/surface-cam.patch)
(p "button" /home/sjanssen/Downloads/debian/patches/surface-button.patch)
(p "button-config" /home/sjanssen/Downloads/debian/patches/surface-button-config.patch)
(p "surface-lid" /home/sjanssen/Downloads/debian/patches/surface-lid.patch)
(p "surface-touchpad" /home/sjanssen/Downloads/debian/patches/surface-touchpad.patch)
@spencerjanssen
spencerjanssen / Main.purs
Created January 22, 2016 16:26
Derive Generic for a data type that mentions a type synonym
module Main where
import Data.Generic
type Fields = {x :: String, y :: Int}
data WrappedFields = WrappedFields Fields
derive instance genericWF :: Generic WrappedFields
{-
@spencerjanssen
spencerjanssen / Main.purs
Last active January 13, 2016 22:52
Where does a come from in the second case? Bug or intentional?
module Main where
import Prelude
import Control.Monad.Eff.Console
data W
= X
| Y
| Z
@spencerjanssen
spencerjanssen / clucky.c
Created October 20, 2015 08:13
clucky.c: fast lucky number sieve
#include <stdio.h>
#define QMAX 100000001
// we pretend these are 1 indexed, gross...
int seq[QMAX];
int count[QMAX];
// could replace this with a no-op and print the whole thing at the end
void emit_result(int n){
import System.Environment
import Data.List (intercalate)
killEvery :: Int -> Int -> [a] -> [a]
killEvery n start = go start
where
go 0 (_:xs) = go (pred n) xs
go i (x:xs) = x : go (pred i) xs
go _ [] = []