ClojureScript libraries can depend on JS libraries

shadow-cljs lets you depend on ClojureScript (cljs) libraries in shadow-cljs.edn and JS libraries alike in package.json. Some cljs libraries can depend on JS libraries, like how Reagent requires React–meaning you’ll need to npm i them before using your cljs library.

Knowing and following hidden rules = programming success

Effective computer programming requires that you find all the hidden rules the computer and the language have and to follow them strictly until you get what you want. For instance, I’m coding in ClojureScript, a pleasant language in a hellish development environment which compiles to JavaScript that the browser can read. There’s a tool I use to assist in ClojureScript’s compilation tasks: shadow-cljs. I use shadow-cljs’s watch mode to look at my ClojureScript files and load the changed files right after they’re changed.

Hypothesis: Use goal-related gratitude to achieve goals ASAP

IDing what one wants and then constantly focusing on what one has related to this want will achieve for this person more than anything else. Today I zoned out and I recalled an idea from On Intelligence (Hawkins, 2005) called the “auto-associative” principle. Incomplete ideas will pull in more ideas until it’s more or less complete. Thoughts attract like thoughts. Pay for whole, fresh banana bundles with single or rotten bananas.

IntelliJ should change the project contents on file change, not on editor focus

I’ve had fun working with IntelliJ… and much not fun. While it boasts excellent Clojure namespace management (avoiding lots of conflicts and bad requires), superior test running (click the green icon next to test itself), better REPL management, it has a few (minor) painful downsides. The project files don’t reload on file change but when you focus the editor. Contrast this to VS Code, where if I move a file in Explorer, it reflects immediately in VS Code, edited or not.

People love yeast's waste products! (Alcohol and CO2)

Given sugar, yeast produces both the alcohol and carbonation of people’s favorite beverages. When we “brew” anything, we’re enlisting the help of billions of yeast (fungal cells) to eat sugar and shit out alcohol: Human beings love to drink yeast shit!

Develop 80% of a Chrome extension in a traditional environment then convert it to a proper extension

I see a slow feedback loop with extension development. Clojure apps have tests and direct execution of the script. ClojureScript offers both tests and fast visual feedback from the browser. Extensions made with ClojureScript, however, must be compiled, put into the browser extension folder; then I must reload the browser extension and run it. That said, I’ve found a faster way of developing Chrome extensions. Write the code as a normal js file first, using Node.

An unseen current you throw delicious ingredients to which returns delicous food

Cooking’s like an unseen current that you throw delicious ingredients to, and the current curves it back to you like a magnet, pulling the ingredients back to you in a more delicious form. Ingredients flow from a magic black box called a store, to your home, to be mixed in various ways, to be put in hot places for a time, to be returned to a more presentable place, until you decide to eat, and it arrives into your tummy.

"Cooking" is shopping, prepping, waiting.

You could call some aspect of prep “cooking”, but “cooking” is really putting things in the right place and letting nature do the work, so I put “cooking” into prep. The rest (the hard part) is waiting.

Working example of Clojure's new `iteration` function

My example: (def example-data {:a {:next-token :b :val "A"} :b {:next-token :c :val "B"} :c {:next-token :d :val "C"} :d {:val "D"}}) ; No token, so `iteration` will end. (vec (iteration (fn [token] (get example-data token)) :initk :a :kf :next-token :vf :val)) I find this simpler and self-evident in how it’s used vs. the AWS example and the .readLine test example given so far. Even though there’s other examples in the tests for iteration, the .

Clojure's install .sh script will replace the existing Clojure version (no need to uninstall)

I wanted to try a new version of Clojure: Clojure v1.11. My first thought was, “How do I uninstall Clojure v1.11”, but when I visited the docs, the Getting Started guide on mentions only installing. I attempted to download the new Clojure despite not installing, and in the install directions I saw a custom install directory option. I didn’t want Clojure to be in my home directory, so I used that and ran clojure --version, but I still saw version 1.