Skip to content

Instantly share code, notes, and snippets.


Joel McCracken joelmccracken

View GitHub Profile
View error.txt
joel@glamdring> nix-shell --verbose ~/Projects/nix-doom-emacs
evaluating file '/nix/store/5ira7xgs92inqz1x8l0n1wci4r79hnd0-nix-2.3.7/share/nix/corepkgs/derivation.nix'
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
evaluating file '/nix/store/8a6yi5gg85wxxdl974l9sj8lzlhsvhzw-nixpkgs-20.09pre240426.f9567594d5a/nixpkgs/default.nix'
evaluating file '/nix/store/8a6yi5gg85wxxdl974l9sj8lzlhsvhzw-nixpkgs-20.09pre240426.f9567594d5a/nixpkgs/lib/minver.nix'
evaluating file '/nix/store/8a6yi5gg85wxxdl974l9sj8lzlhsvhzw-nixpkgs-20.09pre240426.f9567594d5a/nixpkgs/pkgs/top-level/impure.nix'
evaluating file '/nix/store/8a6yi5gg85wxxdl974l9sj8lzlhsvhzw-nixpkgs-20.09pre240426.f9567594d5a/nixpkgs/pkgs/top-level/default.nix'
evaluating file '/nix/store/8a6yi5gg85wxxdl974l9sj8lzlhsvhzw-nixpkgs-20.09pre240426.f9567594d5a/nixpkgs/pkgs/stdenv/booter.nix'
evaluating file '/ni
View gist:fa418e169e7e81c514d0c1679547cab7
dhall hash <<< ''
Error: Failed to resolve imports. Error list:
↳ sha256:46c53957c10bd4c332a5716d6e06068cd24ae1392ca171e6da31e30b9b33c07c
Error: Cannot decode CBOR to Dhall
The following bytes do not encode a valid Dhall expression
View links.el
View .stylish-haskell.yaml
# stylish-haskell configuration file
# ==================================
# The stylish-haskell tool is mainly configured by specifying steps. These steps
# are a list, so they have an order, and one specific step may appear more than
# once (if needed). Each file is processed by these steps in the given order.
# Convert some ASCII sequences to their Unicode equivalents. This is disabled
# by default.
# - unicode_syntax:

Managing Haskell

blah blah blah more things here

From my experience fundraising in Haskell, companies who use it all seem to have suffered from the same two flavors of problem:

  1. A rockstar comes in, dumps mindblowing code everywhere that dazzles the rest of the team and fools the product leads with pseudo-productivity until the rockstar leaves or finally wakes up. Cue the rest of the team death-marching for the next year or few years as the team attempts to juggle feature additions with excising or unraveling the impenetrable yarn-tangle of semantic misdirection.

  2. An especially productive senior or team lead spends their time on refactoring and generally spinning their wheels with respect to product delivery, and then fails to deliver on time, or at all. Cue the rest of the team struggling to keep up with the refactors. The team's knowledge of the state of the product suffers, confusion about goals sets in, the senior/lead effectively becomes an anti-team player, throwing curveballs at the rest o

View Dockerfile
FROM bec-baseimage as build
COPY . /opt/build
RUN cd /opt/build && stack build --system-ghc
FROM ubuntu:16.04
RUN mkdir -p /bec
RUN apt-get update && apt-get install -y \
ca-certificates \
joelmccracken / join.hs
Last active Sep 2, 2019
embed applicative forms in monad form s.t. the error msg and labeling functionaliy from applicative fields are maintained but you can customize the overall feel of the larger form
View join.hs
joinForm :: Html -> MForm Handler (FormResult Join, Widget)
joinForm extra = do
mustAgreeField :: Text -> Field Handler Bool
mustAgreeField errorMsg = checkBool id errorMsg checkBoxField
accept1Def = areq (mustAgreeField
"You must specify that you accept Section 1")
"Accept Section 1" Nothing
accept2Def = areq (mustAgreeField
View error.txt
Error found:
in module Main
at src/Main.purs:65:29 - 65:37 (line 65, column 29 - line 65, column 37)
Could not match type
( nextId :: Int
, textVal :: Maybe String
, items :: Array
{ key :: String
View foo.js
function assertThrows(triggeringFn, testFn) {
var sawError = false;
try {
} catch (Exception e) {
sawError = true;
assert(testFn(e), "Exception did not pass test!");
assert(sawError, "Error was not thrown!");
View index.html
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<title>Writing Shell Scripts in Haskell</title>
<style type="text/css">
code{white-space: pre-wrap;}