Libraryless. Click here for Pure Java version (7829L/50K).
1 | sS philosophyBotWithFactStore_discordAnswer(S theory, SimpleFactStore factStore, S s, O... _) { |
2 | ret philosophyBotWithFactStore_discordAnswer(new PhilosophyBot1(theory), factStore, s, _); |
3 | } |
4 | |
5 | sS philosophyBotWithFactStore_discordAnswer(PhilosophyBot1 bot, SimpleFactStore factStore, S s, O... _) { |
6 | optPar long userID; |
7 | optPar bool fromBot; |
8 | print(userID + " (" + (fromBot ? "bot" : "human") + "): " + s); |
9 | |
10 | S user = "(user " + userID + ")"; |
11 | |
12 | if (factStore != null) { |
13 | factStore.onChange(r change); |
14 | factStore.verbose = true; |
15 | philosophyBot1_factStore(bot, factStore); |
16 | } |
17 | |
18 | bot.standardImports(); |
19 | bot.autoOpenTheories(); |
20 | bot.addFact(user + " is a " + (fromBot ? "bot" : "human")); |
21 | bot.addFact(user + " says (" + bot.sanitizeInput(s) + ")"); |
22 | bot.run(); |
23 | |
24 | ret first(bot.matchFacts("$x", "say $x")); |
25 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1025764 |
Snippet name: | philosophyBotWithFactStore_discordAnswer |
Eternal ID of this version: | #1025764/5 |
Text MD5: | f3589a1b0e422b17e9abce422b4afcf2 |
Transpilation MD5: | d02de09105910999bf0ab3a8d0a367af |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-10-20 14:59:10 |
Source code size: | 856 bytes / 25 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 276 / 390 |
Version history: | 4 change(s) |
Referenced in: | [show references] |