Skip to content

Instantly share code, notes, and snippets.

Gleaming the hypercube

Chris Pressey cpressey

Gleaming the hypercube
Block or report user

Report or block cpressey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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?

View Odd.hs
-- implementation of
-- I, Chris Pressey, hereby place this source code into the public domain.
import Data.Char
-- A program in An Odd Rewriting System consists an alphabet of symbols,
-- each of which belongs to one of two categories (an odd symbol or an even symbol),
-- except for a special halt symbol that appears in neither category;
-- two definitions for each symbol (an odd definition and an even definition);
-- and an initial string. Both the initial string, and each definition, is simply a
cpressey / defeat.jl
Created Nov 22, 2018
The Defeat at Procyon V (for NaNoGenMo 2018)
View defeat.jl
# "The Defeat at Procyon V"
# Chris Pressey, Cat's Eye Technologies
# for NaNoGenMo 2018
# General Utility
cpressey /
Last active Aug 9, 2018
Creating a recursive fractal bottom-up
cpressey / Overview of a Story
Last active Feb 14, 2019
Overview of a "Story Compiler"
cpressey /
Created Apr 28, 2015
Really quick-and-dirty Python script to create glitched (intentionally corrupted) JPEGs
#!/usr/bin/env python
# the contents of this file are in the public domain
import os
import random
import sys
def main(args):
filename = args[0]
cpressey /
Last active Aug 29, 2015
A Python quine written in haste while travelling on the London Underground (and susbequent devolution, which did not occur while on public transport)
# prelude
a = """# prelude"""
b = """# remainder
print a
print 'a = ""' + '"' + a + '""' + '"'
print 'b = ""' + '"' + b + '""' + '"'
print b
# remainder
print a
View Expensive Shoes.txt
BUT HENCE ----- you'll need
++++ you'll say -----
---- SO HENCE they'll have
+++++ --- +
--- i'll have +
AND THEN +++ ++++
----- ++ ----
++ - --
++ ---- SO NOW
You can’t perform that action at this time.