Clojure on the CLR

At work, we have a significant amount of legacy .NET code so I’ve been using ClojureCLR a good amount in debugging to sanity check individual components. Have you been able to get to the REPL? It’s definitely not as straightforward as the Java version, but the docs on github are pretty helpful. One thing that’s … Read more

Why is Clojure named Clojure

Rich Hickey’s (He’s the designer of Clojure) comment on that is the 1st reference link on wiki: Did you pick the name based on starting with the word “closure” and replacing the “s” with “j” for Java? It seems pretty likely, but it would be nice to have that confirmed. The name was chosen to … Read more

What are Clojure’s Naming Conventions?

You might want to look at the Clojure library coding standards on the developer Wiki – this is probably the most comprehensive list that I’ve seen. Update: link above seems to be dead, consider instead: https://clojure.org/dev/contrib_howto#_coding_guidelines To your specific points: File names are lowercase, and stored in a directory structure to match the namespace, and … Read more

ref-set vs commute vs alter

As a super simple explanation of how the Software Transactional Memory system works in clojure; it retries transactions until everyone of them gets through without having its values changed out from under it. You can help it make this decision by using ref-changing-functions that give it hints about what interactions are safe between transactions. ref-set … Read more

How do I stop jetty server in clojure?

I usually have a line in my Ring app that looks like the following: (defonce server (run-jetty #’my-app {:port 8080 :join? false})) This prevents locking up the REPL. It also allows me to recompile this file without worrying that my server will get redefined. It also lets you interact at the REPL like so: user=> … Read more