Warning: session_start(): open(/var/lib/php/sessions/sess_l6k8rvr6s85ng3rhm2m62jvqpd, 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
cmodule PhilosophyBot2 extends DynPrintLog {
transient L unmappedLines = ll("good", "early morning");
transient L unmappedQuestions = ll("what is the time", "how do you feel");
transient S program = [[
funnyAlgorithm
funnyAlgorithm => proc {
while (there are unmapped questions):
find (an unmapped question) x
find (an unmapped line) y
map x to y
}
]];
transient new PhilosophyBot1 bot;
start-thread {
bot.program = program;
bot.addNativePredicate("there are unmapped questions",
() -> nempty(unmappedQuestions));
bot.addNativePredicate("find (an unmapped question) x",
() -> {
print("find unmapped question x");
if (empty(unmappedQuestions)) false;
ret litcimap(x := random(unmappedQuestions));
});
bot.addNativePredicate("find (an unmapped line) z",
() -> {
print("find unmapped line z");
if (empty(unmappedLines)) false;
ret litcimap(z := random(unmappedLines));
});
bot.run();
}
}