https://www.evalapply.org/posts/demo-clojure-workflow-scicloj/index.html Aditya Athalye writes and works here. Aditya Athalye writes and works here. read see mail l self >> now [?] feed Cooking right now: "Project Writing for nerds". Keeping it Old-Tool: REPL habits of a grug-brained Clojure programmer [ | toc ] Published: 2025-03-28 Updated: 2025-03-28 By: Aditya Athalye Is demo of Grug Clojure code vibe. He no catch onto cloud LLM magics for some reason. Still prefer program with only brain-muscles. Prefer use Grug language standard library and standard dev tools. Prefer make and use all byte on local disk. Maybe luddite, maybe obsolete. Grug no mind. Fine with how he code. Besides, Grug like muscles. Hope maybe you see tip, trick, tactic to steal. Take what can use, no take what no can use. --------------------------------------------------------------------- email me comments >> share - [bsky] [in] [HN] [lobste.rs] [reddit] feed --------------------------------------------------------------------- [ ] Email [Get posts by email] --------------------------------------------------------------------- Tags: #meta#riff#howto#whyto#clojure#tools_for_thought#programming#ai #intelligence_augmentation --------------------------------------------------------------------- Contents Video demos of two contrasting workflows Summary opinion for my demo "Slide deck"... whoami whereami Polyglot notebook FTW (sales pitch for org-mode :) Inspect live object Capture values to inspect them at will Try Out dependencies Footnotes --------------------------------------------------------------------- Video demos of two contrasting workflows Presented at the SciCloj visual-tools meeting no. 32 (more at clojureverse). Mine is a complete contrast to the one by m'friend, colleague, Clojure nerd, and all-round mensch, Kapil Reddy. * First, Kapil (begins at ~15m 50s): How he LLMs / MCPs with ClojureScript and Clojure. * Next, I (begins at ~46m 50s): Keeping it Old-Tool: REPL habits of a grug-brained Clojurist. Clojure visual-tools 32 - Workflow Demos 6: old-school tools, REPL, Emacs, Org-mode, AI, MCP, & more. This 2025-03-26 meeting was the sixth of a series of meetings where people would demonstrate their Clojure workflows with different tools. Summary opinion for my demo nb. Somewhat biased toward JVM Clojure, which I use. * Build a core muscle memory of manipulating the live Clojure runtime that does not depend on any editor or third-party tool. * Lean on the Clojure standard library as much as possible, especially for namespaces, clojure.pprint, clojure.repl, clojure.reflect, clojure.datafy. * Prefer using the out-of-the-box deps and cli and build tools, even though they pose a more effortful learning curve ^1 than, say, Leiningen. * Compose a notebook on top of your workflow, like Clerk or Clay or Gorilla REPL, or Calva's Clojure Notebooks feature. Or my all-time ultimate favourite, org-mode with org-babel. * Port and use this dynamic workflow to other (not-Clojure) contexts, e.g. orchestrating multiple LLMs using structured prompting techniques. For more about that see what m'colleague Kapil is doing (same video), and listen to the discussion. That's above my pay grade. "Slide deck"... ... which is just a plain old org-mode file that you will see being used to deliver the live-coded demo, which I've rendered into this blog post. whoami * walking paradox of mechanical sympathy + rapidly becoming obsolete * severely allergic to dependencies * half a slot of working memory + have to write to think + unable to LLM, smol brain no handle big context ^2 * "Writing for nerds" (on a hammock) >> "Vibe coding for nerds" whereami * evalapply.org/tags/clojure * youtube.com/@evalapplydotorg * github.com/adityaathalye * linkedin.com/in/adityaathalye Polyglot notebook FTW (sales pitch for org-mode :) (ns user (:require [ring.adapter.jetty :as jetty]) (:gen-class)) (defn echo-handler [request] {:status 200 :headers {"Content-Type" "text/html;charset=utf-8"} :body (pr-str request)}) (defn run-jetty [port] (println "Starting Jetty server at port:" port) (jetty/run-jetty echo-handler {:port port :join? false})) (defn -main [] (run-jetty 3000)) (comment ; "'Rich' comment form" ;; clojure -M -m org.evalapply.catchall-app ;; OR: (def server (run-jetty 3001)) (.stop server) ) And check... curl "localhost:3001" And pipeline... curl -s "localhost:3001" | bb -e '(-> *input* :headers)' (require '[clj-http.client :as http]) (http/get "http://localhost:3001") (require 'clojure.pprint) Inspect live object (-> server clojure.reflect/reflect ;; alt: cider pprint from edit buffer clojure.pprint/pprint) Capture values to inspect them at will (defonce responses (atom [])) (defn capture-response [response] (swap! responses conj response)) (add-tap capture-response) (tap> {:status 200 :body "hi"}) @responses Tabulate (clojure.pprint/print-table [:status :body] @responses) Visual inspector (require '[clojure.inspector :as inspector]) (inspector/inspect-tree (clojure.reflect/reflect server)) Try Out dependencies * Add without modifying deps.edn file * refactor echo-handler to handle json=true query parameter * copy down and replace body (dynamic REPL-driven dev.) (require 'clojure.repl.deps) (clojure.repl.deps/add-libs {'org.clojure/data.json {:mvn/version "2.5.1"}}) (require '[clojure.data.json :as json]) (defn TODO-override-echo-handler []) (require '[clj-http.client :as http]) (let [base-uri "http://localhost:3001"] (http/get (str base-uri "/foobar?json=true"))) Footnotes --------------------------------------------------------------------- 1. Leiningen offers a nice easy-to-use "UI". Whereas tools built into the Clojure distribution are "low level" machinery. Learning them will require a day or so of trial and error and reading. Maybe we will get an easy wrapper over these at some point. Until then, it's worth the trouble to adopt it, because the model of "your builds are programs" is very general purpose, and the machinery to drive that model is always available wherever Clojure is available.-[?] 2. Grug process no look like Hollywood Hacker Movie. Look like silent art film of many hour... read-think, try-think, write-think, walk-think, sleep, hammock-read-think, do fast REPL things, test, make commit, deploy, loop.-[?] --------------------------------------------------------------------- | toc | title | menu --------------------------------------------------------------------- email me comments >> share - [bsky] [in] [HN] [lobste.rs] [reddit] feed [ ] Email [Get posts by email] --------------------------------------------------------------------- (c) 2025, Aditya Athalye. All content licensed CC BY-SA 4.0 , except where noted otherwise. Built with shite, GNU Emacs, org-mode, and . My newsletter is powered by Buttondown. Want to become a better programmer? Join the Recurse Center!