] "hi mom")
(indirect-adder 1 2)
=> "hi mom" ; rather than 3
I expect there are no tricks like :dynamic true <http://blog.n01se.net/?p=134>
that work, but I thought I'd check.
-
Brian Marick, Artisanal Labrador
Contract programming in Ruby and
https://github.com/marick/Midje/blob/v.1.2-alpha3/src/midje/fakes.clj
Any ideas for either preventing AOT compiling for the jar file or fixing this
problem some other way?
-
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Occasional consulting on Agile
www.exampl
t/expect x => y) truthy
'(+ x y) falsey
'expectfalsey)
-
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Occasional consulting on Agile
www.exampler.com, www.twitter.com/marick
--
You received th
e shower. Or on long walks.
Mileage varies.
-
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Occasional consulting on Agile
www.exampler.com, www.twitter.com/marick
--
You received this message because you are subscribed to the Google
Groups "Clojure"
..
(throw-exception "hi") => (throws Error "hi")
(throw-exception "hi") => (throws Error #"h."))
You could use what's already built in, since conditions are built on top of
exceptions. Alternately, you could write condition-specific "checke
I'll be working in Zurich from 16 May through 3 June. Anyone interested in
weekend or evening Clojure hacking? Clojure user's group?
-----
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Occasional consulting on Agile
www.exampler.com, www.twitter.com/maric
ching
> key.
Thus far, I haven't seriously grappled with multimethods in Midje
(https://github.com/marick/Midje) but I've given it a little thought
(http://bit.ly/er46Dm)
I you can provide sample midje-style tests, I could add making-them-work to the
backlog.
-
Brian Marick, Ar
est(s) passed or failed. I have it on my list to make such a connection,
just because people expect it.
-----
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Occasional consulting on Agile
www.exampler.com, www.twitter.com/marick
--
You received this message because yo
(fact (severity input) => :high
(provided (error-count) =streams=> (range)))
https://github.com/marick/Midje/wiki/Using-stateful-functions-as-prerequisites
-
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Author of /Ring/ (forthco
On Mar 12, 2011, at 9:09 PM, Ken Wesson wrote:
> On Sat, Mar 12, 2011 at 7:20 PM, Brian Marick wrote:
>> http://www.vimeo.com/20963938
>
> Your sequence-decider can be simplified a bit: (mapcat rest-fn step-val). :)
Yes, but separating the map from the concat makes the e
m/20717301
http://www.vimeo.com/20798376
http://www.vimeo.com/20963938
-----
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Author of /Ring/ (forthcoming; sample: http://exampler.com/tmp/ring.pdf)
www.exampler.com, www.exampler.com/blog, www.twitter.com/marick
--
Yo
; set up the class path)? What behaves differently if you run (require
> 'clojure.contrib.condition) in the repl and "in your program"?
Thanks for the offer of help. I decided that going monadic would be cleaner.
I'll revisit this if I turn out to be wrong.
-
Brian
ts
(Or report a bug in the tracker if it turns out you were right but Midje was
wrong.)
-
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Author of /Ring/ (forthcoming; sample: http://exampler.com/tmp/ring.pdf)
www.exampler.com, www.exampler.com/blog, www.twitter.com/m
o expect.
I like semantic versioning myself, but I think considerations are different for
peripheral libraries like mine than they are for the foundational core of the
whole shebang.
-
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Author of /Ring/ (forthcoming;
not
> quite ready for a "2.0".
I agree. My gut tells me "2.0" implies promises about the ecosystem and
ease-of-adoption. Clojure 2.0 would be overpromising. Better to underpromise
and overdeliver, as they say.
-
Brian Marick, Artisanal Labrador
Contract progr
gramming
in Clojure. If that's a style you like, you may be interested in this:
http://www.vimeo.com/19404746
-
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Author of /Ring/ (forthcoming; sample: http://exampler.com/tmp/ring.pdf)
www.exampler.com, www.examp
On Feb 8, 2011, at 8:01 AM, Stuart Halloway wrote:
>
> Please let us know when you get a misleading error message from a
> macroexpansion, so we can make it better. Or contribute a patch along the
> lines of [2].
>
What medium is best?
-----
Brian Marick, Artisanal La
mpiling or something else I'm doing wrong.
Please enlighten.
-----
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Author of /Ring/ (forthcoming; sample: http://exampler.com/tmp/ring.pdf)
www.exampler.com, www.exampler.com/blog, www.twitter.com/marick
--
You receiv
how to migrate from clojure.test to Midje:
http://www.youtube.com/watch?v=a7YtkcIiLGI (8 minutes)
The entry point to the documentation is here:
https://github.com/marick/Midje/blob/master/README.md
Thank you.
-
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Author of
In the absence of #'record?, what's the safest way to tell whether a particular
object is a true map or a record?
-----
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Author of /Ring/ (forthcoming; sample: http://exampler.com/tmp/ring.pdf)
www.ex
On Jan 18, 2011, at 11:29 AM, Brian Marick wrote:
> f this were my problem, I'd wonder if I could make the computation accept
> functions. Then you could do something like this:
That was a lame solution except in the special case where the first element
must be computed. Here
om!")))]
(first (sprout-maker explosive-seed)) => identity-sprout?
(second (sprout-maker explosive-seed)) => (throws Error #"Boom")))
-
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Author of /Ring/ (forthcoming; sample: http://exam
I'm working on a short book on Ring for the Pragmatic Bookshelf. The first two
chapters are here:
http://exampler.com/tmp/ring.pdf
If you'd like to be a reviewer, send me mail.
-----
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Author of /Ring/ (forthcomi
On Jan 16, 2011, at 12:55 PM, Alan wrote:
> list* consumes its last argument lazily, which means it can't count it
That is indeed what it does. seq* would have been a better name. Too late now,
I guess.
-----
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
A
movies.core> (list? (apply list (map identity [1 2 3])))
true
Makes sense to me!
movies.core> (list? (list* (map identity [1 2 3])))
false
Huh?
-
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Author of /Ring/ (forthcoming; sample: http://
n use checkers within checkers:
user> (fact {:a 1 :b 3 :c 5} => (just {:a odd? :b odd? :c odd?}))
true
... and so on. You can find a complete description here:
https://github.com/marick/Midje/wiki/Checkers-for-collections-and-strings
-
Brian Marick, Artisanal Labrador
Contract programmin
ork as well.
Midje isn't a superset of the features of other clojure.test alternatives. For
example, it doesn't have the auto-runner that LazyTest does, and it doesn't
have the trimmed stack traces of Expectations. I plan to keep stealing ideas,
though.
-
Brian Marick,
h...) => anything
>(provided
> (undo-fn ...patch...) => (fn [] (reset!
> visible-evidence-of-a-side-effect :happened!))
> (remove-patch ...patch...) => :nothing-of-interest)
>@visible-evidence-of-a-side-effect => :happened!))
-
Brian Marick, Artisanal Lab
nce-of-a-side-effect
:happened!))
(remove-patch ...patch...) => :nothing-of-interest)
@visible-evidence-of-a-side-effect => :happened!))
1855 $ lein midje midje.util.git
All claimed facts (2) have been confirmed.
1856 $
-
Brian Marick, Artisanal Labrador
Contract programmin
and change old tests to the new format at your leisure.
(The downside is that if you want the test summaries to be right, you have to
wrap the Midje tests in #'deftest. Otherwise fact successes and failures aren't
counted when you do 'lein test'.)
-
Brian Marick, Arti
that they become terser.)
I find the test failures easier to interpret, especially when I use "chatty
checkers" (which was inspired by Phlip's assert{2.0} for Ruby
http://www.oreillynet.com/ruby/blog/2008/02/assert2.html)
-
Brian Marick, Artisanal Labrador
Contract prog
that makes sending a
single fact to the repl work better.)
The whole story about "backgrounds" is here:
https://github.com/marick/Midje/wiki/Setup%2C-Teardown%2C-and-State
https://github.com/marick/Midje/wiki/Background-prerequisites
-
Brian Marick, Artisanal Labrador
Contract prog
own:
(fact
(against-background (before :checks (swap! test-atom (constantly 0
(swap! test-atom inc) => 1
(swap! test-atom dec) => -1)
(background (around :facts (sql/with-connection db ?form)))
I've worked up an emacs interface, and there are features I
ntln (name symbol))) '(a b c)))
That will produce this output:
a
b
c
(nil nil nil)
(See also #'dorun.)
-
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Author of /Ring/ (forthcoming; sample: http://bit.ly/hfdf9T)
www.exampler.com, www.exampler.com/blog,
ess-than 5))
Then an implementation of fact that was (repeatedly (constantly arg)) would
silently spin forever.
-
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Author of /Ring/ (forthcoming; sample: http://bit.ly/hfdf9T)
www.exampler.com, www.exampler.com/blog, ww
je applies an #'eagerly function before checking. (Note: I found
that #'doall isn't always enough, because you can be bitten in the same way by
laziness in nested expressions, so #'eagerly walks the whole tree, not just the
top level.)
-
Brian Marick, Artisanal Labrador
On Dec 5, 2010, at 3:32 PM, Alex Osborne wrote:
>>
>> Is there any way to get the original call form? Something like &env? Some
>> hook into the reader?
>
> Try &form
I should have guessed. Thanks.
-
Brian Marick, Artisanal Labrador
Contract programmi
to get the original call
form? Something like &env? Some hook into the reader?
-
Brian Marick, Artisanal Labrador
Contract programming in Ruby and Clojure
Author of /Ring/ (forthcoming; sample: http://bit.ly/hfdf9T)
www.exampler.com, www.exampler.com/blog, www.twitter.com/marick
--
sweet" syntax, which is built on top of a plain functions-and-maps
interface.)
-
Brian Marick, independent consultant
Mostly on agile methods with a testing slant
Author of /Programming Cocoa with Ruby/
www.exampler.com, www.exampler.com/blog, www.twitter.com/marick
--
You received this
ll be at the hotel around the same time, would be happy to join.
-
Brian Marick, independent consultant
Mostly on agile methods with a testing slant
Author of /Programming Cocoa with Ruby/
www.exampler.com, www.exampler.com/blog, www.twitter.com/marick
--
You received this message because
t;) => "301")))
I do that in Midje's tests for itself.
-
Brian Marick, independent consultant
Mostly on agile methods with a testing slant
Author of /Programming Cocoa with Ruby/
www.exampler.com, www.exampler.com/blog, www.twitter.com/marick
--
You received this message because
ust maturing now but I found his blog posts illuminating.
I'll be doing a talk on this at Strange Loop, and would also be happy to show
people at clojure-conj.
-
Brian Marick, independent consultant
Mostly on agile methods with a testing slant
Author of /Programming Cocoa
the interpreter, I'll have it annotate it
with the correct line numbers. That way, a simple keyboard gesture will take me
to the failing line.
Better ideas for fallbacks?
-
Brian Marick, independent consultant
Mostly on agile methods with a testing slant
Author of /Programming C
ays thought it to be good style to make helper functions only as
> visible as needed, e.g. by using letfn.
>
> But when I want to test my code, I just dont see a way to access these
> local functions for tests.
-
Brian Marick, independent consultant
Mostly on agile methods with
Well, I'll be there even though they've inexplicably scheduled the birthday
party for the day before my birthday.
-----
Brian Marick, independent consultant
Mostly on agile methods with a testing slant
Author of /Programming Cocoa with Ruby/
www.exampler.com, www.example
I've written a short tutorial for clojure.zip:
http://www.exampler.com/blog/2010/09/01/editing-trees-in-clojure-with-clojurezip/
-
Brian Marick, independent consultant
Mostly on agile methods with a testing slant
Author of /Programming Cocoa with Ruby/
www.exampler.com, www.exampler.com
also my birthday. I like chocolate "money
cake" with 1 quarter, 2 dimes, 2 nickels, and 10 pennies baked in. Thanks!
-
Brian Marick, independent consultant
Mostly on agile methods with a testing slant
Author of /Programming Cocoa with Ruby/
www.exampler.com, www.exampler.com/blog, w
change my mind again.
-
Brian Marick, independent consultant
Mostly on agile methods with a testing slant
Author of /Programming Cocoa with Ruby/
www.exampler.com, www.exampler.com/blog, www.twitter.com/marick
--
You received this message because you are subscribed to the Google
Groups "
I have a need to catch and handle all Java Throwables except those used by
c.c.error-kit. I can identify an error-kit throwable like this:
(re-find #"^Error Kit Control Exception" (.toString e)))
That does not fill me with joy. What's the right way to do it?
-----
Brian Mari
201 - 249 of 249 matches
Mail list logo