Skip to content

Instantly share code, notes, and snippets.

View selfsame's full-sized avatar

Joseph Parker selfsame

View GitHub Profile
#!/usr/bin/env python
from PIL import Image
import sys, os, errno
import json, re
mimes = {"py", "hs", "js","clj","cljs"}
args = sys.argv[1:]
"dungeon planet" by Joseph Parker
Chapter 1 - Rules
Section 1(a) - Substance
[via http://inform7.com/learn/eg/rota/source.html]
A material is a kind of value.
The materials are stone, crystal, glass, wood, paper, bronze, copper, tin, silver, lead, iron, steel, dirt, sand, clay, flesh, bone, leather, cotton, sustenance and air.
dungeon planet
An Interactive Fiction by Joseph Parker
Release 1 / Serial number 141124 / Inform 7 build 6L38 (I6/v6.33 lib 6/12N) SD
Dark Hallway
You tread lightly on the dirt floor of this stone hallway. A dim glow is coming from a chamber to the east.
>go east
galactopedia
An Interactive Fiction by Joseph Parker
Release 1 / Serial number 141128 / Inform 7 build 6L02 (I6/v6.33 lib 6/12N) SD
test chamber
A plain white chamber, brightly lit.
@selfsame
selfsame / gist:2789cf328df7a3175207
Last active August 29, 2015 14:10
galactopedia.in
"galactopedia" by Joseph Parker
Book 1 - Rules
[TODO
software should not be in scope unless the computer is carried (equiped) by actor.
understand "enter [software] [anything] on [computer]" - will have to break into player command parsing and I6 code
standard folders and software should be assembly parts
software should be kinds, for easy instantiation and assignment
equipment slots for phones
@selfsame
selfsame / gist:ae3aff95abe3957b2530
Created December 11, 2014 21:03
async loop macro
(defmacro defstate [name state & inputs]
(let [[sym init] state
pairs (mapv vec (partition 2 inputs))
in (gensym)
dispatch (fn [i [f r]]
(~'or (~'and (~'fn? f)
(f i))
(~'= f i)
(ns sync.macros)
(defmacro to [chan value]
`(~'put! ~chan ~value))
'(macroexpand '(state ->e [x y] (prn x y)))
def GET(col, k, notfound=None):
try: return col[k]
except: return notfound
def KEYFN(k):
def _KEYFN_(col, nf=None): return GET(col, k, nf)
return _KEYFN_
@selfsame
selfsame / gist:6107a482243e12d077cd
Last active August 29, 2015 14:13
small MUD ideas

Failing Pet Shop Simulator

Players are assigned positinos in a small owner-operated pet shop. Business is bad, and as the game progresses it gets worse. Players do their jobs, opening up, feeding animals, cleaning cages, helping the rare customer, tending the register, and locking up at the end of the day.

As the money runs out, the managment has to start firing employees (which kicks them out of the game).

Eventually the store defaults on its mortgage and the last employee locks up and wanders off into the sunset, ending the game.

Dinosaur Outback Adventure

diff --git a/Editor/ClojureConfiguration.cs b/Editor/ClojureConfiguration.cs
index 5a2ec17..2082862 100644
--- a/Editor/ClojureConfiguration.cs
+++ b/Editor/ClojureConfiguration.cs
@@ -1,3 +1,4 @@
+using System.IO;
using System.Linq;
using UnityEngine;
using UnityEditor;
@@ -5,7 +6,7 @@ using clojure.lang;