Libraryless. Click here for Pure Java version (2509L/18K/60K).
!752 snew JTextArea thoughtArea; snew JTextArea chatArea; snew JTextField chatField; static OccTree<E> tree, current; static new L<E> chat; p { tree = current = dialogs2occTree(loadDialogs("Let's do GMail")); showSideBySide( withTitle("Chat", centerAndSouth(chatArea, chatField)), withTitle("Thoughts", thoughtArea)); chatField.requestFocus(); onEnter(chatField, runnable { pcall { } chat.add(E.q(userInput())); renderChat(); chatField.selectAll(); }); swingEverySecond(thoughtArea, runnable { predict(); }); } svoid predict { new StringBuilder buf; try { } catch e { buf.append("\n\n" + getStackTrace(e)); } setText(thoughtArea, buf); } sS nextMove { S input = userInput(); ret "stop"; } sS userInput { ret chatField.getText().trim(); } svoid renderChat { chatArea.setText(unparsePoem(chat)); }
Began life as a copy of #1003306
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1003350 |
Snippet name: | Tree-Based GMail Bot (non-functional) |
Eternal ID of this version: | #1003350/1 |
Text MD5: | 89e5a5cf5d729366344c2a729343b54a |
Transpilation MD5: | abf27b64b1e468ee73726000fb7dd85e |
Author: | stefan |
Category: | javax / talking robots |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-06-28 22:57:10 |
Source code size: | 921 bytes / 49 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 538 / 575 |
Referenced in: | [show references] |