This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-28
Channels
- # announcements (2)
- # beginners (19)
- # calva (8)
- # cider (5)
- # cljsrn (13)
- # clojure (35)
- # clojure-conj (3)
- # clojure-spain (1)
- # clojure-uk (2)
- # clojurescript (4)
- # clojutre (4)
- # cursive (13)
- # data-science (2)
- # datascript (1)
- # datomic (5)
- # duct (4)
- # fulcro (76)
- # funcool (5)
- # jobs (5)
- # off-topic (10)
- # remote-jobs (7)
- # rewrite-clj (8)
- # spacemacs (3)
- # sql (2)
- # xtdb (25)
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.
(ns
(:require [my.components :as components]))
So that I can use components/input
components/label
instead of :require
ing each componentYes, you can do that, but it’s a manual process which looks something like this:
(ns your.ns.core
(:require
[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
(:require
[comp.a :as a]
[comp.b :as b]))
(defn a
"docs"
[]
a/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.
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 am using this pluggin, https://github.com/lambdaisland/metabase-datomic 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!
@services https://github.com/boot-clj/boot/wiki/Configuring-Boot talks about this...
".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).