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

17
LINES

< > BotCompany Repo | #1032356 // dm_bot_execFreshRealEval

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

Libraryless. Click here for Pure Java version (14265L/89K).

1  
svoid dm_bot_execFreshRealEval(IVF1<S> postMessage, S code, O... _) {
2  
  dm_bot_execFreshRealEval(ivf1ToVF1(postMessage), code, _);
3  
}
4  
5  
svoid dm_bot_execFreshRealEval(VF1<S> postMessage, S code, O... _) {
6  
  double timeout = optPar timeout(_, 60.0);
7  
  O safetyCheck = optPar safetyCheck(_);
8  
  O mod = dm_current_generic();
9  
  optPar bool alwaysFresh;
10  
  
11  
  dm_refreshTranspiler();
12  
  callF(postMessage, evalWithTimeout_text(timeout, func {
13  
    temp dm_enter(mod);
14  
    try answer (S) callF(safetyCheck, code);
15  
    ret print("eval result > ", str(dm_javaEval(code)));
16  
  }));
17  
}

Author comment

Began life as a copy of #1021658

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1032356
Snippet name: dm_bot_execFreshRealEval
Eternal ID of this version: #1032356/3
Text MD5: 547ac7c7d5cd094adbf9c685236b6f3d
Transpilation MD5: d70941437bdecd42a52349174cbfde65
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-11 05:30:47
Source code size: 584 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 185 / 266
Version history: 2 change(s)
Referenced in: [show references]