babashka

borkdude 2025-08-30T18:20:59.114979Z

How many people here are using specter in bb? The reason I'm asking is: I fixed a bug today in SCI and I discovered that some of specter's tests (at least one) passed because in some cases it relied on this bug facepalm

😆 1
✅ 2
borkdude 2025-08-30T18:27:07.309079Z

This was the failing case in SCI:

(def x 1)
(let [x 2
      x #'x]
 x) ;;=> 2
So the local name would override the var resolution and #'x would just resolve to the local x in the case of a var literal. Now it becomes apparent why this special way of macroexpanding is important in specter: https://github.com/redplanetlabs/specter/blob/9a615ff22c7b6541284fea25de08d6c73e2cd222/src/clj/com/rpl/specter.cljc#L282 Perhaps I can make a version of riddley that works with bb though.

borkdude 2025-08-30T18:30:51.557039Z

https://github.com/babashka/babashka/issues/1856

borkdude 2025-08-30T18:33:45.853459Z

ah luckily it's just this test that doesn't work:

(deftest nested-inline-caching-test
  (is (= [[1]]
         (let [a :b]
           (select
             (s/view
               (fn [v]
                 (select [(s/keypath v) (s/keypath a)]
                   {:a {:b 1}})))
             :a)))))

borkdude 2025-08-30T19:08:32.979469Z

I think I found a good compromise for specter in bb: avoid some macro-magical optimizations altogether

borkdude 2025-08-30T19:09:22.288709Z

😌

Samuel Ludwig 2025-09-02T14:34:09.992209Z

oh my thats interesting 🪄, I do like some specter in BB personally, so I appreciate the arcano-maintenance

borkdude 2025-09-02T14:49:34.323599Z

I think specter will still work fine as a git dep in the newly forthcoming bb

borkdude 2025-09-02T14:50:05.597169Z

ah wait, no, specter has no deps.edn darnit ;)

borkdude 2025-09-02T14:50:28.698609Z

well maybe you can poke Nathan for a new release. the change I made works with old and future bb

Samuel Ludwig 2025-09-02T14:51:27.921859Z

i'll forward this thread over to #specter 👍

Samuel Ludwig 2025-09-02T16:15:51.994989Z

nmarz says they just cut a new release

🎉 1
borkdude 2025-08-30T21:16:29.671599Z

Somehow I missed this babashka "Interactive Shell Scripting" youtube video by @pez! https://www.youtube.com/watch?v=fa5ig2cIWnU

👀 1
❤️ 5