hyperfiddle

Dustin Getz (Hyperfiddle) 2026-01-19T15:12:51.613839Z

Fun experiment

👀 2
Dustin Getz (Hyperfiddle) 2026-01-19T15:19:40.216919Z

This is a brutal enough Clojure footgun that I wanted to share: interaction between #_ and #?(:clj …) with no :cljs branch

(ns dustingetz.scratch)
#_#?(:clj 1)
(def foo 42) ; under cljs compilation, the #_ targets this def
(println foo) ; Use of undeclared Var dustingetz.scratch/foo

🤯 8
😭 3
grav 2026-02-28T20:00:21.138519Z

$ clj-kondo --lint test.cljc --lang cljs
test.cljc:4:10: error: Unresolved symbol: foo
linting took 14ms, errors: 1, warnings: 0

grav 2026-02-28T20:02:16.221599Z

I know Cursive has some clj-kondo integration, but it might only run with --lang clj

shaunlebron 2026-01-20T17:46:38.637639Z

Wow. Yeah I was reading earlier that reader conditionals are ignored instead of returning nil on unspecified platforms. And I've seen people use #_#_ to ignore the next two forms, so likewise "conditional ignores" and "explicit ignores" stack together I guess

Dustin Getz (Hyperfiddle) 2026-01-19T15:22:12.100299Z

this Clojure rough edge is the source of probably several spooky Electric compiler errors that I have personally experienced, it presents like a "clear shadow cache" kind of bug where there is no apparent link between the error and the program

😵‍💫 1
avocade 2026-01-21T16:48:22.456429Z

Yes, I have personally shot myself in the foot several times commenting out reader conditionals like this. Very painful and hair-tearing experiences, sometimes including a feeling of slowly going insane. Bad cocktail 🍸

grav 2026-02-19T21:24:22.094379Z

No linter catches it?