Fork me on GitHub

Are there any conventions that exist for providing a library/program that has an API designed to be used in the REPL? Or any gotchas to be aware of? As far as I can tell the user just has to ensure the library is on the classpath, and then import it and work with it like any other function(s).

Marc Andreu Fernandez04:12:14

Hello, I am trying to setup my spacemacs configuration using the When I start spacemacs I get the following warnings.

Error (use-package): org/:config: Symbol's function definition is void: org-assert-version
Error (use-package): ligature/:init: Symbol's function definition is void: ligature-set-ligatures
Error (use-package): Cannot load ligature
Error (use-package): org/:config: Symbol's function definition is void: org-assert-version
Error (use-package): flycheck/:config: Wrong type argument: listp, t
Is this something I should fix? Any tips on what could I do to fix this? Many thanks Merry Christmas and happy new year to everyone.


I'll take a look and try replicate the error (Update: having carried out a package update and Spacemacs update I havent been able to replicate the error) In the mean time there is a troubleshooting guide at


The errors may be from packages installed in an order that doesnt meet all their requirements (although usually these are only warnings, not errors), so a quick check is to restart Emacs after all packages have been installed. Some errors mention Ligatures, so it may be the font that is defined in the Spacemacs configuration is not installed. The practicalli/spacemacs.d configuration uses Fira Code which has ligature support. Check if Fira Code is installed or change the configuration to use an a Font that is installed on the operating system


FYI: there is also a #C09C8GRLY channel for future questions about using Spacemacs and an #C099W16KZ channel for more general Emacs questions

Marc Andreu Fernandez12:12:16

I John, I think that I have installed Fira Code font

fc-list | grep firacode                                                                                                                                             ─╯
/usr/share/fonts/truetype/firacode/FiraCode-Bold.ttf: Fira Code:style=Bold
/usr/share/fonts/truetype/firacode/FiraCode-SemiBold.ttf: Fira Code,Fira Code SemiBold:style=SemiBold,Regular
/usr/share/fonts/truetype/firacode/FiraCode-Retina.ttf: Fira Code,Fira Code Retina:style=Retina,Regular
/usr/share/fonts/truetype/firacode/FiraCode-Medium.ttf: Fira Code,Fira Code Medium:style=Medium,Regular
/usr/share/fonts/truetype/firacode/FiraCode-Regular.ttf: Fira Code:style=Regular
/usr/share/fonts/truetype/firacode/FiraCode-Light.ttf: Fira Code,Fira Code Light:style=Light,Regular
I have updated the init.el from .spacemacs.d with as
dotspacemacs-default-font '("Ubuntu Mono"
                               :size 12.0
                               :weight normal
                               :width normal)

Marc Andreu Fernandez12:12:04

I got the same warning, but no worries if these are only warning I will leave it and progress my learning 🙂

Daniel Vieira11:12:06

Why (name nil) throws?


The doc string for name defines a return value if the parameter is a string, symbol, or keyword. It promises nothing if the parameter is not one of those types.


When the doc string promises nothing, in some cases you may get something you don't like, e.g. an exception.


That is the case in general for all Clojure functions, not just name -- if you call them with parameters that are not documented, all bets are off for the return value / behavior.

Daniel Vieira14:12:08

Thank you very much! I was not aware of this pattern.


clojure typically handles nil inputs to functions well. in the case of name it may be better that bad inputs throw, and in this case nil is a bad input. "nil" :nil (symbol nil) should be ok input. I can imagine the case where you have a map of keys you expect to be strings or keywords, and one of the keys is nil this is pretty common with output from group-by and maybe it makes sense in your case to have (name nil) => "nil" you can do this via the fnil function i believe.

👍 1

((fnil name "nil") nil)


I'm trying to build a personal blog site using Clojurescript. What would be some best practice to serve it? Could github page be an option?


I use GitHub pages for the (using and all the books I've written. The main page is a ClojureScript app created with figwheel and reagent, deployed to GitHub pages (using a GitHub actions workflow) If more dynamic storage should be needed, then GirHub pages for the build of ClojureScript code backed with for dynamic state, e.g login account s, etc. (if GitHub pages is not enough)

❤️ 2

If it's a static site, I would just use Caddy.


If you need the backend to do something, any of the popular Clojure libs are fine. Personally, I like to use Pedestal (Jetty) and—as of late—Caddy as a reverse proxy (it used to be nginx).


Oh hey TIL you can use vectors instead of lists in ns macro clauses:

(ns foo
  [:require [...]
  [:import (...)])
I always thought it was weird that ns uses () with keyword verbs, since it is very unlike any other clojure code. It's usually always () with symbols, or [] with keywords, not () with keywords

👍 1

Yeah, the elements just have to be sequential so you can use either vectors or lists. But idiomatically:

❤️ 1

Btw. afaik neither Rich nor Alex agree with the argument for using () for imports.


@U06BE1L6T Yeah, I think I've seen them both disagree with () there and if you look at modern code they've written, such as it uses []. Although some of the older code in Clojure itself uses () -- even for require/refer/exclude/etc.


Can anyone point me to the full documentation of "directives" in a deps.edn file?

Bob B22:12:53

I think that deps.edn is technically open, so other tools could potentially get things from deps.edn that aren't used by the deps CLI itself, however I believe <> should cover the things that would be most cromulent to clojure itself


That page omits a lot of specifics about what each directive really is doing or exactly what all the directives are.

Bob B22:12:15

can you provide an example of a directive that isn't covered?


I don't know what they all are


there's no exhaustive index (on that page)


I'm left to infer things like how :exec-args interacts with :exec-fn - or how :main-opts interacts with :exec-fn among other things

Bob B23:12:57

<> mentions the exec ones being tied to -X (and based on the tool section, I guess -T by extension) and main-opts being tied to -M