it is indeed a great teacher but there are times where it hallucinates and sticks to the hallucinated content even after several iteration unless human in the loop breaks it. i've wasted hours believing what LLM hallucinated.
my learnings are a lot of microdoses of things that I usually don't work on in a day to day so i don't want to spend time reading about it but yes this sort of learning would be otherwise impossible so gotta thank LLM for that.
Dynamic classes cannot be GC'd without the classloader being dereferenced. In this case, if eval used an existing classloader we would end up exhausting metaspace and leading to MaxPermGen exception.
Initial Clojure implementation was checking for an already created classloader and tried to reuse. They had commented out the code that was doing it.
These days there is some
Machinery in the JVM for creating truly anonymous classes that can be garbage collected (https://docs.oracle.com/en/java/javase/22/docs/api/java.base......) ), but they are trickier to generate as they can’t have static fields (you don’t have a class name so have no way to refer to them) etc.
Side note: You’re using the term “dereference” incorrectly (also in the article). It doesn’t mean “drop references”. It means “going from the reference to the thing being referenced”, or (in other words) “accessing the thing that is being referenced” [0]. It doesn’t mean the reference is going away.
Lack of documentation around performance related stuff and high memory usage because of immutable data structure.
Otherwise it's great. I try to do it in my free time since most of the clojure services are stable(in terms of features) and we are just scaling it up as we see increase in traffic but it's not really helping right now.
I guess it depends what the tech stack was before?
Where I work, we were previously a ColdFusion shop when I joined, and after a false start with Scala, I introduced Clojure and it stuck: we cross-trained the CF devs and slowly rewrote the platform from the bottom up in Clojure.
We had struggled with automated deployments, and the size of servers, when we were a CF shop but after the switch to Clojure we had a fully-automated deployment pipeline, with rolling cluster updates, and much smaller servers than we needed before, running more processes than before.
The platform was written in Clojure from ground up since the team was small and rest of the company was using Clojure mostly in combination of Java.
Now most of the company moved out of Clojure for various reasons but they didn't try to write performant code and instead just chose to rewrite which I want to avoid. Try as much as possible before deciding to rewrite since rewrite is expensive given the codebase has lot of things.
my learnings are a lot of microdoses of things that I usually don't work on in a day to day so i don't want to spend time reading about it but yes this sort of learning would be otherwise impossible so gotta thank LLM for that.