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

17
LINES

< > BotCompany Repo | #1008152 // Load concepts from ai1.lol spike [OK]

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

Libraryless. Click here for Pure Java version (7383L/48K/163K).

1  
!7
2  
3  
p {
4  
  S text = loadPage("http://ai1.lol/wiki/structure/concepts");
5  
  L list = cast safeUnstructure(text);
6  
  new HashMap map;
7  
  long iid = 0;
8  
  for (O o : list) map.put(++iid, o);
9  
  S text2 = structure(map);
10  
  Concepts newConcepts = new Concepts().safeLoad(text2);
11  
  L<Concept> cc = list(newConcepts, "AIConcept");
12  
  for (Concept c : cc) {
13  
    S id = getString(c, "globalID");
14  
    print(id + ": " + getString(c, "name"));
15  
  }
16  
  print("Have " + n(cc, "concepts"));
17  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1008152
Snippet name: Load concepts from ai1.lol spike [OK]
Eternal ID of this version: #1008152/5
Text MD5: d2bde46f72c13df04213dd55cd6e0f48
Transpilation MD5: a2307351dff595089c1b7c80a0d70b54
Author: stefan
Category: javax / a.i.
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-04-28 13:59:32
Source code size: 484 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 427 / 500
Version history: 4 change(s)
Referenced in: [show references]