This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aatree (23)
- # admin-announcements (13)
- # announcements (3)
- # beginners (49)
- # boot (50)
- # braid-chat (1)
- # braveandtrue (37)
- # cider (72)
- # cljs-dev (25)
- # cljsjs (6)
- # cljsrn (37)
- # clojure (78)
- # clojure-berlin (8)
- # clojure-greece (1)
- # clojure-ireland (2)
- # clojure-madison (14)
- # clojure-new-zealand (2)
- # clojure-poland (10)
- # clojure-russia (149)
- # clojured (2)
- # clojurescript (49)
- # community-development (6)
- # core-async (37)
- # cursive (1)
- # data-science (1)
- # datomic (30)
- # emacs (4)
- # euroclojure (1)
- # funcool (1)
- # graclj (1)
- # hoplon (17)
- # jobs (2)
- # jobs-rus (45)
- # ldnclj (6)
- # mount (12)
- # off-topic (124)
- # om (270)
- # onyx (131)
- # parinfer (70)
- # perun (2)
- # proton (168)
- # re-frame (32)
- # reagent (29)
- # ring-swagger (8)
- # testing (9)
- # yada (39)
Can someone recommend a test framework? I'm somewhat new to testing (I've used expectations a little in the past). I am aware of names like clojure.test, Midje, and Expectations
@michael_at_sosupper: I use the basic clojure.test and you should really take a look in clojure.test.check
Hi! Where can I see example of transducer with internal state and cleanup? I am using async/pipeline fn with transducer to take page screenshots and want to cleanup browser windows.
ha, according to https://github.com/matthiasn/talk-transcripts/blob/master/Hickey_Rich/InsideTransducers/01.00.31.jpg I can't use state with pipeline
@michael_at_sosupper: where I work we've used midje extensively. It's great although things do sometimes get rather involved once you get into complex situations; perhaps that's just us though!
@mdaley: Thanks. Sometimes it's hard to tell what tools/packages are actually being used (and are worth learning)
@michael_at_sosupper: I think we have around 100 RESTful services in our system that are pretty much all testing through a combination of midje and things like this - https://github.com/whostolebenfrog/rest-cljer - which allows us to do isolated acceptance testing. So, used extensively, but some people at work are starting to question its 'lack of composabiity' and are working on an alternative idea.
@mdaley: interesting. sounds like it's worth a look for me. What I'm doing is small for now
@michael_at_sosupper: all the approaches work, although I've found midje more useful for our purposes. Hope it works out!
I'm trying to write a macro to unwrap a list. for example (unwrap (1 2 3)) should give 1 2 3. I dont know how to do this
Haven't tried it but this is a possible light weight alternative: https://github.com/tolitius/mount
I’d recommend you try out both to see what suits your use case. They both have strengths and weaknesses.
I need to give it a solid look. We have our own start/stop rigged up but it is a little bit hairy.
(var (first (second `[foo (bar 1)]))) CompilerException java.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to clojure.lang.Symbol
> The symbol must resolve to a var, and the Var object itself (not its value) is returned. The reader macro #'x expands to (var x).
in case there's an easier way to achieve what i'm doing... I have a macro that defines special functions and I am adding a key to the metadata of the definition so that i could (in theory) read it back out and do a basic form of type checking
so I have something that expands to roughly:
`(def ~(vary-meta name assoc :equation true) (fn  ..))
Does the answer below the accepted clear it up for you? http://stackoverflow.com/a/5596183
I don’t know your use case but if it were me I would make something simpler like a map that had a
type key and a
but i'm just having trouble getting from a form in a macro to something that
var doesn't explode on
var is a special form which means something akin to “the normal rules of evaluation are different”.
var expects a symbol and does not evaluate what is passed to it. Something like this
(let [x '(foo 1) x' (symbol (first x))] (var x’)) may be required.
I did something similar recently but I’m having trouble finding the code to see if it really was tangential,.. or I’m just crazy
seems like I was doing dynamic lookups for namespaces… not exactly the same. I don’t think I’ll be much help after all 😞
For those following along, this is the final function that works:
(defn is-eq [func] (:equation (meta (eval (into () [func 'var])))))
I'd like to convert HTML documents to PDFs. I don't see any Clojure solutions for this. Has anyone use this? https://github.com/flyingsaucerproject/flyingsaucer Thoughts?