Skip to content

Instantly share code, notes, and snippets.

Still standing

Chris Pressey cpressey

Still standing
View GitHub Profile


SI2 is the successor to the SITU-SOL project, which was undertaken during RetroChallenge 2015/07.

Observing that, in the beginning, programs were written on paper and painstakingly hand-translated into computer memory, and that in the modern day, paper very often plays no role at all in the software development process, the objective of the SITU-SOL project was to go

View .bash_aliases
# encoding: UTF-8
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'
export PATH="$HOME/.cabal/bin:$HOME/.local/bin:$PATH"
export EDITOR=nano
alias unpyc="find . -name '*.pyc' -exec rm -f {} \;"
alias rsyncavd="rsync --archive --verbose --delete"
alias git-savepatch='git diff >'
alias chintzy-httpd='python2 -m SimpleHTTPServer'
cpressey / OperationalSansGADTs.hs
Last active Oct 8, 2020
Operational monad sans GADTs
View OperationalSansGADTs.hs
module OperationalSansGADTs where
import Control.Monad (liftM, ap)
-- Adapted from "The Operational Monad Tutorial":
data Program instr a b = Then (instr a) (a -> Program instr a b)
View PipelineCombinators.hs
module PipelineCombinators where
import Data.Either
import qualified Data.Functor.Alt
import qualified Data.Function
import qualified Control.Monad
-- Combinators for pipelines. Each of these functions takes one or more
-- parameters and yields a combinator that is intended to map functions
cpressey / Future directions for
Last active Aug 10, 2020
Future directions for SixtyPical
View Future directions for

Future directions for SixtyPical

SixtyPical has reached a mature stage of development. There are small features that could be added, but they are minor compared to the main features (abstract-interpretation/symbolic-execution/flow-typing-based static analysis and optimization of low-level 6502 programs). So the question arises -- what would be next for SixtyPical?

cpressey / Calling an anonymous function directly in various
Last active Jun 1, 2020
Calling an anonymous function directly in various languages
View Calling an anonymous function directly in various

Just a little survey of what code to create an anonymous function and immediately call it looks like in a handful of high-level languages. All of these expressions should evaluate to 10.

Language Code
Python (lambda x: x+1)(9)
Ruby (lambda {|x| x+1}).call(9)
Lua (function(x) return x+1 end)(9)
Erlang (fun(X) -> X+1 end)(9)
Haskell (\x -> x+1)(9)
cpressey / Some Notes on Software
Last active Mar 24, 2020
Some Notes on Software Preservation
View Some Notes on Software
cpressey / Programming Language Feature
Last active Feb 27, 2021
Programming Language Feature Desiderata
View Programming Language Feature

Programming Language Feature Desiderata

Draft, very draft

This is a list of programming language features that I like (sometimes contrasted with features I don't like) with the hopeful goal of informing a future language design.

For sake of background: almost all of the code I write in my day job

cpressey / dollar.scm
Created Aug 27, 2019
How Haskell's infix $ operator might look in Scheme
View dollar.scm
(define reduce
(lambda (subject complete-rules rules generation-id)
(if (null? rules)
(let* ((rule-pair (car rules))
(rest-of-rules (cdr rules))
(pattern (car rule-pair))
(replacements (cdr rule-pair))
(new-gen-id (+ generation-id 1))
(new-subject (apply-rule subject pattern replacements generation-id)))

NOTE: this document is out of date. See the Wagon distribution for the latest version of this document.


In a conventional concatenative language, every symbol represents a function which takes program states to program states, and the program is a concatenation (sequential composition) of such functions. This is fine when it comes to manipulating state, but what about control?