This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-31
Channels
- # announcements (5)
- # babashka (5)
- # beginners (24)
- # calva (21)
- # cherry (1)
- # clerk (20)
- # clj-kondo (3)
- # clj-otel (12)
- # clojure (50)
- # clojure-austin (2)
- # clojure-conj (3)
- # clojure-europe (40)
- # clojure-nl (1)
- # clojure-norway (203)
- # clojure-spec (3)
- # clojure-uk (6)
- # clojurescript (8)
- # conjure (1)
- # datomic (1)
- # deps-new (1)
- # emacs (5)
- # graphql (8)
- # gratitude (5)
- # holy-lambda (16)
- # honeysql (18)
- # hyperfiddle (12)
- # java (1)
- # jobs (1)
- # lsp (24)
- # membrane (8)
- # nbb (1)
- # off-topic (19)
- # portal (28)
- # proletarian (11)
- # rdf (63)
- # re-frame (38)
- # reagent (8)
- # reitit (1)
- # releases (6)
- # remote-jobs (1)
- # scittle (4)
- # shadow-cljs (20)
- # spacemacs (4)
- # sql (7)
- # transit (1)
I’m noticing that in some situations Clerk seems to evaluate expressions that use clojure.spec specs before they’re defined. Is it possible that Clerk is not tracking spec definitions as part of its computation graph?
I have a Clerk notebook that includes both s/def
spec definitions as well as usages of s/valid?
that refer to those definitions. I’m finding that when I use clerk/show!
on the notebook I get errors signaling that the spec definitions are not yet defined.
Note that I don’t get those errors when I simply require the notebook namespace in the REPL.
It’s a challenge though because simply extracting out the spec definitions and a single usage seemingly isn’t enough to reproduce the behavior. I’ll see what I can do.
Hello! How do I switch over from one viewer into another? I.e. inside clerk/html
I would like to render clojure data in the form clerk normally does. I am looking at the docs but not finding it…
you can generally embed other viewers directly in the hiccup https://book.clerk.vision/#hiccup,-html-&-svg
Thank you. I saw the example with clerk/image
already before. But it is not clear to me which viewer is the one that renders EDN data as an interactive, expandable thing. Do you know?
I think “inspect” will do it
Nextjournal.clerk.viewer/inspect
That’s right. You probably want some combination of inspect, inspect-presented, and present.
If you want an example, search this channel for the delay
and future
viewers I was working on earlier.
if you have the data in the browser. If you’d like to switch from hiccup back to Clerk’s viewer system, use a wrapped value:
(clerk/html [:div
[:h1 "Hiccup"]
{:nextjournal/value (range 100)}])
Awesome! Thank you! I would never discover {:nextjournal/value ..}
trick through skimming the docs and namespaces. I am sure it is document somewhere, just not punching me in the eye :)