Re: Check if value is a ring handler

2016-01-27 Thread James Reeves
On 27 January 2016 at 05:42, JvJ wrote: > Is there a way to dynamically check whether or not a given function > qualifies as a ring handler? > Nope. Clojure isn't statically typed, so you can't determine that a function always returns a value of a particular type. - James

Re: [ANN] fudje - unit testing library vaguely resembling midje, but with less 'calories'

2016-01-27 Thread dimitris
Hi Timothy, Many thanks for taking the time to look into fudje...It is nowhere near as mature as midje but I find it pretty neat and a pleasure to work with so far (apart from the 'multimock' workaround perhaps). Also, many thanks for your feedback...It seems you have misunderstood the

Re: [ANN] fudje - unit testing library vaguely resembling midje, but with less 'calories'

2016-01-27 Thread Timothy Baldridge
Thanks for taking the time to reply. Yes, let me clarify what I mean by DSL. Let's say I in my code somewhere say: (println (just 42)) What is printed in my repl is an instance of the JustChecker type. Calling (just ...) doesn't do anything on its own, it constructs am Abstract Syntax Tree

Re: Check if value is a ring handler

2016-01-27 Thread Matching Socks
(constantly nil) would work as a Ring handler. The str function also would work as a Ring handler. But it might be unclear (in a context where either a Ring handler, or a function for some other purpose, was acceptable) whether these were intended as Ring handlers -- You received this

Re: [ANN] fudje - unit testing library vaguely resembling midje, but with less 'calories'

2016-01-27 Thread Devin Walters
Based on the way I've been using midje and the way I use clojure.test, I really appreciate the middle path fudje has chosen. I don't think the DSL underneath has caused any confusion, and the team I'm working with is composed of seasoned Clojure programmers who have never used midje before.

Core functions for searching lists of values

2016-01-27 Thread cyclops
(def test-galaxy [{:quad-col 0, :quad-row 0, :sec-row 4, :sec-col 4, :type :E} {:quad-col 0, :quad-row 0, :sec-row 4, :sec-col 3, :type :base} {:quad-col 3, :quad-row 5, :sec-row 7, :sec-col 5, :type :star} {:quad-col 1, :quad-row 3,

Re: macro question

2016-01-27 Thread echigoyamontoya
Great! Thanks all for your explanations. On Wednesday, January 27, 2016 at 4:33:40 AM UTC-8, gianluca torta wrote: > > Hi Dan, > > > And, if I understand correctly, what was really happening with the macro >> bar was that in ('+ 2 'u), '+ was looking itself up in 2, not finding >> itself, and

Re: Core functions for searching lists of values

2016-01-27 Thread Jonah Benton
Hey cycl...@speakeasy.net, Jay's excellent main point is really about the use of anonymous functions- that in many cases it's an anti-pattern. Having a name for every function means that those functions become testable and that code consuming those functions stays readable. Another point is

Re: [ANN] fudje - unit testing library vaguely resembling midje, but with less 'calories'

2016-01-27 Thread dimitris
Hi again Timothy, I just got what you meant! by DSL you mean the 'free-floating' checkers right? You mean that you'd prefer to see the checkers as `assert-expr` extensions so they are recognizable by `is` yes? I'm not entirely opposed to that but that would mean one `is` per assertion, which

Re: clojurescript in clojure

2016-01-27 Thread Gregg Reynolds
On Tue, Jan 26, 2016 at 9:03 PM, Matching Socks wrote: > Is lein's project mavenry important here? Could you call cljs.compiler > directly? > You mean instead of using 'lein cljsbuild auto'? I can do that but I'm not sure how to "link" the cljs core lib. Following David

Re: clojurescript in clojure

2016-01-27 Thread Timothy Baldridge
It seems to me that there has to be a simpler approach to what you are trying to accomplish. To that end, what is your end goal, and why is "splitting the cljs into a .cljs file is not an option"? On Wed, Jan 27, 2016 at 12:08 PM, Gregg Reynolds wrote: > > > On Tue, Jan 26,

Re: clojurescript in clojure

2016-01-27 Thread Gregg Reynolds
On Wed, Jan 27, 2016 at 1:28 PM, Timothy Baldridge wrote: > It seems to me that there has to be a simpler approach to what you are > trying to accomplish. To that end, what is your end goal, and why is > "splitting > the cljs into a .cljs file is not an option"? > The end

Re: clojurescript in clojure

2016-01-27 Thread Gregg Reynolds
On Jan 27, 2016 1:57 PM, "Gregg Reynolds" wrote: > > > > On Wed, Jan 27, 2016 at 1:28 PM, Timothy Baldridge wrote: >> >> It seems to me that there has to be a simpler approach to what you are trying to accomplish. To that end, what is your end goal, and

Re: [ANN] fudje - unit testing library vaguely resembling midje, but with less 'calories'

2016-01-27 Thread dimitris
Hi Brian, Thanks for your kind words and, of course, for midje...I've been using it for years! About the AOT issues, i was mainly referring to this: https://github.com/marick/Midje/issues/274 In addition, where i work we have to package our 'harness-testing' module separately and not AOT

Re: [ANN] fudje - unit testing library vaguely resembling midje, but with less 'calories'

2016-01-27 Thread Timothy Baldridge
So a bit of constructive feedback on Fudje, firstly, I like that it's pretty simple, I can take bits I want and leave bits I don't, so good work on that. But I do have a issue with the sweet.clj syntax, and I think it's best exemplified by the code found in the intro: (testing "arg-checker in

Re: How to use plain Clojure functions in core.logic?

2016-01-27 Thread 良ϖ
Well, FYI I've figured out you just need to project the variables you want. Sorry for double-posting. However I've got no idea about how optimum this is. So please don't hesitate if you think about any more clever way to use functions in core.logic :-) 胡軒 ```clojure (let [depart-state {:a {:a

Re: What's the best option similar to Vert.x, Reactor, Nodejs for use with Clojure?

2016-01-27 Thread Fabio T.
My pleasure! Please consider that the Galaxy memory grid project, which provides integration out-of-the-box with Quasar/Pulsar actors for networking, distribution and even migration (but is not by any means the only possible one), is not considered production-ready yet at this stage even

Re: macro question

2016-01-27 Thread gianluca torta
Hi Dan, And, if I understand correctly, what was really happening with the macro > bar was that in ('+ 2 'u), '+ was looking itself up in 2, not finding > itself, and so returning the default value 'u. This was the expansion of > the macro, and so at run time, it was bound to 10. > > exactly,