Liked: A guided tour of Emacs
Liked: A guided tour of Emacs
Liked: A blog in pure Org/Lisp
Clojure method naming: ? and !
Some clojure methods ends with either a ! or a ?. This is one of those tiny details about Clojure that I really dig. Because that single character tells me something really important about the function.
Every method that ends with ? is a predicate. This means that it returns true or false. nil? empty? blank? are examples of predicate functions.
The functions that ends with a ! is a little bit more complicated. All of them are inpure functions. They usually mutate state or deal with io. These are the kind of functions you want to avoid unless you have to.
I got rid of most of my noebooks
I looked at my insane pile of notebooks a while back, and decided to just throw the damn pile in the trash. But then some great people at Micro.blog convinced me to keep parts of it.
So, I went through them all and decided to keep everything that contained stuff I have written. But I decided to get rid of everything that was lists, tasks, notes etc. The result was that most of it are gone. I think the result was that 2⁄3 of my notebooks are gone. And most of the new ones I fill up are thrown out as soon as I am done with them.
This have done a lot to make my netbook collection more manageable, and limited to what might be interesting at some point.
Clojure and editors
I have played around with many different setps for developing Clojure over the last year. Some I like, others I don’t.
This is about the three setups I prefer. There are many others, that you might like more.
All of these setups have their problems, and I don’t consider any of them perfect. But they work fine.
- VS Code + Calva
- IntelliJ + Cursive
- Emacs + Cider
VS Code with Calva is a good setup. The repl is easy to set up and use. And Calva makes sure the remote repl you are connected to refresh your files on save. But there is one thing I do not like about this setup, and that is that console messages(some of the error messages) don’t show up inside VS Code.
Cursive on the other hand is a very easy to use and solid setup. You get everything you expect from a IDE setup. The repl is solid and easy to use, you can either set it up to run a repl for your or connect to a remote one. Like VS Code you don’t get all the output if you connect to a remote one. This is not a problem if you run it locally in IntelliJ. Unlike Corva, Cursive does not have support for reloading changes on save, so you need to run a keyboard shortcut each time you wish to do that. Not huge, but a little bit annoying.
The Emacs setup is my favourite. You can configure everything, you have many different ways to do everything you want. Everything from how you wish to test out code in the repl to what output you want access to. I have not set this up yet, but it is possible to set up auto reload like VS Code.
I personally prefer Emacs for Clojure development, because it is the most powerful. But it is also very hard to get into. If you are the kind of person that would enjoy emacs, you already know it. If not, check out Code or Cursive.
Use Code if you are more into text editors, and Cursive if you are more into IDE’s. Also take the issues with each setup into consideration for what setup you pick.
If I don’t use Emacs, I often use Cider when I want to see all repl output, while I use Code when I find it cumbersome to reload the code all the time.