This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # admin-announcements (8)
- # beginners (28)
- # boot (2)
- # bristol-clojurians (4)
- # cider (12)
- # clojure (177)
- # clojure-android (23)
- # clojure-canada (1)
- # clojure-dev (21)
- # clojure-italy (27)
- # clojure-korea (1)
- # clojure-russia (20)
- # clojure-spain (1)
- # clojurebridge (11)
- # clojurescript (156)
- # core-matrix (1)
- # cursive (2)
- # datomic (39)
- # events (1)
- # hoplon (13)
- # immutant (4)
- # jobs (1)
- # ldnclj (13)
- # luminus (2)
- # melbourne (25)
- # off-topic (9)
- # onyx (13)
- # re-frame (110)
- # reagent (5)
@andre.richards: I've already left chat last time when you answered my question about "how to start in clojure", but I got your message and just want to thank you for advise.
Has anyone seen a qr code generator (for clj or java) with the ability to embed a logo into the qr code?
I guess, what I can do is create a QR code and on top of it draw the logo image of the company
zxing looks like the way to go. https://skrymerdev.wordpress.com/2012/09/22/qr-code-generation-with-zxing/
ahh, someone was even nice enough to make this: https://github.com/killme2008/clj.qrgen
i trying to optimize my workflow, can any one suggest how i can map stack trace to sources in vim ?
https://gist.github.com/mpenet/5231071c9f8217d13fd3 oddness or something I misunderstood?
lein immutant war builds the jar, then downloads this stuff
then creates a war
Retrieving org/immutant/wildfly/2.0.0/wildfly-2.0.0.pom from clojars Retrieving org/clojure/tools.nrepl/0.2.7/tools.nrepl-0.2.7.pom from central Retrieving org/projectodd/wunderboss/wunderboss-wildfly/0.6.1/wunderboss-wildfly-0.6.1.pom from central Retrieving org/projectodd/wunderboss/wunderboss-wildfly/0.6.1/wunderboss-wildfly-0.6.1.jar from central Retrieving org/clojure/tools.nrepl/0.2.7/tools.nrepl-0.2.7.jar from central Retrieving org/immutant/wildfly/2.0.0/wildfly-2.0.0.jar from clojars
ericnormand: the war step resolves those directly, and they aren't visible at
lein deps time
but you could add a profile that adds
[org.immutant/wildfly "2.0.0"] to
:dependencies, and you can then do
lein with-profile +war-deps deps
Is there a better way than this (keyword (str (name (:name the-keyword)) "-panel”)) to add -panel to a keyword, so that :home turns into :home-panel.
(keyword (str (name :foobar) "-panel")) right? I can't think of anything shorter
(-> :foobar name (str "-panel")) is more readable, but it's missing a keyword call, and I like to not thread the first call:
(-> (name :foobar) (str "-panel") keyword)
not sure, but I guess it's because the idea of the threading macro is to unwrap nested calls so they can be read as "transformation steps"... unwrapping the first call gives an additional step for my brain to interpret
this is especially true with short calls like
(name :foobar)... if it's a map/reduce/etc with a long (or not so long) fn as first param, I will probably do:
(->> coll (map #(some big fn on %)) (filter some-pred) first)
@swizzard: it's sometimes fewer lines too (but not in this case)... it's aesthetics, so it depends
hello all, just a quick note that the Clojure/conj CFP has been pushed back a week and will now close Aug 21st https://cognitect.wufoo.com/forms/clojureconj-2015-call-for-presentations/ - would love to have submissions re Clojure or ClojureScript use, libraries, experience reports, etc
Does anyone use Ember with Ember Data? Is there something similar to jsonapi-resources for clojure?
Looks like you need reflection: http://stackoverflow.com/questions/1696693/clojure-how-to-find-out-the-arity-of-function-at-runtime
(reduce conj m0 m) will work on a vector or a hash-map (and is the simple part of the definition of into)
I’m working with some things that are very similar to transducers… maybe I should just figure out how to represent them as transducers exactly and steal all that machinery
I mean you seem to be describing
(fn [f] (map (fn [e] (if (map-entry? e) [(first e) (f (second e))] (f e))))
(defn map-entry? [e] (or (instance? clojure.lang.MapEntry e) (and (vector? e) (= 2 (count e))))) (defn updating [f] (fn [col] (->> (map (fn [e] (if (map-entry? e) [(first e) (f (second e))] (f e))) col) (into (empty col)))))
if we generalize the first type to
[a i -> o] then these have types
[[a i -> x] [a x -> o] -> [a i -> o]] and
[[a i1 -> o1] [a i2 -> o2] -> [a [i1 i2] -> [o1 o2]]]
(defn par "Produce an action over maps from a map of actions. If an action returns nil then it is excluded from the output map. Map keys which have no corresponding action are passed through untouched." [as] (fn [ev m0] (persistent! (reduce (fn [m e] (let [v0 (get m0 k) v1 (f ev v0)] (if v1 (assoc! m k v1) (dissoc! m k)))) (transient m0) as))))
arrdem: testing for two element vectors (or even map entry instance) leads to weird corner cases. Why not just be a functor and switch behavior by collection type not element type?
noisesmith: yeah you could do that too... in my mind this is a mapping that's variant on the type of the elements of the seq being mapped over (the special case being whatever the type of a map pair is, otherwise just the elements). You're right that would behave a lot better.
tel: not literally in the haskell sense, just sharing that aspect of dispatching what it does in a way that is appropriate for the collection type - I'm using the term quite loosely
multimethods can express arbitrary open dispatch, but protocols are much more efficient for open single dispatch
(In this case you were inspecting that it was a vector and the size of the vector too, in the case that the vector is a mapentry)
but you can’t really do typeclasses without a type system and prolog to pipe around your vtables, ha
I don't really want to dig too far into re-frame, but what does "define state transitions in time via reducers" mean?
there are a few ways of looking at it… the easiest is just to note that all of the “event emitters” and “dispatchers” and things are doing a lot of inversion of control
if you’ve got a stream of events then
(map (fn [e] (fn [s] (reducer e s))) events) is a stream of functions