Saturday, January 1, 2022

Decade in review and changes

I can now reflect on the past decade in order to determine what has been done right or wrong, and whats next. In particular, I will explain my programming philosophy and how it has developed over the years. Finally, I will explain the new blog description.

Fully embracing Clojure
I've had several years to really pick up on Common Lisp and Scheme, and I never have. Two important points in Clojure's favor are its richer and more modern syntax and the fact that it is hosted on a virtual machine. Most importantly, it is what I have invested most of my time in. By focusing on Clojure alone, I will have more time to embrace more of the Clojure and ClojureScript ecosystem.

Switching to Intellij:
I am not going to be touching any Lisp dialects other then Clojure, and that includes Emacs Lisp. I am proud to announce that I have switched to Intellij IDEA for everything including Clojure development. I think it was wrong of me to use Emacs so much, and Intellij IDEA is a godsend. It will free me up to mix Java, Clojure, and other JVM languages together in the same project as I see fit.

Virtual machines are more important then languages:
There is an old quote from Alan Kay which is a favourite of mine, which is that Lisp isn't a language it is a building material. Lisp doesn't constrain you to any type of programming, instead it opens up the language for you to develop as you see fit. Macros liberate you from the constraints of the compiler.

"Lisp isn't a language, it's a building material."

There is something equally and perhaps even more true which is that the Java virtual machine (JVM) is also a building material. What opened up my eyes was doing a compiler project for a JVM language. The JVM is a building tool by which can you can build anything you want by generating JVM bytecode.

"The Java virtual machine isn't a language, it's a building material."

The same is true of the Common Language Runtime (CLR), which shares most of the advantages of the JVM. There are a few differences, like the CLR has overloaded arithmetic, reified generics, value types (to be added in the JVM with Valhala), etc. But on a fundamental architectural level, they both share all the most important advantages of each other and they are excellent pieces of technology.

Programming today should surely be done on one of these virtual machines. That is the most important thing, as they can be used as the building material of today for programmers and language developers. I am more comfortable and at home at this point using Java and making use of the JVM then I am with using SBCL and no virtual machine even though the later is a Lisp dialect. In this sense, virtual machines are more important then languages.

This raises the issue: why not use both Lisp and the Java virtual machine at the same time? They are both building materials that you can meld into any form you like: so why not use them together. And of course, that is what we do when programming Clojure, but by far the most important thing is that we have a virtual machine underneath to fall back on.

The Java virtual machine gives us garbage collection, a higher level architecture, a highly optimized just in time compiler, a whole wealth of libraries, a compiler target, and a programming ecosystem with support for multiple languages. In this sense, it is the most important tool in the programmer's arsenal and not the individual language, which is just a nice way of expressing its features.

Knowledge engineering
The title of this blog is Lisp AI, which pays homage to the history of Lisp in artificial intelligence. The phrase artificial intelligence, first coined by John McCarthy, has now evolved to take on many meanings from many different subjects. I am primarily concerned with knowledge engineering and creating ontologies, and so that has been added to the description.

No comments:

Post a Comment