Is everyone ready for snowmageddon? π π¨οΈ βοΈ
i'm just above the heavy band last i checked. should only get maybe 6" or so over the next couple of days π€
what's 6 more inches to what we already have on the ground? π
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...
we've got no snow yet but it's supposed to start tomorrow and not let up all night
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.
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$eval25781damn i should have bought some coffee
lol yeah, one of the lil footguns
@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"]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) β¦
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.
That behavior goes all the way back to Clojure 1.0 apparently!
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.
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.
you can use special symbols too, such as def or quote if you namespace them lol
π
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"]you remember that meme youtube song from the 00s "dumb ways to die"? that's how it feels to write such code
Resistance is futile.