This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-17
Channels
- # aws (16)
- # beginners (82)
- # boot (29)
- # cider (43)
- # cljs-dev (90)
- # cljsrn (14)
- # clojure (79)
- # clojure-dev (12)
- # clojure-greece (4)
- # clojure-italy (12)
- # clojure-russia (81)
- # clojure-shanghai (1)
- # clojure-spec (39)
- # clojure-uk (28)
- # clojurescript (159)
- # consulting (1)
- # cursive (16)
- # data-science (6)
- # datomic (18)
- # devops (3)
- # emacs (22)
- # figwheel (1)
- # graphql (15)
- # hoplon (3)
- # jobs (1)
- # jobs-discuss (8)
- # leiningen (1)
- # luminus (6)
- # lumo (1)
- # off-topic (18)
- # om (6)
- # onyx (38)
- # pedestal (30)
- # perun (3)
- # re-frame (38)
- # reagent (8)
- # ring-swagger (2)
- # rum (2)
- # sql (2)
- # unrepl (14)
- # untangled (1)
- # vim (8)
FYI: I started a consultants directory…. its pretty sparse at the moment…. http://clojureconsultants.org
I really wish there was a wiki of some sort so things like this could be pinned rather than vanish into the 10k limit archive
I got an weird issue, that Leiningen REPL evaluation very slow in large data structure. Here is the link in #cider https://clojurians.slack.com/files/stardiviner/F5DSLRF0R/CIDER_evaluation_spend_too_long_time.clj
Someone DM’d me about my plans for http://clojureconsultants.org … I dont have any big plans really. I’m just trying to find work. I thought it would be neat if work could just find us. I think it the site would be helpful when googling for clojure engineers. It might be a fools errand.
@qqq I’m expecting that google will find and rank the page… but yea, this 10k limit is kinda ghetto… slack is pricy for “standard” aka unlimited $8/per user per month
a few years down the line, slack is going to have to buy out a competitor for hundereds of millions of dollars
becuase someone on some open source channel said 'fuck it; this 10k likmit sucks for open soue projects; I'm writing an alternative"
clojure map question. There are a couple of clojure 'lazy map' implementations out there which allow you to lazy evaluate or calculate the values in a map when the values are requested. I'm looking for a way to manage missing keys in a similar way, i.e. if a key is not found I would like to call a function to determine what should be returned and or if that key / value should be added to the map on the fly
@tatut I need to return a map from a function, not sure if memoize is applicable in that scenario?
@tatut ah, worldview mutated...thanks for the alternate perspective. It is probably not asserted to be a map so this might be viable
@mpenet found the potemkin option https://gist.github.com/bmabey/5779423 thanks for the reference
I used (html/select (buscar-tags-nfe) [(html/attr-starts :class "linha")])
, but I want to select only the :td that class starts with "linha", not all tags
@fabrao [[:td (html/attr-starts :class "linha")]]
, outermost vector denotes descendance, nested vectors means “and”.
I should rephrase. Is there a build-in function of the following form (x pred? item) which is equivalent of (when (pred? item) item) ?
no, but it’s very easy to write
the hardest part is naming the function
it's better not to write that function, imho. readability is usually the tradeoff for concision
(defn when-pred [pred? x] (when (pred? x) x))
(when-pred even? 10)
is how I do itit mostly exists for usage in eg. ->> where it’s nice not to have to use the arg twice
even more specifically, inside some->>
- the two together make things much more elegant
(some->> request-data (when-pred well-formed?) (api-call) (usable-result?) (frob))
some->>
macro threads, which mean after passing it through the predicate we no longer have access to the original value
@lambder that’s the point of when-pred - it returns the item if the pred was truthy
and usable-result?
(or really it’s equivalent in my real code) returns item if usable, otherwise nil
I shouldn’t have given my fake-example-function a name ending in ?, my bad
Whenever I run lein test-refresh a file .lein-env is created that has the config options for my test DB. Later if I do lein run it picks up the db config from .lein-env which is wrong. What generates this .lein-env file and how can I stop it from being created?
@dealy That isn’t a test-refresh thing. Quick search for .lein-env
pulls up environ library and config. https://github.com/weavejester/environ https://github.com/yogthos/config
@dealy Luminus uses cprop https://github.com/tolitius/cprop
and .lein-env is generated by lein-cprop https://github.com/luminus-framework/lein-cprop
I used to believe that HTTP GET requests contained a map of "key-vaule" pairs. However, I'm looking at : http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getParameterMap() It appears that GET requests contains a map of "string, LIST-OF-STRING" instead of "string, string" pairs.