This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-20
Channels
- # alda (2)
- # beginners (6)
- # boot (25)
- # cider (10)
- # clojars (5)
- # clojure (81)
- # clojure-brasil (1)
- # clojure-dev (2)
- # clojure-russia (19)
- # clojure-spec (21)
- # clojure-uk (69)
- # clojurescript (23)
- # code-reviews (15)
- # cursive (3)
- # datavis (1)
- # datomic (8)
- # euroclojure (3)
- # events (5)
- # flambo (15)
- # hoplon (17)
- # jobs-rus (13)
- # lambdaisland (50)
- # mount (5)
- # off-topic (3)
- # om (1)
- # parinfer (72)
- # proton (1)
- # protorepl (1)
- # re-frame (17)
- # reagent (59)
- # videos (1)
@dpsutton Alex’s assertion carries over to ClojureScript. Here is what that looks like with :repl-verbose
enabled so you can see the JavaScript is the same:
cljs.user=> (let [x 1]
#_=> (let [y 2]
#_=> (+ x y)))
Evaluating Expression
(function (){var x = (1);
var y = (2);
return (x + y);
})()
3
cljs.user=> (let [x 1
#_=> y 2]
#_=> (+ x y))
Evaluating Expression
(function (){var x = (1);
var y = (2);
return (x + y);
})()
3
how do i load edn-file only on initialization of an application? more specifically — i want to serve a file on each request to my server, but see no reason to load it from disk on every req
(def edn-contents (slurp ( "path/to/file.edn")))
(defn handler [req]
{:status 200
:body edn-contents})
thanks! does edn-contents
invoked only once?