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

17
LINES

< > BotCompany Repo | #1027630 // Conversation concept (used to include Msg + MsgOut)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (12788L/87K).

concept Conversation {
  bool authed;
  S cookie, ip;
  new LL<Msg> oldDialogs;
  new L<Msg> msgs;

  void add(Msg m) {
    syncAdd(msgs, m);
    change();
    vmBus_send chatBot_messageAdded(mc(), this, m);
  }
  
  int allCount() { ret lengthLevel2(oldDialogs) + l(msgs); }
  int archiveSize() { ret lengthLevel2(oldDialogs); }
  
  L<Msg> allMsgs() { ret concatLists(listPlus(oldDialogs, msgs)); }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027630
Snippet name: Conversation concept (used to include Msg + MsgOut)
Eternal ID of this version: #1027630/8
Text MD5: 37e1c4e4835c77f564abaa263033342e
Transpilation MD5: 18bbd140758503d5809020aeba53a35d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-04-10 18:51:42
Source code size: 420 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 159 / 1033
Version history: 7 change(s)
Referenced in: #1027629 - WebChatBot [LIVE]
#1027729 - getCruddieLog
#1027736 - New Engine Spike [dev.]
#1027746 - New Engine Spike [backup with shallowZip]
#1027748 - New Engine Spike with logic rule [dev.]
#1027758 - New Engine Spike with AllOnAll [OK]
#1027763 - Test NewEngine [OK]
#1027772 - Msg + MsgOut