This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-30
Channels
- # aleph (25)
- # announcements (20)
- # babashka (29)
- # babashka-sci-dev (12)
- # beginners (27)
- # biff (3)
- # clojure (29)
- # clojure-europe (21)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojurescript (3)
- # clr (5)
- # code-reviews (4)
- # data-science (7)
- # datahike (6)
- # datascript (3)
- # emacs (9)
- # fulcro (5)
- # graalvm (10)
- # malli (15)
- # nbb (7)
- # off-topic (17)
- # pathom (9)
- # polylith (4)
- # practicalli (15)
- # reitit (3)
- # releases (2)
- # rum (1)
- # shadow-cljs (73)
- # squint (34)
- # tools-deps (3)
- # xtdb (11)
Announcing v0.2.0 of clerk-utils
, a library designed to help write interactive docs like https://clerk-utils.mentat.org with #clerk.
This release adds a show-cljs
macro that makes it easy to use clerk with cljc files, as well as a docs page documenting how to use Clerk with a custom ClojureScript bundle: https://clerk-utils.mentat.org/dev/clerk_utils/show.html
See the interactive docs notebook for more detail: https://clerk-utils.mentat.org
• Release notes: https://github.com/mentat-collective/clerk-utils/releases/tag/v0.2.0
• Clojars: https://clojars.org/org.mentat/clerk-utils
• Github: https://github.com/mentat-collective/clerk-utils
• cljdoc: https://cljdoc.org/d/org.mentat/clerk-utils/0.2.0
Dewey Search: A "not completely terrible" web page for finding clojure libraries that are hosted on github. https://phronmophobic.github.io/dewey/search.html Edit: • Added https://phronmophobic.github.io/dewey/topics.html page • Topics and authors are now clickable to show filtered view source: https://github.com/phronmophobic/dewey/tree/gh-pages
Dear friends! Just finished up writing the babashka http-client today and I think it's ready to be used. Please provide your feedback while this library is in flux so we can move it to a built-in somewhere in 2023! https://github.com/babashka/http-client
org.babashka/http-client {:mvn/version "0.0.1"}
Great stuff as always! However at my work we've had a problems when using java.net.net.HttpClient with respect to network timeouts. For example request timeout does not cover receival of the body: https://bugs.openjdk.org/browse/JDK-8258397 Not sure if this can be solved perfectly at a higher level such as babashka/http-client or not (or just mitigated).
I have not looked super close at it, but my personal preference as of now is to just stay away from http://java.net.http.HttpClient :-/
@UGJE0MM0W The workaround that occurred to me also is mentioned here: > A possibility for the caller is to make use of the CompletableFuture API (get/join will accept a timeout, or CF::orTimeout can be called). IIRC - in that case, it will still be the responsibility of the caller to cancel the request. babashka http-client isn't going to fix JDK issues, unless the workaround is super obvious
user=> (let [resp (http/get "" {:async true})] (deref resp 1000 ::too-late))
:user/too-late
user=> (let [resp (http/get "" {:async true})] (deref resp 1200 ::too-late))
{:status 200,
That's an OK-ish workaround I think. One problem we also had is that it takes a long time before a HTTP/2 connection is marked bad/dead. Requests kept piling onto the same dead connection, so a bunch of requests (eventually) timed out, thus we had a flood of timeouts. HTTP/2 is the default as far as I know. Using HTTP/1.1 would be better in this case.
@UGJE0MM0W I don't think so:
user=> (:version (let [resp (http/get "" {:async true})] (deref resp 1000 (delay (do (future-cancel resp) ::too-late)))))
:http1.1
I think so:
Returns the preferred HTTP protocol version for this client. The default value is HttpClient.Version.HTTP_2
https://docs.oracle.com/en/java/javase/17/docs/api/java.net.http/java/net/http/HttpClient.html#version()other site: I guess so. I see that you are doing some http-version stuff as well
Anyway... My experience on an unstable network (Azure container instances) + http2 (default) is unfortunately not very good with http://java.net.http.HttpClient. I'd be hard pressed to recommend it in such a setting. I also cannot recommend Azure container instances per se. The problem lies with the JDK of course, not babashka/http-client. I have no idea if babashka.curl/httpkit is better. clj-http is http1.1 default + timeouts that are respected AFAIK, which is what I've stuck with.
Announcing Fulcro Internationalization, version 1.0 https://github.com/fulcrologic/fulcro-i18n This library supplies features for easily internationalizing Fulcro applications: • Use your native language in the code strings • Extract those to GNU gettext POT files • Use PoEdit or other great tools to generate translations in supported languages • Dynamically load the translations per locale from your server