This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-28
Channels
- # admin-announcements (1)
- # aws (2)
- # beginners (21)
- # boot (28)
- # braid-chat (1)
- # cider (51)
- # cljs-edn (7)
- # cljsjs (35)
- # cljsrn (2)
- # clojure (85)
- # clojure-chicago (7)
- # clojure-czech (1)
- # clojure-gamedev (3)
- # clojure-poland (2)
- # clojure-russia (80)
- # clojure-sanfrancisco (1)
- # clojure-uk (5)
- # clojurebridge (9)
- # clojurescript (68)
- # cursive (29)
- # datomic (23)
- # emacs (2)
- # hoplon (94)
- # jobs-discuss (15)
- # juxt (2)
- # liberator (2)
- # luminus (16)
- # mount (12)
- # off-topic (7)
- # om (57)
- # onyx (58)
- # proton (10)
- # re-frame (9)
- # reagent (38)
- # remote-jobs (2)
- # rum (12)
- # untangled (136)
It sounds like you’ve got 2 web servers, is that correct? One accepting outside requests which forwards to a VHOST which is another?
.. am I also right in thinking that PHP doesn’t usually have this architecture because it’s a module INSIDE the web server?
Say I have a vector of maps [{:key :A01, name: "Foo"} {:key :B01, name: "Bar"}]
and I want to pull out of that vector only the map entry that has a specific key, what's the way in Clojure to do this? I've tried (get-in my-data :B01)
, but getting Don't know how to create ISeq from Keyword error.
@dharrigan: lookup filter
, it filters a seq based on a predicate, which is basically what you want.
get-in
is used to retrieve a value inside one nested map.
e.g:
(get-in {:a {:b 1}} [:a :b])
=> 1
In your case, if I understood what you want to do (filter elements of a vector with a specific value for a key), you could do (as @sveri suggested)
(filter #(= "Bar" (:name %))
[{:key :A01, :name "Foo"} {:key :B01, :name "Bar"}])
=> ({:key :B01, :name "Bar”})
BTW, your map was not an correct clojure map (key name:
should be :name
)@bones: I don't know how PHP deployment works, but yes that's the idea of it for clojure.
@codonnell: I did quotation cause at the way I’m aware of deploying PHP is FTP ha ha
ah, I see
I don’t think even PHP guys deploy using FTP anymore
oh, just saw you were talking more about pages
then FTP can be ok 😄
Hey, this is really good https://rasterize.io/blog/clojure-the-good-parts.html