Re: Amazonica and S3

2016-07-27 Thread Gareth Rogers
Thanks to a quick turn around by the mcohen01, the author, two bugs have 
been fixed with the bucket notifications and tagging :) The project docs 
(README) have been updated with examples.

On Friday, 22 July 2016 02:24:45 UTC+1, Andrea Richiardi wrote:
>
> I am glad you solved and raised the issue so that we can track that!
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Free webinar - Deep Learning: Clojure

2016-07-27 Thread Rachael Russell
Every language has many pre-defined core functions, so we can quickly get 
on building what we really want. This ease of use does come at a cost, 
though. Do we really know the power of the magic that we are wielding? 

In this webinar we will look at how to learn a language by implementing 
models of some of its key features. To put this in practice, we will be 
diving deep into Clojure, and implementing our own versions of reduce, 
count, filter, map and pmap. In doing so, we will explore some key Clojure 
functionality, including the use of recur, lazy-seq, and futures. We will 
also explore different testing methodologies to confirm that the code we 
have written behaves as we expect. The pace will start gently for those 
with little Clojure experience to follow, but will then dive deep to 
provide a full understanding.

https://attendee.gotowebinar.com/register/7591641081299503617?source=RR 

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Clojure spec screencast: Testing

2016-07-27 Thread Alex Miller
Check out the 2nd screencast about spec, this time on testing with check 
and instrument:

http://blog.cognitect.com/blog/2016/7/26/clojure-spec-screencast-testing

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Clojure spec screencast: Testing

2016-07-27 Thread Beau Fabry
With the passing test of `my-index-of`, is there any way to be confident 
that test.check generated inputs that checked the branch of the :fn spec 
where a return other than nil happened? All of the invocations of 
`exercise-fn` in the screencast only managed to get nil as a result.

On Wednesday, July 27, 2016 at 9:22:27 AM UTC-7, Alex Miller wrote:
>
> Check out the 2nd screencast about spec, this time on testing with check 
> and instrument:
>
> http://blog.cognitect.com/blog/2016/7/26/clojure-spec-screencast-testing
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


cautious wrapper for letfn that does macroexpansion on fnspecs first

2016-07-27 Thread Andrew C
letfn assumes fnspecs are all already properly shaped, like: (fn-name 
[args] body)

But it is possible that a macroexpansion is needed to get them in the right 
shape before letfn does its work, especially if the user found all his 
fnspecs were of similar shape and used a macro to eliminate boilerplate 
repetition. His fnspecs would be (name-of-macro macro-args) and would 
expand to (fn-name [args] body)

Original:

(defmacro letfn 
  "fnspec ==> (fname [params*] exprs) or (fname ([params*] exprs)+)

  Takes a vector of function specs and a body, and generates a set of
  bindings of functions to their names. All of the names are available
  in all of the definitions of the functions, as well as the body."
  {:added "1.0", :forms '[(letfn [fnspecs*] exprs*)],
   :special-form true, :url nil}
  [fnspecs & body] 
  `(letfn* ~(vec (interleave (map first fnspecs) 
 (map #(cons `fn %) fnspecs)))
   ~@body))

Macro-friendly wrapper:

(defmacro letfn'
  [fnspecs & body]
  `(letfn ~(vec (map macroexpand fnspecs)) ~body))


   1. What do you think?
   2. Is the user I mentioned above using macros wisely (use case is to 
   eliminate boilerplate code)?
   

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Clojure spec screencast: Testing

2016-07-27 Thread Stuart Halloway
Yes.  Short answer: Make a model of the input space. Coming in a future
screencast. :-)

Stu

On Wed, Jul 27, 2016 at 2:13 PM, Beau Fabry  wrote:

> With the passing test of `my-index-of`, is there any way to be confident
> that test.check generated inputs that checked the branch of the :fn spec
> where a return other than nil happened? All of the invocations of
> `exercise-fn` in the screencast only managed to get nil as a result.
>
>
> On Wednesday, July 27, 2016 at 9:22:27 AM UTC-7, Alex Miller wrote:
>>
>> Check out the 2nd screencast about spec, this time on testing with check
>> and instrument:
>>
>> http://blog.cognitect.com/blog/2016/7/26/clojure-spec-screencast-testing
>>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Clojure spec screencast: Testing

2016-07-27 Thread Rick Moynihan
These screencasts are great,

Thanks for making them; and of course working on clojure & clojure.spec! :-)

R.

On 27 July 2016 at 19:52, Stuart Halloway  wrote:

> Yes.  Short answer: Make a model of the input space. Coming in a future
> screencast. :-)
>
> Stu
>
> On Wed, Jul 27, 2016 at 2:13 PM, Beau Fabry  wrote:
>
>> With the passing test of `my-index-of`, is there any way to be confident
>> that test.check generated inputs that checked the branch of the :fn spec
>> where a return other than nil happened? All of the invocations of
>> `exercise-fn` in the screencast only managed to get nil as a result.
>>
>>
>> On Wednesday, July 27, 2016 at 9:22:27 AM UTC-7, Alex Miller wrote:
>>>
>>> Check out the 2nd screencast about spec, this time on testing with check
>>> and instrument:
>>>
>>> http://blog.cognitect.com/blog/2016/7/26/clojure-spec-screencast-testing
>>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Can we provide examples in fdef?

2016-07-27 Thread Frank Liu
Hi All,

Not sure if this is helpful or taking it too far, but often when I write a 
function, I have a few typical happy and unhappy code paths in mind. It 
would be nice if we can put that into spec's fdef. 

For example, in addition to :fn, :ret, :args, we add :examples, which is 
just array of [val1 val2 -> ret]. More concretely, for +, [[1 2 -> 3] [1.0 
2 -> 3.0]] (or however it should be defined).

Then when you run spec.test, we will also run those examples.

I think the benefits are: 1. it's a form of doc test, 2. no need to switch 
to another file to write these simple tests, 3. and since there's less 
overhead, we'd probably write more tests.

Frank

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Obtaining the call graph of a clojure project

2016-07-27 Thread Matan Safriel
Hi,

Is it possible to get information about the call graph of a project from 
the clojure compiler?
For example in Scala, one can use a compiler plugin, to tap into the AST. 
This in turn permits deriving more or less the entire call graph of the 
project, directly through the compiler, rather than by picking inside the 
byte code produced by the compiler.

What can be said about this aspect in Clojure?

Thanks!
Matan

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Obtaining the call graph of a clojure project

2016-07-27 Thread Gary Fredericks
I have a very hacky bunch of code here 

 
that uses tools.analyzer to try to do this. It works okay and I would love 
for somebody to make it better.

On Wednesday, July 27, 2016 at 5:51:03 PM UTC-5, Matan Safriel wrote:
>
> Hi,
>
> Is it possible to get information about the call graph of a project from 
> the clojure compiler?
> For example in Scala, one can use a compiler plugin, to tap into the AST. 
> This in turn permits deriving more or less the entire call graph of the 
> project, directly through the compiler, rather than by picking inside the 
> byte code produced by the compiler.
>
> What can be said about this aspect in Clojure?
>
> Thanks!
> Matan
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Obtaining the call graph of a clojure project

2016-07-27 Thread Daniel Compton
This is a slightly adjacent issue, but you can see namespace usage ordering
with lein-ns-dep-graph .

On Thu, Jul 28, 2016 at 11:42 AM Gary Fredericks 
wrote:

> I have a very hacky bunch of code here
> 
> that uses tools.analyzer to try to do this. It works okay and I would love
> for somebody to make it better.
>
>
> On Wednesday, July 27, 2016 at 5:51:03 PM UTC-5, Matan Safriel wrote:
>>
>> Hi,
>>
>> Is it possible to get information about the call graph of a project from
>> the clojure compiler?
>> For example in Scala, one can use a compiler plugin, to tap into the AST.
>> This in turn permits deriving more or less the entire call graph of the
>> project, directly through the compiler, rather than by picking inside the
>> byte code produced by the compiler.
>>
>> What can be said about this aspect in Clojure?
>>
>> Thanks!
>> Matan
>>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
—
Daniel

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Clojure spec screencast: Testing

2016-07-27 Thread Beau Fabry
Sweet. Looking forward to it. Enjoying the casts so far very quick ramp up. 
Nice work

On Wednesday, July 27, 2016 at 11:52:36 AM UTC-7, stuart@gmail.com 
wrote:
>
> Yes.  Short answer: Make a model of the input space. Coming in a future 
> screencast. :-)
>
> Stu
>
> On Wed, Jul 27, 2016 at 2:13 PM, Beau Fabry  > wrote:
>
>> With the passing test of `my-index-of`, is there any way to be confident 
>> that test.check generated inputs that checked the branch of the :fn spec 
>> where a return other than nil happened? All of the invocations of 
>> `exercise-fn` in the screencast only managed to get nil as a result.
>>
>>
>> On Wednesday, July 27, 2016 at 9:22:27 AM UTC-7, Alex Miller wrote:
>>>
>>> Check out the 2nd screencast about spec, this time on testing with check 
>>> and instrument:
>>>
>>> http://blog.cognitect.com/blog/2016/7/26/clojure-spec-screencast-testing
>>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> 
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.