clojure-ohio

seancorfield 2026-01-23T19:46:56.411569Z

Is everyone ready for snowmageddon? πŸ™‚ 🌨️ β˜ƒοΈ

Darin Douglass 2026-01-23T19:52:41.060029Z

i'm just above the heavy band last i checked. should only get maybe 6" or so over the next couple of days 🀞

Darin Douglass 2026-01-23T19:53:10.620729Z

what's 6 more inches to what we already have on the ground? πŸ˜›

seancorfield 2026-01-23T20:09:28.147219Z

We just got all the ice cleared off our front porch and steps from the last round of snow (which was when my wife went in for her knee replacement -- so that was a fun morning, getting to the hospital at 5 am in that!). I ought to try to clear the ice off the back deck steps today I suppose...

2026-01-23T20:10:08.025719Z

we've got no snow yet but it's supposed to start tomorrow and not let up all night

eraserhd 2026-01-23T20:14:22.348189Z

I bought eight pounds of good coffee, so I'm ready. I haven't checked how bad our snow is supposed to be, but we usually get it bad.

πŸ‘πŸ» 1
πŸ˜† 1
eraserhd 2026-01-23T20:15:25.007009Z

TIL:

user=> (def foo.bar 42)
#'user/foo.bar
user=> (let [foo.bar 42] nil)
Syntax error (ClassFormatError) compiling fn* at (REPL:11:1).
Illegal field name "foo.bar" in class user$eval25781

2026-01-23T20:26:58.543409Z

damn i should have bought some coffee

2026-01-23T20:27:48.269619Z

lol yeah, one of the lil footguns

seancorfield 2026-01-23T22:32:51.359209Z

@eraserhd Related:

user=> (def foo.bar (fn [x] (* x x )))
#'user/foo.bar
user=> (foo.bar 13)
Syntax error (ClassNotFoundException) compiling at (REPL:1:1).
foo.bar
user=> (user/foo.bar 13)
169
user=> foo.bar
Syntax error (ClassNotFoundException) compiling at (REPL:0:0).
foo.bar
user=> user/foo.bar
#object[user$foo_DOT_bar 0x11841b15 "user$foo_DOT_bar@11841b15"]

eraserhd 2026-01-23T22:48:27.543909Z

Huh. So my theory with let is: Let seems to be rewriting to fn* as one does (though surprising because I thought there were performance reasons not to do that), and fn* is making a class with local vars being class members, and the JVM doesn’t allow object fields with dots. I don't have a theory about (foo.bar 13) …

seancorfield 2026-01-23T22:49:21.140839Z

Because Clojure 1.12 treats foo.bar as a Java class' package now. Happens with 1.11 too, so it's not new-in-1.12.

seancorfield 2026-01-23T22:52:22.836859Z

That behavior goes all the way back to Clojure 1.0 apparently!

eraserhd 2026-01-23T23:00:17.798809Z

Oh! That makes sense. The other thing I had to work through porting clara-eql to cljs was the macros resolving type names. \`EAV would correctly resolve to clara_eav.eav.EAV in my macro, but then Clara couldn’t resolve clara_eav.eav.EAV in the second pass.

eraserhd 2026-01-23T23:01:17.744499Z

I realized that any Java class can be referred to by a symbol without import or namespace. Which, makes sense. I’ve written code like that before.

2026-01-23T22:38:11.215089Z

you can use special symbols too, such as def or quote if you namespace them lol

seancorfield 2026-01-23T22:41:49.927759Z

πŸ˜„

user=> (def def def)
#'user/def
user=> def
#object[clojure.lang.Var$Unbound 0x5bfc257 "Unbound: #'user/def"]
user=> (def x def)
#'user/x
user=> x
#object[clojure.lang.Var$Unbound 0x5bfc257 "Unbound: #'user/def"]

πŸ˜‚ 1
2026-01-23T23:04:00.859829Z

you remember that meme youtube song from the 00s "dumb ways to die"? that's how it feels to write such code

chepprey 2026-01-23T01:16:24.352149Z

Resistance is futile.