Skip to content

Instantly share code, notes, and snippets.

View michaeljklein's full-sized avatar

Michael J Klein michaeljklein

View GitHub Profile

Keybase proof

I hereby claim:

  • I am michaeljklein on github.
  • I am lambdamichael (https://keybase.io/lambdamichael) on keybase.
  • I have a public key ASBgMtW745y_AdzI1esh1aia8p0t9DQEyFVSl10BA8b7Owo

To claim this, I am signing this object:

module Main where
{-# INLINE neither #-}
neither :: Bool -> Bool
neither = not
infixl `nor`
{-# INLINE nor #-}
nor :: Bool -> Bool -> Bool
nor x y = x && not y

Steven Ramsay: Higher-Order Constrained Horn Clauses for Verification

https://arxiv.org/abs/1705.06216

Currently, he's pitching horn-clauses, saying there's already plenty of horn-clause solvers.

Most people prefer higher order logic for writing stuff, but what if we could lift Horn-clauses into a basis for higher-order program verification.

Never edit a method, always rewrite it

Introduction

This is an impromptu response to Never edit a method, always rewrite it, by Dave Cheney.

At a recent RubyConf, Chad Fowler presented his ideas for writing software systems
that mirror the process of continual replacement observed in biological systems.
@michaeljklein
michaeljklein / six_sigma_demo_notes.hs
Last active November 24, 2017 20:16
Translated some ideas from 6sigma.us to Haskell
{-# LANGUAGE GADTs #-}
{-# LANGUAGE InstanceSigs #-}
import Control.Comonad
import Data.Functor.Classes
import Data.List
-- [Six Sigma](6sigma.us) Demo Notes

wikipedia

Traces of nobility, gentleness and courage persist in all people, do what we will to stamp out the trend.
So, too, do those characteristics which are ugly.
It is just unfortunate that in the clumsy hands of a cartoonist all traits become ridiculous,
leading to a certain amount of self-conscious expostulation and the desire to join battle.
There is no need to sally forth, for it remains true that those things which make us human are,
curiously enough, always close at hand.
Resolve then, that on this very ground, with small flags waving and tinny blasts on tiny trumpets,
we shall meet the enemy, and not only may he be ours, he may be us. Forward!
Our bodies are like a train.
The train needs "food" (fuel) to keep running.
The train needs air, since trains don't have their own air.
The train needs to be greased and maintained to retain its ability to rove the tracks.
The train needs to be balanced and rooted on its track, but not too much or it won't go anywhere.