Libraryless. Click here for Pure Java version (8264L/58K).
sbool loadFunctions_debug; static O loadFunctions_veryQuickJava; static Class loadFunctions(S... functions) { ret loadFunctions(asList(functions)); } static Class loadFunctions(Collection<S> functions, O... _) { print("Compiling " + joinWithPlus(functions)); TreeSet<S> functionSet = new TreeSet<S>(functions); StringBuilder buf = stringBuilder(appendNewLineIfNempty(stringPar header(_))); for (S s : functionSet) buf.append("please include function " + assertIdentifier(s) + ".\n"); long time = sysNow(); Class c; if (loadFunctions_veryQuickJava != null) c = (Class) callF(loadFunctions_veryQuickJava, str(buf)); else { veryQuickJava_transpiled.set(""); // request transpilation c = veryQuickJava(str(buf)); saveTranspiledStandardFunctions(functionSet, getAndClearThreadLocal(veryQuickJava_transpiled)); } if (loadFunctions_debug) done2_always(time, "loadFunctions: " + join(" ", functions)); ret c; }
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1007852 | 
| Snippet name: | loadFunctions - instantly make a program out of a list of standard function names and hotwire it | 
| Eternal ID of this version: | #1007852/19 | 
| Text MD5: | 6e956e101d896ee7d6a4ef71c90db012 | 
| Transpilation MD5: | cb6819c4531857e43ff19e998fb2f097 | 
| Author: | stefan | 
| Category: | javax | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2020-01-23 23:00:52 | 
| Source code size: | 977 bytes / 26 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 877 / 998 | 
| Version history: | 18 change(s) | 
| Referenced in: | [show references] |