This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-16
Channels
- # announcements (9)
- # babashka (12)
- # beginners (60)
- # biff (2)
- # calva (4)
- # cider (4)
- # clj-commons (1)
- # clj-kondo (17)
- # clojure (2)
- # clojure-europe (17)
- # clojurescript (15)
- # emacs (18)
- # exercism (5)
- # fulcro (15)
- # holy-lambda (13)
- # joyride (1)
- # lambdaisland (2)
- # malli (1)
- # nbb (3)
- # off-topic (23)
- # polylith (6)
- # portal (59)
- # releases (1)
- # squint (1)
- # tools-deps (4)
Just lovely ahahahaha 🙏
hey Chris, pretty funny. Curious what made you build this, just for fun or do you have an actual use case?
Portal recently https://github.com/djblue/portal/releases/tag/0.30.0 for https://calva.io/notebooks/ as a renderer, which got me thinking about what integrating portal into clerk would look like. My main motivation is to author notebooks to document viewers with live examples. These notebooks should work at the clojure repl, in a calva notebook and in a clerk notebook since the common format is a clojure file.
This version of a portal viewer wouldn't work with the static site generation, but that would be easy to add via the https://github.com/djblue/portal/blob/master/doc/guides/standalone.md.
https://clojurians.slack.com/archives/C0185BFLLSE/p1660889269813399 is what the calva notebook looks like
I guess it should be possible to embed it in the same context if you take over ClojureScript compilation and make a bundle with Clerk’s and Portals CLJS code in it
> My main motivation is to author notebooks to document viewers with live examples. Embedding them in the same context should get the static build working (in case you want to publish those notebooks 👆 via Clerk’s static publishing)
Trying to get a colleague to use portal, found out the hard way the API to get to logging renderer isn't straightforward. Thoughts in thread
Not everyone uses timbre Assuming we don't want to introduce into source code something new outside of Clojure core, how can portal hitch itself onto it? How about injecting an inline metadata to tap, then massaging the tap target based on metadata attached to the form?
The logging spec isn't based on timbre. The docs have a mapping from timbre to the log viewer.
https://github.com/djblue/portal/blob/master/src/portal/console.cljc is the original place where I came up with the schema
https://github.com/seancorfield/dot-clojure/blob/develop/dev.clj#L86-L116 is how you can do it with tools logging, which I'm hoping to add to the docs soon
I guess I'm confused about what this inliner would look like outside of a clojure macro
Another option I've been thinking about to make it easier to use portal.console is adding a reader tag, something like #portal/log
.
It could do one of two thing. It could produce the log map which can then be sent to tap> or it could tap> the map itself, not sure which is better :thinking_face:
If you saw (s/def ::time inst?)
in the docs, would you have know a java date would also work from clj land?
Not sure why I have a custom one in the viewer, but i think inst? is the correct predicate
also, if we're just tracing values chronologically, I find I don't have anything to do with the log level. I care about time and place, less about level
We tend to assume everyone knows their tooling well, but it turns out most people are there for a job not because if they couldn't do Clojure they'd quit and go be a carpenter :man-shrugging:
Would you mind putting a PR for the lein stuff? Not very familiar with the best way to use it.
I added https://github.com/djblue/portal/blob/master/doc/guides/portal-console.md#spec for now to help people in the future who run into these issues 👌