Fork me on GitHub
#announcements
<
2021-10-02
>
pez10:10:37

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/1301https://github.com/BetterThanTomorrow/calva/issues/1283

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

❤️ 16
👏 10
👍 4
🧡 1
💜 2
borkdude21:10:33

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

borkdude21:10:43

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

borkdude21:10:10

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.

borkdude22:10:54

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.

borkdude22:10:49

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

slipset08:10:09

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.

uochan21:10:24

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

🎉 17
❤️ 3