This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-10-31
Channels
- # ai (5)
- # announcements (11)
- # beginners (19)
- # biff (1)
- # calva (8)
- # cider (3)
- # clj-kondo (12)
- # clojure (97)
- # clojure-europe (39)
- # clojure-nl (1)
- # clojure-norway (74)
- # clojure-uk (35)
- # clojurescript (8)
- # component (8)
- # conjure (4)
- # cursive (13)
- # data-science (1)
- # datahike (55)
- # datomic (2)
- # emacs (3)
- # etaoin (6)
- # gratitude (1)
- # hoplon (12)
- # hyperfiddle (54)
- # introduce-yourself (1)
- # lsp (70)
- # missionary (40)
- # music (1)
- # off-topic (79)
- # re-frame (78)
- # releases (4)
- # sql (5)
- # squint (9)
- # tree-sitter (4)
- # xtdb (20)
I am utilizing Squint to compile this expression:
(-> (js/$ "main")
(.find "*:lt(20)")
(.filter (fn [_ element]
(and
(not= "A" (.-nodeName element))
(-> (js/$ element) (.parents "a") .-length zero?)))))
the interesting bit beign:
var inject_links_BANG_ = (function () {
let text_elements1 = $("main").find("*:lt(20)").filter((function (_, element) {
let and__25548__auto__2 = ("A" !== element["nodeName"]);
if (and__25548__auto__2 != null && and__25548__auto__2 !== false) {
($(element).parents("a")["length"] == 0)} else { ; <--- NO RETURN STATEMENT
return and__25548__auto__2;}
}));
so this expression returns undefined
when the first condition inside and
is true, which is very weird.@U4BHMMBB2 I'm looking at it now, but I don't understand the problem. Is it possible for you to write this down into a jquery-less example?
The squint index.html page in the root of the repo now uses #C01GH5EN7JA clojure-mode, which was ported to squint and released to npm: https://squint-cljs.github.io/squint/ It uses both squint and clojure-mode directly from CDN via import-maps!
🚀 4