!752 snew JTextArea thoughtArea; snew JTextArea chatArea; snew JTextField chatField; static OccTree tree, current; static new L 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)); }