Skip to content

Instantly share code, notes, and snippets.

@peterorme
Created February 5, 2015 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterorme/86c544141da299554b09 to your computer and use it in GitHub Desktop.
Save peterorme/86c544141da299554b09 to your computer and use it in GitHub Desktop.
Deep Thoughts - A continued table with no content
[
In this example we first create an empty table but with typed columns, so we can later on
make a "continued" table and add values there. You can't do this with only blank entries,
and you can't do it with types in the cells of the first row ("a topic, a text", etc) --
as it turns out, what you have to do is put the row types in parentheses after the column
names.
]
Section 1 - Setup
Table of Deep Thoughts
topic (a topic) name (a text) rule (a rule)
-- -- --
Pondering is an action out of world applying to one topic.
Understand "Ponder [text]" as pondering.
Carry out pondering (this is the pondering rule):
let matched be false;
repeat through the Table of Deep Thoughts:
if topic understood matches the topic entry:
follow the rule entry;
now matched is true;
unless matched is true, say "I have nothing to say about [the topic understood]." (A).
Section 2 - Story
The demo is a room
Table of Deep Thoughts (continued)
topic name rule
"a/alfa/alpha/aleph/adam" "Aleph" the Letter A Rule
"alfa/beta/gamma" "Greek" the Greek Rule
This is the Letter A Rule: say "Aaah. This is how it begins.";
This is the Greek Rule: say "It's all Greek to me."
test me with "ponder alfa"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment