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

24
LINES

< > BotCompany Repo | #1005515 // A.I. Text Storage

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

Libraryless. Click here for Pure Java version (5146L/34K/112K).

!752

concepts.

concept Text {
  S text, md5;
  
  void save() {
    if (md5 == null) { md5 = md5(text); change(); }
  }
}

p {
  conceptPersistence();
  makeBot("Text Storage Bot.");
}

synchronized answer {
  if "store text *" {
    Text text = uniq(Text, text := $1);
    text.save();
    ret "OK, ID: " + text.id;
  }
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1005515
Snippet name: A.I. Text Storage
Eternal ID of this version: #1005515/1
Text MD5: d910df1ae160d9f7fd3e473b8fbd12be
Transpilation MD5: 3f057656a0915bbb9c0e4030805550fa
Author: stefan
Category: javax / a.i.
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-11-24 13:12:39
Source code size: 347 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 496 / 594
Referenced in: [show references]