Sammy's Blog
Sammy's Blog
Table of Contents
1. Deft version 0.2.0
2. How much LLMs is too much LLMs?
3. Building Chess in about 350 lines of Clojure
4. Announcing Deft: A class and interface system for Clojure and ClojureScript
5. My Blog is Now on RSS
6. How to Win at Wordle
7. The Power Of Habit (Book Review Pt 1)
8. Modern Monetary Theory and You
9. The Perfect Camera
10. Camera Lenses: What's in My Bag
11. Why Many Primary Forecasts are Wrong
12. The Wonky Math behind the Democratic Primary
13. What's Going on With The Impeachment
14. Treating Cancer with Chemo (Part 3)
15. Treating Cancer with Chemo (Part 2)
16. Treating Cancer with Chemo (Part 1)
17. The Importance of Doing Nothing
18. Why I Support Citizens United
19. Camera Settings
rss
1. Deft version 0.2.0
Now that deft 0.2.0 is released, I figure it's a good time to talk about what I built, and why I built it.
The point of Clojure's everything-is-a-map toolkit is that getters and setters are a waste of time. Clojure was built, in large part, in response to the crappy 2008 Java workflow, where you had to write getters, setters, and builders, and you took on all this bloat that nobody enjoyed.
The problem is that if you want to represent your data using the built-in defprotocol and defrecord, and you want to define functions that depend on the presence of a certain field, then the only way to encode that information into the protocol is to add getter and setter metohds to it. icky.
You can also use a combination of protocol + malli schema to represent this, but then when you use it, you need to specify 'this function takes as input something that both implements this protocol and implements this Malli schema'. Also icky.
What we want is something we can use in the style of defprotocol and defrecord, but gives us all the getters and setters and map-like stuff by default. The key insight is that if a field exists in a record, we get all the other good stuff, so we just need to add support for protocols with required keys.
Deft v0.2.0 adds support for namespaced keys in type and protocol definitions. i.e., you can now do:
(defp Positioned :required-keys [::pos - ::Point])
and
(deft Circle [::location/position radius])
(>Circle ::location/position [1 2] :radius 12)
this is useful because you can now define methods that depend on those fields being present i.e.:
(defp Gremlin :extends [location/Positioned])
(defmethod game-object/get-hitbox ::Gremlin [self]<br>(js/Matter.Bodies.rectangle<br>(get-in self [::location/pos ::location/x])<br>(get-in self [::location/pos ::location/y])<br>15 15))
Check it out!
https://github.com/sstraust/deft
2. How much LLMs is too much LLMs?
I finished reading On the Edge last week, and it was bad. Not that I don't respect Nate Silver. I respect him a lot. So when his seminal text on gambling and risk taking was a rambling mess, I was suprised and disappointed. Nevertheless, a completionist at heart, I trudged on, to the very end, where I was greeted with this message:
"ChatGPT was a significant help in writing this book, serving as a creative muse when coming up with things like chapter subheadings, metaphors, and analogies, and for refining my understanding of technical topics that are likely to be well represented in its corpus."
Technically he wrote the book by hand, and technically he typed the letters onto his keyboard, but you know, did he really? Did he put his whole thought and mind and being into every word on the page? Maybe. I'm reminded of the absolute classic [Simple Made Easy](https://www.youtube.com/watch?v=SxdOUGdseq4), a video where so much of the core lecture is built on defining precise language, and saying exactly what you mean. When you offload that work, you don't just skip word choices, you skip that thinking, and you miss out on that organization and mental clarity.
In reading Nate's book, there's a real and noticeable difference between the language that feels baked into the organizational fabric of Nate's mentality, and the bits that were added on as an afterthought. The later chapters especially felt like they lacked that sort of mental compactification that cohesifies everything under one vision. I'm sad because this could have been a phenominal work, and it's clear that a lot of effort was made, especially into interviews and data collection, and it feels like it's just lacking that one last missing piece of insight to bring it all the way home.
So how much LLMs is too much LLMs? Well, when it comes to human connection, I'd say the answer is near zero. I don't want to read your AI generated e-mails, and I certainly don't want to read your AI generated essays. I'd much rather read your prompt instead, because I care about what you, yes, you personally think about, and I want to understand what you wanted to communicate.
Don't get me wrong, I love LLMs for the right purpose. I'd love to use LLMs on doctor's notes to build models that predict whether the flu is...