Re: ? stateful-map ?

2022-11-27 Thread Sam Ritchie
Pretty sure what you’re looking for is either 
https://clojuredocs.org/clojure.core/reductions or something close. This idea 
is called a “scanLeft” in some functional languages, so that should give you 
another search term to use. Good luck!

On Sun, Nov 27, 2022, at 12:00 PM, Jules wrote:
> Guys,
> 
> I've found myself needing a function that I am sure cannot be an original but 
> I'm not aware of it existing anywhere...
> 
> It is a cross between 'map', 'reduce' and 'iterate'...
> 
> Given a function 'f' and a sequence 's' it would return you  a sequence of :
> ```
> [(f s[0]) (f (f s[0]) s[1]) (f (f (f s[0]) s[1]) s[2]) ...]
> ```
> 
> or, more concretely, e.g.:
> ```
> util-test> (stateful-map + [0 1 2 3 4 5])
> [0 1 3 6 10 15]
> util-test> 
> ```
> 
> I have a couple of approaches to it - one using reduce:
> 
> ```
> (defn stateful-map-1 [f [h & t]]
>   (reduce
>(fn [acc v]
>  (conj acc (f (last acc) v)))
>[h]
>t))
> ```
> 
> and another, mapping using a stateful function:
> 
> ```
> (let [secret (Object.)]
>   (defn stateful-mapper [f]
> (let [state (volatile! secret)] (fn [v] (vswap! state (fn [old new] (if 
> (= secret old) (f new) (f old new))) v)
> 
> (defn stateful-map-2 [f s]
>   (mapv (stateful-mapper f) s))
> ```
> 
> The former feels more idiomatic whereas the latter (although uglier) is more 
> efficient and has the added benefit of being able to be used for general 
> map-ing which is important as I want to use this approach to transduce a 
> clojure.async.channel.
> 
> It could, of course, be expressed directly as a transducer but it feels like 
> something simpler that should only be lifted to a transducer as and when 
> needed (see test below) ...
> 
> Here is my working testsuite:
> 
> ```
> (deftest stateful-map-test
>   (testing "reduction"
> (is
>  (=
>   [0 1 3 6 10 15]
>   (stateful-map-1 + [0 1 2 3 4 5]
>   (testing "mapping stateful function"
> (is
>  (=
>   [0 1 3 6 10 15]
>   (stateful-map-2 + [0 1 2 3 4 5]
>   (testing "transduction"
> (is
>  (=
>   [0 1 3 6 10 15]
>   (sequence (map (stateful-mapper +)) [0 1 2 3 4 5])
> ```
> 
> Am I missing a standard way of doing this in Clojure ? Or is a stateful 
> function the best answer ?
> 
> Interested in your thoughts,
> 
> 
> Jules
> 
> 
> 
> -- 
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/clojure/f1ada73f-8249-431a-9f4d-580aea12bdefn%40googlegroups.com
>  
> .

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/798d8cc2-b3b0-4036-b3a2-5cbf43751c98%40app.fastmail.com.


Re: ClojureScript at its best

2016-03-01 Thread Sam Ritchie
https://racehubhq.com/ <https://racehubhq.com/> is full Clojurescript + Om, 
with full client-side rendering + routing and all data transfer via websocket.

Sam Ritchie (@sritchie <https://twitter.com/sritchie>)
Machine Learning @ Stripe <https://stripe.com/>
samritchie.io <http://www.samritchie.io/> | 703.863.8561



> On Mar 1, 2016, at 2:55 AM, Bryan Maass <bryan.ma...@gmail.com> wrote:
> 
> Also, the Asciinema player is written in cljs. https://asciinema.org/
> 
> -- 
> 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 
> <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 
> <mailto:clojure+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <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: Why (memoize (fn [_#] (gensym "node")) in rhizome?

2015-09-12 Thread Sam Ritchie
Ah, of course. Even though the guts of the function are ignoring the argument, 
`memoize` is using it. Cool!

Sam Ritchie (@sritchie)
RaceHub Co-Founder
703.863.8561
www.racehubhq.com <http://www.racehubhq.com/>
Twitter <http://twitter.com/racehubhq> // Facebook 
<http://facebook.com/racehubhq>


> On Sep 12, 2015, at 3:24 AM, Moe Aboulkheir <m...@nervous.io> wrote:
> 
> 
> 
> On Sat, Sep 12, 2015 at 1:58 AM, Sam Ritchie <sritchi...@gmail.com 
> <mailto:sritchi...@gmail.com>> wrote:
> Seems like a good use of “delay”, yeah? Slightly different calling semantics, 
> of course, but still:
> 
> user> (def f (delay (gensym "node")))
> #'user/f
> user> @f
> node3330
> user> @f
> node3330
> 
> The original code wanted different behaviour - a distinct gensym for each 
> distinct input.  Memoize takes the ignored argument into account when 
> associating the inputs with outputs.
> 
> user> (def mapped-gensym (memoize (fn [_] (gensym "alias"
> 
> user> (mapped-gensym "HI")
> alias29367
> user> (mapped-gensym "HI")
> alias29367
> user> (mapped-gensym "NOT HI")
> alias29372
> 
> Take care,
> Moe
> 
> -- 
> 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 
> <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 
> <mailto:clojure+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <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: Why (memoize (fn [_#] (gensym "node")) in rhizome?

2015-09-11 Thread Sam Ritchie
Seems like a good use of “delay”, yeah? Slightly different calling semantics, 
of course, but still:

user> (def f (delay (gensym "node")))
#'user/f
user> @f
node3330
user> @f
node3330

Sam Ritchie (@sritchie)
RaceHub Co-Founder
703.863.8561
www.racehubhq.com <http://www.racehubhq.com/>
Twitter <http://twitter.com/racehubhq> // Facebook 
<http://facebook.com/racehubhq>


> On Sep 11, 2015, at 6:12 PM, Sean Corfield <s...@corfield.org> wrote:
> 
>> (memoize (fn [_#] (gensym "node"))
>> 
>> How is that different than 
>> 
>> (gensym "node")
> 
> 
> The latter returns a string, e.g., "node18051", the former returns a function 
> that, when called, returns a string. Wrapping it in memoize just ensures that 
> if you call it multiple times with the same argument, you get back the same 
> string each time:
> 
> (def f (memoize (fn [_#] (gensym "node"
> #'user/f
> user> (f 1)
> node18056
> user> (f 1)
> node18056
> user> (f 2)
> node18061
> user> (f 2)
> node18061
> user> (f 3)
> node18066
> 
> Sean
> 
> 
> -- 
> 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 
> <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 
> <mailto:clojure+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <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: Using @ alone

2015-05-21 Thread Sam Ritchie
That’s probably with a macro body, where it takes on a slightly different 
meaning.

`(+ ~@[1 2 3])

In that form, ~@ strips off the sequence following it. The form macroexpands to

(clojure.core/+ 1 2 3)

I believe ~@ only works inside a backticked form.

Sam Ritchie (@sritchie)
RaceHub Co-Founder
703.863.8561
www.racehubhq.com http://www.racehubhq.com/
Twitter http://twitter.com/racehubhq // Facebook 
http://facebook.com/racehubhq


 On May 20, 2015, at 4:35 PM, Pierre Thibault pierre.thibau...@gmail.com 
 wrote:
 
 Is possible to use the operator '@' alone? In the Joy Of Clojure book it is 
 presented as '~@'. I would like an example.
 
 -- 
 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 
 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 
 mailto:clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout 
 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: Using @ alone

2015-05-21 Thread Sam Ritchie
Whoops, sorry all. Only the first message in the thread loaded.

Sam Ritchie (@sritchie)
RaceHub Co-Founder
703.863.8561
www.racehubhq.com http://www.racehubhq.com/
Twitter http://twitter.com/racehubhq // Facebook 
http://facebook.com/racehubhq


 On May 21, 2015, at 8:33 AM, Sam Ritchie sritchi...@gmail.com wrote:
 
 That’s probably with a macro body, where it takes on a slightly different 
 meaning.
 
 `(+ ~@[1 2 3])
 
 In that form, ~@ strips off the sequence following it. The form macroexpands 
 to
 
 (clojure.core/+ 1 2 3)
 
 I believe ~@ only works inside a backticked form.
 
 Sam Ritchie (@sritchie)
 RaceHub Co-Founder
 703.863.8561
 www.racehubhq.com http://www.racehubhq.com/
 Twitter http://twitter.com/racehubhq // Facebook 
 http://facebook.com/racehubhq
 
 
 On May 20, 2015, at 4:35 PM, Pierre Thibault pierre.thibau...@gmail.com 
 mailto:pierre.thibau...@gmail.com wrote:
 
 Is possible to use the operator '@' alone? In the Joy Of Clojure book it is 
 presented as '~@'. I would like an example.
 
 -- 
 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 
 mailto: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 
 mailto:clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en 
 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 
 mailto:clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout 
 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: reader conditional indentation (clojure-mode)

2015-04-16 Thread Sam Ritchie

Just bump your clojure version in project.clj and cider will work just fine.


Dylan Butman mailto:dbut...@gmail.com
April 16, 2015 at 9:18 AM
Also, what would be necessary to get repl (cider, etc) working with cljc?

On Thursday, April 16, 2015 at 10:41:28 AM UTC-4, Dylan Butman wrote:
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Dylan Butman mailto:dbut...@gmail.com
April 16, 2015 at 8:41 AM
Does anyone know the required clojure-mode indentation configuration 
to achieve indentation aligned 
with http://dev.clojure.org/display/design/Reader+Conditionals ? 
Specifically, I'd like the next line following either #?(... or 
#?@(... to be indented at the same level as the #.

--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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, not the go to for data science

2015-03-29 Thread Sam Ritchie

The older the fiddle...


Luc Préfontaine mailto:lprefonta...@softaddicts.ca
March 29, 2015 at 9:21 AM
It's fun to see that vintage tools are so much appreciated these days :)
Luc P.


--
Luc Préfontainelprefonta...@softaddicts.ca sent by ibisMail!

Joseph Smith mailto:j...@uwcreations.com
March 29, 2015 at 8:26 AM
Batsov,

CIDER is the best Clojure IDE. ;)

--
@solussd


On Mar 29, 2015, at 9:14 AM, Bozhidar Batsov bozhi...@batsov.com 
mailto:bozhi...@batsov.com wrote:


--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Bozhidar Batsov mailto:bozhi...@batsov.com
March 29, 2015 at 8:14 AM
And CIDER isn't, right? I find this pretty insulting...


--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Colin Yates mailto:colin.ya...@gmail.com
March 29, 2015 at 4:47 AM
Cursive Clojure, LightTable and CounterClockwise are all good Clojure 
IDEs.


Sayth Renshaw mailto:flebber.c...@gmail.com
March 29, 2015 at 2:54 AM
Hi

I last learned clojure in 1.2. Just curious why Clojure hasn't 
developed as a go to for data science?


It never seems to get a mention R,Python and now Julia get the 
attention. By design it would appear that Clojure would be a good fit. 
Is it a lack of libraries, ease of install, no good default 
environment (R Rstudio, IPython ) where as you would need to use emacs 
with clojure, or is there just a better default use of Clojure?


Sayth



--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: Who's using Clojure?

2015-03-03 Thread Sam Ritchie

Also, check out the success stories:

http://cognitect.com/clojure#successstories

And this list of companies using Clojure:

http://clojure.org/companies

Thanks to Alex Miller for putting this together.


gvim mailto:gvi...@gmail.com
March 3, 2015 at 6:28 PM


Figures in my last post are for London.

gvim

Marcus Blankenship mailto:mar...@creoagency.com
March 3, 2015 at 5:55 PM
Have things changed in 4 years?  ;-)




Best,
Marcus

Marcus Blankenship
\\\ Problem Solver, Linear Thinker
\\\ 541.805.2736 \ @justzeros \ skype:marcuscreo

--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
James Reeves mailto:ja...@booleanknot.com
March 3, 2015 at 5:52 PM
This is a thread that's four years old. I think it's dead now :)

- James


--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Hildeberto Mendonça mailto:m...@hildeberto.com
March 3, 2015 at 1:11 PM
Watch this video from Neal Ford ;-) http://youtu.be/2WLgzCkhN2g

I Think it will help.




--
Hildeberto Mendonça, Ph.D
Blog: http://www.hildeberto.com
Community: http://www.cejug.net
Twitter: https://twitter.com/htmfilho
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Dan Hammer mailto:dan.s.ham...@gmail.com
February 27, 2015 at 11:38 AM
We used Clojure and Cascalog to generate the monthly deforestation 
alerts from satellite imagery for Global Forest Watch 
http://globalforestwatch.org.  This is the real-time component of 
the project.


On Tuesday, April 19, 2011 at 10:38:14 AM UTC-4, Damien wrote:
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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

Re: cascalog and java 1.7

2015-02-27 Thread Sam Ritchie

Hey Sunil,

That's probably due for an update. Hadoop 1.x (and 0.21.x, etc) only ran 
on JDK6. As long as the Hadoop distro you've chosen runs on JDK6 or JDK8 
you're going to be fine.


Cheers,
Sam


Sunil S Nandihalli mailto:sunil.nandiha...@gmail.com
February 26, 2015 at 1:25 PM
Hi Everybody,
 I have been meaning to try cascalog for a while now looking at its 
powerful query language. But today when I was trying to play with it I 
am getting some errors and when I go back cascalog readme page it says 
cascalog runs only with java 1.6 . Is it just that the readme is 
outdated or does it really mean that cascalog cannot run on java 1.7? 
I thought I need to confirm this before investigating cascalog any 
further.

Thanks,
Sunil.
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: Clojurescript Light Table Setup

2015-02-20 Thread Sam Ritchie

What issues are you having?


JvJ mailto:kfjwhee...@gmail.com
February 20, 2015 at 2:17 PM
I'm having some issues working with CLJS and Light table.  I've found 
a few things online, but never a single end-to-end setup.  Does anyone 
have any advice on setting up, beginning with lein, ending with 
repl-browser connection in light table?


Thanks.
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: Help with Liberator POST route

2015-02-19 Thread Sam Ritchie
Specifying POST tells Compojure that you only want to pass POST requests 
on to your liberator resource. That part worked. Liberator then received 
the request and passed it through its workflow.


At the allowed-method? decision point, liberator checked your 
declaration and saw only the default entry of [:get]. It short circuited 
and returned a Method Not Allowed response, as stated in the 
documentation.


Think of the POST wrapper as a middleware that only matches against 
POST requests. Liberator and Compojure are different libs with slightly 
overlapping functionality here. Using ANY disables Compojure's request 
type matching, allowing liberator to take care of it exclusively.



gvim mailto:gvi...@gmail.com
February 19, 2015 at 9:41 AM


OK, will use ANY. Still puzzled, though, as to why Method not 
allowed was returned when I clearly specifed POST.


gvim

Sam Ritchie mailto:sritchi...@gmail.com
February 19, 2015 at 9:20 AM
Try adding

:allowed-methods [:get :post]

to your resource.

You'll want to use ANY for all liberator routes, since they manage 
the responses for incorrect content types internally. If you specify 
GET or POST, it's up to you to return the proper responses if the 
methods aren't supported (since Compojure will return nil and try to 
match further down your list of routes.



gvim mailto:gvi...@gmail.com
February 19, 2015 at 8:48 AM


Thanks for spotting that one :). Still not there, though. Now getting 
simply Method not allowed.


gvim

Jonathan Barber mailto:jonathan.bar...@gmail.com
February 19, 2015 at 5:56 AM
On 18 February 2015 at 22:35, gvim gvi...@gmail.com 
mailto:gvi...@gmail.com wrote:


On 18/02/2015 15:32, Andy- wrote:

Without having tested it: I think you're curl -d format is
wrong. It's
not semicolon separated:

http://superuser.com/questions/149329/what-is-the-curl-command-line-syntax-to-do-a-post-request

HTH


That solved the curl data submission problem but I'm still getting
errors and suspect the POST defroute isn't correct. 'Trouble all
the examples of :post submissions in the docs are mixed up with
other factors so it's difficult to isolate the correct information.


Replace min with minute in the route (or change minute in the 
curl POST to min). Because the field names don't agree, the 
compojure destructing doesn't match and you end up trying to parseInt nil.


Cheers



gvim

-- 
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
mailto: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
mailto:clojure%2bunsubscr...@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
mailto:clojure%2bunsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.




--
Jonathan Barber jonathan.bar...@gmail.com 
mailto:jonathan.bar...@gmail.com

--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
gvim mailto:gvi...@gmail.com
February 18, 2015 at 3:35 PM


That solved the curl data submission problem but I'm still getting 
errors and suspect the POST defroute isn't correct. 'Trouble all the 
examples of :post submissions in the docs are mixed up with other 
factors so it's difficult to isolate the correct information.


gvim



--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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

Re: Help with Liberator POST route

2015-02-19 Thread Sam Ritchie
 min region location]
   (user (Integer/parseInt day) (Integer/parseInt month) 
(Integer/parseInt year) (Integer/parseInt hour) (Integer/parseInt min) 
region location))


 but doesn't work with POST:

(defroutes app-routes
  (POST /user [day month year hour min region location]
   (user (Integer/parseInt day) (Integer/parseInt month) 
(Integer/parseInt year) (Integer/parseInt hour) (Integer/parseInt min) 
region location))



Testing with with:

curl -d 
day=10;month=8;year=1970;hour=13;minute=45;region=Europe;location=London 
http://localhost:3000/user


 returns an error with the first parameter truncated:

java.lang.NumberFormatException For input string: 
14;month=10;year=1960;hour=13;minute=44;region=Europe;location=London


What am I doing wrong and why is the POST data truncated in the error 
message?


gvim



--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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.


[ANN] Om-Bootstrap 0.4.0, w/ support for Om 0.8

2015-02-09 Thread Sam Ritchie
I last wrote about om-bootstrap at version 0.2.6. This new version is 
compatible with Om 0.8.x and React 012.x.


We've also added a few new features - modals and pagers, plus some 
collapsible functionality for navbars and panels. Thanks to all the 
contributors on this release!


Docs site:

http://om-bootstrap.herokuapp.com

Code:

https://github.com/racehub/om-bootstrap

Leiningen https://clojars.org/racehub/om-bootstrap:

[racehub/om-bootstrap  0.4.0]



RELEASE NOTES 
https://github.com/racehub/om-bootstrap/blob/develop/CHANGELOG.md:


- Upgraded to Om 0.8.8 and React 0.12.x.
- The docs site now uses the new cljsjs stuff, removing the need for 
:preamble and :externs. The getting started 
http://om-bootstrap.herokuapp.com/getting-started  page shows the new way.

- Panels and navbars are now collapsible

### New Components

- `pagination`
- `modal`

--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: [ANN] bouncer 0.3.2

2015-01-23 Thread Sam Ritchie
We're using Validateur for this: 
https://github.com/michaelklishin/validateur Not sure if you've seen 
that one either.


Schema is more of a type-system-lite - it's not very good out of the box 
at allowing you to validate form data and return nice error messages in 
a way that's easy for some form library to consume.



Laurens Van Houtven mailto:_...@lvh.io
January 23, 2015 at 10:43 AM
Looks awesome! I’m currently using prismatic/schema for what seems 
like exactly the same thing; could you enlighten me how the two 
libraries are different?



thanks
lvh



--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Leonardo Borges mailto:leonardoborges...@gmail.com
January 23, 2015 at 4:39 AM
bouncer is a validation library for Clojure apps

Github: https://github.com/leonardoborges/bouncer
Clojars: https://clojars.org/bouncer

The main change with 0.3.2 is that bouncer now works with 
Clojurescript! - thanks Robin(@Skinney)!


New validators have also been added. You can read more about the 
changes in the CHANGELOG: 
https://github.com/leonardoborges/bouncer/blob/master/CHANGELOG.md


Enjoy! :)

Leonardo Borges
www.leonardoborges.com http://www.leonardoborges.com
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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.


AOT Compilation Error on Clojure 1.7.0-alpha5

2015-01-14 Thread Sam Ritchie
Hey all, I'm trying to bump my project to the latest alpha (5), and my 
AOT compilation test now throws this error when compiling a file that 
requires Prismatic's schema: Caused by: java.lang.ClassCastException: 
schema.utils.SimpleVCell cannot be cast to schema.utils.PSimpleCell 
Here's the relevant line in Schema: 
https://github.com/Prismatic/schema/blob/master/src/cljx/schema/utils.cljx#L192 
I'm guessing something's up with the cast. That class implements the 
protocol, so this shouldn't throw a ClassCastException. Here's the full 
stacktrace:


https://gist.github.com/sritchie/70d057b04f3b18179933

This failure occurs on alpha5, but NOT on alpha4 (or alpha2. Didn't test 
alpha3.)


Any ideas?
--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: ANN: Om 0.8.0-rc1

2015-01-14 Thread Sam Ritchie

I'm getting the same thing. Did you guys resolve this?


Kristofer Svärd mailto:kristofer.sv...@gmail.com
January 2, 2015 at 10:55 AM
Do I still need to specify an externs file when compiling with 
advanced optimization? I found that from Om 0.8.0-beta4 specifying both
:optimizations :advanced and :externs [react/externs/react.js] gives 
a compilation error


ERROR: JSC_DUPLICATE_EXTERN_INPUT. Duplicate extern input: 
file:/home/kristofer/.m2/repository/com/facebook/react/0.12.2.1/react-0.12.2.1.jar!/react/externs/react.js 
at (unknown source) line (unknown line) : (unknown column)


while excluding the :externs option produces a working, optimized js file.

/Kristofer

Den onsdagen den 31:e december 2014 kl. 21:23:02 UTC+1 skrev David Nolen:
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
David Nolen mailto:dnolen.li...@gmail.com
December 31, 2014 at 1:22 PM
I just cut Om 0.8.0-rc1. The only change from prior betas/alphas is
more bug fixes.

https://github.com/swannodette/om

Feedback welcome!
David



--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: ANN: Om 0.8.0-rc1

2015-01-14 Thread Sam Ritchie

Looks like we don't need to manually specify externs:

https://github.com/swannodette/om/commit/343ec3fefc038850f9ddc4c20463213fd09d1368


Sam Ritchie mailto:sritchi...@gmail.com
January 14, 2015 at 10:31 AM
I'm getting the same thing. Did you guys resolve this?


Kristofer Svärd mailto:kristofer.sv...@gmail.com
January 2, 2015 at 10:55 AM
Do I still need to specify an externs file when compiling with 
advanced optimization? I found that from Om 0.8.0-beta4 specifying both
:optimizations :advanced and :externs [react/externs/react.js] gives 
a compilation error


ERROR: JSC_DUPLICATE_EXTERN_INPUT. Duplicate extern input: 
file:/home/kristofer/.m2/repository/com/facebook/react/0.12.2.1/react-0.12.2.1.jar!/react/externs/react.js 
at (unknown source) line (unknown line) : (unknown column)


while excluding the :externs option produces a working, optimized js file.

/Kristofer

Den onsdagen den 31:e december 2014 kl. 21:23:02 UTC+1 skrev David Nolen:
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
David Nolen mailto:dnolen.li...@gmail.com
December 31, 2014 at 1:22 PM
I just cut Om 0.8.0-rc1. The only change from prior betas/alphas is
more bug fixes.

https://github.com/swannodette/om

Feedback welcome!
David



--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: How to handle refactoring with TDD and mocking/stubbing

2015-01-05 Thread Sam Ritchie
Agreed, Timothy - obviously the mental model gets more tangled when 
state mocking comes into play, but the fact is, sometimes you don't have 
the option (right away) of rewriting the code you're testing.


Midje has been great for the Cascalog community:
http://www.samritchie.io/testing-cascalog-with-midje/
http://www.samritchie.io/cascalog-testing-2-0/

The state mocking is just one piece of Midje. A bunch of its other 
features, such as its collection checkers and chatty checkers, are 
excellent.


Colin Yates wrote:
I have thousands of lines of tests written using Midje and it was the 
second one I turned to when I started using Clojure full-time a couple 
of years ago. I think it would be fairer to say that Midje is powerful 
enough to hang yourself, but that doesn't make that power wrong. This 
is the good old power/not power dilema and caution should dfefinitely 
be used by newbies using Midje, particularly established OO developers 
to ensure they don't mis-use Midje's tools as a bridge to stay in the 
OO paradigm.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: Creating Hiccup From Code Keeping Formatting and Comments

2015-01-04 Thread Sam Ritchie

Hey Stefan,

I wrote something much like this for the Om-Bootstrap doc site at 
om-bootstrap.herokuapp.com. I ended up putting all code examples into 
their own files, then slurping those up. The fun thing about the code 
below is that each example is executable, and actually runs on the 
om-bootstrap site.


Here's the Om code:

https://github.com/racehub/om-bootstrap/blob/develop/docs/src/cljs/om_bootstrap/docs/example.cljs

Then, I slurp up the code snippets from their respective files with a 
slurp-example macro:


https://github.com/racehub/om-bootstrap/blob/develop/docs/src/clj/om_bootstrap/macros.clj#L5

This lets me define examples like this:

https://github.com/racehub/om-bootstrap/blob/develop/docs/src/cljs/om_bootstrap/docs/components.cljs#L42

using the relative path under dev/snippets. Here's the code that 
defines that linked example:


https://github.com/racehub/om-bootstrap/blob/develop/dev/snippets/button/types.cljs


Stefan Kamphausen mailto:ska2...@gmail.com
January 4, 2015 at 8:57 AM
Hi,


Currently, I am trying to write a presentation using ring and 
reveal.js.  For the code samples, I'd like to write real clojure 
code, i.e. no strings or the like.


Then, I want to turn that into a suitable hiccup vector which will 
create the correct reveal.js/highlight.js syntax.


I wrote a trvial macro:

(defmacro example [ body]
  `[:pre
[:code ~(apply str body)]])

The problem is, that it looses all formatting, because the Clojure 
reader already had its fun with the code. So,


(example
 A string literal
 (defn a-function [x y]
   ;; concat x and y as strings
   (str x y)))

macro-expands to

[:pre [:code A string literal(defn a-function [x y] (str x y))]]

which is pretty useless.

I already thought about using form but this too has been read already.


Any ideas?


Kind regards,
stefan
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: ANN: boltzmann 0.1.1 - a deep-learning library

2015-01-04 Thread Sam Ritchie

Looks like it's here: https://github.com/ghubber/boltzmann


Christopher Small mailto:metasoar...@gmail.com
January 4, 2015 at 6:45 PM
Where is the repository?


On Sunday, January 4, 2015 4:07:22 PM UTC-7, Christian Weilbach wrote:
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Christian Weilbach mailto:whitesp...@polyc0l0r.net
January 4, 2015 at 4:07 PM
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all,

- From the README:

This library is supposed to implement Boltzmann Machines, Autoencoders
and related deep learning technologies. All implementations should
both have a clean high-level mathematical implementation of their
algorithms (with core.matrix) and if possible, an optimized and
benchmarked version of the core routines for production use. This is
to facilitate learning for new users or potential contributors, to be
able to implement algorithms from papers/other languages and then tune
them for performance if needed.

This repository is supposed to cover techniques building on Restricted
Boltzmann Machines, like Deep Belief Networks, Deep Boltzmann Machines
or temporal extensions thereof as well as Autoencoders (which I am not
familiar enough with yet). Classical back-propagation is also often
used to fine-tune deep models supervisedly, so networks should support
it as well.



I haven't build myself deep belief networks out of it yet, but this
should be fairly straightforward. Also combination with the usual
linear classifiers (logistic regression, SVM) at the top layer can be
explored. If somebody has interest/experience in/with implementing
standard backpropagation, go ahead and open a pull-request :-).

Christian
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEcBAEBAgAGBQJUqceeAAoJEKel+aujRZMkJHoIAKkAbgZjvs9pzmJjzJf5Y1sg
EQCwf7W6Vrz0rvDtrkSiRNO+rmSEL4TpWPPlHLTYWs781Wrz9FRmkmHzR0mZ8izT
kWsQ3rP4TjDUDiB8S34CQxA15YLRfbvIxVv2JBfkGBWo64NHSrNUxz+Dfvu2jzbi
at614o/T5lZQ6qzkyputYwzOocX58AcnCtfXDVO2UJt8RU/q33FVugjtXtvsDxgM
AOO4WnW6mzYvLUbrhksDjuLShhs2EoCMB54cB2W5ejz+6X3oFeF/xndFqtNYdwPF
d13q60Ex0s/IqIo3mOwB/O1rOnsBHxiQ6nuSaphMAm7jJF9wHtDaXHWRZHa2RTg=
=BjnJ
-END PGP SIGNATURE-



--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: Implementing a Oauth2 provider with clauth and friend

2014-12-15 Thread Sam Ritchie
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: Implementing a Oauth2 provider with clauth and friend

2014-12-15 Thread Sam Ritchie
That's actually the Facebook token. Facebook's JS API will give you a 
token that lasts for about an hour. You have to use your app's ID and 
secret to make a server-side request and upgrade that short token to a 
long-lived (~60 day) token.


I'm not acting as an OAuth provider, just storing credentials and that 
token in a local database.

Sebastian Bensusan mailto:sbe...@gmail.com
December 15, 2014 at 3:05 PM
Thanks Sam.

The gist is very helpful (as well as the Friend + Liberator post). I 
see you are generating and maintaining your own tokens ( exchange for 
long-lived token).


Did you write custom code for this or is there some library I should 
look at?


Sebastian
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Sam Ritchie mailto:sritchi...@gmail.com
December 15, 2014 at 6:54 AM
I've just implemented this with Facebook login on a single-page app 
using Om and Sente. I'm planning on writing it up (who ISN'T planning 
on writing up all their open source stuff in glorious detail? Imagine 
the blog posts!!), but before I get around to code I can offer my 
little state flow chart I wrote up before coding:


https://gist.github.com/sritchie/8e137d8727f409826005

Facebook has a nice guide on how to think about this:

https://developers.facebook.com/docs/facebook-login/multiple-providers

The trickiness has to do with allowing users to merge accounts.

Not sure if it's clear from that gist, but we decided to auto-generate 
usernames for users that signed up with Facebook, and not set a 
password at all. If a user goes into their profile and tries to unlink 
Facebook, if they haven't set a password, an alert'll pop up saying 
Whoops! You need to set a password to unlink.


Pinterest does a nice job making signup with another provider or your 
account really easy.



Sebastian Bensusan mailto:sbe...@gmail.com
December 15, 2014 at 4:50 AM
Users should also be able to authenticate using my site credentials OR 
Linkedins. I thought friend-oauth would be useful to allow the 
Linkedin authentication.


I am a little lost on where to start. I could start from my own auth 
and then add Linkedin to it with friend, or start with friend and add 
my own auth service around it.


On Monday, December 15, 2014 11:42:36 AM UTC+1, David Della Costa wrote:
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Dave Della Costa mailto:ddellaco...@gmail.com
December 15, 2014 at 3:42 AM
I'm a bit confused--if you are building your own oauth2 server (correct
me if I misunderstood--you want users to use oauth2 to authenticate
against your own service?), what purpose does a Friend workflow have in
this context? Seems like you could skip Friend altogether.

DD

Sebastian Bensusan mailto:sbe...@gmail.com
December 15, 2014 at 1:40 AM
Hi Dave,

I am planning to use friend-oauth2 to handle third party workflows. 
It is exactly what I need to consume third party oauth services, but 
from what I understood from the source code, it doesn't help me offer 
my own oauth service. I'm struggling with the design for an oauth 
service that integrates directly with friend.


Thanks for your answer!

Sebastian

On Monday, December 15, 2014 6:58:55 AM UTC+1, David Della Costa wrote:
--
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

Facebook Graph API via CLS

2014-12-03 Thread Sam Ritchie

Hey all,

I'm working on a Clojurescript wrapper of Facebook's JS SDK, using 
Prismatic's schema for documentation / types. Here's the code:


https://gist.github.com/sritchie/b517d67f9507aca36399

If anyone here's interested I'd be happy to put a little library up on 
github with this and the rest of the API.


Cheers,
Sam
--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: Getting sick and tired of [trace missing]

2014-12-03 Thread Sam Ritchie

The first result of googling

jvm [trace missing]

is really helpful here.


Fluid Dynamics mailto:a2093...@trbvm.com
December 3, 2014 at 10:29 AM
It's a giant pain to debug exceptions without stack traces. This seems 
to be a problem specific to CCW, as I don't encounter it using other 
development environments.


Is this going to be fixed anytime soon?
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: Wouldn't it be nice if if-let allowed more bindings?

2014-11-26 Thread Sam Ritchie
 
with gensyms, and wraps every else clause emission in a let that 
restores the original bindings of these symbols from these gensym 
locals. The tree-walking makes it work even with destructuring its the 
binding vector:


= (let [x 6] (if-and-let [{x :a} {:a 42} y (first [(/ x 3)])] [x y] x))
[42 14]
= (let [x 6] (if-and-let [{x :a} {:a 42} y (first [])] [x y] x))
6

It also unshadows defs:

= (def x 6)
= (if-and-let [{x :a} {:a 42} y (first [])] [x y] x)
6

That's from the (or ... (resolve %)) part of the outer filter on the 
walked tree. Remove that and leave the outer filter as just (filter 
(or env {}) ...), and that last test produces 42 instead.


Not that you should really be shadowing defs with locals anyway. 
That's always prone to cause problems.


Not bad for only 18 lines of actual code, hmm?

--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: [ANN] Amazonica: Clojure client for the entire AWS api

2014-11-22 Thread Sam Ritchie
 no documentation in source, sparse documentation on 
github, and using dynamically generated code. Specific improvements to 
documentation I'd love to see: a comprehensive list of keys that 
credential maps and functions take as well as their valid values. The 
one or two examples per API on Github are insufficient for different 
combinations of functionality in real-world use cases. Pointing to AWS 
javadoc is not sufficient because Amazonica does name-munging and 
unwrapping - in order to understand the Amazonica input/output, you 
have to be an expert with the library and look at the implementation 
for name-munging. It is effectively a new API. A comprehensive list of 
functions would be nice, but finding them at the repl is a reasonable 
work around.


* Dynamically generating an API doesn't save anyone time
This is an extension of the previous point. You have almost 800 lines 
of code, mostly dedicated to reflection and interning methods. It's 
impressive that the whole thing works as well as it does, but doesn't 
actually save time vs. explicitly targeting an API with small wrapper 
functions. That has the benefit of being very obvious and easy to 
understand (as described above). It does mean you have to do some work 
when the Java SDK changes or you add a client, but I see there is 
already some nasty logic to switch on the client class if it has a 
different interface. There's a performance cost in reflection too.


* Functions are both variadic and dispatch on argument type
Especially without clear javadoc style documentation for function 
arguments, types, and keys, having functions that take a smorgasborg 
of different arguments is incredibly confusing. I think the root of 
this problem is the choice to make the client methods variadic, 
because then there can't be well-specified arities for the various 
cases (no credentials or arguments, credential map, just arguments, 
credential map and arguments), using repl. If the functions instead 
had 0, 1, and 2 arities that took nothing, an argument map, or a 
credential map and an argument map, it would be so much clearer. Also 
argument maps are generally a little easier to work with than 
destructuring the rest.


* There are no releases or tags on github
My company has a tedious process for importing third-party packages 
into source control. It's not ideal, but I'm sure it's not unique. It 
would be great to be able to pull in a stable release built against 
well-specified versions of dependencies.


I hope this doesn't come across as harsh, that's not my intent. I 
really do appreciate you writing this library, and I realize that 
given how mature it is, completely changing the implementation is 
probably unfeasible. I just want to raise these concerns and see 
whether other people share them. If so, maybe they can serve as 
patterns or anti-patterns for future libraries.


-Greg Mitchell

On Monday, March 25, 2013 2:51:42 PM UTC-7, Michael Cohen wrote:
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: Preventing url-encoding of POST body in http-kit.client

2014-11-14 Thread Sam Ritchie

How about just decoding on the other side?


Saju Ravindran Pillai mailto:saju.pil...@concur.com
November 14, 2014 at 5:46 AM
Hi,

I need to POST an XML body to an http endpoint, which replies back 
with a xml response.


I do this ..
(org.httpkit.client/post uri {:body (str “foobar/foo”)})

but the client is encoding the xml tags to gt;  lt;

I then tried :

(org.httpkit.client/post uri {:body (str “foobar/foo”)
:content-type application/octet-stream
:content-encoding application/octet-stream”
:mime-type “application/octet-stream”
:body-encoding “application/octet-stream”})

.. hoping that one of those options will do the trick — but no luck.

How do I prevent http-kit from url-encoding the post body?

-srp
ps:

The following works …

curl -X POST -d @file http://uri/
$ cat file
foobarfoo



This e-mail message is authorized for use by the intended recipient 
only and may contain information that is privileged and confidential. 
If you received this message in error, please call us immediately at 
(425) 590-5000 and ask to speak to the message sender. Please do not 
copy, disseminate, or retain this message unless you are the intended 
recipient. In addition, to ensure the security of your data, please do 
not send any unencrypted credit card or personally identifiable 
information to this email address. Thank you.




--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: [ANN] Clojure 1.7.0-alpha3 now available

2014-10-28 Thread Sam Ritchie
/browse/CLJ-1388)
  Equality bug on records created with nested calls to map-record
* [CLJ-1274](http://dev.clojure.org/jira/browse/CLJ-1274)
  Unable to set compiler options via system properties except for AOT 
compilation

* [CLJ-1241](http://dev.clojure.org/jira/browse/CLJ-1241)
  NPE when AOTing overrided clojure.core functions
* [CLJ-1185](http://dev.clojure.org/jira/browse/CLJ-1185)
  reductions does not check for reduced value
* [CLJ-1039](http://dev.clojure.org/jira/browse/CLJ-1039)
  Using def with metadata {:type :anything} throws ClassCastException 
during printing

* [CLJ-887](http://dev.clojure.org/jira/browse/CLJ-887)
  Error when calling primitive functions with destructuring in the arg 
vector

* [CLJ-823](http://dev.clojure.org/jira/browse/CLJ-823)
  Piping seque into seque can deadlock
* [CLJ-738](http://dev.clojure.org/jira/browse/CLJ-738)
= is incorrect when args include Double/NaN
* [CLJ-1408](http://dev.clojure.org/jira/browse/CLJ-1408)(alpha3)
  Make cached string value of Keyword and Symbol transient
* [CLJ-1466](http://dev.clojure.org/jira/browse/CLJ-1466)(alpha3)
  clojure.core/bean should implement Iterable



--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: [ANN] om-bootstrap 0.2.6 released

2014-09-16 Thread Sam Ritchie
I fully agree that with more features, the library would be useful to a 
larger range of folks :) Pull requests welcome, as always.


I'm developing each component as needed as I convert paddleguru.com over 
to Om. The input components and basic tables, panels, buttons and 
navbars came first; the rest are on their way.


My thought on open source is, document well and release early. There's 
no reason to keep all the existing stuff closed because the tables 
module isn't fully sexed out.

Daniel mailto:doubleagen...@gmail.com
September 16, 2014 at 7:17 AM
Good work.  Although I hate to say it, It's of little use for most 
projects without more out-of-the-box table options eg searchable, 
sortable, paginated, never-ending.


On Wednesday, August 27, 2014 2:05:27 PM UTC-5, Sam Ritchie wrote:
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Sam Ritchie mailto:sritchi...@gmail.com
August 27, 2014 at 1:05 PM
This release adds a bunch of new active components - notably, dropdown 
buttons, split dropdown buttons and a navbar. The navbar allowed me to 
beef up the doc site with a proper navbar, more pages and client-side 
javascript navigation using Secretary and Html5 pushState:


http://om-bootstrap.herokuapp.com

Code:

https://github.com/racehub/om-bootstrap

Leiningen:

[racehub/om-bootstrap0.2.6]


RELEASE NOTES:

- Upgraded Clojurescript dependency on the doc site to get around this 
bug: http://dev.clojure.org/jira/browse/CLJS-839. Added a note.


This hash code bug was causing `bs-class-set`'s internal lookup in 
`class-map` to sporadically fail in Safari 7.0.x.


From https://github.com/racehub/om-bootstrap/pull/13:
- `om-bootstrap.util/clone-with-props` can now clone proper om 
components by injecting extra attributes into the om cursor.
- `:on-select` handlers on top level nav elements now get called if 
set, along with the current nav-item `:on-select` handlers


### New Components

- `dropdown-mixin` (mixins.cljs)
- `menu-item`, `dropdown-menu`, `dropdown` (button.cljs)
- `split` (ie, SplitButton) (button.cljs)
- `navbar` (ie, SplitButton) (button.cljs)



--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: [ANN] om-bootstrap 0.2.6 released

2014-09-15 Thread Sam Ritchie
FYI, I added a nice Getting Started page to the Om-Bootstrap 
documentation site that should help users get past the initial pain of 
cobbling together the proper leiningen dependencies, Bootstrap CDN 
header links and lein-cljsbuild settings:


http://om-bootstrap.herokuapp.com/getting-started

Thanks to David for a template for the Leiningen stuff, and others for 
bugging me to get this done :)


Cheers!

Sam Ritchie mailto:sritchi...@gmail.com
August 27, 2014 at 1:05 PM
This release adds a bunch of new active components - notably, dropdown 
buttons, split dropdown buttons and a navbar. The navbar allowed me to 
beef up the doc site with a proper navbar, more pages and client-side 
javascript navigation using Secretary and Html5 pushState:


http://om-bootstrap.herokuapp.com

Code:

https://github.com/racehub/om-bootstrap

Leiningen:

[racehub/om-bootstrap0.2.6]


RELEASE NOTES:

- Upgraded Clojurescript dependency on the doc site to get around this 
bug: http://dev.clojure.org/jira/browse/CLJS-839. Added a note.


This hash code bug was causing `bs-class-set`'s internal lookup in 
`class-map` to sporadically fail in Safari 7.0.x.


From https://github.com/racehub/om-bootstrap/pull/13:
- `om-bootstrap.util/clone-with-props` can now clone proper om 
components by injecting extra attributes into the om cursor.
- `:on-select` handlers on top level nav elements now get called if 
set, along with the current nav-item `:on-select` handlers


### New Components

- `dropdown-mixin` (mixins.cljs)
- `menu-item`, `dropdown-menu`, `dropdown` (button.cljs)
- `split` (ie, SplitButton) (button.cljs)
- `navbar` (ie, SplitButton) (button.cljs)



--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: [ANN] om-bootstrap 0.2.5 - Bootstrap 3 components in Om

2014-08-28 Thread Sam Ritchie

Hey Andy,

All you should need is the usual Om project layout, similar to the 
index.html you mentioned, plus this line in your project's header to 
include the Bootstrap CSS that Om-Bootstrap uses:


link 
href=https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css; 
rel=stylesheet type=text/css class=style /


For the om-bootstrap docs project, I jammed the Bootstrap CSS into the 
resources folder to make local development easier when I'm offline, but 
it's totally fine to just reference the CDNed version in your project. 
There's no need to know anything about the resources folder to use 
Om-Bootstrap.


I'll add this information to the documentation site today on this 
barebones, TODO Getting Started page:


http://om-bootstrap.herokuapp.com/getting-started

Andy Dwelly mailto:andydwe...@gmail.com
August 28, 2014 at 6:05 AM
I've got a working knowledge of Clojure and I'm trying to extend my 
reach into Clojurescript, om, and bootstrap as I want the resulting 
website to look reasonable.
I've worked my way through the om tutorials and I have a simple plain 
om example of my own which doesn't use bootstrap.


Apart from the [om-bootstrap 0.2.6] dependancy, it seems that to get 
started with om-bootstrap  I need an initial index.html file similar 
to the one generated with the 'lein new mies-om'
command, but referencing bootstrap, and some idea of the structure of 
the resources directory - presumably various bits of the bootstrap 
project.


Can you give any guidance in this area ?

-A

On Monday, August 25, 2014 2:14:04 AM UTC+1, Sam Ritchie wrote:
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Sam Ritchie mailto:sritchi...@gmail.com
August 24, 2014 at 7:13 PM
Hey all,

I wanted to share a library I've been putting together for writing 
Bootstrap 3 components in Om. It's called, creatively, Om-Bootstrap.


Here's the git repository: https://github.com/racehub/om-bootstrap

Version 0.2.5 is on Clojars https://clojars.org/racehub/om-bootstrap:

[racehub/om-bootstrap0.2.5]

I've also written an interactive documentation site for the project, a 
la the Bootstrap doc site:


http://om-bootstrap.herokuapp.com

This site has working examples of every component in the library, and 
TODOs in the spots that I intend to cover. Every example snippet has a 
show code toggle that lets you see the code used to generate that 
example. You should be able to copy the code over to your project and 
have it work right away.


There's a lot of cool stuff in this project that I hope to document. 
The README describes how to get the embedded websocket repl running. 
I'll post on how I do the embedded example snippets soon. The plan is 
to add server-side HTML generation and client side routing once the 
doc site gets a few more pages.


Huge props to David for Om, and to the react-bootstrap 
https://github.com/react-bootstrap/react-bootstrap project for 
inspiration... I've been tracking off of them and their killer doc 
site for this initial push.


Let me know what you guys think!


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: [ANN] om-bootstrap 0.2.5 - Bootstrap 3 components in Om

2014-08-27 Thread Sam Ritchie

Hey Henry,

I started the project because I wanted to write schemas (using 
Prismatic's schema library) for all of the react-bootstrap components; I 
ended up doing this rewrite because I wanted to leverage the huge 
performance gains Om can get over straight-up React due to Clojure's 
immutable data structures.


React-Bootstrap's components rely on a lot of property mutation under 
the hood. Also, react-bootstrap isn't Closure-compiler compatible, so 
wrapping that library becomes an exercise in extern management.


Hope that helps!


henry w mailto:henryw...@gmail.com
August 27, 2014 at 10:24 AM
Hi Sam,

total noob question coming up (just got started with om beginner 
tutorial).


React components can be used from om apparently (not that i have seen 
an example of this). So, why is there a need for this library? Is it 
providing boilerplate around react-bootstrap or doing something more?


Thanks
Henry

On Monday, August 25, 2014 2:14:04 AM UTC+1, Sam Ritchie wrote:
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Sam Ritchie mailto:sritchi...@gmail.com
August 24, 2014 at 7:13 PM
Hey all,

I wanted to share a library I've been putting together for writing 
Bootstrap 3 components in Om. It's called, creatively, Om-Bootstrap.


Here's the git repository: https://github.com/racehub/om-bootstrap

Version 0.2.5 is on Clojars https://clojars.org/racehub/om-bootstrap:

[racehub/om-bootstrap0.2.5]

I've also written an interactive documentation site for the project, a 
la the Bootstrap doc site:


http://om-bootstrap.herokuapp.com

This site has working examples of every component in the library, and 
TODOs in the spots that I intend to cover. Every example snippet has a 
show code toggle that lets you see the code used to generate that 
example. You should be able to copy the code over to your project and 
have it work right away.


There's a lot of cool stuff in this project that I hope to document. 
The README describes how to get the embedded websocket repl running. 
I'll post on how I do the embedded example snippets soon. The plan is 
to add server-side HTML generation and client side routing once the 
doc site gets a few more pages.


Huge props to David for Om, and to the react-bootstrap 
https://github.com/react-bootstrap/react-bootstrap project for 
inspiration... I've been tracking off of them and their killer doc 
site for this initial push.


Let me know what you guys think!


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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.


[ANN] om-bootstrap 0.2.6 released

2014-08-27 Thread Sam Ritchie
This release adds a bunch of new active components - notably, dropdown 
buttons, split dropdown buttons and a navbar. The navbar allowed me to 
beef up the doc site with a proper navbar, more pages and client-side 
javascript navigation using Secretary and Html5 pushState:


http://om-bootstrap.herokuapp.com

Code:

https://github.com/racehub/om-bootstrap

Leiningen:

[racehub/om-bootstrap  0.2.6]



RELEASE NOTES:

- Upgraded Clojurescript dependency on the doc site to get around this 
bug: http://dev.clojure.org/jira/browse/CLJS-839. Added a note.


This hash code bug was causing `bs-class-set`'s internal lookup in 
`class-map` to sporadically fail in Safari 7.0.x.


From https://github.com/racehub/om-bootstrap/pull/13:
- `om-bootstrap.util/clone-with-props` can now clone proper om 
components by injecting extra attributes into the om cursor.
- `:on-select` handlers on top level nav elements now get called if set, 
along with the current nav-item `:on-select` handlers


### New Components

- `dropdown-mixin` (mixins.cljs)
- `menu-item`, `dropdown-menu`, `dropdown` (button.cljs)
- `split` (ie, SplitButton) (button.cljs)
- `navbar` (ie, SplitButton) (button.cljs)

--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: om tutorial, java.lang.UnsupportedClassVersionError

2014-08-27 Thread Sam Ritchie
Looks like you're using JDK6 on your local machine - upgrade to JDK7 and 
you'll be all set.



Brian Craft mailto:craft.br...@gmail.com
August 27, 2014 at 1:44 PM
The basic tutorial fails on cljsbuild, with

Exception in thread main java.lang.UnsupportedClassVersionError: 
com/google/javascript/jscomp/CompilerOptions : Unsupported major.minor 
version 51.0, compiling:(cljs/closure.clj:1:1)



I gather this is some java version issue. Is there a workaround?
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: Sente - is it possible to close a connection?

2014-08-24 Thread Sam Ritchie

I think you can send :chsk/close:

https://github.com/ptaoussanis/sente/blob/master/src/taoensso/sente.cljx#L335

This doesn't look documented either, but according to the code it'll do 
the trick.



Daniel Kersten mailto:dkers...@gmail.com
August 24, 2014 at 11:30 AM
After some more digging[1], I see that the client can call 
(sente/chsk-reconnect! my-chsk) to disconnect (and then reconnect) a 
connection.
Looking at the comments in the code[2], it does this by closing the 
socket and then it gets auto-reconnected. I guess that means its not 
possible to disconnect without automatically reconnecting, but for now 
this behaviour is sufficient for me.


Hopefully this is useful to others, as I don't see chsk-reconnect! 
documented anywhere.


[1] https://github.com/ptaoussanis/sente/issues/63 and 
https://github.com/ptaoussanis/sente/blob/93a8660b23c001cb50701f80f78d9a86fd4f5433/src/taoensso/sente.cljx#L555
[2] 
https://github.com/ptaoussanis/sente/blob/93a8660b23c001cb50701f80f78d9a86fd4f5433/src/taoensso/sente.cljx#L632 
and 
https://github.com/ptaoussanis/sente/blob/93a8660b23c001cb50701f80f78d9a86fd4f5433/src/taoensso/sente.cljx#L732




--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Daniel Kersten mailto:dkers...@gmail.com
August 24, 2014 at 11:06 AM
Hi,

I'm trying programmatically close a connected sente connection (either 
on the server or the client).


Is this possible?

Thanks,
Dan.
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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.


[ANN] om-bootstrap 0.2.5 - Bootstrap 3 components in Om

2014-08-24 Thread Sam Ritchie

Hey all,

I wanted to share a library I've been putting together for writing 
Bootstrap 3 components in Om. It's called, creatively, Om-Bootstrap.


Here's the git repository: https://github.com/racehub/om-bootstrap

Version 0.2.5 is on Clojars https://clojars.org/racehub/om-bootstrap:

[racehub/om-bootstrap  0.2.5]


I've also written an interactive documentation site for the project, a 
la the Bootstrap doc site:


http://om-bootstrap.herokuapp.com

This site has working examples of every component in the library, and 
TODOs in the spots that I intend to cover. Every example snippet has a 
show code toggle that lets you see the code used to generate that 
example. You should be able to copy the code over to your project and 
have it work right away.


There's a lot of cool stuff in this project that I hope to document. The 
README describes how to get the embedded websocket repl running. I'll 
post on how I do the embedded example snippets soon. The plan is to add 
server-side HTML generation and client side routing once the doc site 
gets a few more pages.


Huge props to David for Om, and to the react-bootstrap 
https://github.com/react-bootstrap/react-bootstrap project for 
inspiration... I've been tracking off of them and their killer doc site 
for this initial push.


Let me know what you guys think!
--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: idiomatic filter-not or inverting predicate

2014-08-21 Thread Sam Ritchie

I think you want complement, like (filter (complement odd?) ...)


Andy C mailto:andy.coolw...@gmail.com
August 21, 2014 at 2:01 PM
Hi,


I was wondering what is the nicest way to do filter-not in Clojure. 
Here are 3 expressions:


user= (filter #(apply = %) '([1 2] [1 1]))
([1 1])
user= (filter #(apply not= %) '([1 2] [1 1]))
([1 2])
user= (filter #(not (apply = %)) '([1 2] [1 1]))
([1 2])


First one is just a base filtering. Second is taking advantage of 
having inverted predicate. Now let's assume that we have only a 
positive predicate, hence we would have to invert it by hand. That 
leads me to 3rd expression above.


I was wondering though is it is possible to somehow get not closer 
to =, so the fact that we invert it is more obvious ...


Is it possible to do that? Or perhaps there is an easier way to code 
it up all together ?


Thx,
Andy
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: Howto write test.check custom generators

2014-08-10 Thread Sam Ritchie

You can to use gen/fmap to build up generators. Here's an example:

;; generates a millisecond using gen/choose, then maps that to a time 
instance using my u/ms-to-time function.

(def result-gen
  (- (gen/choose 0 u/max-time)
   (gen/fmap u/ms-to-time)))

;; Generates EITHER a result or nil, then maps that into an event entry 
data structure:

(def event-entry-gen
  (- (gen/one-of [(gen/return nil) result-gen])
   (gen/fmap (fn [result]
   (merge {:_id id
   :_rev rev
   :type event-entry
   :division {:age-group U17
  :boat-type K1
  :gender male}
   :event-id event-id
   :regatta-id regatta-id
   :athletes []
   :racer-number 10}
  (when result
{:result {:division-size 10
  :rank {:overall 1
 :division 1}
  :time result}}))

Once you have a generator instance you can copy the rest of the 
test.check examples, run gen/sample on the generator directly... all the 
good stuff.



Timothy Washington mailto:twash...@gmail.com
August 10, 2014 at 12:38 PM
Hi there,

I'm trying to get my head wrapped around test.check 
https://github.com/clojure/test.check/. My current stumbling block 
is custom generators. Of course I've combed through the docs 
https://github.com/clojure/test.check/blob/master/doc/intro.md#record-generators 
and source 
https://github.com/clojure/test.check/blob/master/src/main/clojure/clojure/test/check/generators.clj. 
And I'm pretty sure I need to use */gen-bind/* to get this all 
working. But it's just not clicking yet.



Let's say I want to create a */user/* and a */group/*, where a user 
can belong to many groups. So let's say I have a generic 
*/create-user/* function.


  (defn */create-user/* [opts]
(merge {:id (mu/generate-uuid)
:username 
:password (crypto/base64 12)
:first-name 
:last-name 
:email 
:country {}}
   opts))


And a generic */create-group/* function.

  (defn create [opts]
(merge {:id (mu/generate-uuid)
:name 
:users []}
   opts))



 1. Now, if I try `*/(gen/sample create-user)/*`, or `*/(gen/sample
(gen/vector du/create))/*`it will fail.
 2. I also want to do the same thing with groups (ie /(gen/sample
create-user)/).
 3. Additionally however, I want to assert that a created group will
always have at least 1 user in the `*/:users []/*` k/v field.


How can I make test.check generators for these data structures?



Tim Washington
Interruptsoftware.com http://interruptsoftware.com


--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: CLJS Function clobbering js function of same name

2014-08-04 Thread Sam Ritchie
 AM
I dug a bit deeper to see where :js-globals came from and found the 
old ticket for this exact issue: 
http://dev.clojure.org/jira/browse/CLJS-680
I propose that we remove it, because it's unnessecary when we gensym 
fn names the same way as let bindings + blacklists are never a great 
solution, but in the case of an open set of names (such as globals 
that can differ from runtime to runtime), they are particularly awful.


Ad reproducing the issue: Can the shadowing mechanism be influenced by 
compiler flags such as :advanced?




--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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.


CLJS Function clobbering js function of same name

2014-07-31 Thread Sam Ritchie

Hey guys,

I ran into this last night when trying to port some ancient JS in our 
project over to cljs. I was defining an om component called 
users-typeahead, and in the (did-mount ...) implementation calling a 
bare javascript function called js/users_typeahead. At the repl, the 
latter worked great; INSIDE the did-mount implementation, 
js/users_typeahead resolved to a reference to the enclosing function itself.


My expectation was that, with Clojurescript's namespacing, js/func_name 
would always resolve to the top-level global namespace. Instead,


Here's a minimal reproduction:

(.log js/console Hi!)
;; logs Hi!

(defn console [s] (.log js/console s))

(console Hi!)
;; throws Compilation error: TypeError: undefined is not a function

What do you think? Expected behavior, or just an edge case to avoid?

--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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 / Core.Async Dependency Issues

2014-07-31 Thread Sam Ritchie

I've seen that too. Here's the line from my project.clj:

  ;; This is required to get around this strange bug with
  ;; core.memoize:
  ;; https://github.com/Kodowa/Light-Table-Playground/issues/794
  [org.clojure/core.memoize 0.5.6]


Timothy Washington mailto:twash...@gmail.com
July 31, 2014 at 11:28 AM
I'm trying the latest */clojure/* and */core.async/* releases on a 
fresh project (lein new thing).


(defproject thing 0.1.0-SNAPSHOT
  :description FIXME: write description
  ...
  :dependencies [*/[org.clojure/clojure 1.6.0]/*
*/[org.clojure/core.async 0.1.303.0-886421-alpha]/*])


But I get a RuntimeException: /No such var: 
clojure.core.cache/through/.


user (require '[clojure.core.async :as async :refer :all])
*/CompilerException java.lang.RuntimeException: No such var:
clojure.core.cache/through,
compiling:(clojure/core/memoize.clj:52:3)/*
user
user (pst *e)
CompilerException java.lang.RuntimeException: No such var:
clojure.core.cache/through, compiling:(clojure/core/memoize.clj:52:3)
clojure.lang.Compiler.analyze (Compiler.java:6464)
clojure.lang.Compiler.analyze (Compiler.java:6406)
clojure.lang.Compiler$InvokeExpr.parse (Compiler.java:3665)
...
clojure.lang.Compiler.analyzeSeq (Compiler.java:6632)
Caused by:
RuntimeException No such var: clojure.core.cache/through
...
clojure.lang.Compiler.analyze (Compiler.java:6406)
nil
user



After looking around (see here 
https://github.com/LightTable/LightTable/issues/794), I've tried a 
few things including different core.async versions, and including 
core.cache directly (see below). But no dice. Umm, I'm sure there's a 
simple fix for this?


(defproject thing 0.1.0-SNAPSHOT
  :description FIXME: write description
  ...
  :dependencies [[org.clojure/clojure 1.6.0]
[org.clojure/core.cache 0.6.3]
[org.clojure/core.memoize 0.5.6
:exclusions [org.clojure/core.cache]]])


(defproject thing 0.1.0-SNAPSHOT
  :description FIXME: write description
  ...
  :dependencies [[org.clojure/clojure 1.6.0]
[org.clojure/core.cache 0.6.3]
[org.clojure/core.memoize 0.5.6]
[org.clojure/core.async
0.1.303.0-886421-alpha]])



Thanks

Tim Washington
Interruptsoftware.com http://interruptsoftware.com

--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: java interoperability: No such namespace error

2014-07-31 Thread Sam Ritchie

I think you need a space before the final LogManager, not just a period:

(ns de.uni-stuttgart.iaas.ipsm.base-resource-service.core
  (:import [org.apache.logging.log4j LogManager])

The vector's just for style, a list works just as well.



Timur mailto:timurha...@gmail.com
July 31, 2014 at 1:44 PM
Hi,

(ns de.uni-stuttgart.iaas.ipsm.base-resource-service.core
  (:import (org.apache.logging.log4j.LogManager)))

(println (LogManager/getLogger))


The above simple code throws the following exception and I could not 
resolve the issue:


CompilerException java.lang.RuntimeException: No such namespace: 
LogManager, compiling:(/tmp/form-init3126046047239152769.clj:2:10)



LogManager is in the class path. Evaluation of the first expression 
does not throw any exceptions.


Anyone has any idea?


--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: An Averaging function

2014-07-10 Thread Sam Ritchie
. What does the error message mean?  and seeing this or similar again, how do 
I investigate to get a meaningful Clojure solution?


I think it means it's trying to call the value of sumed as a function. I'll 
leave it to others to suggest ways of understanding Clojure error messages (and 
just note for any of those others who have the ability to do something about 
this that it sure would be great to be able to get stack backtraces with values 
of locals regardless of IDE etc.).


3.  Code Style, what can I do to improve readability and form?


Myself, I'd probably do it without any variables at all, and name everything 
more meaningfully, e.g.:

(defn average-numbers
   Returns the average of the provided numbers.
   [numbers]
   (/ (reduce + numbers)
  (count numbers)))

=  (average-numbers [1 2 3 4])
5/2

  -Lee

Stephen Feyrer mailto:stephen.fey...@gmail.com
July 9, 2014 at 6:48 PM
Hi,

I tried to create the function below in a Lighttable instarepl.  In 
lieu of any better idea for formatting, the   statements below 
indicate instarepl output.


(defn avged ([x]
((def sumed (reduce + x))  10 
(def counted (count x))  4 
(def result (/ sumed counted))  5/2 
result
)))

(avged [1 2 3 4])  java.lang.ClassCastException: java.lang.Long 
cannot be cast to clojure.lang.IFn

Var.java:392 clojure.lang.Var.fn
Var.java:423 clojure.lang.Var.invoke
(Unknown Source) user/avged 

The objective of this function is just a learning exercise.

I have three questions:

1. Why doesn't it work, return a value?

2. What does the error message mean?  and seeing this or similar 
again, how do I investigate to get a meaningful Clojure solution?


3.  Code Style, what can I do to improve readability and form?


Thanks.

--
Stephen Feyrer.
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: An Averaging function

2014-07-09 Thread Sam Ritchie
About code style, don't do defs inside of a function - this binds them 
inside the entire namespace, so your values are escaping and persisting 
when you just want locals. Use let:


(defn averaged [x]
  (let [summed (reduce + x)
 counted (count x)]
(/ summed counted)))

That function actually does work, by the way. I suspect that farther up 
in your lighttable/repl session you bound avged to a number, like (def 
avged 10).

Stephen Feyrer mailto:stephen.fey...@gmail.com
July 9, 2014 at 6:48 PM
Hi,

I tried to create the function below in a Lighttable instarepl.  In 
lieu of any better idea for formatting, the   statements below 
indicate instarepl output.


(defn avged ([x]
((def sumed (reduce + x))  10 
(def counted (count x))  4 
(def result (/ sumed counted))  5/2 
result
)))

(avged [1 2 3 4])  java.lang.ClassCastException: java.lang.Long 
cannot be cast to clojure.lang.IFn

Var.java:392 clojure.lang.Var.fn
Var.java:423 clojure.lang.Var.invoke
(Unknown Source) user/avged 

The objective of this function is just a learning exercise.

I have three questions:

1. Why doesn't it work, return a value?

2. What does the error message mean?  and seeing this or similar 
again, how do I investigate to get a meaningful Clojure solution?


3.  Code Style, what can I do to improve readability and form?


Thanks.

--
Stephen Feyrer.
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: [question] Multimethods vs case

2014-07-08 Thread Sam Ritchie
Use multimethods if you want to open the system up for later extension 
(by a library user, for example).



Elric Erkose mailto:elric.erk...@gmail.com
July 8, 2014 at 2:02 PM
Is there any documentation or do you have thoughts on choosing between 
using multimethods vs case? I assume they both do constant time dispatch.

--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: lein install

2014-07-08 Thread Sam Ritchie
No, that's the name of a namespace - zilch is the library, and it has an 
mq namespace, I believe.


My guess is that it's a multi-module project and you're running lein 
install from the root, instead of the appropriate submodule.



Plínio Balduino mailto:pbaldu...@gmail.com
July 8, 2014 at 6:39 AM
I could guess that the problem is in the dot in the project name.

Could you try to change it to zilch-mq or zilchmq and test?

Plínio



--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
zhenxuanpan mailto:zhenxuan...@gmail.com
July 8, 2014 at 5:39 AM
when i run lein install

lein install
Compiling zilch.mq
Exception in thread main java.io.FileNotFoundException: Could not 
locate zilch/mq__init.class or zilch/mq.clj on classpath:

at clojure.lang.RT.load(RT.java:432)
at clojure.lang.RT.load(RT.java:400)
at clojure.core$load$fn__4890.invoke(core.clj:5415)
at clojure.core$load.doInvoke(core.clj:5414)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5227)
at clojure.core$compile$fn__4895.invoke(core.clj:5426)
at clojure.core$compile.invoke(core.clj:5425)
at user$eval9.invoke(form-init581473078545854006.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6511)
at clojure.lang.Compiler.eval(Compiler.java:6501)
at clojure.lang.Compiler.load(Compiler.java:6952)
at clojure.lang.Compiler.loadFile(Compiler.java:6912)
at clojure.main$load_script.invoke(main.clj:283)
at clojure.main$init_opt.invoke(main.clj:288)
at clojure.main$initialize.invoke(main.clj:316)
at clojure.main$null_opt.invoke(main.clj:349)
at clojure.main$main.doInvoke(main.clj:427)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)
Compilation failed: Subprocess failed

--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: Game logic with Clojure

2014-06-23 Thread Sam Ritchie
I like to hold the state of the game in a data structure, and have every 
function take the game state and return a new game state. Then, to 
persist the game you can just serialize the whole thing to disk.


Here's a blackjack game I wrote a while back in that style:

https://github.com/sritchie/blackjack

Hope that helps!


Majen Ful mailto:majen...@gmail.com
June 23, 2014 at 1:54 PM
Hello all,

First, thank you all for your contribution and your help. I just 
follow Clojure's news and groups, and I'm really impressed by how this 
community is pleasant and helpful.


Well, I am new to Clojure world, I do programming as a hobby (I'm not 
pro) and I don't have advanced knowledges. However I really enjoy 
programming and I like games. In a classic language, as Ruby or 
Java, I can use mutable states and objects so it is easy to reason. 
In Clojure, I understand how immutability works, but I still miss some 
reflexes.


My goal is to build a little card game 
like http://boardgamegeek.com/boardgame/128667/samurai-sword

A lot of things to do, but I have some difficulties at beginning.

For example, I can define cards, I can define some function (isdead, 
attack)... But how can I save the state of the game ? When a player 
attacks another player, the second player must have its life reduced. 
At this point, my OO reflexes are went back and don't find a solution.


Could you give me some tips and lead me to the right things to do.

Thanks by advance :-)
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: doseq with index

2014-06-22 Thread Sam Ritchie

(doseq [[idx item] (map-indexed vector a-lazy-seq)]
   (do-stuff! item idx))


Răzvan Rotaru mailto:razvan.rot...@gmail.com
June 22, 2014 at 1:50 PM
Hi,

Is there an elegant way to use a doseq or for and also get an index to 
use? I find myself using map-indexed in these cases, and I prefer more 
the for constructs.



(doall (map-indexed
(fn [i x]
  ;do stuff with side effects using i and x
 )
a-lazy-seq))


Cheers,
Razvan
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: Is it the right Clojure group for a newbie

2014-06-20 Thread Sam Ritchie
Awesome book :) I started my Clojure journey by going to Nicaragua for 
two weeks with the Little Schemer and a pad of paper. I'd spend a couple 
of hours by the beach each morning, writing lisp out by hand. You'll be 
in a pretty good head space for it by the time you get back.



douglas smith mailto:0padou...@gmail.com
June 6, 2014 at 7:32 AM
here is pdf of Little Schemer

http://scottn.us/downloads/The_Little_Schemer.pdf


On Friday, June 6, 2014 9:17:58 AM UTC-4, douglas smith wrote:
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
douglas smith mailto:0padou...@gmail.com
June 6, 2014 at 7:17 AM
Sounds like we are in a similar position.

Maybe we could start a study group of sorts. -not sure how?

We could post back to this thread for now and see what happens.

Someone have a better suggestion?

Doug






On Monday, June 2, 2014 5:36:51 PM UTC-4, shar...@gmail.com wrote:
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
sharma...@gmail.com mailto:sharma...@gmail.com
June 2, 2014 at 3:36 PM
All,
   If this is the right Clojure group for a newbie, I would like to 
ask for the best online resources to begin with. I am new to 
programming, having recently switched from a non technical field.
I have started looking at http://www.braveclojure.com/, but any 
pointers would be useful, especially cookbook styled ones.

Abha
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: Invalid timestamp

2014-06-20 Thread Sam Ritchie
yup, responded as such on the Cascalog list. (That's a better place for 
these questions; no need to cross post to the main group.)



Mike Fikes mailto:mikefi...@me.com
June 20, 2014 at 5:57 PM
It it perhaps reading the first line of your file and running it 
trough the parser?

--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
sindhu hosamane mailto:sindh...@gmail.com
June 20, 2014 at 3:40 PM
Hello,
 i am  dealing with timestamp in my cascalog query .
My code snippet looks like

(def datefrom 2010:05:03 13:20:47)

(defcustom-formatter(f/formatter:MM:dd HH:mm:ss))

(def start-value (ct/to-long (f/parse custom-formatter datefrom)))


(def dateto 2012:09:01 08:17:00)

(def end-value (ct/to-long (f/parse custom-formatter dateto)))

  (defn convert-to-long [a]

(ct/to-long (f/parse custom-formatter a)))


(?- (stdout) [?timestamp  ?category_description ]

(info-tap : ?timestamp  ?category_description )

(convert-to-long ?timestamp : ?converted-timestamp)

(= ?converted-timestamp start-value)(= ?converted-timestamp end-value)

)


my data looks like

Timestamp;assembly;category_description;eventtext;downtime;tag;process;state

2012:09:01 10:20:00;Turbine1;Event from the CU which indicates an A 
event;Event642;;5;f;5373


2012:09:01 10:20:30;Turbine1;Event from the CU which indicates an A 
event;Event642;;5;f;5373


2012:09:01 10:21:00;Turbine1;Event from the CU which indicates an A 
event;Event642;;5;f;5373


2012:09:01 10:21:30;Turbine1;Event from the CU which indicates an A 
event;Event642;;5;f;5373



I have created a custom formatter same as how my timestamp field  in 
data looks like .But inspite when i run it shows me Caused by: 
java.lang.IllegalArgumentException: Invalid format: Timestamp


whats wrong in my code ? i don't understand.

--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: Advice on data structure communication and awareness

2014-05-17 Thread Sam Ritchie

Check out Prismatic's schema:

https://github.com/Prismatic/schema

With validation turned off that's exactly what the library provides.


James Reeves mailto:ja...@booleanknot.com
May 17, 2014 11:42 AM
I've been toying around with the idea of type signatures that exist 
specifically for documentation purposes, loosely inspired by the stack 
effect declarations in Factor.


For example, in your case we might start with something like:

(defn count-items
  {:doc/type '([{Keyword String} - Integer])}
  [m])

And then change it to:

(defn count-items
  {:doc/type '([[ [Keyword String]] - Integer])}
  [m])

This might produce docs like:

  (count-items {Keyword String}) → Integer

  (count-items [ [Keyword String]]) → Integer

Or for more standard functions:

  (assoc {k v} k v) → {k v}

  (get {k v} k) → v

As you can probably tell, these type definitions wouldn't be 
sufficient for core.typed or even Prismatic's schema. Their purpose 
would be purely to give end users an approximate understanding of the 
function at a glance.


I've yet to completely sell myself on this idea, however.

- James



--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Mike Fikes mailto:mikefi...@me.com
May 17, 2014 8:22 AM
I've never used a dynamically-typed language and an issue I've 
encountered with Clojure is a difficulty with readily seeing the 
data structures being consumed or returned by functions I'm writing, 
especially when I come back to them several days later and if those 
structures get to be somewhat nested or otherwise complex.


As a small concrete example, lets say that I currently have a function 
that accepts data that looks like {:a A :b B} and, at some point I 
change the internals of the function to instead operate on data that 
looks like [[:a A] [:b B]].


I could see the docstring communicating that the initial 
implementation of the function accepts a map, and then perhaps it 
boils down to finding suitable language to describe the structure in 
the revised implementation (sequence of pairs, relation, or some 
other language suitable to the abstraction).


I suppose this is no different than the documentation aspect that 
generics provided in Java when we went from raw types like List to 
ListString, but, of course, generics can get unwieldy rather quickly 
with things like ListMapString,SetInteger.


Does there exist idiomatic language that developers employ in their 
docstrings to quickly convey this kind of info? I see that the 
docstrings for clojure.core are fairly readable, but they tend to 
operate on very simple data structures.

--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: Advice on data structure communication and awareness

2014-05-17 Thread Sam Ritchie

Ah, sorry, didn't see your reference at the bottom :)

Schema does augment the docs to some degree:

paddleguru.models.transfer/payout!
([regatta balance our-fee their-fee])
  Inputs: [regatta :- regatta/Regatta balance :- graph/Balance our-fee 
:- s/Num their-fee :- s/Num]

  Returns: {:success s/Bool, :message s/Str}

  Performs a payout for the supplied regatta. If either of the
  supplied balances can't be satisfied by current available funds,
  this method returns success false and a message explaining what
  happened. Else, it'll create all transfers and return success and a
  nice note.


James Reeves mailto:ja...@booleanknot.com
May 17, 2014 11:42 AM
I've been toying around with the idea of type signatures that exist 
specifically for documentation purposes, loosely inspired by the stack 
effect declarations in Factor.


For example, in your case we might start with something like:

(defn count-items
  {:doc/type '([{Keyword String} - Integer])}
  [m])

And then change it to:

(defn count-items
  {:doc/type '([[ [Keyword String]] - Integer])}
  [m])

This might produce docs like:

  (count-items {Keyword String}) → Integer

  (count-items [ [Keyword String]]) → Integer

Or for more standard functions:

  (assoc {k v} k v) → {k v}

  (get {k v} k) → v

As you can probably tell, these type definitions wouldn't be 
sufficient for core.typed or even Prismatic's schema. Their purpose 
would be purely to give end users an approximate understanding of the 
function at a glance.


I've yet to completely sell myself on this idea, however.

- James



--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Mike Fikes mailto:mikefi...@me.com
May 17, 2014 8:22 AM
I've never used a dynamically-typed language and an issue I've 
encountered with Clojure is a difficulty with readily seeing the 
data structures being consumed or returned by functions I'm writing, 
especially when I come back to them several days later and if those 
structures get to be somewhat nested or otherwise complex.


As a small concrete example, lets say that I currently have a function 
that accepts data that looks like {:a A :b B} and, at some point I 
change the internals of the function to instead operate on data that 
looks like [[:a A] [:b B]].


I could see the docstring communicating that the initial 
implementation of the function accepts a map, and then perhaps it 
boils down to finding suitable language to describe the structure in 
the revised implementation (sequence of pairs, relation, or some 
other language suitable to the abstraction).


I suppose this is no different than the documentation aspect that 
generics provided in Java when we went from raw types like List to 
ListString, but, of course, generics can get unwieldy rather quickly 
with things like ListMapString,SetInteger.


Does there exist idiomatic language that developers employ in their 
docstrings to quickly convey this kind of info? I see that the 
docstrings for clojure.core are fairly readable, but they tend to 
operate on very simple data structures.

--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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

Re: [ANN] Automat: better FSMs through combinators

2014-05-16 Thread Sam Ritchie
...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: JSON authentication with cemerick/friend?

2014-05-05 Thread Sam Ritchie
#workflows



(def users {root {:username root
:password (creds/hash-bcrypt admin_password)
:roles #{::admin}}
jane {:username jane
:password (creds/hash-bcrypt test)
:roles #{::user}}})


(defroutes app-routes

  (GET /test [] {:body {:my-map helo}})
  (route/resources /)
  (route/not-found Not found))

(def app
  (-
  (handler/api app-routes)
  (middleware/wrap-json-body)
  (middleware/wrap-json-response)

   (friend/authenticate {:credential-fn (partial 
creds/bcrypt-credential-fn users)

:workflows [
(workflows/interactive-form)]})
  )
  )



I'm testing with curl:

curl -v --data username=janepassword=test http://localhost:3000/login

Or:

curl -v --request POST 
 http://localhost:3000/login?username=janepassword=test 
http://localhost:3000/login?username=janepassword=test


And I get:

* About to connect() to localhost port 3000 (#0)
*   Trying ::1...
* connected
* Connected to localhost (::1) port 3000 (#0)
 POST /login?username=janepassword=test HTTP/1.1
 User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 
OpenSSL/0.9.8y zlib/1.2.5

 Host: localhost:3000
 Accept: */*

 HTTP/1.1 302 Found
 Date: Wed, 23 Apr 2014 22:25:15 GMT
 Location: http://localhost:3000/login?login_failed=Yusername= 
http://localhost:3000/login?login_failed=Yusername=

 Content-Length: 0
 Server: Jetty(7.6.8.v20121106)

* Connection #0 to host localhost left intact
* Closing connection #0


This looks like authentication failed, but the data is correct. I 
reviewed the curl request, and this seems to be the correct way to 
send a POST. But username= gives me the impression it's not being 
parsed correctly.


Also, how can I get a JSON response instead of only a header?

Thanks.

P.S. Maybe it would be positive if this library has an own Google Group.
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: JSON authentication with cemerick/friend?

2014-04-23 Thread Sam Ritchie
I wrote a post that tries to explain all the crazy cases you need to 
handle to dispatch Friend responses based on content type:


http://sritchie.github.io/2014/01/17/api-authentication-with-liberator-and-friend/

Liberator can be helpful for this.


Ivan Schuetz mailto:ivanschu...@gmail.com
April 23, 2014 3:28 PM
Hi,

I'm trying to get a simple use case running - send a login request to 
/login and get success or fail response, preferably in JSON format.


I followed the example in https://github.com/cemerick/friend#workflows 
https://github.com/cemerick/friend#workflows



(def users {root {:username root
:password (creds/hash-bcrypt admin_password)
:roles #{::admin}}
jane {:username jane
:password (creds/hash-bcrypt test)
:roles #{::user}}})


(defroutes app-routes

  (GET /test [] {:body {:my-map helo}})
  (route/resources /)
  (route/not-found Not found))

(def app
  (-
  (handler/api app-routes)
  (middleware/wrap-json-body)
  (middleware/wrap-json-response)

   (friend/authenticate {:credential-fn (partial 
creds/bcrypt-credential-fn users)

:workflows [
(workflows/interactive-form)]})
  )
  )



I'm testing with curl:

curl -v --data username=janepassword=test http://localhost:3000/login

Or:

curl -v --request POST 
 http://localhost:3000/login?username=janepassword=test 
http://localhost:3000/login?username=janepassword=test


And I get:

* About to connect() to localhost port 3000 (#0)
*   Trying ::1...
* connected
* Connected to localhost (::1) port 3000 (#0)
 POST /login?username=janepassword=test HTTP/1.1
 User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 
OpenSSL/0.9.8y zlib/1.2.5

 Host: localhost:3000
 Accept: */*

 HTTP/1.1 302 Found
 Date: Wed, 23 Apr 2014 22:25:15 GMT
 Location: http://localhost:3000/login?login_failed=Yusername= 
http://localhost:3000/login?login_failed=Yusername=

 Content-Length: 0
 Server: Jetty(7.6.8.v20121106)

* Connection #0 to host localhost left intact
* Closing connection #0


This looks like authentication failed, but the data is correct. I 
reviewed the curl request, and this seems to be the correct way to 
send a POST. But username= gives me the impression it's not being 
parsed correctly.


Also, how can I get a JSON response instead of only a header?

Thanks.

P.S. Maybe it would be positive if this library has an own Google Group.
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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: [ANN] Sente - Clojure(Script) + core.async + WebSockets/Ajax

2014-04-15 Thread Sam Ritchie
Hey Peter,

I like the UUID feature, but it doesn't look like the list of all connected 
users is available in the API. How would you do a global broadcast to all 
connected clients using Sente? I'm having trouble figuring out how to write 
a chat demo using Sente.

Thanks for your work!

On Wednesday, February 26, 2014 6:57:24 AM UTC-7, Peter Taoussanis wrote:

 Hi folks,

 Quick post to announce a new lib release: 
 https://github.com/ptaoussanis/sente

 From the README:
 *Sente* is small client+server library that makes it easy to build *reliable, 
 high-performance realtime web applications with Clojure*.

 * *Bidirectional a/sync comms* over both *WebSockets* and *Ajax* 
 (auto-selecting).
 * *Robust*: auto keep-alives, buffering, mode fallback, reconnects.
 * edn rocks. So *send edn, get edn*: no json here.
 * *Tiny, simple API*: make-channel-socket! and you're good to go.
 * Automatic, sensible support for users connected with *multiple clients* 
 and/or 
 devices simultaneously.
 * *Flexible model*: use it anywhere you'd use WebSockets or Ajax.
 * *Fully documented, with examples* (more forthcoming).
 * Small: *less than 600 lines of code* for the entire client+server 
 implementation.
 * *Supported servers*: currently only http-kit, but easily extended.

 ---
 Have been using something like this in production since a little after 
 core.async came out, and wouldn't want to go back. Note that I tweaked a 
 few things for the public release so there may be some rough edges 
 initially. 

 An example project's included (new as of today) and there's a Leiningen 
 alias configured to handle all the fiddly bits like getting the Cljx and 
 Cljs to compile: just download, `lein start-dev` at a terminal, and you're 
 good to go.

 Any questions/problems/whatever, you can reach me here or on GitHub.

 That's it! Happy hacking, cheers! :-)
 - *Peter Taoussanis*
 https://twitter.com/ptaoussanis
 https://www.taoensso.com/clojure-libraries


-- 
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: [ANN] Sente - Clojure(Script) + core.async + WebSockets/Ajax

2014-04-15 Thread Sam Ritchie
I think the two granularities I'd be interested in are channels and 
individual users.


If we exposed a global list of uids, and a list of UIDs per channel, I 
think we'd have enough to build up a nice set of broadcast operations. 
For example:


- Broadcast to this channel for users that pass this predicate
- hit these multiple channels except for these users
- re-broadcast this user's message to everyone in the channel except 
this user


So yeah, I think that exposing a list will get us pretty far. The 
missing piece, then, would be the ability for a a client to send a 
connection request for a specific channel.



Peter Taoussanis mailto:ptaoussa...@gmail.com
April 15, 2014 10:18 AM
Hey Sam!

it doesn't look like the list of all connected users is available
in the API.


Yeah, that's right. Have been punting on this...

For the moment have left it up to applications to decide who they're 
interested in broadcasting to. This might be everyone that's 
connected, everyone that's connected with certain credentials, 
everyone subscribed to certain topics, etc.


Basically the application's expected to keep an appropriate index of 
event-types - user-ids.


Haven't thought much about what kind of help the core API could offer. 
Probably a good starting point would be a simple set of all currently 
connected uids. Then folks could intersect that against their own 
subscriptions, etc.


Would that be helpful in your case? Otherwise, like I say - haven't 
thought much about this so ideas would be very welcome.


Cheers! :-)
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Sam Ritchie mailto:sritchi...@gmail.com
April 15, 2014 9:05 AM
Hey Peter,

I like the UUID feature, but it doesn't look like the list of all 
connected users is available in the API. How would you do a global 
broadcast to all connected clients using Sente? I'm having trouble 
figuring out how to write a chat demo using Sente.


Thanks for your work!

On Wednesday, February 26, 2014 6:57:24 AM UTC-7, Peter Taoussanis wrote:
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Peter Taoussanis mailto:ptaoussa...@gmail.com
February 26, 2014 6:57 AM
Hi folks,

Quick post to announce a new lib release: 
https://github.com/ptaoussanis/sente


From the README:
*Sente* is small client+server library that makes it easy to build 
*reliable, high-performance realtime web applications with Clojure*.


* *Bidirectional a/sync comms*over 
both*WebSockets*and*Ajax*(auto-selecting).

* *Robust*: auto keep-alives, buffering, mode fallback, reconnects.
* ednrocks. So*send edn, get edn*: no json here.
* *Tiny, simple API*:|make-channel-socket!|and you're good to go.
* Automatic, sensible support for users connected with*multiple 
clients*and/or devices simultaneously.

* *Flexible model*: use it anywhere you'd use WebSockets or Ajax.
* *Fully documented, with examples*(more forthcoming).
* Small:*less than 600 lines of code*for the entire client+server 
implementation.

* *Supported servers*: currently onlyhttp-kit, but easily extended.

---
Have been using something like this in production since a little after 
core.async came out, and wouldn't want to go back. Note that I tweaked 
a few things for the public release so there may be some rough edges 
initially.


An example project's included (new as of today) and there's a 
Leiningen alias configured to handle all the fiddly bits like getting 
the Cljx and Cljs to compile: just download, `lein start-dev` at a 
terminal, and you're good to go.


Any questions/problems/whatever, you can reach me here or on GitHub.

That's it! Happy hacking, cheers! :-)
- *Peter

Re: using contrib functions

2014-03-29 Thread Sam Ritchie
defadt defines an algebraic data type - so, imagine a record with a 
finite number of implementations (Boolean is an algebraic data type 
since it only has true and false, for example. Chess pieces would be 
another one.)


Once you define an ADT you can use that contrib library's match macro 
to do exhaustive case matches. Without the defadt thing, you just have 
to trust that the user knows how to handle all of your cases.



Sean Corfield mailto:s...@corfield.org
March 28, 2014 9:05 PM

That's very out of date documentation. The current documentation is here:

http://clojure.github.io/

The old monolithic clojure-contrib library hasn't been maintained for 
a very long time.


Some parts of that library were migrated to the new modular contrib 
libraries. You can read more about that here:


http://dev.clojure.org/display/community/Where+Did+Clojure.Contrib+Go

The old clojure.contrib.types library was not one of those so it's 
essentially gone now. That usually means there are better ways to do 
what the old library did - or that the old library was never really a 
good way to do things in the first place. I've no idea what defadt was 
meant to do, I'm afraid.


Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

Perfection is the enemy of the good.
-- Gustave Flaubert, French realist novelist (1821-1880)



Christopher Howard mailto:cmhowa...@alaska.edu
March 28, 2014 8:40 PM
Hi. --Insert here the usual caveats about being new to Clojure and
Java.--

I wanted to try out this Contrib function describe on this
page
http://richhickey.github.io/clojure-contrib/types-api.html#clojure.contrib.types/defadt. 
How

do I get that in my project? Trying to follow documentation, I did
lein search:

code:

my-host:~/my-project$ lein search contrib
Warning: couldn't download index for http://repo1.maven.org/maven2
== Results from clojars - Showing page 1 / 1 total
[webnf.deps/contrib 0.0.1] The uber dependency to get a full set of 
popular

dependencies. For development or when you have room in your .m2 repo.

my-host:~/my-project$ lein search clojure.contrib.types
Warning: couldn't download index for http://repo1.maven.org/maven2
my-host:~/my-project$ lein search defadt
Warning: couldn't download index for http://repo1.maven.org/maven2


Is that webnf package the thing I am supposed to put in my
dependencies list? Version 0.0.1 doesn't sound right. Or am I
supposed to download something myself and throw it in my lib
directory?



--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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.
inline: postbox-contact.jpginline: compose-unknown-contact.jpg

Re: [soft/philosophical] event handers in cljs

2014-03-09 Thread Sam Ritchie
Well, I typically have multiple channels. No need to have a single 
global event bus for everything. With multiple channels, you can have a 
bunch of local event loops.



t x mailto:txrev...@gmail.com
March 9, 2014 1:43 PM
Hi,

Before core.async, the way I did event handling in cljs was:


## approach 1
goog.events.listen(... , callback-func)

After learning core.async, I read (and liked the idea of):

## approach 2
* (defn global-events (core.async/chan 1))
* shove all events on to global-events
* have a go-thread ! from global-events and process there



### Question


I'm now shifting back to liking approach 1 a bit more. The reason
being: at the point where I define the GUI element, I also define it's
behavior.


Approach 2 has this weird coupling, where it's like:

I'm going to define my GUI elements at location X.

Then, at location Y, which centralizes event processing, I'm going
to define how each event is handled.


What are people's takes on this? Am I doing approach 2 incorrectly,
or does approach 1 actually has it's merits?

Thanks!



--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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.
inline: compose-unknown-contact.jpg

Re: Uberjar woes

2014-02-27 Thread Sam Ritchie

Hey Tom,

Can you post your project.clj for us to take a peek?


Tom Connors mailto:t.v.conn...@gmail.com
February 27, 2014 12:49 PM
Hi Everyone,
I've been having trouble creating an uberjar of a project and I'm 
hoping someone here can point me toward a solution.
After cleaning out the target directory (with lein clean) and 
preprocessing my cljx, I can run the project with no trouble using 
lein repl and lein run. I can package up the project (lein 
with-profile prd uberjar) and get the resultant jar files. After that, 
the trouble starts. Running the jar (java -jar my-standalone.jar) 
fails with a NoClassDefFoundError error, pointing at a protocol 
defined in weaverjester's clout - 
https://github.com/weavejester/cloutclout/core/Route. I highly doubt 
clout actually has anything to do with the problem. After creating the 
uberjar, I can no longer run the project with lein run or lein repl - 
I get the same error, and I can't do anything with lein without 
getting that error until I remove the target directory.
I've inspected the jar and can see that it contains clout, but just 
clout/core.clj - no .class files. I edited clout's project.clj to 
include :aot :all, packaged it into a jar, replaced the clout jar in 
my local maven repo with that new jar, and re-packaged my project. At 
this point, when I ran the jar, I got another NoClassDefFoundError, 
this time pointing at another protocol, but this one from 
clojure.core: clojure/lang/ILookupHost.
I've been having this problem with the latest leiningen (2.3.4) and 
2.2.0.
I've been futzing with my project.clj for some time, but to no avail. 
Any help greatly appreciated.

-Tom
--
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 
mailto:clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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/groups/opt_out.
inline: compose-unknown-contact.jpg

Re: Email delivery libs not working

2014-02-24 Thread Sam Ritchie
If you want to use Mandrill, here's a gist with my core.async mandrill 
API code I wrote for PaddleGuru:


https://gist.github.com/sritchie/9191297

You can figure out the requires from the namespace declaration, I think. 
I use the conf namespace to get my API key (toggled for prod and dev), 
and collectify is just this:


(defn collectify [obj]
(cond (nil? obj) []
  (or (sequential? obj) (instance? List obj)) obj
  :else [obj]))

It's not the full API, of course, but it should get you going.

The Dude (Abides) mailto:exel...@gmail.com
February 24, 2014 3:33 AM
Hi, I'm new to clojure and have got a productive handle on CRUD, 
sessions, routing, writing functions. Last couple things are email 
delivery, image processing (resizing).


So I looked on the clojure-toolbox site for email delivery libs with 
smtp authentication for a Mandrill acct fo transactional emails. I've 
used Mandrill in other langs right away zero glitch. Here's the 
results thus far in Clojure as a frame of reference for web domain use 
2014:


POSTAL
https://github.com/drewr/postal#encryption-gmail-example

Doesn't deliver. Tried number of examples in the docs.

MAILER
https://github.com/clojurewerkz/mailer

Worked briefly, but not via Mandrill, no emails reached there. 
Authentication settings have no impact, uses Postal above lib for 
delivery. Tried number of examples in the docs.


CLJ MAIL
https://github.com/MayDaniel/clj-mail

Out of date syntax.

I googled and found a couple more in the quest to avoid having to do 
this via java heaven forbid:


MMEmail
http://blog.8thlight.com/micah-martin/2010/04/21/mmemail-my-first-clojure-open-source-contribution.html

Says cannot connect to port 25 although my settings specify port 587 
for Mandrill


POSTMARK
http://sjl.bitbucket.org/clojure-postmark/

Transactional email delivery service with a clojure lib. Will create 
an acct in morning and try it out.


Doe anyone know of any other smooth workable out the gate solutions 
for email delivery?

--
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/groups/opt_out.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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/groups/opt_out.
inline: compose-unknown-contact.jpg

Re: [ANN] lein-modules 0.1.0 - multi-module support in Leiningen

2014-02-10 Thread Sam Ritchie
Nice, this looks great! SBT has a great multi-module story; this was the 
only thing I've missed, moving back from Scala. Thank you!



Jim Crossley mailto:jcrossl...@gmail.com
February 10, 2014 7:36 AM
Maven multi-module projects provide support for project aggregation, 
letting you define parent-child relationships among a group of 
projects to achieve interdependence-based build ordering, limited 
project inheritance, and centralized dependency management.


Maven's pom.xml files are verbose, error-prone, and just generally 
gross, especially for multi-module projects, so I wanted to see if I 
could provide the above features using Leiningen. The fruit of my 
labor thus far is this plugin:


   https://github.com/jcrossley3/lein-modules

Project inheritance is achieved using Leiningen profiles. This is more 
flexible than Maven, where the values subject to inheritance are 
hard-coded. And profiles defined in your project's ancestors are 
activated appropriately for each task, as you would expect.


Dependency management is a lot simpler, too: it's just a map of 
dependency symbols to version strings, from which your dependency 
specs are populated by Leiningen middleware.


See the README for more details and an example.

Love,
Jim

--
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/groups/opt_out.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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/groups/opt_out.
inline: compose-unknown-contact.jpg

Re: dynalint, lein-dynalint 0.1.2 - Warn on (zipmap (keys m) (vals m))

2014-02-01 Thread Sam Ritchie
I added this to the :injections vector of my lein project; it looks 
really helpful, but when compiling in emacs via nRepl, without the line 
number, it's really hard to track down these errors. Is there any way 
that dynalint could (optionally) output more info about where the 
infraction takes place?



Ambrose Bonnaire-Sergeant mailto:abonnaireserge...@gmail.com
February 1, 2014 6:38 AM
Hi,

If you're interested in refactoring out instances of (zipmap (keys m) 
(vals m)),

then dynalint 0.1.2 may help.


|[com.ambrosebs/dynalint 0.1.2]|

I've added a simplistic case that warns if a 
clojure.lang.APersistentMap$KeysSeq or ValsSeq is passed to zipmap.


user= (require '[dynalint.lint :as dyn])
nil
user= (dyn/lint)
:ok
user= (let [m {1 2 3 4}
  #_=   ks (keys m)
  #_=   vs (vals m)]
  #_=   (zipmap ks vs))
WARNING (Dynalint id 1):  Should not pass result of clojure.core/keys 
to zipmap
WARNING (Dynalint id 2):  Should not pass result of clojure.core/vals 
to zipmap

{3 4, 1 2}
user=

Note: dynalint only supports Clojure 1.5.1.

dynalint README https://github.com/frenchy64/dynalint
dynalint CHANGELOG https://github.com/frenchy64/lein-dynalint

lein-dynalint README https://github.com/frenchy64/lein-dynalint

Thanks,
Ambrose
--
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/groups/opt_out.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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/groups/opt_out.
inline: postbox-contact.jpg

Re: dynalint, lein-dynalint 0.1.2 - Warn on (zipmap (keys m) (vals m))

2014-02-01 Thread Sam Ritchie

Let me see how I can work that into the flow. Thanks!


Ambrose Bonnaire-Sergeant mailto:abonnaireserge...@gmail.com
February 1, 2014 6:58 AM
Hi Sam,

Are you familiar of dynalint.lint/print-warning?

That's really the best idea I've come up with.

Thanks,
Ambrose



--
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/groups/opt_out.
Sam Ritchie mailto:sritchi...@gmail.com
February 1, 2014 6:54 AM
I added this to the :injections vector of my lein project; it looks 
really helpful, but when compiling in emacs via nRepl, without the 
line number, it's really hard to track down these errors. Is there any 
way that dynalint could (optionally) output more info about where the 
infraction takes place?



Ambrose Bonnaire-Sergeant mailto:abonnaireserge...@gmail.com
February 1, 2014 6:38 AM
Hi,

If you're interested in refactoring out instances of (zipmap (keys m) 
(vals m)),

then dynalint 0.1.2 may help.


|[com.ambrosebs/dynalint 0.1.2]|

I've added a simplistic case that warns if a 
clojure.lang.APersistentMap$KeysSeq or ValsSeq is passed to zipmap.


user= (require '[dynalint.lint :as dyn])
nil
user= (dyn/lint)
:ok
user= (let [m {1 2 3 4}
  #_=   ks (keys m)
  #_=   vs (vals m)]
  #_=   (zipmap ks vs))
WARNING (Dynalint id 1):  Should not pass result of clojure.core/keys 
to zipmap
WARNING (Dynalint id 2):  Should not pass result of clojure.core/vals 
to zipmap

{3 4, 1 2}
user=

Note: dynalint only supports Clojure 1.5.1.

dynalint README https://github.com/frenchy64/dynalint
dynalint CHANGELOG https://github.com/frenchy64/lein-dynalint

lein-dynalint README https://github.com/frenchy64/lein-dynalint

Thanks,
Ambrose
--
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/groups/opt_out.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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/groups/opt_out.
inline: postbox-contact.jpginline: postbox-contact.jpg

Re: dynalint, lein-dynalint 0.1.2 - Warn on (zipmap (keys m) (vals m))

2014-02-01 Thread Sam Ritchie

Thanks for the help! This is great.


Ambrose Bonnaire-Sergeant mailto:abonnaireserge...@gmail.com
February 1, 2014 7:16 AM
I just realised it's undocumented.

(print-warning) prints the latest warning.

(print-warning id) prints the dynalint warning with the corresponding id

(print-warning id depth) also has depth like clojure.repl/pst.

Ditto with print-error.

Thanks,
Ambrose



--
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/groups/opt_out.
Sam Ritchie mailto:sritchi...@gmail.com
February 1, 2014 7:14 AM
Let me see how I can work that into the flow. Thanks!


Ambrose Bonnaire-Sergeant mailto:abonnaireserge...@gmail.com
February 1, 2014 6:58 AM
Hi Sam,

Are you familiar of dynalint.lint/print-warning?

That's really the best idea I've come up with.

Thanks,
Ambrose



--
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/groups/opt_out.
Sam Ritchie mailto:sritchi...@gmail.com
February 1, 2014 6:54 AM
I added this to the :injections vector of my lein project; it looks 
really helpful, but when compiling in emacs via nRepl, without the 
line number, it's really hard to track down these errors. Is there any 
way that dynalint could (optionally) output more info about where the 
infraction takes place?



Ambrose Bonnaire-Sergeant mailto:abonnaireserge...@gmail.com
February 1, 2014 6:38 AM
Hi,

If you're interested in refactoring out instances of (zipmap (keys m) 
(vals m)),

then dynalint 0.1.2 may help.


|[com.ambrosebs/dynalint 0.1.2]|

I've added a simplistic case that warns if a 
clojure.lang.APersistentMap$KeysSeq or ValsSeq is passed to zipmap.


user= (require '[dynalint.lint :as dyn])
nil
user= (dyn/lint)
:ok
user= (let [m {1 2 3 4}
  #_=   ks (keys m)
  #_=   vs (vals m)]
  #_=   (zipmap ks vs))
WARNING (Dynalint id 1):  Should not pass result of clojure.core/keys 
to zipmap
WARNING (Dynalint id 2):  Should not pass result of clojure.core/vals 
to zipmap

{3 4, 1 2}
user=

Note: dynalint only supports Clojure 1.5.1.

dynalint README https://github.com/frenchy64/dynalint
dynalint CHANGELOG https://github.com/frenchy64/lein-dynalint

lein-dynalint README https://github.com/frenchy64/lein-dynalint

Thanks,
Ambrose
--
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/groups/opt_out.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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/groups

Re: dynalint, lein-dynalint 0.1.2 - Warn on (zipmap (keys m) (vals m))

2014-02-01 Thread Sam Ritchie

ah, nice. Yeah, that should work.


Ambrose Bonnaire-Sergeant mailto:abonnaireserge...@gmail.com
February 1, 2014 7:16 AM
I just realised it's undocumented.

(print-warning) prints the latest warning.

(print-warning id) prints the dynalint warning with the corresponding id

(print-warning id depth) also has depth like clojure.repl/pst.

Ditto with print-error.

Thanks,
Ambrose



--
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/groups/opt_out.
Sam Ritchie mailto:sritchi...@gmail.com
February 1, 2014 7:14 AM
Let me see how I can work that into the flow. Thanks!


Ambrose Bonnaire-Sergeant mailto:abonnaireserge...@gmail.com
February 1, 2014 6:58 AM
Hi Sam,

Are you familiar of dynalint.lint/print-warning?

That's really the best idea I've come up with.

Thanks,
Ambrose



--
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/groups/opt_out.
Sam Ritchie mailto:sritchi...@gmail.com
February 1, 2014 6:54 AM
I added this to the :injections vector of my lein project; it looks 
really helpful, but when compiling in emacs via nRepl, without the 
line number, it's really hard to track down these errors. Is there any 
way that dynalint could (optionally) output more info about where the 
infraction takes place?



Ambrose Bonnaire-Sergeant mailto:abonnaireserge...@gmail.com
February 1, 2014 6:38 AM
Hi,

If you're interested in refactoring out instances of (zipmap (keys m) 
(vals m)),

then dynalint 0.1.2 may help.


|[com.ambrosebs/dynalint 0.1.2]|

I've added a simplistic case that warns if a 
clojure.lang.APersistentMap$KeysSeq or ValsSeq is passed to zipmap.


user= (require '[dynalint.lint :as dyn])
nil
user= (dyn/lint)
:ok
user= (let [m {1 2 3 4}
  #_=   ks (keys m)
  #_=   vs (vals m)]
  #_=   (zipmap ks vs))
WARNING (Dynalint id 1):  Should not pass result of clojure.core/keys 
to zipmap
WARNING (Dynalint id 2):  Should not pass result of clojure.core/vals 
to zipmap

{3 4, 1 2}
user=

Note: dynalint only supports Clojure 1.5.1.

dynalint README https://github.com/frenchy64/dynalint
dynalint CHANGELOG https://github.com/frenchy64/lein-dynalint

lein-dynalint README https://github.com/frenchy64/lein-dynalint

Thanks,
Ambrose
--
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/groups/opt_out.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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/groups

Re: order of returned values from keys and vals

2014-02-01 Thread Sam Ritchie

Looks like Rich just chimed in with:

keys order == vals order == seq order 


Matching Socks mailto:phill.w...@gmail.com
January 31, 2014 7:31 PM
Actually, http://dev.clojure.org/jira/browse/CLJ-1302 keys and vals 
consistency not mentioned in docstring was declined, with the comment 
The absence of this property in the docs is correct. You should not 
rely on this.




On Wednesday, August 11, 2010 6:03:39 PM UTC-4, Chouser wrote:
--
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/groups/opt_out.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
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/groups/opt_out.
inline: compose-unknown-contact.jpg

Re: Java interoperability

2014-01-27 Thread Sam Ritchie

Where do you see that method?

https://github.com/jayway/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/JsonPath.java

Perusing the code, it looks like it doesn't exist.


Paul Smith mailto:paulaaronsmit...@gmail.com
January 27, 2014 8:21 AM
Hi,

I am attempting to use Java interoperability.

I have downloaded a dependency through Leiningen

[com.jayway.jsonpath/json-path 0.9.1]

I import the dependency into a namespace

(:import (com.jayway.jsonpath JsonPath)

The Java class, JsonPath has a static method 'read' that takes two
strings as arguments.

However, when I try to evaluate this expression

(JsonPath/read  )

I receive  java.lang.IllegalArgumentException: No matching method: read

I am unsure on what I am doing wrong here?

Many Thanks

Paul
--
--
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/groups/opt_out.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
--
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/groups/opt_out.
inline: compose-unknown-contact.jpg

Re: [ANN] com.stuartsierra/frequencies 0.1.0

2014-01-25 Thread Sam Ritchie

Nice! Aphyr's interval-metrics also does a really nice job here:

https://github.com/aphyr/interval-metrics


Stuart Sierra mailto:the.stuart.sie...@gmail.com
January 25, 2014 10:39 AM
New Clojure library frequencies

https://github.com/stuartsierra/frequencies

Basic statistical computations (mean, median, etc.) on */frequency 
maps/*, e.g. the map returned by `clojure.core/frequencies`.


A frequency map can represent (or approximate) a large distribution of 
values in a small amount of memory.


Log files, benchmarks, and load tests frequently produce data sets 
that are too large to store entirely in memory. Frequency maps are a 
convenient way to get a summary view of these data sets.



Leiningen dependency:

[com.stuartsierra/frequencies 0.1.0-SNAPSHOT]


Special thanks to Craig Andera for code review and Cognitect for 20% time.
--
--
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/groups/opt_out.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
--
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/groups/opt_out.
inline: postbox-contact.jpg

Re: OOP question re: The Language of the System

2014-01-19 Thread Sam Ritchie
 the data wouldn't need this functionality.


- James
--
--
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/groups/opt_out.
Brian Craft mailto:craft.br...@gmail.com
January 19, 2014 12:55 PM
http://www.youtube.com/watch?v=ROor6_NGIWU

Around 56:28 Rich is talking about whether components pass a data 
structure, or an object that has all these verbs and knows how to do 
stuff 


Clojure data types also have verbs, in protocols, and if one component 
passes a record to another component, the receiver will need to use 
those verbs to make use of the data. How is that different than the 
OOP example? There's the syntactic difference that in OOP you write it 
object, verb, arguments, and in clojure you write it verb, object, 
arguments. But that's trivial. How is it architecturally different to 
pass an object with methods vs passing a record with protocol?

--
--
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/groups/opt_out.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
--
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/groups/opt_out.
inline: postbox-contact.jpginline: compose-unknown-contact.jpg

Re: RESTful API Auth with Friend and Liberator

2014-01-18 Thread Sam Ritchie

Hey,

These are the choices and libraries that drove me toward Liberator. 
Liberator should help with the API definitions, and (with a little trust 
and understanding) Friend shouldn't get in your way with auth.


FWIW We currently use ClojureScript with template sharing between 
Enfocus on the client and Enlive on the server. For a new payments 
dashboard I'm going to try out Om.



clojure.u...@gmail.com mailto:clojure.u...@gmail.com
January 17, 2014 9:28 PM
Thanks!

I have been looking at a lot of combinations for the front end to go 
with the liberator/friend back end e.g. using client-side technologies


om(clojurescript)
purnam (angularjs + clojurescript)

or going for a server side
hiccup/enlive templating + clojurescript (for any client side js)

I know it is not directly relevant but would like to know what you 
experience has been and what would you suggest.


Thanks in advance!



On Saturday, January 18, 2014 2:57:10 AM UTC+5:30, Sam Ritchie wrote:
--
--
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/groups/opt_out.
Sam Ritchie mailto:sritchi...@gmail.com
January 17, 2014 2:27 PM
Hey guys,

Those of you working on webapps might find this interesting:

http://sritchie.github.io/2014/01/17/api-authentication-with-liberator-and-friend/

Enjoy!


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
--
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/groups/opt_out.
inline: compose-unknown-contact.jpginline: postbox-contact.jpg

Re: RESTful API Auth with Friend and Liberator

2014-01-18 Thread Sam Ritchie

The code for that tutorial is all here:

https://github.com/paddleguru/liberator-friend

PaddleGuru.com isn't open source, so I can't share any of the 
dashboards, unfortunately. Maybe some examples down the road.



Bastien mailto:bastiengue...@gmail.com
January 18, 2014 9:39 AM
Hi Sam,


Can we see the code, by any chance?

It would be great -- tutorials are fun to read, but real-world
examples with well commented code is even better IMHO.

Sam Ritchie mailto:sritchi...@gmail.com
January 18, 2014 7:29 AM
Hey,

These are the choices and libraries that drove me toward Liberator. 
Liberator should help with the API definitions, and (with a little 
trust and understanding) Friend shouldn't get in your way with auth.


FWIW We currently use ClojureScript with template sharing between 
Enfocus on the client and Enlive on the server. For a new payments 
dashboard I'm going to try out Om.



clojure.u...@gmail.com mailto:clojure.u...@gmail.com
January 17, 2014 9:28 PM
Thanks!

I have been looking at a lot of combinations for the front end to go 
with the liberator/friend back end e.g. using client-side technologies


om(clojurescript)
purnam (angularjs + clojurescript)

or going for a server side
hiccup/enlive templating + clojurescript (for any client side js)

I know it is not directly relevant but would like to know what you 
experience has been and what would you suggest.


Thanks in advance!



On Saturday, January 18, 2014 2:57:10 AM UTC+5:30, Sam Ritchie wrote:
--
--
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/groups/opt_out.
Sam Ritchie mailto:sritchi...@gmail.com
January 17, 2014 2:27 PM
Hey guys,

Those of you working on webapps might find this interesting:

http://sritchie.github.io/2014/01/17/api-authentication-with-liberator-and-friend/

Enjoy!


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
--
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/groups/opt_out.
inline: compose-unknown-contact.jpginline: postbox-contact.jpg

Re: Managing role-based permissions in Ring apps

2014-01-17 Thread Sam Ritchie
Okay, here's my post: 
http://sritchie.github.io/2014/01/17/api-authentication-with-liberator-and-friend/


This is basically everything I understand about Friend, plus my 
integrations with Liberator. The code's in this example project:


https://github.com/paddleguru/liberator-friend

Hope this helps!

Stefan Kamphausen wrote:
To clarify, that was an example of content negotiation middleware, not 
ACL.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
--
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/groups/opt_out.


RESTful API Auth with Friend and Liberator

2014-01-17 Thread Sam Ritchie

Hey guys,

Those of you working on webapps might find this interesting:

http://sritchie.github.io/2014/01/17/api-authentication-with-liberator-and-friend/

Enjoy!
--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
--
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/groups/opt_out.


Re: Managing role-based permissions in Ring apps

2014-01-12 Thread Sam Ritchie

cemerick's Friend library is the way to do this:

https://github.com/cemerick/friend

I'm writing up a post on how to combine Friend with Liberator, for easy 
ACL management for RESTful APIs. Take a look and let us know what you think!



Alexandr Kurilin mailto:a...@kurilin.net
January 12, 2014 7:01 PM
My Ring app is undergoing growing pains: I think I need some kind of 
abstraction for managing user permissions when working with my RDBMS. 
Our system has few user roles and they all own or have rights to a 
bunch of data in a hierarchical fashion e.g. admin  manager  
employee etc.


So far I've gotten away with manually writing permissions checks as 
part of input validation functions in my Ring handlers. Mississippi 
takes care of the basic input validation step, then I do some higher 
level checking, including permissions, and then in case of a 
POST/UPDATE I attempt an insertion and listen for SQL exceptions. At 
the end I generate the right HTTP code.


The problem is that I have to write a bespoke check for each separate 
route, often having to account for 2-3 user types, each with a 
different set of tables to join to validate permissions. Business 
rules like is the requesting user A in the same group as the 
requested user B? If not, return 403 or is requesting user A owner 
of the group user B is part of? If not, return 403 etc.


My gut feeling is that this should be handled in a much more abstract 
and declarative fashion. I should be able to say: if user type X 
requesting data type Y with operation Z, check X-to-Y ACL table for 
whether the user has that right. Then I can just declare these 
business rules in a central location (akin to routes) and know that I 
didn't accidentally mess something up UTing might get simpler too. I 
think the Rails gem CanCan does something similar to the above.


Now, does anybody have suggestions regarding this pattern? Have you 
added something similar to your project or did you opt for a different 
design? Any clj libraries you found useful here?


Cheers!
--
--
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/groups/opt_out.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
--
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/groups/opt_out.
inline: postbox-contact.jpg

Re: [ANN] dynalint 0.1.0

2014-01-11 Thread Sam Ritchie
Hey Ambrose, looks great. I tried to the leiningen plugin's test command 
and ended up with a bunch of messages like this:


WARNING (Dynalint id 146):  clojure.set/union should have set arguments: nil

but with no way to link this back to my code. Any ideas?


Ambrose Bonnaire-Sergeant mailto:abonnaireserge...@gmail.com
January 11, 2014 8:46 AM
Hi,

For those who like analysing their programs I present Dynalint, a 
simplistic linter. It's essentially a bunch of manually curated 
runtime warnings and errors for the core Clojure library.


https://github.com/frenchy64/dynalint

Please read the README for instructions and caveats.

Here's the gist:

user= (require '[dynalint.lint :as dyn])
nil
user= (dyn/lint)
:ok
user= (require '[clojure.set :as set])
nil
user= (set/union #{1} nil)
WARNING (Dynalint id 1):  clojure.set/union should have set arguments: nil
#{1}
user= (vals nil)
nil
user= (vals 1)
ExceptionInfo ERROR (Dynalint id 2): First argument to 
clojure.core/vals must be seqable: 1  clojure.core/ex-info (core.clj:4327)


user= (update-in {} [] identity)
WARNING (Dynalint id 3):  clojure.core/update-in key path should be 
non-empty: []

{nil nil}


Also lein-dynalint is a Leiningen plugin which some might find helpful.

https://github.com/frenchy64/lein-dynalint

Enjoy!
Ambrose
--
--
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/groups/opt_out.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
--
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/groups/opt_out.
inline: postbox-contact.jpg

Re: Reactive Patterns with Atoms - am I using too much state?

2013-12-01 Thread Sam Ritchie
Okay, got it. It looks like you're using agents where I'd been using 
atoms. Not sure if there's much of a difference for these use cases... 
the one-directional flow of source - state - watcher update 
notification - ui change seems to work well with both agents and atoms.


Brian Marick wrote:

On Nov 30, 2013, at 10:39 AM, Sam Ritchiesritchi...@gmail.com  wrote:


Brian, I like that too. It looks like you're providing the state when you do 
the def-action?


If I understand the question right, yes. A test of a state function would look 
like:

(fact
   (incrementer {:value 1} 3) =  {:value 4}))


Is the self variable state, captured through the closure?


`self` is the agent, whose dereference is passed in as the symbol named `state`.

That part I'm uncomfortable with. I've put each agent in a namespace with its 
action functions. The convention is that the agent is named `self`, and 
`def-action` knows that convention. It works, but it reminds me too much of 
singletons and all those cases where you start out thinking a single instance 
is all you'll ever need and then discover you were wrong.


Latest book: /Functional Programming for the Object-Oriented Programmer/
https://leanpub.com/fp-oo



--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
--
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/groups/opt_out.


Re: Reactive Patterns with Atoms - am I using too much state?

2013-11-30 Thread Sam Ritchie
Interesting; I had started playing with the core.async approach, and 
it's good to see that Pedestal's on that same path.


Brian, I like that too. It looks like you're providing the state when 
you do the def-action? Is the self variable state, captured through 
the closure?


Walter van der Laan wrote:
An alternative that I'm looking at is pedestal 0.3.0. It sort of works 
like this...


;; Create a transform-channel and transform-function to handle all 
changes to 'state'

(defn init []
  (let [c (chan)]
(go (while true
  (when-let [[path v] (! c)]
(swap! state assoc-in path v
c))
(def transform-chan (init))
(defn transform [path v]
  (! transform-chan [path v]))

;; Change the state by calling transform
(transform [athlete-number :active?] true)
(transform [athlete-number :timestamp] ms)

;; Create an inform-channel where functions can subscribe to changes 
in 'state'

(def inform-channel-subscriptions
  [[update-timestamp [:* :timestamp]]
   [update-active [:* :active?]]])

This approach is described in:
https://github.com/pedestal/pedestal/blob/master/app/examples/walkthrough.clj

On Friday, November 29, 2013 6:58:32 PM UTC+1, Sam Ritchie wrote:

Hey guys,

As I start to work on more Clojurescript UI code, I've been
running into a pattern with atoms and watches that I THINK I can
abstract away... but the solution feels wrong, and I'd love to
hear a better way.

Say I'm building a stopwatch for timing runners in a race. I've
got a clojure record like this:

(defrecord StopwatchState [
  active? ;; timer running?
  timestamp ;; UTC time of this particular state
  stopwatch-time ;; the time on the stopwatch as of timestamp
  results ;; pairs of [athlete number, time]])

and a bunch of functions that toggle the timer, mark an athlete
crossing the line, update the timer, etc.

My view holds the current state in an atom:

(def state (atom ,,some-stopwatch-state))

and I update my views by adding watches to the atom and refreshing
the various UI components to match the new state.

Now! Here's the annoying pattern. In the cljs UI world, to poke
these atoms, I end up wrapping all of my model functions like this:

(defn toggle! []
  (swap! state toggle))
(defn mark! [athlete-number]
  (swap! state mark athlete-number))

I can think of two ways to break the pattern.

1) A deep-code-walking macro that transforms code like (mark state
athlete-number) into (swap! state mark athlete-number) if the
first argument is an atom;
2) a defstatefn macro that defines the mark and mark! versions
at the same time.

Both feel wrong. My goal is to program in a more declarative way.
Is there a better way to structure UI code?

-- 
Sam Ritchie (@sritchie)

Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook
http://facebook.com/paddleguru

--
--
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/groups/opt_out.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
--
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/groups/opt_out.


Reactive Patterns with Atoms - am I using too much state?

2013-11-29 Thread Sam Ritchie

Hey guys,

As I start to work on more Clojurescript UI code, I've been running into 
a pattern with atoms and watches that I THINK I can abstract away... but 
the solution feels wrong, and I'd love to hear a better way.


Say I'm building a stopwatch for timing runners in a race. I've got a 
clojure record like this:


(defrecord StopwatchState [
  active? ;; timer running?
  timestamp ;; UTC time of this particular state
  stopwatch-time ;; the time on the stopwatch as of timestamp
  results ;; pairs of [athlete number, time]])

and a bunch of functions that toggle the timer, mark an athlete crossing 
the line, update the timer, etc.


My view holds the current state in an atom:

(def state (atom ,,some-stopwatch-state))

and I update my views by adding watches to the atom and refreshing the 
various UI components to match the new state.


Now! Here's the annoying pattern. In the cljs UI world, to poke these 
atoms, I end up wrapping all of my model functions like this:


(defn toggle! []
  (swap! state toggle))
(defn mark! [athlete-number]
  (swap! state mark athlete-number))

I can think of two ways to break the pattern.

1) A deep-code-walking macro that transforms code like (mark state 
athlete-number) into (swap! state mark athlete-number) if the first 
argument is an atom;
2) a defstatefn macro that defines the mark and mark! versions at 
the same time.


Both feel wrong. My goal is to program in a more declarative way. Is 
there a better way to structure UI code?


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
--
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/groups/opt_out.


Re: Reactive Programming in Clojure

2013-11-18 Thread Sam Ritchie

Nice! Here are my Scala assignments, if you want to follow along:

https://github.com/sritchie/rx-scala-class

Doing the second one tomorrow.

Marco Manzi wrote:
Hi all, I'm a young clojure developer. I work as Java developer, but 
I've falled in love with this fantastic language and I would like to 
help in some way.
Actually I'm following Principles of Reactive Programming 
https://www.coursera.org/course/reactive on Coursera. It is all 
written in Scala, but I'm not that proficent on Scala, so I'm 
following it in Clojure, I'm writing some posts on how I'll following it.
If anyone has the same need can follow me at 
http://reactiveclojure.blogspot.it 
http://reactiveclojure.blogspot.it/, there is also a github 
repository where I'm posting the code to make the same assigment as in 
the coursera.

I appreciate any hint you can give.
See you :)
--
--
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/groups/opt_out.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
--
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/groups/opt_out.


Re: [ANN] Parkour: Hadoop MapReduce in idiomatic Clojure

2013-11-12 Thread Sam Ritchie
Great stuff! Just as a note, Cascalog 2.0 has a lower-level DSL that 
lets you write Cascading in idiomatic clojure. Here are some test examples:


https://github.com/nathanmarz/cascalog/blob/develop/cascalog-core/test/cascalog/cascading/operations_test.clj

Marshall Bockrath-Vandegrift wrote:

ronennark...@gmail.com  writes:


Thanks for releasing this, I personally had to re-invent such
functionality over clojure-hadoop


Glad to do so.  If you’ve been exploring a similar software space, would
be very interested in additional specific feedback.  And PRs :-).


Did you happen to test this over AWS EMR?


I have not run it live on EMR, but the unit test matrix includes Hadoop
versions 0.20.205, 1.0.3, and 2.2.0, which are the sufficiently-recent
Hadoop releases EMR’s documentation claims are supported.



--
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie

--
--
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/groups/opt_out.


Re: problem 58 on 4clojure

2012-08-26 Thread Sam Ritchie
Here's a solution using reduce that handles passing multiple arguments into
the rightmost function:

(fn [ fns]
(fn [ args]
  (let [[f  fns] (reverse fns)]
(reduce #(%2 %1) (apply f args) fns

On Sun, Aug 26, 2012 at 9:12 AM, Tyler Perkins thinks.outs...@gmail.comwrote:

 It might help to simplify. Whenever you're accumulating over a
 sequence of things, think of reduce:

 (let [__ (fn [ fs]
  ;;  Here's the function:
  (reduce #(fn [x] (%1 (%2 x))) fs))
  ]
  ;;  Testing:
  [ (= 5 ((__ (partial + 3) second) [1 2 3 4]))
(= [3 2 1] ((__ rest reverse) [1 2 3 4]))
  ])

 Each step in the accumulation creates a new function that just applies
 the current function to an argument that is the result of applying the
 already-composed ones.

 --
 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




-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie

(Too brief? Here's why! http://emailcharter.org)

-- 
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

Re: is this a problem for clojure.contrib.dataflow? Or something else?

2012-08-21 Thread Sam Ritchie
Definitely +1 for Cascalog -- I maintain Cascalog, along with Nathan Marz.
Here's the wiki:

https://github.com/nathanmarz/cascalog/wiki

Head on over to the
cascalog-userhttps://groups.google.com/forum/?fromgroups#!forum/cascalog-user
mailing
list with any questions. Looking forward to seeing you there.

On Mon, Aug 20, 2012 at 5:55 PM, ronen nark...@gmail.com wrote:

 Terabyte size and chain of dependent tasks might hint toward 
 Cascaloghttps://github.com/nathanmarz/cascalog/wiki this assumes that
 your doing batch job processing (on top of hadoop)

 If you need a more soft real time datalog based query then I would check
 datomic http://www.datomic.com/ although from your description is
 sounds less so.

 Ronen

 On Tuesday, August 21, 2012 3:14:23 AM UTC+3, Leif wrote:

 +1.  I know of a couple tools in python for this purpose that are called
 workflow management systems.   It would be good to know if there is a
 robust one in clojure.

 On Monday, August 20, 2012 12:18:54 AM UTC-4, matt hoffman wrote:

 I have a problem that I'm trying to figure out how to tackle. I'm new to
 Clojure, but I'm interested, and perhaps this will be my excuse to give it
 a try. Any of the following answers would help:
 What you're describing really sounds like X
 You could think of that problem like this, instead
 You may want to search for term 'Y'...it sounds related (I imagine I'm
 probably describing some well-established domain...I just don't know the
 right terms to search for)

 So, the problem:
 I have an app that is in production doing some fairly complex
 calculations on large-ish (terabyte-range) amounts of data.  The
 calculations are expressed as chains of dependent tasks, where each tasks
 can have a number of inputs and outputs. But the code has become hard to
 maintain, full of accidental complexity and very difficult for newer
 developers to understand. So, I'm trying to find the right abstractions to
 put in place to keep things simple.
 One of the sources of complexity is the intermingling of code involving
 loading data, dividing up data to be executed in parallel, processing data,
 persisting data, and handling the execution flow on an individual datum
 (configuring pipelines of components,etc.) I'd like to keep the functions
 pure and push the other concerns off to a framework -- and, ideally, not
 have to write that framework.

 So I think my problem statement is this:
 I'd like to be able to define functions that specify, somehow, what
 input they want, and perhaps what output they produce. Then I'd like to
 push the concern of how those inputs are calculated -- loaded from a db,
 calculated from source data -- off on some other party.

 For example, if I define a function that requires foo, and I call that
 function without providing foo, I'd like for _something_ to step in and
 say, Ok, you require foo. I have this function over here that produces
 foo. Let me call that for you, then hand you the output.  Perhaps instead
 of a framework that transparently looks up and executes that function and
 provides a Future for the result, perhaps I can explicitly build a
 dependency graph up-front containing all the functions required to produce
 the end result, and then execute them all in order... I think the effect is
 the same.

 From a bit of searching I've done today, dataflow programming like
 clojure.contrib.dataflow sounds like it might be close to what I'm looking
 for, but I'd love to hear ideas.   Am I describing something that already
 exists?  Would this actually be simpler than it seems using some clever
 macros? Are there some keywords I should search for to get started?  Or
 perhaps I'm coming at this problem wrong, and I should think about it a
 different way...

  --
 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




-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie

(Too brief? Here's why! http://emailcharter.org)

-- 
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

Re: real-world usage of reducers?

2012-08-21 Thread Sam Ritchie
I think you have to add the -server JVM flag to get your JVM to actually
engage all cores. (Is that right?)

On Tue, Aug 21, 2012 at 8:52 PM, Jeff Heon jfh...@gmail.com wrote:

 On Tuesday, August 21, 2012 10:49:45 PM UTC-4, Jim foo.bar wrote:

 If you say that running with reducers cuts runtime to 1/4 the original,
 I'll believe you...However, even though our code is very similar, I


 Maybe you two have a different number of cores?

 One test might be for you to test the scrabbler on your machine, with and
 without reducers and compare the speed gain.

  --
 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




-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie

(Too brief? Here's why! http://emailcharter.org)

-- 
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

Re: Why cannot last be fast on vector?

2012-06-29 Thread Sam Ritchie
Perhaps place them inside a protocol, where core supplies implementations
for ISeq only? This would make it easier to extend efficient behavior to
other types without placing a big burden on core.

On Fri, Jun 29, 2012 at 3:05 PM, David Nolen dnolen.li...@gmail.com wrote:

 On Fri, Jun 29, 2012 at 5:17 PM, Mark Engelberg
 mark.engelb...@gmail.com wrote:
  It is clear that some collections *could* support a more efficient last.
  Anything with random access.  Anything that supports rseq (e.g., sorted
  collections).

 And what does overloading last in this way mean for drop-last,
 take-last, but-last? All sequence functions.

 David

 --
 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




-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie09

(Too brief? Here's why! http://emailcharter.org)

-- 
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

Re: infix-to-prefix macro dead-end!!!

2012-05-02 Thread Sam Ritchie
Hey Jim, what do you think of something like this?

(defmacro infix-prefix [form]
  (loop [[a op b  more :as form] form]
(if (not op)
  a
  (recur (cons (list op a b) more)

This transforms the list by plucking off three items at a time, rearranging
them into prefix notation then popping them back onto the list in the
recursion. When only one form's left inside the list, the macro returns
that form, passing it into the compiler. Here's an example expansion:

user (infix-prefix (1 * 2 + 3 - 6))
(1 * 2 + 3 - 6)
((* 1 2) + 3 - 6)
((+ (* 1 2) 3) - 6)
((- (+ (* 1 2) 3) 6))
-1

On Wed, May 2, 2012 at 1:24 PM, Jim - FooBar(); jimpil1...@gmail.comwrote:

 Hey everyone,

 I've been trying all morning (more than 3 hours) to improve my macro but
 with little success...basically what I had before i started fiddling with
 it was a macro which would take an expression of the form (1 + 4 * 5 - 1 /
  2) and would return the expression in prefix form: (/ (- (* (+ 1 4) 5) 1)
 2)...it would not handle nested parens and no operator precedence...This is
 it:
 --**--**
 --**--**
 ---
 (defmacro functionize [macro]
  `(fn [ args#] (eval (cons '~macro args#

 (defmacro infix-to-prefix [expr]
 (if-not (empty? (filter #(list? %))  '~expr))
 (infix-to-prefix
   (map #(if (list? %)
 (apply (functionize infix-to-prefix) %) %) 'expr))
 `(loop [
  ops#   (filter #(not (number? %)) '~expr)
  args#  (filter #(number? %) '~expr)
 ]
  (if (empty? ops#) (first args#)
 (let [[a# b#  more#] args#]
 (recur
 (rest ops#)
 (conj more#
 (list (first ops#) a# b#

 ;;usage : (infix-to-prefix (1 + 4 * 6))
 ;;= (* (1 + 4) 6)
 --**--**
 --**--**
 --
 I know for a fact that the bit after the back-quote works exactly as
 explained above...all the new code is above the back-quoted loop - recur
 form. all i'm trying to do is replace all the parens at each level with
 values calculated recursively using eval on the returned
 expressionHowever i can't seem to go any further...I am literally about
 to give up...I know this may not be necessarily the best approach but i 've
 worked hard on this  and  i want to see it succeed!

 Any help is greatly appreciated...

 Jim




 --
 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+unsubscribe@**googlegroups.comclojure%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/clojure?hl=enhttp://groups.google.com/group/clojure?hl=en




-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie09

(Too brief? Here's why! http://emailcharter.org)

-- 
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

Re: Bret Victor - Inventing on Principle

2012-02-24 Thread Sam Ritchie
Why listen to music when you could read lyrics? Watching a well-performed
talk is about making an emotional connection with the storyteller. Go read
the I have a dream speech, then watch the video. They're both powerful,
but the performance trumps the script.

(Please don't troll me on the example, I'm not making a comparison between
speakers :)

On Fri, Feb 24, 2012 at 11:12 AM, Cedric Greevey cgree...@gmail.com wrote:

 On Fri, Feb 24, 2012 at 2:06 PM, gaz jones gareth.e.jo...@gmail.com
 wrote:
  Are you Ken Wesson with a new account?

 Who?

 Wait. Surely you don't think that it's not possible for more than one
 person to prefer text to video as a way of disseminating verbal
 information over the internet, given all of text's advantages in such
 areas as bandwidth, cost, and tool support?

 --
 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




-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie09

(Too brief? Here's why! http://emailcharter.org)

-- 
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

Re: where is defalias in the new contrib github repositories

2012-02-02 Thread Sam Ritchie
Hey Mike,

I don't think it's in any of the new modular contrib libraries. I placed it
in a utility library called Jackknife that we use from Cascalog:

https://github.com/sritchie/jackknife/blob/master/src/jackknife/def.clj#L4

I think the only change I had to make for 1.3 compatibility was changing
the method call on line 12 from .getRoot to .getRawRoot.

Cheers,
Sam

On Wed, Feb 1, 2012 at 10:23 PM, R Daneel maspo...@gmail.com wrote:

 Hi!  I'm trying to figure out where to get defalias from in the new
 contrib repositories:

   http://dev.clojure.org/display/doc/Clojure+Contrib

 it says that some of the old contrib.def moved to core.incubator, but
 apparently not defalias.  Can anyone tell me where it is now (or better
 yet: how to answer that sort of question generically!)?

 Thanks!

 Mike

  --
 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




-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie09

(Too brief? Here's why! http://emailcharter.org)

-- 
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

Re: where to find defalias in new github-based contrib repos?

2012-02-02 Thread Sam Ritchie
Mike,

Here's your first thread w/ my response:
http://groups.google.com/group/clojure/browse_thread/thread/2e189d3d296f5ff4/143976b50711dc84?lnk=gstq=where+is+defalias#143976b50711dc84

Cheers,
Sam

On Thu, Feb 2, 2012 at 8:00 AM, R Daneel maspo...@gmail.com wrote:

 (Apologies if this is a repost: I thought I'd asked it last night but I
 couldn't find it this morning!)

 I'm trying to find defalias in the new github contrib repos:
 core.incubator apparently absorbed some of the old def namespace, but it
 doesn't contain defalias.  Does anyone know where that went, or if it
 didn't then is there anything equivalent in the core now?  Thanks!

  --
 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




-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie09

(Too brief? Here's why! http://emailcharter.org)

-- 
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

Re: Literate programming in emacs - any experience?

2012-01-23 Thread Sam Ritchie
I've been wondering this as well -- I'm specifically curious about how one
might jump back and forth between literate source like
thishttps://raw.github.com/nakkaya/nakkaya.com/master/resources/posts/2011-12-15-fractals-in-clojure-distributed-buddhabrot-fractal-using-clojurescript.org
and
the REPL. I know you can evaluate code snippets into the repl; I'm thinking
of early steps like loading an entire namespace into the repl when its code
exists in separate code blocks. Some command like evaluate all code
snippets that'll be tangled into this file.

I will blog the hell out of this once I figure it out. My goal is to
rewrite Cascalog as a literate program.

On Mon, Jan 23, 2012 at 5:14 AM, Colin Yates colin.ya...@gmail.com wrote:

 Hi all,

 There are some excellent resources on this mailing list regarding literate
 resources, but they are more based around the theory rather than actual use.

 Has anybody got any real world usage reports regarding using literate
 programming in emacs?  In particular, does paredit and slime work inside
 the clojure fragments when using org.babel for example?

 Finally - how are people finding practising TDD with literate programming?
  I imagine that Clojure's excellent REPL (+ evaluating clojure forms from
 within a buffer) mean there are far less type, extract tangled code, run
 tests needed.  Hmmm, not sure that is clear.  What I mean is, do people
 find that the ability to evaluate a clojure form from within org.babel
 (assuming that is possible!) is sufficient for TDD or do you find you need
 to type, extract the tangled code and then run lein (for example) to run
 the tests?

 Basically - how do y'all get on with TDDing in emacs following the
 approach of literate programming - any advice welcome!

 Thanks all.

 Col

 --
 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




-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie09

(Too brief? Here's why! http://emailcharter.org)

-- 
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

Matrix Multiplication Woes

2012-01-17 Thread Sam Ritchie
Hey all,

I'm running into some large performance differences with matrix
multiplication between Python's Numpy and Clojure -- so big that I'm almost
certainly doing something very wrong. Numpy seems to be able to multiply a
1,000,000x23 matrix by its transpose in under a second, while the
equivalent clojure code takes over six minutes. Here's my stack overflow
post with the details:

http://stackoverflow.com/questions/8899773/matrix-multiplication-in-clojure-vs-numpy

And a gist with the code:

https://gist.github.com/1627900

I've tried Incanter, but it seems to be even slower than this naive
multiplication. Do you guys have any advice on how to do this in a
performant way?

Thanks,
-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie09

(Too brief? Here's why! http://emailcharter.org)

-- 
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

Re: Matrix Multiplication Woes

2012-01-17 Thread Sam Ritchie
Update -- I wrapped the JBLAS library and ended up with stellar
performance, about 3x faster than numpy.

https://gist.github.com/264a2756fc657140fdb8

On Tue, Jan 17, 2012 at 10:37 AM, Sam Ritchie sritchi...@gmail.com wrote:

 Hey all,

 I'm running into some large performance differences with matrix
 multiplication between Python's Numpy and Clojure -- so big that I'm almost
 certainly doing something very wrong. Numpy seems to be able to multiply
 a 1,000,000x23 matrix by its transpose in under a second, while the
 equivalent clojure code takes over six minutes. Here's my stack overflow
 post with the details:


 http://stackoverflow.com/questions/8899773/matrix-multiplication-in-clojure-vs-numpy

 And a gist with the code:

 https://gist.github.com/1627900

 I've tried Incanter, but it seems to be even slower than this naive
 multiplication. Do you guys have any advice on how to do this in a
 performant way?

 Thanks,
 --
 Sam Ritchie, Twitter Inc
 703.662.1337
 @sritchie09

 (Too brief? Here's why! http://emailcharter.org)




-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie09

(Too brief? Here's why! http://emailcharter.org)

-- 
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

Re: Threading macro with support for conditionals

2012-01-10 Thread Sam Ritchie
Mikka,

The pallet/thread-expr library has the macros you're looking for:

https://github.com/pallet/thread-expr

These would allow you to write:

(use 'pallet.thread-expr)

(- {}
   (status code)
   (content-type application/json;charset=utf-8)
   (when- (= error-type :unauthorized)
 (header WWW-Authenticate Basic realm=\my-realm\))
   (when-not- (= request-method :head)
 (assoc :body (json-str ...

The tests provide a decent set of examples:

https://github.com/pallet/thread-expr/blob/develop/test/pallet/thread_expr_test.clj

Cheers,
Sam

On Tue, Jan 10, 2012 at 8:06 AM, Miikka Miettinen 
miikka.mietti...@gmail.com wrote:

 Hi,

 I sometimes find myself wanting to write simple conditional expressions
 inside - and -. For example, it would be nice to create Ring responses
 like this:
 (- {}
(status code)
(content-type application/json;charset=utf-8)
(when (= error-type :unauthorized)
  (header WWW-Authenticate Basic realm=\my-realm\))
(when (not= request-method :head)
  (assoc :body (json-str ...

 The above obviously doesn't work, but is there some other macro somewhere
 that would enable me to do this?

 Best regards,
 Miikka

 --
 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




-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie09

(Too brief? Here's why! http://emailcharter.org)

-- 
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

Re: Storing clojure lists and maps in Redis

2012-01-06 Thread Sam Ritchie
Peter,

Check out Carbonite for a great wrapper library around Kryo. Here are the
API tests, with round trip examples:
https://github.com/revelytix/carbonite/blob/master/test/carbonite/test_api.clj
.

Cheers,
Sam

On Fri, Jan 6, 2012 at 1:30 AM, Peter Taoussanis ptaoussa...@gmail.comwrote:

 Tim's the one to thank: I didn't do much :)

  I did some rudimentary bench marking for large data sets and found
 deep-freeze to be 10 times faster on
  average compared to JSON serialization. That is really a huge
  performance difference.

 Some final comments if performance really is a major factor for you:

 1. You should compare deep-freeze with and without compression in your
 real environment with real data. Compression hits writing speeds more
 than reading speeds but may or may not still get you a net win
 depending on your particular environment since compression decreases
 the amount of data going around- especially for large payloads.

 2. In my tests, redis-clojure was significantly slower than clj-redis
 due to its protocol implementation. Being built on Jedis, I expect clj-
 redis to maintain better performance characteristics going into the
 future (particularly if you end up one day wanting bleeding-edge stuff
 like clustering, etc.).

 3. I hadn't heard of Kryo before this thread so I haven't tested it-
 but I wouldn't be surprised if a library wrapping something like Kryo
 could still significantly beat deep-freeze performance. If time
 allows, I'll try look into this in future and see if deep-freeze
 couldn't itself benefit from using something similar.

 Cheers,

 --
 Peter

 --
 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




-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie09

(Too brief? Here's why! http://emailcharter.org)

-- 
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

Re: Storing clojure lists and maps in Redis

2012-01-04 Thread Sam Ritchie
Here's an example of a Ring session store that writes clojure maps to and
from Redis:

https://github.com/wuzhe/clj-redis-session/blob/master/src/clj_redis_session/core.clj

In addition to Deep Freeze, you might check out Kryo, accessible via Alex
Miller's Carbonite https://github.com/revelytix/carbonite library. I use
Kryo in both Cascalog and ElephantDB for Clojure data serialization, and
it's been working out wonderfully. Here are some kryo
benchmarkshttp://code.google.com/p/kryo/wiki/BenchmarksAndComparisons
if
you're interested.

On Wed, Jan 4, 2012 at 7:55 AM, Peter Taoussanis ptaoussa...@gmail.comwrote:

 read/pr-str works well, but it's painfully slow relative to something
 like Redis. JSON libraries and the like would be faster, but might
 require more contortions if you're using lots of Clojure data types.
 My 2c: the best overall compromise atm is the Deep-Freeze
 serialization library (https://github.com/halgari/deep-freeze). It
 gets you very decent performance and great support for Clojure data
 types.

 You don't mention what Redis client you're using, but be aware that if
 you're going to be going the binary serialization route, you'll want
 to communicate with Redis via byte[]s rather than JVM strings. If
 you're using Jedis, take a look at BinaryJedis.

 Hope that helps!

 --
 Peter

 --
 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




-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie09

(Too brief? Here's why! http://emailcharter.org)

-- 
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

Potential bug w/ inlined functions

2012-01-02 Thread Sam Ritchie
Hey all,

I'm writing a function called barr= that looks just like clojure.core/=,
but uses java.util.Arrays/equals instead of equiv. To speed up the function
I tried adding type hints to both the function definition and the
2-argument inlined version. Type hinting the inline function threw an
exception that makes me think the compiler is interpreting Here's the gist:
https://gist.github.com/1551640

Type hints on the function definition work great:

(defn barr=
  ([x] true)
  ([^bytes x ^bytes y]
 (java.util.Arrays/equals x y))
  ([x y  more]
 (if (barr= x y)
   (if (next more)
 (recur y (first more) (next more))
 (barr= y (first more)))
   false)))

But hinting the inline version causes an exception:

(defn barr=
  {:inline-arities #{2}
   :inline (fn [x y] `(let [^bytes x# ~x
^bytes y# ~y]
   (java.util.Arrays/equals x# y#)))}
  ([x] true)
  ([^bytes x ^bytes y]
 (java.util.Arrays/equals x y))
  ([x y  more]
 (if (barr= x y)
   (if (next more)
 (recur y (first more) (next more))
 (barr= y (first more)))
   false)))

;; CompilerException java.lang.IllegalArgumentException: Unable to resolve
classname:
;; clojure.core/bytes, compiling:(NO_SOURCE_PATH:54)

The compiler seems to be interpreting this type hint as a var. Are type
hints not allowed inside of inline definitions for some reason?

Cheers,
-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie09

(Too brief? Here's why! http://emailcharter.org)

-- 
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

Re: Potential bug w/ inlined functions

2012-01-02 Thread Sam Ritchie
You're right, it's macro more than inlining. Tag metadata doesn't throw an
error, but it doesn't fix the reflection warning either (assuming I'm doing
it correctly):

(defmacro barr= [^{:tag bytes} x ^{:tag bytes} y]
  `(java.util.Arrays/equals ~x ~y))

(defmacro barr= [ x  y]
  `(java.util.Arrays/equals ^{:tag bytes} ~x
^{:tag bytes} ~y))


As for the approach, I wanted to start out by mimicking the implementation
of clojure.core/=. I haven't written inlined functions before, and was
curious about the potential speedup. I do like the idea of a generic arr=.

On Mon, Jan 2, 2012 at 11:27 AM, David Nolen dnolen.li...@gmail.com wrote:

 I suspect this has more to do with type-hinting inside a macro. Did you
 try adding :tag metadata to those symbols?

 As a side note I do find this approach a bit strange. Why not just define
 a generic arr= that with multi-arity inlining?

 David

 On Mon, Jan 2, 2012 at 1:43 PM, Sam Ritchie sritchi...@gmail.com wrote:

 Hey all,

 I'm writing a function called barr= that looks just like clojure.core/=,
 but uses java.util.Arrays/equals instead of equiv. To speed up the function
 I tried adding type hints to both the function definition and the
 2-argument inlined version. Type hinting the inline function threw an
 exception that makes me think the compiler is interpreting Here's the gist:
 https://gist.github.com/1551640

 Type hints on the function definition work great:

 (defn barr=
   ([x] true)
   ([^bytes x ^bytes y]
  (java.util.Arrays/equals x y))
   ([x y  more]
  (if (barr= x y)
(if (next more)
  (recur y (first more) (next more))
  (barr= y (first more)))
false)))

 But hinting the inline version causes an exception:

 (defn barr=
   {:inline-arities #{2}
:inline (fn [x y] `(let [^bytes x# ~x
 ^bytes y# ~y]
(java.util.Arrays/equals x# y#)))}
   ([x] true)
   ([^bytes x ^bytes y]
  (java.util.Arrays/equals x y))
   ([x y  more]
  (if (barr= x y)
(if (next more)
  (recur y (first more) (next more))
  (barr= y (first more)))
false)))

 ;; CompilerException java.lang.IllegalArgumentException: Unable to
 resolve classname:
 ;; clojure.core/bytes, compiling:(NO_SOURCE_PATH:54)

 The compiler seems to be interpreting this type hint as a var. Are type
 hints not allowed inside of inline definitions for some reason?

 Cheers,
 --
 Sam Ritchie, Twitter Inc
 703.662.1337
 @sritchie09

 (Too brief? Here's why! http://emailcharter.org)

  --
 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 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




-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie09

(Too brief? Here's why! http://emailcharter.org)

-- 
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

Re: Any built-in way to print to stream besides *out*?

2011-12-31 Thread Sam Ritchie
Like this?

(defn printf+ [ [writer  more :as xs]]
  (if (instance? java.io.PrintWriter writer)
(binding [*out* writer]
  (apply println more))
(apply println xs)))

On Sat, Dec 31, 2011 at 10:01 AM, Andy Fingerhut
andy.finger...@gmail.comwrote:

 I know I can bind *out* to another stream like *err*, but is that the only
 way built-in to Clojure?

 (binding [*out* *err*] (println This will go to *err*, not *out*))

 If it is the only way, is there some library perhaps where someone has
 implemented a function that lets you specify the output stream as an
 argument, e.g.

 (printf+ *err* This will go to *err*)
 (printf+ This will go to *out* as the default output stream)

 Thanks,
 Andy

  --
 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




-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie09

(Too brief? Here's why! http://emailcharter.org)

-- 
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

AOT compilation for library targeting multiple Clojure versions

2011-12-07 Thread Sam Ritchie
Hey all,

I'm almost finished integration Kryo serialization into Cascalog using Alex
Miller's Carbonite library, and I'm running into a bit of a hitch with
AOT-compilation. I'm exposing the Clojure serializers to Kryo using a
namespace compiled with :gen-class:

https://github.com/sritchie/carbonite/blob/master/src/carbonite/JavaBridge.clj

and calling JavaBridge.enhanceRegistry(kryo); from my java code. The
problem is that this locks me into Clojure 1.3.0, or whatever version was
used to compile JavaBridge.

What's the recommended way to work around this and support multiple Clojure
versions? Should I build JavaBridge for 1.2 and 1.3 under different names
and query *clojure-version* from java at runtime to decide which version to
use?

Thanks all,
-- 
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie09

(Too brief? Here's why! http://emailcharter.org)

-- 
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

  1   2   >