Uses 911K of libraries. Click here for Pure Java version (2638L/14K).
!7 cprint CacheAllSnippets { transient SS texts; // snippet ID to uppercase text transient SS titles; // snipppet ID to title start-thread { time "Loaded all snippet texts & titles" { new SS texts; new SS titles; for (virtual CSnippet sn : dm_allSnippets()) { S snippetID = (S) rcall snippetID(sn); texts.put(snippetID, upper((S) rcall text(sn))); titles.put(snippetID, getString title(sn)); } setFields(+texts, +titles); } print("Loaded " + nSnippets(texts) + ", " + nChars(totalStringLength(values(texts)))); } // API // id to uppercase text SS getData() { sleepWhile(() -> texts == null, max := 10.0); ret texts; } SS getTitles() { sleepWhile(() -> titles == null, max := 10.0); ret titles; } }
Began life as a copy of #1028144
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment