This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-09
Channels
- # aleph (1)
- # announcements (4)
- # asami (6)
- # babashka (45)
- # beginners (19)
- # biff (3)
- # calva (35)
- # cider (4)
- # clojars (5)
- # clojure (117)
- # clojure-art (3)
- # clojure-denmark (2)
- # clojure-europe (89)
- # clojure-gamedev (5)
- # clojure-nl (4)
- # clojure-norway (17)
- # clojure-spec (3)
- # clojure-uk (5)
- # clojurescript (84)
- # conjure (13)
- # datomic (11)
- # emacs (2)
- # figwheel (2)
- # fulcro (16)
- # graphql (5)
- # honeysql (7)
- # introduce-yourself (1)
- # lsp (86)
- # malli (16)
- # music (1)
- # off-topic (2)
- # pathom (14)
- # polylith (28)
- # re-frame (11)
- # reagent (23)
- # releases (1)
- # reveal (19)
- # shadow-cljs (72)
- # spacemacs (13)
- # sql (1)
- # test-check (3)
- # timbre (4)
- # tools-deps (45)
- # vim (18)
Style guidance wanted:
is defining global functions through composition e.g. (def foo (comp b->c a->b))
bad style and should I use the more verbose defn instead for that purpose?
Information about the inner function’s signature is lost in cursive it seems.
that is completely fine. To preserve signature you could copy metadata of rightmost composed function (in your example a->b
) to foo
(def ^{:arglists (:arglists (meta #'a->b))} foo
(comp b->c a->b))
That’s very useful thanks!
Hello everyone! Is there a clean way in Clojure to check if a string is plural or singular?
I don’t think something like this is built-in. There are many irregular plural forms in english. If something like this exists, it would be a library.
You might be able to wrap a Java library such as this: https://github.com/atteo/evo-inflector
Ty for the fast reply! figured that it'd be problematic but wanted to make sure I wasn't missing anything due to my faulty googling skills :') Cheers!
Hi How Can I convert string representing a date to its long value?
Epoch time
(-> "09-03-2022"
(LocalDate/parse (DateTimeFormatter/ofPattern "dd-MM-yyyy"))
(.atStartOfDay)
(.toInstant ZoneOffset/UTC)
(.getEpochSecond))
=> 1646784000
Thanks
Hi guys, hope your are doing good. Currently looking in functional programming and interested in learning clojure, i wanted to know if you have any book recommendation where functional programming concepts are included?
Most intro Clojure books probably include this to some degree, certainly Programming Clojure does
Not all of it is relevant to Clojure, but I LOVED the Manning book Functional Programming in Scala. I don't even do any Scala, but I thought it taught some really good FP concepts better than any other book I've tried, in a language agnostic way.
https://www.braveclojure.com/clojure-for-the-brave-and-true/ is a great read and has a few chapters explicitly on functional programming :thumbsup:
I think Grokking Simplicity by @U050P0ACR is great