This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-05
Channels
- # architecture (2)
- # aws (1)
- # bangalore-clj (4)
- # beginners (97)
- # boot (35)
- # cider (8)
- # cljsjs (3)
- # cljsrn (35)
- # clojure (190)
- # clojure-dusseldorf (4)
- # clojure-italy (7)
- # clojure-poland (1)
- # clojure-russia (17)
- # clojure-spec (74)
- # clojure-uk (30)
- # clojureremote (2)
- # clojurescript (298)
- # code-reviews (18)
- # component (18)
- # cursive (18)
- # datascript (3)
- # datavis (2)
- # datomic (24)
- # dirac (17)
- # emacs (3)
- # garden (7)
- # hoplon (51)
- # jobs (2)
- # jobs-rus (2)
- # leiningen (4)
- # luminus (11)
- # mount (24)
- # off-topic (1)
- # om (32)
- # onyx (25)
- # pedestal (1)
- # powderkeg (9)
- # protorepl (6)
- # re-frame (11)
- # reagent (15)
- # spacemacs (6)
- # sql (35)
- # uncomplicate (1)
- # unrepl (74)
- # untangled (130)
- # yada (6)
Bore da
Morning!
clojure.core function of the day: inst-ms "Return the number of milliseconds since January 1, 1970, 00:00:00 GMT”
Morning
it takes an inst as an arg
Is there a bot in this slack group for executing Clojure code snippets?
so not the current time... but the number of mseconds since epoch of the inst you give it?
@yogidevbear yep - clojurebot which you send messages too using /clj
ok silly question... I have a key in one file: ::db
how do I use that from a different file (that I have required
?)
@thomas ::foo
is a reader macro that simply expands to the value of (keyword (ns-name (the-ns *ns*)) "foo")
so from another namespace just write :foo/foo
directly or if you have (:require [foo :as f])
you can ::f/foo
ok.. I watched Eric Normands Clojure/West talk last night and now I am trying to do something similar with my project...
what is the best way to generate a maps with a set number of keys... but varying values?
I haven’t seen the talk but that sounds like a job for Spec’s generators?
or just manually: (apply hash-map (interleave [:a :b :c] (repeatedly rand)))
?
do you mean :spec/db
(with a single :
)?