!7 sclass Experiment > DynCalculatedList { LinkedHashMap> results = new LinkedHashMap; // code -> true count, false count, error count S code; transient int timeout = 10000; transient JTextField tfCode; visualize { ret northAndCenterWithMargins( centerAndEastWithMarginInbetween( tfCode = onEnter(jLiveValueTextField_bothWays(dm_fieldLiveValue('code)), rThread evalIt), hstackWithSpacing( jbutton("Fresh", rThread { refresh(); evalIt() }), jbutton("Eval", rThread evalIt))), super.visualize()); } start { thread "Test Code" { testCode("1 == 2"); } } void refresh { veryQuickJava_refresh(); print("Refreshed translator."); } void evalIt { testCode(code); } void testCode(fS code) { fO o = evalJava_prep2(evalJava_prep(code)); setOpt(o, 'creator_class := weakRef(creator())); // Report to OS directly O result = null; pcall { result = evalWithTimeoutOrNull(timeout, func { evalJava_main2(o) }); } cleanUp(o); temp enter(); T3 t = results.get(code); if (t == null) results.put(code, t = new T3(0L, 0L, 0L)); if (isTrueOpt(result)) t.a++; else if (isFalseOpt(result)) t.b++; else t.c++; changeAndUpdate(); } L calc() { ret reversed(map(results, func(S key, T3 value) -> S { value.a + "/" + value.b + "/" + value.c + ": " + shorten(key, 100) })); } }