This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-17
Channels
- # adventofcode (3)
- # announcements (1)
- # babashka (25)
- # beginners (55)
- # calva (12)
- # cider (40)
- # clj-kondo (13)
- # clojure-australia (2)
- # clojure-dev (11)
- # clojure-europe (67)
- # clojure-france (6)
- # clojure-nl (16)
- # clojure-uk (9)
- # clojuredesign-podcast (9)
- # clojurescript (17)
- # conjure (7)
- # cursive (3)
- # datomic (3)
- # emacs (8)
- # figwheel-main (7)
- # fulcro (21)
- # google-cloud (21)
- # graphql (8)
- # helix (1)
- # honeysql (32)
- # instaparse (2)
- # jobs (2)
- # jobs-discuss (2)
- # meander (80)
- # mount (1)
- # off-topic (25)
- # pathom (31)
- # polylith (1)
- # rdf (24)
- # re-frame (21)
- # reagent (29)
- # releases (1)
- # remote-jobs (1)
- # shadow-cljs (16)
- # slack-help (6)
- # sql (5)
- # tools-deps (23)
- # uncomplicate (2)
- # wasm (2)
- # xtdb (4)
Good morning. This day start nicely with a 10 people meeting about a production bug. It can only go uphill from here 😛
Morgen!
@ordnungswidrig a bit like Sisyphus?
@dharrigan yea. If if Kafka an Sisyphos had a child.
I tried to find the joke about message brokers, there. Time for another coffee
@ordnungswidrig would be happy to know that I’ve been reading some liberator source-code this morning 🙂
don’t do that. It’s basically the first clojure code I had ever written.
I know it is. And it’s such a wonderful journey into another way of writing Clojure 🙂
Reason being is that we’re switching from Compojure to Reitit while not throwing out Liberator.
Liberator plays nicely with Compojure (since Compojure expects a ring-handler), but Reitit just wants a simple function that accepts a request as a handler.
Well, liberator creates simple function that expect a request and return a response.
which is the ring-handler model
hmm you can use run-resource
e.g. :handler (run-resource req :exists? false)
I played around with a new defresource
which accepts a request
so something like this:
(defresource field-search [{:keys [system ctx parameters] :as request}]
:allowed-methods [:get]
:available-media-types ["application/json"]
:handle-ok (component-service/search-components (:component-service system)
ctx parameters))
Morning. In about 9.5 hours from now (20:00 GMT+1) @ericdallo will present clojure-lsp at the Dutch (online) Clojure meetup. All welcome.
doesn’t this work (reitit + liberator)?
["/my-resource" field-search]
… which expands to:
["/my-resource {:handler field-search}]
… which mean “all requests to /my-resource
handled by ring-handler, defined as field-search
”.> So our code base is littered with `:handler ((liberator-resource foo bar baz) req)`
I’m not an retit expert but looking at this again this is weird. I had expected :handler (liberator/resource foo bar baz)
do be sufficient. :thinking_face:
@otfrom FWIW, here is my LSP config: https://github.com/borkdude/prelude/blob/master/personal/init.el#L356-L392
@borkdude thx. I thought it might have been that. I like some of the things from it, but overall it is a bit noisy
Yeah, recently we introduced some visual simple feedbacks in the modeline, so lsp-ui is kind of redundant for some features
You can also do lsp-describe-thing-at-point which will give you the same info a lens, but then on request. I prefer that
e.g. the amount of usages, etc could also be inside describe-thing-at-point @ericdallo?
It could, it's not common for lsp-servers return that kind of info on the hover information though
Yeah, I don't remember what lsp-describe-thing-at-point calls, I thought it was hover
@ericdallo Ah I can just toggle lsp-lens-mode anyway, so never mind :)
Yes :) most lsp-mode features have their own minor-modes/lsp-*-enable flags to make almost everything opt-in/out
I think
(setq lsp-ui-sideline-show-code-actions nil)
got rid of the bit that I found extra annoying. I quite like the rest of the chromeI’m trying lsp now and I’m impressed and confused at the same time
Make sure to check this guide if you use Emacs 🙂 it should help https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/
so, I know it will place nicely with CIDER, but I'm wondering if I should get rid of clj-refactor
I haven't used clj-refactor for a while, IMO you can use clojure-lsp for most features
Good evening
This has got to be the most beautiful voice I've heard in years: https://www.youtube.com/watch?v=6EyPVbGMC2Y
I wonder if the people who don't speak the language find it as moving as I do