Fork me on GitHub

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 • Fix`calva.highlight.bracketColors` • Fix

cljs 14
👏 8
🔥 5
calva 6
wow 1
🎉 2
Asko Nōmm21:10:58

Yet another Clojure HTTP router has come to life, with zero dependencies, entirely data-structure based (no macros, no magic) • 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!

❤️ 16
👏 10
👍 4
🧡 1
💜 2

That's awesome. This library might even work in bb with the built-in httpkit server


@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})



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.

Asko Nōmm21:10:23

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.

Asko Nōmm23:10:50

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! 🙂

metal 3
Asko Nōmm23:10:12

Except for Clojure itself, of course


This would be runnable in cljs as well?

Asko Nōmm14:10:24

There’s no reason it shouldn’t be, but I think I have to change the file to .cljc for that? Right?

Asko Nōmm16:10:51

Pushed an update, should now work with CLJS.


Just released vim-iced ver 3.7.0, Clojure Interactive Development Environment for Vim8/Neovim. Added support for @borkdude 's #nbb nrepl-server. Also updated instant connecting command to support nbb 🙂

🎉 17
❤️ 3