Libraryless. Click here for Pure Java version (13942L/87K).
1 | sclass ExecFreshRealEval { |
2 | S code; |
3 | double timeout = 60.0; |
4 | IF1<S> safetyCheck; |
5 | IF0<AutoCloseable> enter = dm_tempEnter(); |
6 | bool showStackTraces; |
7 | |
8 | swappable void postMessage(S output) { print(output); } |
9 | |
10 | run { |
11 | temp callF(enter); |
12 | dm_refreshTranspiler(); |
13 | IF0 f = -> { |
14 | temp callF(enter); |
15 | try answer safetyCheck?.get(code); |
16 | ret print("eval result > ", str(dm_javaEval(code)); |
17 | }; |
18 | S output = showStackTraces |
19 | ? evalWithTimeout_text_showStackTrace(timeout, f) |
20 | : evalWithTimeout_text(timeout, f); |
21 | postMessage(output); |
22 | } |
23 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033007 |
Snippet name: | ExecFreshRealEval |
Eternal ID of this version: | #1033007/10 |
Text MD5: | e0eb5947929cce1a8a24aba32045352a |
Transpilation MD5: | 87383763304e6096237edb9ba9f96ac9 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-11 12:58:45 |
Source code size: | 603 bytes / 23 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 175 / 333 |
Version history: | 9 change(s) |
Referenced in: | [show references] |