Email or username:

Password:

Forgot your password?
(λ. borkdude)

In the newest #babashka (1.0.167) you can do this without having a fork of clojure.spec in your bb.edn:

$ bb -e "(require '[clojure.spec.alpha :as s]) (s/valid? int? 2)"
true

The source of github.com/babashka/spec.alpha is pre-bundled with added only 100kb to the image.

#clojure
1/2

4 comments
(λ. borkdude)

The current clojure.spec.alpha is interpreted and takes about 50ms to load.

When clojure.spec2 ever comes out, there will be a pre-compiled fast version (which will add roughly 3-5mb to the image).

The trade-off is having some convenience now while saving space for later.

fogus

@borkdude this means that I can no longer run Spec from a floppy and will have to invest in a Zip drive.

(webdev Tory) :emacs:

@borkdude What is the best way of using #clojure #babashka with a #Cider REPL? Or is that thinking about it in the wrong way?

(λ. borkdude)

@worldsendless If your directory has a bb.edn, you can select cider-jack-in + babashka. Or you can start the nrepl from the command line (bb nrepl-server) and then cider-connect

Go Up