This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-09
Channels
- # announcements (4)
- # aws (3)
- # babashka (86)
- # babashka-sci-dev (31)
- # beginners (171)
- # biff (15)
- # calva (3)
- # clerk (47)
- # cljdoc (11)
- # clojure (59)
- # clojure-dev (11)
- # clojure-europe (122)
- # clojure-losangeles (1)
- # clojure-nl (2)
- # clojure-norway (4)
- # clojure-uk (2)
- # clojurescript (40)
- # cursive (5)
- # data-science (3)
- # datahike (1)
- # datomic (5)
- # fulcro (9)
- # graalvm (8)
- # hyperfiddle (17)
- # introduce-yourself (1)
- # java (28)
- # jobs (1)
- # malli (11)
- # membrane (9)
- # missionary (1)
- # nbb (1)
- # off-topic (5)
- # other-languages (1)
- # pedestal (1)
- # re-frame (4)
- # reagent (16)
- # releases (3)
- # remote-jobs (3)
- # shadow-cljs (83)
- # spacemacs (1)
- # sql (5)
- # tools-deps (28)
- # xtdb (15)
Random bit of info - you can use JFR to listen for class redefinitions. Might this be usable for detecting reloaded namespace vars?
public static void startJfr() throws IOException, ParseException {
var path = Paths.get("jfr.xml");
var config = Configuration.create(path);
var events = List.of("jdk.SocketRead", "jdk.SocketWrite", "jdk.TLSHandshake");
Runnable task = () -> {
try (EventStream es = new RecordingStream(config)) {
events.forEach(event -> es.onEvent(event, System.out::println));
es.start();
}
};
new Thread(task).start();
}
<configuration version="2.0">
<event name="jdk.SocketRead">
<setting name="enabled">true</setting>
<setting name="stackTrace">true</setting>
<setting name="threshold" control="socket-io-threshold">0 s</setting>
</event>
<event name="jdk.SocketWrite">
<setting name="enabled">true</setting>
<setting name="stackTrace">true</setting>
<setting name="threshold" control="socket-io-threshold">0 s</setting>
</event>
<event name="jdk.TLSHandshake">
<setting name="enabled">true</setting>
<setting name="stackTrace">true</setting>
<setting name="threshold" control="socket-io-threshold">0 s</setting>
</event>
</configuration>
Hi, there! Does malli have a function like spec2's select? Something like this maybe, supporting selecting nested keys:
(let [schema [:map
[::name string?]
[::age pos-int?]
[::address
[:map
[::address.city string?]
[::address.country string?]]]]]
(m/select schema [::name ::address {::address [::address.city]}]))
Thanks! I implemented my own function, looks very much like this one. Just wonder why this can't be on malli itself, as it seems some people(including me) think it is useful
👍 4