Libraryless. Click here for Pure Java version (2286L/17K/51K).
1 | !747 |
2 | |
3 | m { |
4 | static new L<S> programRuns; |
5 | |
6 | p { |
7 | autoReportToChatOff(); |
8 | |
9 | int n = 0; |
10 | while (true) { |
11 | S line = suckFromChat(); |
12 | if (line.length() == 0) break; // present time reached |
13 | //print("chat> " + line); |
14 | interpretLine(line); |
15 | ++n; |
16 | } |
17 | suckFromChat_close(); |
18 | |
19 | print("Last program runs:"); |
20 | print(indent(" ", fromLines(programRuns))); |
21 | } |
22 | |
23 | static void interpretLine(S line) { |
24 | L<S> tok = javaTok(line); |
25 | S text = unquote(tok.get(tok.size()-2)); |
26 | if (text.startsWith("JavaX RUN ")) |
27 | programRuns.add(text.substring("JavaX RUN ".length())); |
28 | } |
29 | } |
Began life as a copy of #1000939
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1000958 |
Snippet name: | Self-awareness experiment - find last programs run |
Eternal ID of this version: | #1000958/1 |
Text MD5: | 9f835d2cc1ff21c9b90429dc3600b9cd |
Transpilation MD5: | b9c657d0211d9361b362d9b46201775c |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-09-13 15:12:52 |
Source code size: | 651 bytes / 29 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 649 / 753 |
Referenced in: | [show references] |