Transpose a Matrix in ClojureImagine you have rows of letters, numbers, and Greek letters: [[:a :b :c] [:1 :2 :3] [:alpha :beta :gamma]] Now, imagine you want to transpose them: (mapv vector [:a :b :c] [:1 :2 :3] [:alpha :beta :gamma]) ;;=> [[:a :1 :alpha] ;; [:b :2 :beta]...Nov 6, 2025·1 min read·39
Repeating Digits in ClojureMy son asked me if I could make the computer double numbers, like 2 4 6 → 22 44 66 I started with a really ugly solution: (map (fn [x] (parse-long (clojure.string/join "" [(str x) (str x)]))) [2 4 6]) ;;=> (22 4...Sep 20, 2025·2 min read·39
Sliding Windows in ClojureI was doing a little Clojure programming and my son asked me if the computer could make it go 1 2 3, 2 3 4, 3 4 5, … I thought, hmm, that’s a sliding window. Here was my first thought: (->> (range 1 4) (map (fn [x] [x (inc x) (inc (inc x))])))...Sep 18, 2025·2 min read·39
VS Code: Simple BrowserUpdated September 16, 2025 to indicate that Flares have a singleton mode as explained by PEZ. I just learned about Calva Flares. Then I wondered, is there something built into VS Code for viewing webpages? There is! It’s called Simple Browser and was...Sep 12, 2025·1 min read·57
Calva FlaresUpdated September 16, 2025 after PEZ showed me how to use the sidebar panel. I was playing with some Clojure code in Calva for Visual Studio Code and stumbled onto a feature. In my Primary Side Bar, I have the Calva view. I noticed the Inspector prev...Sep 12, 2025·1 min read·70
Sales PromisesImagine you’re a salesperson for a boutique car manufacturer and you’re having a sales conversation with a new, important customer: Customer: Thanks for seeing me. I’m really looking forward to one of your custom cars!Salesperson: Absolutely. You can...Aug 1, 2025·2 min read·76
Understanding StacksIn computer science, a stack is what you think it is. A pile. There are two important restrictions: Only add to the top Only remove from the top To illustrate, let’s track how we get dressed using a stack. At first, the stack is empty. Let’s add ...Jul 26, 2025·1 min read·32