Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

29
LINES

< > BotCompany Repo | #1000958 // Self-awareness experiment - find last programs run

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (2286L/17K/51K).

!747

m {
  static new L<S> programRuns;
  
  p {
    autoReportToChatOff();
    
    int n = 0;
    while (true) {
      S line = suckFromChat();
      if (line.length() == 0) break; // present time reached
      //print("chat> " + line);
      interpretLine(line);
      ++n;
    }
    suckFromChat_close();
    
    print("Last program runs:");
    print(indent("  ", fromLines(programRuns)));
  }
  
  static void interpretLine(S line) {
    L<S> tok = javaTok(line);
    S text = unquote(tok.get(tok.size()-2));
    if (text.startsWith("JavaX RUN "))
      programRuns.add(text.substring("JavaX RUN ".length()));
  }
}

Author comment

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: 647 / 749
Referenced in: [show references]