Fork me on GitHub
Christian Barraza16:09:35

Is there an easy way to pass a list as an argument, but not as a list, but rather its individual elements?


In javascript it is a common pattern to have index.js in a directory which just exports other modules within that directory. Eg. components/index.js exports components/my-component.js Is this possible in clojure? What I’m trying to accomplish is that just require components namespace.

  (:require [my.components :as components]))
So that I can use components/input components/label instead of :requireing each component


Yes, you can do that, but it’s a manual process which looks something like this:

(ns your.ns.core
    [comp.a :as a]
    [comp.b :as b]))

(def a a/a)
(def b b/b)

; ...and so on
Then you could have one ns which allows you to import everything from it. The downside of the above approach is you IDE tooling will not work as you expect, a from your.ns.core will not have docs associated when you interact from the repl etc. So one way around this is to manually specify components in your index ns like
(ns your.ns.core
    [comp.a :as a]
    [comp.b :as b]))

(defn a 

; ...and so on


Hi @U6GNVEWQG thank you for taking the time and showing example. It seems like its not worth it applying this pattern. Yes?


I feel that it can be, yes, and we structure some of our libraries like this at work.


Oh great. It’s not that bad I guess so 😄


But repeating the doc is what I don’t like


Its hard to explain without code, but the docstrings are not repeated. They live in the entry ns. Everything else is implementation details.


Oh ok. It’s like defining an interface in the entry ns with the docs. and implementation in the other files


I'm trying without sucess to configure a datomic database with metabase


I am using this pluggin, but cannot find a way to proper configure the edn file


I have an in-memory database and I keep receiving "unable to connect to database" error messages


Hi there… I'm using Emacs with CIDER and boot as a build tool. Sometimes I get exceptions such as: java.nio.file.NoSuchFileException: styles/.#styles.clj I do have a source file styles.clj, but not .#styles.clj To me this looks like the watch task detects the creation of Emacs' autosave files and since they're on my source path boot wants to load them. Autosave files are of the fleeting type of course and then end up missing. Any other ideas as to what may be causing this or how to fix it? Thanks!


".bootignore controls construction of the initial boot-fileset. Files matching the regexes in .bootignore will be excluded. For example, to ignore emacs backup files, .bootignore should contain .*~$. To ignore transient emacs files, add ^\.# and /\.#."


@seancorfield Hi, many thanks for helping me out once again! That should solve it…It didn't happen all that often and actually my workflow is quite smooth by now… I'm totally hyped by the language!


Cool. I personally do not like "watch" workflows. I don't want to have to switch out of my editor/REPL setup to see code being compiled or tests being run. I do all my updates from the editor via the REPL -- a very tight RDD workflow.


I also run tests from my editor/REPL combo during my regular development and only run "test suites" from the command line occasionally (e.g., before pushing a feature to a branch).