This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-21
Channels
- # announcements (1)
- # architecture (392)
- # babashka (3)
- # beginners (1)
- # calva (2)
- # cider (1)
- # clojure (30)
- # clojure-denmark (2)
- # clojure-dev (9)
- # clojure-europe (13)
- # clojure-italy (2)
- # clojure-japan (17)
- # clojure-korea (8)
- # clojure-nl (1)
- # clojure-norway (74)
- # clojure-uk (3)
- # clojurescript (6)
- # code-reviews (8)
- # conjure (1)
- # data-science (1)
- # datascript (7)
- # datomic (1)
- # fulcro (1)
- # graalvm (9)
- # humbleui (3)
- # hyperfiddle (11)
- # leiningen (4)
- # lsp (7)
- # malli (7)
- # off-topic (57)
- # other-languages (9)
- # overtone (7)
- # shadow-cljs (30)
- # sql (15)
- # squint (3)
- # timbre (3)
- # vim (6)
I just tried Object.assign(globalThis, _sc)
in the squint/index.umd.html
and it seems to work quite nicely from the devtools console.
This way I can write clojure programs in js syntax on a live webpage, without any browser extensions.
I've checked if there are any conflicts between the browser globals and the vars in squint.core
:
new Set(Object.keys(_sc)).intersection(new Set(Object.keys(globalThis)))
> Set(1) {'find'}
i wonder if it would cause any practical issues if we override that find
function...I've also noticed there is a globalThis.name
property, but there is no squint.core.name
in https://cdn.jsdelivr.net/npm/[email protected]/lib/squint.core.umd.js, yet https://squint-cljs.github.io/squint can correctly run (-> js/globalThis type name)
and it compiles it to
var squint_core = await import("squint-cljs/core.js");
globalThis.user = globalThis.user || {};
return name(squint_core.type(globalThis));
i wonder why can't i access _sc.name
on the index.umd.html
page (with squint 0.7.96 in it)?I don't know why this works, but apparently it does https://squint-cljs.github.io/squint/?src=KG5hbWUgOmZvbyk%3D name isn't a squint function yet