clerk

Andreas S. 2025-05-09T16:49:51.272889Z

Thank you @borkdude for your prompt and proficient help. I got the wikidata query eventually to work. 👍

🎉 5
mathpunk 2025-05-09T21:02:10.266359Z

I'm not sure what The Right Way is to tell my system, the files we're reading might change. My io is occurring in a block like this:

^:nextjournal.clerk/no-cache
(def all-configs-1
  (apply merge (->> (:include platform-meta-config)
                    (map #(str my-platform-location %))
                    (map io/as-file)
                    (map slurp)
                    (map yaml/parse-string))))
but it doesn't seem to update in a "live" way, and while that's not a big deal, it also did not appear to update when I shut down my notebook, removed .clerk/cache and .cpcache, and restarted.

borkdude 2025-05-09T21:14:56.039799Z

does your REPL give a different result than the clerk notebook?

mathpunk 2025-05-09T22:35:35.183319Z

in this round of Clojuring I have been using clerk instead of configuring a repl

borkdude 2025-05-09T22:36:46.439689Z

if you could jack in with a REPL you could verify that clerk is doing something else than what it should. if you deleted the cache, I'd expect it to do the same as your REPL

mathpunk 2025-05-09T22:37:29.410929Z

Got it. It's silly that I do not know how to jack in with my latest editor foray, so I will figure that out

mathpunk 2025-05-09T22:37:51.637109Z

Clerk is just so easy!

🖤 1
2025-05-10T09:58:53.793419Z

If you have some code like this that you want to re-run when something changes on the filesystem, you might want to use beholder and an atom

➕ 1
teodorlu 2025-05-10T10:42:30.716059Z

If you're using the file watcher, you may be experiencing the following: 1. You start the file watcher 2. You open the Clojure namespace 3. You make a change to the yaml file 4. You don't see anything happen in the Clerk preview of the Clojure namespace. Clerk only tracks dependencies between Clojure namespaces, so this is working as designed, as far as I can tell. If you touch the Clojure namespace (eg add a comment), I suspect you'll see the change in Clerk. With repl + editor hotkey, this is a bit smoother: 1. Change the yaml file 2. Hit your editor hotkey.

borkdude 2025-05-10T10:47:32.599739Z

file watching is fine, but the part I was concerned about is this: > it also did not appear to update when I shut down my notebook, removed .clerk/cache and .cpcache, and restarted. this just doesn't make sense, unless the REPL gives the same result

💯 1
🤔 1
borkdude 2025-05-10T10:47:56.104019Z

or perhaps you just forgot to refresh the browser :)

🤔 1