Skip to content

Instantly share code, notes, and snippets.

👇
On Soviet GitHub, status updates YOU

Chris Pressey cpressey

👇
On Soviet GitHub, status updates YOU
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
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)
subject
(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)))
View Wagon.md

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

Wagon

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 https://esolangs.org/wiki/An_Odd_Rewriting_System
-- 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
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
cpressey / latcarf.js.md
Last active Aug 9, 2018
Creating a recursive fractal bottom-up
@cpressey
cpressey / Overview of a Story Compiler.md
Last active Feb 14, 2019
Overview of a "Story Compiler"
@cpressey
cpressey / glitchtool.py
Created Apr 28, 2015
Really quick-and-dirty Python script to create glitched (intentionally corrupted) JPEGs
View glitchtool.py
#!/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
cpressey / tube-quine.py
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)
View tube-quine.py
# 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 +++ ++++
----- ++ ----
- BUT NOW AND NOW
++ - --
++ ---- SO NOW
You can’t perform that action at this time.