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).

!7

cprint {
  transient new TransformersOnObjects too;
  switchable long maxSteps = 1000;

  start-thread {
    too.add(GStatement("A timer is something that times"));
    too.add(GStatement("A waiter is someone who waits"));
    too.add(GQuestion("A timer is..."));
    too.add(GQuestion("A waiter..."));

    too.addTransformer(func(GQuestion q, GStatement s) {
      if (allStrings(q.text, s.text) && match((S) q.text, (S) s.text))
        ret new GAnswer(s.text, q);
      null;
    });

    stepAllWithStats(too, maxSteps);
    pnlWithClasses(too.getObjects());
  }
}

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: 140 / 416
Version history: 14 change(s)
Referenced in: [show references]