This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-27
Channels
- # announcements (8)
- # babashka (11)
- # beginners (34)
- # clerk (11)
- # clj-http (2)
- # clojure (5)
- # clojure-europe (9)
- # clojure-gamedev (1)
- # clojure-nl (1)
- # clojure-norway (17)
- # clojure-poland (1)
- # clojure-sweden (5)
- # clojure-uk (9)
- # clojurescript (17)
- # core-typed (12)
- # cursive (4)
- # datahike (4)
- # datalevin (2)
- # datomic (7)
- # emacs (8)
- # events (8)
- # graphql (5)
- # gratitude (1)
- # hyperfiddle (19)
- # jobs-discuss (4)
- # leiningen (4)
- # lsp (21)
- # meander (2)
- # off-topic (9)
- # play-clj (1)
- # polylith (10)
- # releases (1)
- # sci (18)
- # vim (10)
Do you have any examples of typing a function that should return hiccup?
I played around with a type for hiccup via malli. https://github.com/typedclojure/typedclojure/blob/8457122c3e9caeabcf75b47f13f58367bd59268c/typed/malli/test/typed_test/malli.clj#L49
here I convert it to a type that represents the result of conforming hiccup https://github.com/typedclojure/typedclojure/blob/8457122c3e9caeabcf75b47f13f58367bd59268c/typed/malli/test/typed_test/malli/schema_to_type.clj#L59-L73
but no I don't have examples. I'd be curious if you could share what you're tackling.
We have a website that uses the rum library for server side rendering hiccup. We typed a bunch of our more business logic files and have liked the benefits so far, so we wanted to try out typing some of our files with hiccup components
But yeah we have been using typed clojure for a couple months now and have overall enjoyed the robustness it brings
I'm curious if you check many namespaces and how the performance is? I recently merged some changes to parallelize checking, it would be interesting if you could try one of the latest snapshots (1.2.2-20240527.060957-41).
One problem is that the printing is interleaved but I've found 3x speedups on my internal testing.
We use lein-typed to check namespaces around 15 of them. I’m pretty sure we’re on the snapshot already and I thought for sure I noticed a nice speed up earlier. I will confirm though later tonight or tomorrow.