Skip to content

Instantly share code, notes, and snippets.

View selfsame's full-sized avatar

Joseph Parker selfsame

  • Clover Food Lab
View GitHub Profile
#N canvas 273 586 450 300 10;
#X obj 49 147 dac~;
#X obj 52 89 equa;
#X obj 193 16 vsl 15 128 0 1 0 0 empty empty volume 0 -9 0 10 -204786
-1 -159808 2700 1;
#X obj 55 14 hsl 128 15 0 127 0 0 empty empty midi_note -2 -8 0 10
-262130 -1 -4160 5400 1;
#X obj 55 45 hsl 128 15 0 1000 0 0 empty empty freq -2 -8 0 10 -261682
-1 -258113 4500 1;
#X obj 52 112 *~ 0.001;
>>> p = r"rip (?P<thing>.+) from (?P<object>.+)"
>>> re.search(p, "rip sheet from red book")
<_sre.SRE_Match object; span=(0, 23), match='rip sheet from red book'>
>>> res = re.search(p, "rip sheet from red book")
>>> res.groups
<built-in method groups of _sre.SRE_Match object at 0x7fa2c61e2938>
>>> res.groups()
('sheet', 'red book')
@selfsame
selfsame / selfie-dungeon.ni
Created October 3, 2018 00:09
selfie dungeon inform
"dungeon-planet" by Joseph Parker
Chapter 1 - Rules
Section 1(a) - Substance
@selfsame
selfsame / store.js
Last active May 24, 2018 18:43
generic react-redux store actions
import { createStore } from "redux"
const deepcopy = (col) => {
return JSON.parse(JSON.stringify(col))}
const shallowcopy = (col) => {
return Array.isArray(col)?[...col]:{...col}}
const update = (col, k, f) => {
col = shallowcopy(col)
import { createStore } from "redux"
const shallowcopy = (col) => {
if (Array.isArray(col)) {
return [...col]}
else {
return {...col}}}
const assoc = (col, k, v) => {
col = shallowcopy(col)
selfsame@box ╺─╸ [macplus]
[21:58] >> identify -verbose monoeye.pict
Image: monoeye.pict
Format: PICT (Apple Macintosh QuickDraw/PICT)
Class: DirectClass
Geometry: 507x311+0+0
Resolution: 72x72
Print size: 7.04167x4.31944
Units: Undefined
Colorspace: sRGB
[data]
Game entities are hashmaps.
{:id 5
:hp {:max 100 :current 50}
:sentient true
:name "frog"
:color :green}
@selfsame
selfsame / ideas.md
Created February 15, 2018 19:45
tilde.town platformer

Users claim coordinates of a "room", and define the layout with ascii

#location
5,7

#layout
 |  $ _/
_| _ _=
@selfsame
selfsame / WITCH.md
Last active February 5, 2018 11:01

ideas for tildemush's WITCH scripting language

Let's imagine an Alice and Wonderland themed little cake.

A MUD has a complex system of commands that interact with objects. A player typing eat the little cake would be parsed into the eat command, find a little cake object in the current scope, check for an eatable property, and enact some result, either a default player.name+"eats the"+subject.name or some custom interaction provided by the object.

A MUSH is a "shared hallucination", we avoid hard coded rules and interactions and let the users roleplay as they see fit. A player could /do eats the little cake, /do shrinks down to the size of a mouse!, and then go about pretending to be a tiny person until they got bored.

A WITCH script describes an object which can then be created in the MUD by users. How can these objects facilitate user defined interaction? The current spec has a hears directive giving access to text i