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

28
LINES

< > BotCompany Repo | #1008158 // Thinking about texts 1 [WORKS]

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

Libraryless. Click here for Pure Java version (9792L/67K/221K).

!7

sS concepts = [[
  qhwrrglkfrbixwov - X has text Y.
  jqqmoikhpezdzszn - X has Y line(s).
  ygoumdrmuwqzeesj - How many line(s) does X have?
  lefmtqojfaiukfke - How many
  kcbifqeqvsidsios - -> a text
]];

sS statements = [[
  kcbifqeqvsidsios has text "hello world\nhello again".
]];

p-tt {
  myTruth(concepts, statements);
  
  // number-of-lines evaluator
  addLispEvaluator("ygoumdrmuwqzeesj", new F1<Lisp,Int>() {
    Int get(Lisp l) {
      S text = lispForwardRaw("qhwrrglkfrbixwov", l.get(0));
      //print("Text: " + struct(text));
      ret text != null ? countLines(text) : null;
    }
  });
  
  lispAnswerQuestion_verbose("How many line(s) does kcbifqeqvsidsios have?");
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1008158
Snippet name: Thinking about texts 1 [WORKS]
Eternal ID of this version: #1008158/14
Text MD5: 27cad989a944e27f55e09a4b6f27477e
Transpilation MD5: cfa3c321866ea267d313d8b4e5639941
Author: stefan
Category: javax / a.i. / gui
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-04-29 16:14:58
Source code size: 719 bytes / 28 lines
Pitched / IR pitched: No / No
Views / Downloads: 434 / 789
Version history: 13 change(s)
Referenced in: [show references]