Warning: session_start(): open(/var/lib/php/sessions/sess_h7119iaiu8bmvdu39l4m9b3023, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
static Web web;
static Canvas canvas;
p-subst {
web = persistentObject("Web", Web);
web.onNewLabel.add(voidfunc(WebNode node, Lisp label) {
if (eqic(label, "Day"))
processDay(node);
});
initWeb();
canvas = showCAL(diagram(), 650, 450);
calcOnConceptChanges(1000, r { canvas = showCAL(diagram(), canvas) }, false);
bot("Every Day Bot.");
showCommandList();
}
static CirclesAndLines diagram() { ret webToCAL(web); }
svoid initWeb {
web.node("Every day");
change();
}
answer {
if "every day *" { web.relation(lisp("I should", "Every day", $1)); change(); ret "OK"; }
if "delete all" { web.clear(); initWeb(); change(); ret "OK"; }
if "add day *" { web.node($1, "Day"); change(); ret "OK"; }
}
svoid processDay(WebNode day) {
for (WebNode action : web_allForwardRelated(web.findNode("Every day"), lisp("I should")))
web.getRelation(day, action).addLabel("I should");
}