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

22
LINES

< > BotCompany Repo | #1028395 // Transformers Spike 2 [OK]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (5473L/27K).

1  
!7
2  
3  
cprint {
4  
  transient new TransformersOnObjects too;
5  
  switchable long maxSteps = 1000;
6  
7  
  start-thread {
8  
    too.add(GStatement("A timer is something that times"));
9  
    too.add(GStatement("A waiter is someone who waits"));
10  
    too.add(GQuestion("A timer is..."));
11  
    too.add(GQuestion("A waiter..."));
12  
13  
    too.addTransformer(func(GQuestion q, GStatement s) {
14  
      if (allStrings(q.text, s.text) && match((S) q.text, (S) s.text))
15  
        ret new GAnswer(s.text, q);
16  
      null;
17  
    });
18  
19  
    stepAllWithStats(too, maxSteps);
20  
    pnlWithClasses(too.getObjects());
21  
  }
22  
}

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: #1028395
Snippet name: Transformers Spike 2 [OK]
Eternal ID of this version: #1028395/15
Text MD5: ef94a7c5bea9cd0d58f777e6f268e83e
Transpilation MD5: 2c0be81264808ba3c5d39132756fc856
Author: stefan
Category: javax / a.i.
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-06-21 01:29:29
Source code size: 596 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 209 / 511
Version history: 14 change(s)
Referenced in: [show references]