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

34
LINES

< > BotCompany Repo | #1017220 // Quick & Safe Standard Function As Big Text [Dyn Module]

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

Libraryless. Click here for Pure Java version (17129L/123K).

!7

set flag DynModule.

sclass QSFunction extends DynBigNumber {
  InputChooser inputChooser = new(this);
  
  visualize { ret northAndCenter(wrap(inputChooser), super.visualize()); }
  void update { if (inputChooser.update()) update(inputChooser.input()); } 
  
  start {
    loadFunctions_preferDiskCache();
    hotwire_copyOver_after.add(f shareMyCreatorWith);
    doEvery(10000, r { update(inputChooser.input()) });
  }
  
  void update(S input) {
    temp enter();
    
    S sf = null;
    for (S word : words(input))
      if ((sf = or(mechMapCI("Word => Function").get(word), sf)) != null) break;
    if (sf != null) input = sf;
    
    S f = firstContainedInSet(words(input), mechSet("Safe & fast JavaX functions"));
      
    if (f != null) pcall {
      if (neq(getDescription(), f)) dm_showModule_noFocus();
      S value = or2(strOrNull(callAndMake(f)), "-");
      setDescription(f);
      setValue(value);
    }
  }
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1017220
Snippet name: Quick & Safe Standard Function As Big Text [Dyn Module]
Eternal ID of this version: #1017220/11
Text MD5: 46ea958b77e1420840eb606b5e2f84c3
Transpilation MD5: 4b64479d16789cff706278c9796ad8e3
Author: stefan
Category: javax / stefan's os
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-14 22:13:44
Source code size: 968 bytes / 34 lines
Pitched / IR pitched: No / No
Views / Downloads: 351 / 652
Version history: 10 change(s)
Referenced in: [show references]