#+OPTIONS: toc:nil num:nil creator:nil author:nil

** Wed Feb 15 00:37 UTC; omar
I am frustrated. See if you can spot the problem with this:

#+begin_src clojure
(defn reload-lat!
 "Refreshes the lat from disk, returning the updated lat."
 ^Lat [{:keys [cached-lat] :as this}]
 (swap! cached-lat reload-lat this))

(defn disk-interface
 "Creates a stateless interface for loading a line from disk.
  Automatically triggers an asynchronous reload when instantiated."
 [index-file-path
  inventory]
 (let [this {:index-file-path   index-file-path
             :cached-lat        (atom nil)
             :inventory         inventory}]
   (future (reload-lat! this))
   this))
#+end_src

This codebase has statefulness all over it, every other
function has a bang at the end. There's a MutableStore
implementation which has the docstring "A stateful wrapper
around an ImmutableStore". Its only method is ~put~ ffs.

I think there's a fundamental misunderstanding of words in
play.

Also, this is a disk based storage model. I think that's a
terrible idea for software which needs to serve multiple
requests possibly concurrently.

Anyway, I'm done for now. I need to stop thinking about this.