This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-18
Channels
- # announcements (1)
- # babashka (17)
- # beginners (26)
- # calva (7)
- # clj-kondo (57)
- # cljdoc (8)
- # clojure (6)
- # clojure-europe (26)
- # clojure-italy (1)
- # clojure-nl (1)
- # clojure-norway (52)
- # clojure-uk (4)
- # datahike (1)
- # emacs (16)
- # events (1)
- # hyperfiddle (24)
- # introduce-yourself (1)
- # jobs (8)
- # lsp (6)
- # malli (9)
- # membrane (38)
- # missionary (5)
- # polylith (26)
- # portal (4)
- # reitit (1)
- # releases (7)
- # remote-jobs (1)
metamorph.ml 0.7.6 : Machine learning functions https://clojars.org/scicloj/metamorph.ml ā¢ fixed scm links and ClojureDoc generation ā¢ refactored learning curve
http://metamorph.ml 0.7.7 : Machine learning functions for tech.ml.dataset https://clojars.org/scicloj/metamorph.ml ā¢ fixed color assignment for learning curve
io.github.hlship/trace 1.2 https://github.com/hlship/trace A small library to improve the experience when using output to debug code using the REPL. Changes: ā¢ Added a #trace/result tagged literal, which can trace a form and the result of evaluating it ā¢ Added bench-for macro, which generalizes bench for a range of inputs
(defn handle-request
[request]
(if (string/ends-with? #trace/result (:uri request) "/")
{:status 401
:body "Invalid request"})
(handle-resource-request (:uri request)))
> (handle-request {:request-method :get :uri "/status"})
=> {:status 200 ...}
{:in my.example.ring-handler/handle-request,
:line 11,
:thread "nREPL-session-62724fb3-7086-49bb-9d8f-4b238de8d01e",
:form (:uri request),
:result "/status"}
(let [inputs {:list (doall (map inc (range 1000)))
:vector (vec (doall (map inc (range 1000))))}
pred (fn [value] #(< % value))
v1 (fn [pred coll] (first (filter pred coll)))
v2 (fn [pred coll] (reduce (fn [_ v] (when (pred v)
(reduced v)))
nil coll))]
(bench-for [input [:list :vector]
count [5 50 500]]
(v1 (pred count) (input inputs))
(v2 (pred count) (input inputs))))
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā³āāāāāāāāāāāā³āāāāāāāāāāāā³āāāāāāāāāāāā
ā Expression ā Mean ā Var ā Ratio ā
ā£āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā«
ā (v1 (pred 5) (:list inputs)) ā 459.03 ns ā Ā± 4.47 ns ā 1,353.9 % ā
ā (v2 (pred 5) (:list inputs)) ā 33.90 ns ā Ā± 1.27 ns ā 100.0 % ā (fastest)
ā (v1 (pred 50) (:list inputs)) ā 82.29 ns ā Ā± 1.67 ns ā 242.7 % ā
ā (v2 (pred 50) (:list inputs)) ā 500.76 ns ā Ā± 2.72 ns ā 1,477.0 % ā
ā (v1 (pred 500) (:list inputs)) ā 473.59 ns ā Ā± 6.02 ns ā 1,396.9 % ā
ā (v2 (pred 500) (:list inputs)) ā 81.51 ns ā Ā± 1.40 ns ā 240.4 % ā
ā (v1 (pred 5) (:vector inputs)) ā 498.76 ns ā Ā± 7.44 ns ā 1,471.1 % ā
ā (v2 (pred 5) (:vector inputs)) ā 34.63 ns ā Ā± 0.77 ns ā 102.1 % ā
ā (v1 (pred 50) (:vector inputs)) ā 34.43 ns ā Ā± 0.45 ns ā 101.5 % ā
ā (v2 (pred 50) (:vector inputs)) ā 81.52 ns ā Ā± 1.58 ns ā 240.4 % ā
ā (v1 (pred 500) (:vector inputs)) ā 514.36 ns ā Ā± 4.27 ns ā 1,517.1 % ā (slowest)
ā (v2 (pred 500) (:vector inputs)) ā 512.08 ns ā Ā± 6.29 ns ā 1,510.4 % ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā»āāāāāāāāāāāā»āāāāāāāāāāāā»āāāāāāāāāāāā
Transmuting the expressions to substitute in the values provided by the implicit for required some Major Macro Mojo ā¢ļø.
http://metamorph.ml 0.7.8 : Machine learning functions for tech.v3.datasets https://clojars.org/scicloj/metamorph.ml ā¢ fixed default color of error bands for learning curve