This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-02
Channels
- # announcements (15)
- # aws-lambda (1)
- # babashka (2)
- # beginners (25)
- # calva (2)
- # cider (6)
- # cljfx (6)
- # clojure (24)
- # clojure-boston (1)
- # clojure-dev (2)
- # clojure-europe (31)
- # clojure-uk (2)
- # clojurescript (48)
- # community-development (4)
- # conjure (1)
- # datahike (4)
- # datascript (10)
- # datomic (1)
- # deps-new (1)
- # fulcro (10)
- # juxt (1)
- # malli (7)
- # missionary (1)
- # nrepl (2)
- # off-topic (2)
- # other-languages (5)
- # polylith (4)
- # random (1)
- # react (2)
- # shadow-cljs (9)
- # tools-deps (21)
A new version of Calva just out, v2.0.213
. It adds support for pure ClojureScript nREPL servers. Yes, there is such a thing now, see #nbb. As I think it might have been a while since we announced a new Calva version, let me include a few items from the top of the changelog:
• Workaround https://github.com/BetterThanTomorrow/calva/issues/1308
• Fix https://github.com/BetterThanTomorrow/calva/issues/1290`calva.highlight.bracketColors`https://github.com/BetterThanTomorrow/calva/issues/1290
• Fix https://github.com/BetterThanTomorrow/calva/issues/1301
• https://github.com/BetterThanTomorrow/calva/issues/1283
Yet another Clojure HTTP router has come to life, with zero dependencies, entirely data-structure based (no macros, no magic) https://github.com/askonomm/ruuter • Supports direct maps as responses as well as functions • Does not monkey around with anything else, keeping things as vanilla as possible. • Works with just about any HTTP server you can throw it, like http-kit, ring + jetty, etc. • Tiny!
@U026NQLSBLH Yep it works!
(require '[babashka.deps :as deps])
(deps/add-deps '{:deps {org.clojars.askonomm/ruuter {:mvn/version "1.0.1"}}})
(require '[ruuter.core :as ruuter])
(def routes [{:path "/"
:method :get
:response {:status 200
:body "Hi there!"}}])
(ruuter/route! routes {:port 8082})
@(promise)
I think you could even make this agnostic of httpkit and just provide a documentation example of how to use this with several other ring servers. Keeping it "vanilla" is a nice trade-off.
Awesome stuff! And you’re right, making it agnostic of http-kit would be as simple as removing the route!
fn and making the router
fn public, I think.
You might not be aware of this, but people have been asking for a routing solution in bb for a long time but most routing libs come with a lot of baggage so I've resisted adding one so far and recommended people to build their own solution by dispatching on method and uri (using core.match for example). This library offers nice solution to this problem.
In the future bb might switch to a different http server (not sure and will take a lot of time before the old one will be deprecated and eventually removed) but having this routing lib agnostic of server might be nice from that perspective.
I’m flattered that it could serve a useful purpose! Just pushed a new version 1.1.0
with updated documentation that is entirely decoupled from any HTTP server, and thus has no dependencies at all anymore! 🙂
There’s no reason it shouldn’t be, but I think I have to change the file to .cljc for that? Right?
Just released vim-iced ver 3.7.0, Clojure Interactive Development Environment for Vim8/Neovim. https://github.com/liquidz/vim-iced Added support for @borkdude 's #nbb nrepl-server. Also updated instant connecting command to support nbb 🙂 https://twitter.com/uochan/status/1444417505506721793