Warning: session_start(): open(/var/lib/php/sessions/sess_5944fg5qolv6fokc0fmb5587lp, 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
/*
proc "Computer! Can we $task?" {
find $program that fulfills $task;
if ($program != null)
print("Yes, with this program: " + programInfo($program));
else
print("I did not find a program for that.");
}
*/
p-type {
makeBot();
}
answer {
if (flexMatchDropPunctuation("Computer! Can we *?", s, m)
|| flexMatchDropPunctuation("Can we *?", s, m)) {
S task = $1;
print("Looking for " + quote(task) + "...");
Snippet program = findProgramThatFulfills(task);
if (program != null)
ret "Maybe with this program? " + snippetWithTitle(program);
else
ret "I did not find a program for that.";
}
}
static Snippet findProgramThatFulfills(S task) {
ret first(tbSearchRunnableQuick(1, task));
}