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

svoid dm_bot_execFreshRealEval(IVF1<S> postMessage, S code, O... _) {
  dm_bot_execFreshRealEval(ivf1ToVF1(postMessage), code, _);
}

svoid dm_bot_execFreshRealEval(VF1<S> postMessage, S code, O... _) {
  double timeout = optPar timeout(_, 60.0);
  O safetyCheck = optPar safetyCheck(_);
  O mod = dm_current_generic();
  optPar bool alwaysFresh;
  
  dm_refreshTranspiler();
  callF(postMessage, evalWithTimeout_text(timeout, func {
    temp dm_enter(mod);
    try answer (S) callF(safetyCheck, code);
    ret print("eval result > ", str(dm_javaEval(code)));
  }));
}

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: 186 / 266
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)