(λ. borkdude)
borkdude.bsky.social
(λ. borkdude)
@borkdude.bsky.social
850 followers 24 following 450 posts
#clojure (#cljKondo, #babashka) * functional programming * whole food plant based * progressive rock+metal * ♥ @lalage_ * http://github.com/borkdude
Posts Media Videos Starter Packs
Moar squint optimizations. If objects aren't shared, we are free to mutate them, even when assoc instead of assoc! is used.

squint-cljs.github.io/squint/?src=...

#clojure #clojurescript #squintcljs
Squint CLJS now emits more performant code for assoc, assoc! and get when objects can be inferred or are type hinted using ^object

#squintcljs #clojure #clojurescript

squint-cljs.github.io/squint/?src=...
I don't know what this means, but you can create webcomponents with squint:

squint-cljs.github.io/squint/?src=...
Squint
squint-cljs.github.io
I wanted to speed up = (equals) in ClojureScript: when you know one of the (2) operands is a primitive, you can drop down to `===` instead of going through the `cljs.core/=` functions

But can't do this because idiots can override the behavior of = via protocols on primitives :-s
~{} returns -1 in JavaScript, don't ask me how I know
Cool article on Show HN about Eucalypt!

Link below
Small tweak to #squintcljs. When using ^object type hints, assoc and assoc! compile down direct object manipulation without calling into the stdlib

squint-cljs.github.io/squint/?src=...

#clojure #clojurescript
I'm probably not the first to think about this one? Split a string into two at cursor in emacs. Works nicely with str in #clojure

(defun split-string-at-point ()
(interactive)
(when (nth 3 (syntax-ppss)) ; are we inside a string?
(insert "\"\"")
(backward-char 1)))
I should tone down the excitement a little bit. It's much much faster when you use constants in str, but still only 4x faster when you use all variables.
Announcing a little but fun macro as library that optimizes CLJS str almost 300x.

github.com/borkdude/clj...

#clojure #clojurescript
Found a pretty nice optimization for str in #squintcljs

(str "Hello: " (+ 1 2 3) nil "Dude")

=>

`Hello: ${1 + 2 + 3 ?? ""}Dude`

So str -> template string + null/undefined check.
This performs much better than Array.join('').

But... is it worth it?

#clojure #clojurescript
Babashka Conf in 2026 the day before Dutch Clojure Days? Show your interest in the babashka-conf channel on Clojurians Slack.

#babashka #babashka_conf
I'm posting a lot since I have to give a presentation tonight and I'm at peak procrastination right now.
Included a small compile time optimization for = : when you compare with a number, or keyword/string (same thing in squint), which is a pretty common pattern, then = will still compile into === :

squint-cljs.github.io/squint/?src=...
Squint
squint-cljs.github.io
Nbb: the easiest way to script in ClojureScript on node, bun and deno

github.com/babashka/nbb

#clojure #clojurescript #nbbcljs
Ik heb ook teveel ochtendhumeur om evangelisch kerkganger te zijn, dus dat matcht. Misschien zie ik je in november dan eindelijk eens in de Hoeksteen 033 ;)