Warning: session_start(): open(/var/lib/php/sessions/sess_mc3cl5trgm2shu882qucijrbma, 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 PhilosophyBotTextArea > DynTextArea {
S output, logicRules;
transient PhilosophyBot1 bot;
transient ReliableSingleThread rstRunProgram = dm_rst(this, r runProgram);
transient JLabel lblStatus;
transient ReliableSingleThread rstLogicRules = dm_rst(this, r showLogicRules);
visual jvsplit(
jCenteredSection("Program", super),
centerAndSouth(
jhsplit(
jCenteredSection("Output", dm_textArea_scrollDown_readOnly output()),
jCenteredSection("Logic rules",
dm_textArea_scrollDown_readOnly logicRules())
),
withRightMargin(lblStatus = jRightAlignedLabel())));
start {
grabInterval = 1.0;
dm_watchFieldAndNow text(rstRunProgram);
}
void runProgram {
temp tempMiniLoadingAnim();
time {
setField(output := hijackPrint(r {
pcall {
bot = new PhilosophyBot1(text);
bot.onFactAdded.add(fact -> r { printStackTrace("Fact added: " + fact) });
bot.onLogicRuleAdded.add(rule -> rstLogicRules.run());
bot.standardImports();
bot.run();
bot.checkExpectations();
}
}));
}
main setText(lblStatus, lastTiming_formatted());
}
void showLogicRules {
setField(logicRules := joinWithEmptyLines(allToString(cloneList(bot.logicRules)));
}
}