shadow-cljs

https://github.com/thheller/shadow-cljs | https://github.com/sponsors/thheller | https://www.patreon.com/thheller
2020-12-20T14:56:25.080200Z

Looking into generated code, this is how (set #js [...]) looks:

var oRa = $APP.Cj("aaa aarp abarth abb abbott abbvie ... [a lot more] ... yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw".split(" "));
Which looks like a clever Google Closure optimization. And this is how #{...} looks:
var oRa = new $APP.yj(null,new $APP.m(null,1504,["studio", null, "etisalat", null, "mortgage", null, "xn--gecrj9c", null, "technology", null, "nl", null, "lilly", null, "wolterskluwer", null, "schmidt", null, "hisamitsu", null, "total", null, "blue", null, "aw", null, "zw", null, "properties", null, "amex", null, "linde", null, "arpa", null, "ieee", null, ... [a lot more] ... , "fairwinds", null, "lk", null, "itau", null],null),null);
Not sure why set constructor has alternating strings with nulls.

2020-12-20T15:07:51.082200Z

The latter corresponds to this in unoptimized build:

orgpad.common.util.tld.all_tlds = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1504, ["studio",null,"etisalat",null,"mortgage",null,"xn--gecrj9c",null,"technology",null,"nl",null,"lilly",null,"wolterskluwer",null,"schmidt",null,"hisamitsu",null,"total",null,"blue",null,"aw",null,"zw",null,"properties",null,"amex",null,"linde",null,"arpa",null,"ieee",null, ... [a lot more] ...,"fairwinds",null,"lk",null,"itau",null], null), null);
No idea why inner PersistentArrayMap is created. The former corresponds to this:
orgpad.common.util.tld.all_tlds = cljs.core.set(["aaa","aarp","abarth","abb","abbott","abbvie", ... [a lot more] ...,"yoga","yokohama","you","youtube","yt","yun","za","zappos","zara","zero","zip","zm","zone","zuerich","zw"]);

2020-12-20T15:25:18.082800Z

Posted to ask.clojure, so I will see whether this will lead to something

👍 1