This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-28
Channels
- # announcements (2)
- # babashka (36)
- # beginners (29)
- # bristol-clojurians (2)
- # calva (3)
- # cider (102)
- # circleci (7)
- # clj-kondo (5)
- # cljs-dev (7)
- # clojure (117)
- # clojure-europe (23)
- # clojure-korea (1)
- # clojure-nl (1)
- # clojure-spec (15)
- # clojure-uk (47)
- # clojurescript (43)
- # code-reviews (1)
- # community-development (1)
- # conjure (32)
- # cursive (1)
- # datalog (15)
- # datomic (14)
- # emacs (18)
- # fulcro (9)
- # helix (23)
- # jackdaw (1)
- # jobs-discuss (10)
- # meander (8)
- # membrane (57)
- # off-topic (4)
- # portal (2)
- # re-frame (22)
- # reagent (1)
- # reitit (9)
- # reveal (3)
- # rewrite-clj (14)
- # shadow-cljs (22)
- # spacemacs (27)
- # sql (34)
- # testing (6)
- # tools-deps (40)
- # vim (5)
- # vrac (15)
- # xtdb (2)
In Bulma CSS a class is called <div class="notification is-danger">
, but in reagent it is written like :div.notification.is-danger
. Why do they match? Is .
considered whitespace in a class name since you presumably cannot have a nested class? I guess the latter is true and that I realized the answer while writing the question XD
That's just syntax sugar in reagent Hiccup and its origin is CSS, not method calls. Classes in CSS are referred to using a dot and ids using #, so in Hiccup you can just do [:div.myclass.myotherclass#myid] and it will get converted to [:div {:class "myclass myotherclass ", :id "myid"}]
Thanks for the reminder. The final one is >
which I think just creates a new element ๐
Are there formatters that can turn
(cond (true? loading?) :loading
user :authenticated
:else :anonymous)
into
(cond (true? loading?) :loading
user :authenticated
:else :anonymous)
? (I use emacs btw)Note that there is a downside to this approach when it comes to version control. If you change (true? loading?) to something longer or shorter, youโll get a diff spanning three lines rather than one.
;; Indentation of function forms
;;
(setq clojure-indent-style 'align-arguments)
;;
;; Vertically align s-expressions
;;
(setq clojure-align-forms-automatically t)
;;
;; Auto-indent code automatically
;;
(add-hook 'clojure-mode-hook #'aggressive-indent-mode)
Thanks to all of you! ๐
i hit C-c <space>
and it aligned it like that for me. clojure-align
is what that is bound to for me. can probably get more clarification in #emacs
Hello everyone!
Where can I find documentation about the :forms
key of metadata map?
Is it only for documentation purposes or the compiler does something with its value?
Example of use: https://github.com/clojure/clojure/blob/38bafca9e76cd6625d8dce5fb6d16b87845c8b9d/src/clj/clojure/core.clj#L4521
they're used by doc
if they exist so it's the best place to hand-craft an arglist form if the default is not conveying what you want. this is a common need with macros which might just take a bunch of syntax that they have to parse
also note that if you supply a spec with fdef and :args, that will printed by doc
as well
just wanted to share with the community. As a clojure beginner, I've commited my first lines of Clojure in the project of the Java project of one of our customer. It's some HoneySQL code to generate test data on the development server ๐
If you continue down this path, it would be very interesting to read about it (in a blog post or such). Not only interesting by itself but it also teaches the Clojure community what is looked for when migrating systems to Clojure.
https://github.com/drewverlee/fk-gen @UPQTL73ML I made a library that might interest you. I'm sure someone else has created a more robust version.
@U0DJ4T5U1 thx. I'll check this
The problem I'm solving is that postures tables demand more information then you might care about testing.
Create an uberjar of the Clojure project and run using the java command line. This is the most common approach
java -jar project-uberjar.jar