Re: Clojure beginner: IF statement error!

2016-03-04 Thread Joseph Smith
Those strings are in the if form. 

---
Joe R. Smith
j...@uwcreations.com
@solussd


> On Mar 4, 2016, at 6:48 PM, Renata Akhm  wrote:
> 
> Hi! I've just strated coding on Clojure and tried to move some of my Lisp 
> code to Clojure:
> (defn mpow
>   [N M]
>   (if (= M 0) 1 "in case pow is 0 return 1"
>   (do (* N (recur N (- M 1)   "decrease power M each itr"
> )
> So it just calculates power recursively. When I run it the "Too many 
> arguments to if" error occures. What am I doing wrong? Thank you in advance 
> for help!
> 
> Renata
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

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


Re: clojure, not the go to for data science

2015-03-29 Thread Joseph Smith
Batsov,

CIDER is the best Clojure IDE. ;)

--
@solussd


 On Mar 29, 2015, at 9:14 AM, Bozhidar Batsov bozhi...@batsov.com wrote:
 
 And CIDER isn't, right? I find this pretty insulting... 
 
 On 29 March 2015 at 13:47, Colin Yates colin.ya...@gmail.com wrote:
 Cursive Clojure, LightTable and CounterClockwise are all good Clojure IDEs.
 
 On 29 March 2015 at 09:54, Sayth Renshaw flebber.c...@gmail.com wrote:
  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
 
  --
  You received this message because you are subscribed to the Google
  Groups Clojure group.
  To post to this group, send email to clojure@googlegroups.com
  Note that posts from new members are moderated - please be patient with 
  your first post.
  To unsubscribe from this group, send email to
  clojure+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/clojure?hl=en
  ---
  You received this message because you are subscribed to the Google Groups 
  Clojure group.
  To unsubscribe from this group and stop receiving emails from it, send an 
  email to clojure+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/d/optout.
 
 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

-- 
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: Kwargs vs explicit parameter map for APIs?

2015-03-23 Thread Joseph Smith
I believe the current behavior with apply is the correct behavior as a map can 
be treated as a sequence of MapEntrys. 

--


 On Mar 23, 2015, at 19:15, Mark Engelberg mark.engelb...@gmail.com wrote:
 
 Yes, I thought that technique worked, but I just conducted the same 
 experiment as you did and confirmed that it doesn't.  I must have been 
 misremembering.  You are correct that passing a map to a keyword-arg function 
 is more of a nuisance than it should be.
 
 On Mon, Mar 23, 2015 at 4:36 PM, Matching Socks phill.w...@gmail.com wrote:
 Could you give an example demonstrating this?
 
 user (defn a [ {x :x y :y}] (vector x y))
 #'user/a
 
 user (a :y 7 :x 3)
 [3 7]
 
 user (apply a {:x 3 :y 7})
 [nil nil] 
 
 
 
 On Monday, March 23, 2015 at 6:13:55 AM UTC-4, puzzler wrote:
 It's been a while since I've tested this, but I believe that if a map is 
 passed as the last argument to apply, Clojure does the right thing and 
 passes the map in as keyword args.
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

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


Re: When to use metadata

2015-01-29 Thread Joseph Smith
Yes- when the data you want to add shouldn't affect the value of the map. 

---
Joe R. Smith
@solussd


 On Jan 29, 2015, at 9:10 AM, Jonathon McKitrick jmckitr...@gmail.com wrote:
 
 Is there a rule of thumb or set of use cases when metadata is a more elegant 
 solution than simply adding more entries to a map or record?
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

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


Re: An Averaging function

2014-07-10 Thread Joseph Smith
When you're done with On Lisp check out Let Over Lambda. :)

---
@solussd


 On Jul 10, 2014, at 5:38 PM, Marcus Blankenship mar...@creoagency.com wrote:
 
 Ok, I'm sure this is heresy, but I'm getting a great deal from Paul Graham's 
 On Lisp, even though the examples are in Common Lisp. Really amazing 
 stuff!!!
 
 Sent from my iPhone
 
 On Jul 10, 2014, at 11:26 AM, Raoul Duke rao...@gmail.com wrote:
 
 here are some related resources (books, videos). imbibe all of these
 and it might help.
 http://realmofracket.com/
 http://landoflisp.com/
 https://news.ycombinator.com/item?id=1023970
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

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


Re: alternative syntax for Clojure? Haskell?

2014-04-05 Thread Joseph Smith
Clojure syntax (I.e. parentheses) enable features in the language- you can't 
remove them without sacrificing functionality. 

Personally, I feel the uniformity of Clojure syntax makes it easier for me to 
reason about code. When I'm working in a language like, say, Ruby, I have to 
think ahead about whether or not I need/will need delimiters (e.g. parentheses) 
depending on how I'm composing code. 

---
Joseph Smith
@solussd


 On Apr 5, 2014, at 12:57 PM, Timothy Baldridge tbaldri...@gmail.com wrote:
 
 I find Haskell syntax completely unreadable. Just saying
 
 On Apr 5, 2014 11:36 AM, Travis Wellman twell...@gmail.com wrote:
 When I started learning Haskell after a year or more of Clojure, the syntax 
 was refreshing, and I found myself wishing I could write Clojure with 
 Haskell syntax.
 
 Later I left Clojure behind for plain Java because of code maintenance 
 issues. I had been writing elegant but deeply nested Clojure code that was 
 very difficult to read and realized that Clojure nurtures this propensity in 
 its users. Though it's possible to write flatter more linear, more readable, 
 more maintainable code, I didn't really want to, and other languages are 
 designed for such.
 
 Now I'm coming back to those old discoveries again, and thinking about 
 Clojure, and wondering how much work it would be to write a new Haskell-ish 
 syntax for using Clojure. I was just looking at core.logic tests, which are 
 a perfect example of hard-to-read, using single letter variables, few 
 newlines, and zero comments.
 
 To be clear, in this topic I'm not interested in the functional purity of 
 Haskell, nor it's libraries or type system, but just the syntax.
 
 Has anyone had a similar experience?
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

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


Re: [beginner] How do I make a button that could interact with indicator?

2014-01-11 Thread Joseph Smith
A Clojure Swing wrapper (and more!): https://github.com/daveray/seesaw


 On Jan 11, 2014, at 4:45, Mark Johns m3nt...@gmail.com wrote:
 
 HI everyone, I am new to Clojure in terms of practice. I like the philosophy 
 of Clojure and I want to start using it.
 
 I need to build a simple model: button and indicator (progress bar).
 Button interacts with indicator. That's it.
 When the button is pressed - indicator fills,
 when the button is not pressed - indicator depletes.
 
 Where do I start? Give me a hint.
 
 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.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
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: ANNOUNCE: Cognitect is sponsoring CinC contrib libraries

2013-12-06 Thread Joseph Smith
That's awesome!

---
Joseph Smith
j...@uwcreations.com
@solussd


 On Dec 6, 2013, at 8:44 AM, David Nolen dnolen.li...@gmail.com wrote:
 
 This is great news! :)
 
 
 On Thu, Dec 5, 2013 at 3:42 PM, Nicola Mometto brobro...@gmail.com wrote:
 
 I'm happy to announce that after Ambrose BS commissioned me to continue
 working on my CinC libraries as part of his typed-clojure campaign
 (http://www.indiegogo.com/projects/typed-clojure), Cognitect
 (http://cognitect.com/) offered me sponsorship for my work on CinC
 contrib libraries.
 
 The libraries I'm referring to with CinC libraries are:
  * tools.analyzer: https://github.com/clojure/tools.analyzer
  * tools.analyzer.jvm: https://github.com/clojure/tools.analyzer.jvm
  * tools.emitter.jvm: https://github.com/clojure/tools.emitter.jvm
 
 
 I want to thanks Justin Gehtland and Tim Baldridge that helped this
 happen and Alex Miller for his prompt help in setting up the JIRA and
 Hudson workflows.
 
 Thanks again to Ambrose BS and a bit unrelately I want to thanks Andy
 Fingerhut who lately has been a great help to me, trying out
 tools.analyzer[.jvm] and reporting bugs along the way.
 
 Thanks,
 Nicola Mometto (Bronsa)
 
 --
 --
 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.
 
 -- 
 -- 
 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.

-- 
-- 
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: Why is this count example not working: (count % '(1 2 3))

2013-11-03 Thread Joseph Smith
% is used as the implicit arg in the #() (syntactic sugar) anonymous function 
form. 

Maybe you want (count '(1 2 3)). 

---
Joseph Smith
j...@uwcreations.com
@solussd


 On Nov 3, 2013, at 3:39 PM, Angus anguscom...@gmail.com wrote:
 
 (count % '(1 2 3))
 
 I am getting error: clojure.lang.ArityException: Wrong number of args (2) 
 passed to: core$count
 -- 
 -- 
 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.

-- 
-- 
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: How to go about 'proving' why dynamically typed languages are better.

2013-10-08 Thread Joseph Smith
 Just bc it's dynamically typed doesn't mean you can't leverage types for 
dispatch. Remember, you can single dispatch on type (using protocols), or 
multi-dispatch using a function applied to the arguments (multimethods). 

---
Joseph Smith
j...@uwcreations.com
@solussd


 On Oct 8, 2013, at 7:46 AM, John D. Hume duelin.mark...@gmail.com wrote:
 
 
 On Oct 8, 2013 5:35 AM, Phillip Lord 
 
   However… I find that I am writing a lot of statements like this:
  
   (cond (hash-map? v)
   ……
  
  (vector? v)
   ……
  
  (list? v)
  …..
  
   :else …..)
  
 
 zcaudate, in what context(s) do you find yourself writing a lot of 
 expressions like that? I rarely want to allow so much flexibility in 
 arguments. I'm wondering if there are idioms to avoid it.
 
   I'm not sure a type checker will help in that instance.
 
 
  A type-checker wouldn't no, but a type system would; pretty much
  every language with a static type system has a type based dispatch
  somewhere. It would be nice to be able to do
 
  (defun fn
([^vector v] ...)
([^list l] ...)
([else] ...)
 
 How is Clojure's protocols feature different from what you're describing?
 -- 
 -- 
 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.

-- 
-- 
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: How to go about 'proving' why dynamically typed languages are better.

2013-10-08 Thread Joseph Smith
This is Clojure- we can have both, at the same time! 
clojure.core.typed

---
Joseph Smith
j...@uwcreations.com
@solussd


 On Oct 8, 2013, at 5:36 PM, Kendall Shaw ks...@kendallshaw.com wrote:
 
 Some things that I see most of the time when I read debates about dynamic vs 
 static are:
 
 1. Statically defined types don't solve everything, so they are   not 
 useful.
 
 Some help is better than no help even if the help doesn't solve all of your 
 problems.
 
 Yes, you should wash your hands before dinner, even though we are all going 
 to die in the end anyway.
 
 2. I like static typing as long as it is optional
 
 In the case where the point of using statically defined types is to have a 
 compiler catch problems instead of you needing to predict their occurrence 
 then static typing would have to be non-optional.
 
 3. You don't need the compiler to warn you about types, because you can write 
 tests.
 
 A difficult problem is one that occurs on a rare occasion in some place that 
 you would not have thought to check. So, you can't expect to be able to catch 
 them with tests. If the problem is one that would have been flagged as a 
 compile-time error, then in that case it would have been useful to have been 
 using static typing.
 
 I am still unsure. It seems likely that the usefulness of statically defined 
 types would depend upon the application. When using statically defined types 
 makes development slower to an extent that outways the benefit, then it is 
 bad. If  faster initial development as a result of dynamic typing ultimately 
 ends up taking more time because of problems that would have been caught by a 
 compiler, then it is bad. If statically defined typing makes you not discover 
 things you would have because of the overhead of dealing with the static 
 typing, then that is bad.
 
 Kendall
 
 
 On 10/05/2013 08:35 PM, zcaudate wrote:
 I'm a little bit miffed over this current craze of `types` and `correctness` 
 of programs. It smells to me of the whole `object` craze of the last two 
 decades. I agree that types (like objects) have their uses, especially in 
 very well defined problems, but they have got me in trouble over and over 
 again when I am working in an area where the goal is unclear and 
 requirements are constantly changing.  
 
 BTW... This is no means a criticism of all the type system work that is 
 going on in the clojure community. I am a huge fan of Ambrose's Typed 
 Clojure project because it gives me the option of using types... not shoving 
 it down my throat. I like the freedom to choose.
 
 My experience of programming in clojure has freed me from thinking about 
 types and hierarchies and this article rings so true: 
 http://steve.yegge.googlepages.com/is-weak-typing-strong-enough.
 
 However, everywhere I look, there are smug type-weenies telling me that my 
 dynamically typed program is bad because it cannot be `proven correct` and 
 not `checked by the compiler`. This question on SO really makes me angry 
 http://stackoverflow.com/questions/42934/what-do-people-find-so-appealing-about-dynamic-languages
  because no one is defending dynamic languages on there. The reason is very 
 simple. because we don`t have a theory to back us up!
 
 I do want to put up an counter argument against this barrage of abuse 
 against dynamic languages. And I want to put some academic weight behind 
 this. The only counter I could come up with was to use Godel's 
 incompleteness theorem. For those that don't know... here is an introduction 
 to the man and his theory. http://www.youtube.com/watch?v=i2KP1vWkQ6Y. 
 Godel's theorem, invalidated Principia Mathematica as a complete system of 
 description. Principia Mathematica btw  effectively led to Type Theory.
 
 According to http://en.wikipedia.org/wiki/Type_theory. The types of type 
 theory were invented by Bertrand Russell in response to his discovery that 
 Gottlob Frege's version of naive set theory was afflicted with Russell's 
 paradox. This theory of types features prominently in Whitehead and 
 Russell's Principia Mathematica. It avoids Russell's paradox by first 
 creating a hierarchy of types, then assigning each mathematical (and 
 possibly other) entity to a type. Objects of a given type are built 
 exclusively from objects of preceding types (those lower in the hierarchy), 
 thus preventing loops.
 
 I'm hoping to collect a few more `proofs` from the clojure community... for 
 example... if there is a paper on why are type systems so bad at 
 classifying animals... then please forward it on. 
 -- 
 -- 
 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

Re: as- macro enhancement request?

2013-08-20 Thread Joseph Smith
Second- that would be a nice, and intuitive, enhancement. 

---
Joseph Smith
j...@uwcreations.com
@solussd


 On Aug 20, 2013, at 8:52 PM, Ken Restivo k...@restivo.org wrote:
 
 I like the as- macro, mostly because it'd theoretically obviate the need to 
 include the Swiss Arrows library anymore.
 
 There's one reason why I keep going back to Swiss Arrows though: the ability 
 to include single-arg functions in the chain that do not have the explicit 
 token.
 
 i.e. in Swiss Arrows, I can do:
 
 (- foo
 bar
 (baz  quux)
 blah)
 
 Note, it's clean and simple, no need for a bunch of noise and 's where not 
 needed, only when calling functions with arity  1.
 
 But with as-, I have to do:
 
 (as-  foo
 (bar )
 (baz  quux)
 (blah ))
 
 And that just seems unnecessarily noisy to me.
 
 
 Would love it if as- allowed removing unnecessary characters, this way:
 
 (as-  foo
 bar
 (baz  quux)
 blah)
 
 
 Anyway, very minor quibble, just putting it out there.
 
 Thanks.
 
 -ken
 
 -- 
 -- 
 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.

-- 
-- 
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] bouncer 0.2.4-alpha1 [breaking changes]

2013-08-15 Thread Joseph Smith
I like releasing it as 0.3.0.

---
Joseph Smith
j...@uwcreations.com
@solussd






On Aug 15, 2013, at 9:20 AM, Leonardo Borges leonardoborges...@gmail.com 
wrote:

 Hi Moritz,
 
 Thanks for the suggestion. You're right and I missed this.
 
 I'll make sure I take this into account for the next release - I could 
 release it as 0.3.0-alpha1 but then I'd like to remove 0.2.4-alpha1 from 
 Clojars which doesn't seem to be a trivial thing to do.
 
 
 
 Leonardo Borges
 www.leonardoborges.com
 
 
 On Fri, Aug 16, 2013 at 12:13 AM, Moritz Ulrich mor...@tarn-vedra.de wrote:
 
 Just a small suggestion: Bugfix releases (z in x.y.z) are usually
 considered to be non-breaking, so breaking changes in such releases
 might cost people time when they assume they can upgrade without
 changing their code.
 
 It's nicer to introduce breaking changes to minor- or major-releases (x or
 y in x.y.z).
 
 Leonardo Borges writes:
 
  Hi all,
 
  bouncer is a validation library for Clojure apps
 
  Github: https://github.com/leonardoborges/bouncer
  Clojars: https://clojars.org/bouncer
 
  Version 0.2.4-alpha1 has undergone major, breaking changes:
 
  - My original design made heavy use of macros for a nicer, more natural DSL
  at the expense of composition;
  - This turned out not to be the best option as I received a few bug reports
  related to issues composing validations;
  - As a result I removed almost all macros in favour of functions
 
  In a nutshell what this means is that where once you wrote this:
 
  (b/validate {:postcode -1}
:postcode [(v/required :message required) (v/number
  :message number)])
 
  You will now write this:
 
  (b/validate {:postcode -1}
:postcode [[v/required :message required] [v/number
  :message number]])
 
  The difference is minimal, but the gains are great as I was able to
  completely eliminate the defvalidatorset macro in favour of clojure maps:
 
  (def address-validations {:postcode [v/required v/number]})
 
  (b/validate {} address-validations)
 
  Please check out the
  READMEhttps://github.com/leonardoborges/bouncer/blob/master/README.mdfor
  updated docs as well as the
  CHANGELOGhttps://github.com/leonardoborges/bouncer/blob/master/CHANGELOG.md
  for
  details.
  Feedback on this version and the new API is greatly appreciated.
 
  Cheers,
  Leonardo Borges
  www.leonardoborges.com
 
  --
 
 
 --
 Moritz Ulrich
 
 --
 --
 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.
 
 
 -- 
 -- 
 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.

-- 
-- 
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: core.async

2013-06-29 Thread Joseph Smith
 It seems to me that the Clojure space suffers from an unusual malady: it's 
 busy sitting here quietly advancing half of applied computer science, and no 
 one seems to notice the full extent of its import.
 
And it makes me sound like a broken record with my colleagues: Oh! Clojure 
has...



 

---
Joseph Smith
@solussd






On Jun 29, 2013, at 6:07 AM, Peter Taoussanis ptaoussa...@gmail.com wrote:

 Oh man, how is everyone _not_ running around screaming about this right now?
 
 It seems to me that the Clojure space suffers from an unusual malady: it's 
 busy sitting here quietly advancing half of applied computer science, and no 
 one seems to notice the full extent of its import.
 
 Man, I'm sometimes forced to just stop for a moment and sit in awe at how 
 lucky I've been to see this stuff develop and to get to use it.
 
 Clojure was huge. And before we're close to digesting its potential, there's 
 protocols. And Clojurescript. Then Datomic. Reducers. Now this.
 
 And it's not about everything being necessarily _novel_, though there is 
 often novelty. For me it's largely about the cohesiveness of the design and 
 the consistency of the overarching vision. Everything _fits_. I feel like I'm 
 using tools and ideas that weren't just developed with care, or cleverness, 
 or experience, but all of those things in a kind of harmony that's 
 vanishingly rare to find in any field.
 
 I honestly feel like I'm witnessing history being made.
 
 Thank you Rich Hickey, and everyone else in this community for making my work 
 every day so enjoyable.
 
 - Peter Taoussanis
 
 
 -- 
 -- 
 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.
  
  

-- 
-- 
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: In what OS do you code?

2013-06-14 Thread Joseph Smith
I write code in OSX. 

---
Joseph Smith
@solussd

On Jun 14, 2013, at 8:46 AM, Erlis Vidal er...@erlisvidal.com wrote:

 Hi, 
 
 I'm a bit curious to know in what OS do you code. Do you prefer iOS, Linux, 
 Windows? Why is that? Because the tools? The environment? 
 
 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.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  

-- 
-- 
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: Clojure in production

2013-06-10 Thread Joseph Smith
I work for Nanonation Inc (Nanonation.net) and we have a couple internal tools 
as well as a new product, Viewpoint, where the backend and web portal are both 
100% Clojure.  

---
Joseph Smith
j...@uwcreations.com
@solussd


On Jun 10, 2013, at 6:48 PM, Ignacio Thayer itha...@gmail.com wrote:

 ReadyForZero.com uses clojure exclusively (~50K lines) on the backend for 
 http and api requests.
 
 Ignacio Thayer
 Co-founder/CTO ReadyForZero.com
 
 On Monday, June 10, 2013 2:47:25 PM UTC-7, Plinio Balduino wrote:
 
 Hi there 
 
 I'm writing a talk about Clojure in the real world and I would like to 
 know, if possible, which companies are using Clojure for production or 
 to make internal tools. 
 
 Thank you 
 
 Plínio Balduino
 
 -- 
 -- 
 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.
  
  

-- 
-- 
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: Sweet-expressions

2013-03-25 Thread Joseph Smith
I never have understood the obsession with moving the parens in Lisp to the 
same place they are in C-like languages. I'm not typing any less, and it 
certainly undermines the code = data (i.e. lisp lists / function calls) 
homoiconic representation. Is it clearer? Maybe to someone unaccustomed to 
Lisp, but it's a very superficial thing- you get used to it (and these days I 
screw up interpreting/writing my C-lang code bc/ I'm used to Lisp). 

Regarding infix vs. postfix, it doesn't take a Lisper long to appreciate the 
advantages of prefix notation, e.g. (+ 1 8 9 3) vs 1 + 8 + 9 + 3. 

There is a (arguably, at least) Lisp out there with hardly any parens- Haskell. 
:D


On Mar 25, 2013, at 8:02 PM, Jason Lewis jasonlewi...@gmail.com wrote:

 N
 
 
 
 Jason Lewis
 
 Email  jasonlewi...@gmail.com 
 
 Twitter@canweriotnow
 
 Blog   http://decomplecting.org
 
 About http://about.me/jason.lewis
 
 
 On Mon, Mar 25, 2013 at 6:44 PM, Kris Jenkins krisajenk...@gmail.com wrote:
 As an interesting point of trivia, the idea of abandoning S-expressions for 
 some other notation actually pre-dates the first implementation of Lisp. 
 S-expressions were originally intended as a temporary measure, before a more 
 familiar representation - deemed M-expressions - could be formalized. But in 
 the words of John McCarthy:
 
 The project of defining M-expressions precisely and compiling them or at 
 least translating them into S-expressions was neither finalized nor 
 explicitly abandoned. It just receded into the indefinite future, and a new 
 generation of programmers appeared who preferred internal notation to any 
 FORTRAN-like or ALGOL-like notation that could be devised. The History Of 
 Lisp
 
 In short, the idea of abandoning S-expressions has fair claim to be one of 
 the oldest ideas in Lisp. My personal theory about that is that by the time 
 someone knows enough Lisp to do a decent job of the translation, they no 
 longer see any problem...
 
 Kris
 
 On Monday, 25 March 2013 10:52:23 UTC, poetix wrote:
 I really like the look of this:
 
 http://readable.sourceforge.net/
 
 which defines a completely reversible transformation between e.g.
 
 
 define fibfast(n)
   if {n  2}
 n
 fibup(n 2 1 0)
 and
 
 (define (fibfast n)
   (if ( n 2)
 n
 (fibup n 2 1 0)))
 
 and wonder how difficult it would be to support it (or something like it) 
 in/for Clojure. A coffeescript-like approach might be a good first step.
 
 Any thoughts?
 
 Dominic
 
 -- 
 -- 
 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.
  
  
 
 
 -- 
 -- 
 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.
  
  

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




clojure.core/protocol?

2013-03-08 Thread Joseph Smith
It appears that, as of Clojure 1.5, clojure.core/protocol? is private. Does 
anyone know the reason for this? What's the proper way to tell if something is 
a protocol?

---
Joseph Smith
j...@uwcreations.com
@solussd






-- 
-- 
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: Best practice - (:keyword map) versus (map :keyword)

2013-01-28 Thread Joseph Smith
Also, :keyword is a function, whereas the object you're passing to it may not 
be a array-map or hash-map (both functions), but a record or other type 
implementing the map interface. 

---
Joseph Smith
j...@uwcreations.com
@solussd


On Jan 28, 2013, at 8:09 PM, James Xu xumingming64398...@gmail.com wrote:

 (:Keyword map) is preferred, because keyword itself can never be nil, while 
 it's possible for map, you might be interested to have a look at: 
 https://github.com/bbatsov/clojure-style-guide
 
 From: Jonathon McKitrick jmckitr...@gmail.com
 Reply-To: clojure@googlegroups.com
 Date: Mon, 28 Jan 2013 18:00:01 -0800 (PST)
 To: clojure@googlegroups.com
 Subject: Best practice - (:keyword map) versus (map :keyword)
 
 Either one works, is there any kind of guideline on which to prefer, when?  
 Or is it entirely personal preference?  It seems each way could be more 
 readable in different circumstances 
 -- 
 -- 
 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.
  
  
 -- 
 -- 
 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.
  
  

-- 
-- 
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: Best practice - (:keyword map) versus (map :keyword)

2013-01-28 Thread Joseph Smith
The problem with this approach is if your map is a record (e.g. made with 
defrecord) it will not work. 

---
Joseph Smith
j...@uwcreations.com
@solussd


On Jan 28, 2013, at 8:31 PM, AtKaaZ atk...@gmail.com wrote:

 I would use (map :keyword) myself, for that exact reason(because I'm into 
 fail-fast), but only when I know the map is expected to never be nil at this 
 point(but likely I'll do the program in such a way that this point won't be 
 reached with a nil map in the first place), so that if it happens that the 
 map is nil it will throw exception at this point and it will stop the bug 
 propagating further, but if I were to use (:keyword map) it may err later or 
 never. Sure I could use other ways to test for nil, but just in case I forget 
 to do so, (map :keyword) would save me where (:keyword map) would just 
 continue. I note that it's idiomatic clojure to use the latter variant (ie. 
 non-fail-fast).
 
 - says the guy(me) that hasn't done any program(in clojure anyway)
 
 
 On Tue, Jan 29, 2013 at 3:09 AM, James Xu xumingming64398...@gmail.com 
 wrote:
 (:Keyword map) is preferred, because keyword itself can never be nil, while 
 it's possible for map, you might be interested to have a look at: 
 https://github.com/bbatsov/clojure-style-guide
 
 From: Jonathon McKitrick jmckitr...@gmail.com
 Reply-To: clojure@googlegroups.com
 Date: Mon, 28 Jan 2013 18:00:01 -0800 (PST)
 To: clojure@googlegroups.com
 Subject: Best practice - (:keyword map) versus (map :keyword)
 
 Either one works, is there any kind of guideline on which to prefer, when?  
 Or is it entirely personal preference?  It seems each way could be more 
 readable in different circumstances
 -- 
 -- 
 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.
  
  
 -- 
 -- 
 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.
 
 
 
 -- 
 Please correct me if I'm wrong or incomplete,
 even if you think I'll subconsciously hate it.
 
 -- 
 -- 
 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.
  
  

-- 
-- 
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: Call for volunteers to help moderate a ClojureScript Google group

2013-01-23 Thread Joseph Smith
I'll help!

---
Joseph Smith
j...@uwcreations.com
@solussd


On Jan 23, 2013, at 8:16 PM, Brandon Bloom snprbo...@gmail.com wrote:

 /me steps forward
 
 On Wednesday, January 23, 2013 10:53:34 AM UTC-8, Andy Fingerhut wrote:
 
 An interest was expressed by a few in having a separate ClojureScript 
 mailing list. 
 
 If it is a Google group, that requires moderating messages sent to the 
 group, via manual approval.  I suspect early on there will be many people 
 posting to the group for the first time that have long worked with 
 ClojureScript, and you'll know them, and you can approve that and all future 
 messages from them, but every time a new sender sends their first few 
 messages to the group, a person needs to receive an email, click a link, 
 read the message to verify it is on topic, and click a couple of buttons to 
 approve it or reject it. 
 
 Anyone interested in helping out with that?  It is easier if the load can be 
 spread across multiple people.  If someone else approves a message, you 
 still might get an email about a message needing approval, but the last 
 couple of steps above are then unnecessary. 
 
 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 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: Clojure 1.5.0 RC 1

2012-12-22 Thread Joseph Smith
Awesome stuff. I'm using those threading macros already. :)

---
Joseph Smith
j...@uwcreations.com
@solussd


On Dec 22, 2012, at 1:16 PM, Denis Labaye denis.lab...@gmail.com wrote:

 Is the release note here: 
 https://github.com/clojure/clojure/blob/master/changes.md ? 
 
 Anyway it looks tasty: 
 New and Improved Features: Reducers
 New threading macros:
 cond-
 cond-
 as-
 some-
 ...
 
 
 On Sat, Dec 22, 2012 at 5:09 PM, Stuart Halloway stuart.hallo...@gmail.com 
 wrote:
 I just kicked off the RC1 build for Clojure.  With luck, within a few hours 
 it will show up at Maven Central [1]
 
 Please test it.  It would be fantastic if as many people as possible updated 
 their projects and tested with the RC, so we can flush out issues now 
 instead of in release.
 
 Regards,
 Stu
 
 [1] http://bit.ly/WEnjAi
 -- 
 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

-- 
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: defrecord and overriding empty

2012-12-15 Thread Joseph Smith
Well here I am over a year later with the same problem. I'm curious, what 
was your solution for the time being?

On Tuesday, September 27, 2011 1:06:37 PM UTC-5, David Nolen wrote:

 On Tue, Sep 27, 2011 at 1:54 PM, Nathan Sorenson nd...@sfu.cajavascript:
  wrote:

 Should IPersistentCollection even be defining 'empty', if one of the 
 language's key data types doesn't support it? I think it would be better to 
 either pull 'empty' into it's own protocol so clojure.walk doesn't match on 
 IPersistentCollection when walking a data structure with the false 
 expectation that it can create an empty version, or rename 'empty' it to 
 something that records can implement, like 'default.' 


 This is a fair point. ClojureScript fixes this by providing 
 IEmptyableCollection.

 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

Re: Clojure turns 5

2012-10-16 Thread Joseph Smith
Whoo hoo!! Party!!!

Thanks to everyone, especially Rich, for creating and contributing to Clojure. 
:)

---
Joseph Smith
j...@uwcreations.com
@solussd


On Oct 16, 2012, at 8:54 PM, Rich Hickey richhic...@gmail.com wrote:

 I released Clojure 5 years ago today. It's been a terrific ride so far.
 
 Thanks to everyone who contributes to making Clojure, and its community, 
 great.
 
 Rich
 
 -- 
 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


Re: File endings proposal for easier cross-compiling

2012-10-07 Thread Joseph Smith
I like the idea of a scheme like this. 


On Oct 8, 2012, at 1:44 AM, Jonathan Fischer Friberg odysso...@gmail.com 
wrote:

 Hi,
 
 In my opinion, cross-compiler projects is way too complicated to pull off. 
 When they really shouldn't be.
 Therefore, I'm proposing the following file ending scheme:
 
 .clj - detected by all compilers. In a cross-compiler project, .clj files 
 contains code not specific to the compiler.
 
 .cljj - detected by the jvm compiler, contains jvm specific code.
 
 .cljs - detected by clojurescript, contains clojurescript specific code.
 
 .cljclr - detected by clojureCLR, ...
 
 and so on.
 
 It's important to note that the actual content of the files is not checked. 
 That is, a .clj file can still
 contain compiler-specific code.
 Moreover, the point of this scheme is not the actual file endings, but the 
 fact that each compiler has it's own file ending in addition to .clj.
 
 The advantages of this scheme are:
 
 1. Cross-compiler code becomes ridiculously easy to separate. Say you want to 
 draw something on-screen, using java2D in the jvm, and a canvas in javascript.
 Then simply create a draw.cljj file for the java2D code, and a draw.cljs file 
 for the canvas code. Easy! 
 
 2. Backwards-compatible with most existing projects. 
 Since .clj is still detected by all compilers, and .cljs is detected by 
 clojurescript, existing projects will still be correctly detected and 
 compiled.
 
 
 So, what do you think?
 
 Jonathan
 -- 
 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

Re: Central screwup

2012-08-16 Thread Joseph Smith
I'm surprised this still hasn't been fixed. I noticed it and raised the issue 
(well, told people about it on IRC) about 2 weeks ago. I've been pointed at an 
alternate repo as a workaround. :/

---
Joseph Smith
j...@uwcreations.com


On Aug 16, 2012, at 5:27 AM, Paul Lam paul@forward.co.uk wrote:

 it happened again...
 
 
 
 On Friday, 15 June 2012 05:32:14 UTC+1, Nelson Morris wrote:
 On Thu, Jun 14, 2012 at 8:38 AM, Stuart Sierra 
 the.stua...@gmail.com wrote: 
  
  
  Is there anyone on the Clojure/core team with a contact among those 
  who run Central who could get them to look into this? 
  
  
  I'm on the Sonatype OSSRH mailing list: 
  https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
   
  (mailing list addresses at the bottom) 
  
  There was no mention of this issue there, but I'll ask about it. 
  -S 
  
  
  -- 
  You received this message because you are subscribed to the Google 
  Groups Clojure group. 
  To post to this group, send email to clo...@googlegroups.com 
  Note that posts from new members are moderated - please be patient with 
  your 
  first post. 
  To unsubscribe from this group, send email to 
  clojure+u...@googlegroups.com 
  For more options, visit this group at 
  http://groups.google.com/group/clojure?hl=en 
 
 akhudek just asked about only getting 1.2.0 from central in #clojure. 
 It appears the metadata has been reverted again. 
 
 From  http://repo1.maven.org/maven2/org/clojure/clojure/ : 
 maven-metadata.xml 14-Sep-2010 12:18 
   325 
 maven-metadata.xml.md5 14-Sep-2010 12:18 
32 
 maven-metadata.xml.sha114-Sep-2010 12:18 
40 
 
 $ curl  http://repo1.maven.org/maven2/org/clojure/clojure/maven-metadata.xml 
 ?xml version=1.0 encoding=UTF-8? 
 metadata 
   groupIdorg.clojure/groupId 
   artifactIdclojure/artifactId 
   versioning 
 latest1.2.0/latest 
 release1.2.0/release 
 versions 
   version1.2.0/version 
 /versions 
 lastUpdated20100914121821/lastUpdated 
   /versioning 
 /metadata 
 -- 
 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

Re: Clojure Sticker

2012-06-14 Thread Joseph Smith
Excellent. I'd like a sticker for my notebook. :)

---
Joseph Smith
j...@uwcreations.com
@solussd


On Jun 14, 2012, at 11:52 AM, Rich Hickey richhic...@gmail.com wrote:

 No, you are not allowed to reproduce the Clojure logo and put it up for sale.
 
 I'd be happy to set up an official way to get stickers/shirts etc.
 
 Rich
 
 
 On Jun 11, 2012, at 6:23 PM, Sven Johansson wrote:
 
 I've been trawling the internet for Clojure stickers before and 
 come up empty. If there's really and truly nowhere to get these 
 online, I'll have it done before the end of the week and put it up 
 for order via whatever international order t-shirt/paraphernalia 
 online-shop that seems to work best. 
 
 But... what about copyright and this kind of use? Am I actually
 allowed to reproduce the Clojure logo and put it up for sale on a 
 commercial site?
 
 -- 
 Sven Johansson
 Twitter: @svjson
 
 On Mon, Jun 11, 2012 at 11:11 PM, Joseph Smith j...@uwcreations.com wrote:
 Me too!
 
 ---
 Joseph Smith
 j...@uwcreations.com
 @solussd
 
 
 On Jun 11, 2012, at 2:08 PM, Christian Guimaraes cguimaraes...@gmail.com 
 wrote:
 
 I'm interested also...
 
 On Sun, Jun 10, 2012 at 2:03 AM, aboy021 arthur.bo...@gmail.com wrote:
 Is there anywhere that I can get a Clojure sticker? 
 
 -- 
 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

-- 
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: Clojure Sticker

2012-06-11 Thread Joseph Smith
Me too!

---
Joseph Smith
j...@uwcreations.com
@solussd


On Jun 11, 2012, at 2:08 PM, Christian Guimaraes cguimaraes...@gmail.com 
wrote:

 I'm interested also...
 
 On Sun, Jun 10, 2012 at 2:03 AM, aboy021 arthur.bo...@gmail.com wrote:
 Is there anywhere that I can get a Clojure sticker?
 -- 
 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

-- 
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: Converting project.clj to maven's pom.xml

2012-06-07 Thread Joseph Smith
Doesn't lein pom do it?

---
Joseph Smith
j...@uwcreations.com
(402)601-5443


On Jun 6, 2012, at 11:20 PM, Mark Derricutt m...@talios.com wrote:

 Maybe I should write a lein plugin that generates a pom for my maven plugin - 
 but that feels a little rude :)
 
 Mark
 
 On 21/04/12 8:46 AM, Ben Smith-Mannschott wrote:
 It does't configure clojure-maven-plugin, so executing 'mvn package'
 with the resulting pom will not produce a useful result.
 
 
 -- 
 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


Emacs / Emacs Live autocompletion and slime-edit-definition

2012-05-28 Thread Joseph Smith
I've been playing around with emacs live thismorning- cool stuff. It makes me 
want to get to the bottom of a couple nagging emacs problems I've had for 
awhile (since I'm now so close to emacs IDE bliss).

I frequently use 'slime-edit-definition', aka M-x ., to 'jump to definition 
(and M-x * to jump back). It always works with functions in clojure.core, but 
only works some of the time with code in my own projects. How does it index the 
symbols it's able to jump to? Using emacs live I get docstrings, autocomplete 
and function arg lists for clojure.core functions, but not anything in my 
namespaces. Is there a way to get emacs/slime/whatever to index these so I can 
M-x . my way around and see docstrings/arg lists?

Thanks!

---
Joseph Smith
j...@uwcreations.com
(402)601-5443






-- 
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: Emacs / Emacs Live autocompletion and slime-edit-definition

2012-05-28 Thread Joseph Smith
Oops, mistake in my email, yeah I'm using meta-dot, M-.

Looks like it's able to 'see into' anything I've required in the repl. I was 
hoping it was crawling the project somehow. :D

---
Joseph Smith
j...@uwcreations.com
@solussd






On May 28, 2012, at 9:44 AM, Baishampayan Ghose wrote:

 On Mon, May 28, 2012 at 8:03 PM, Joseph Smith j...@uwcreations.com wrote:
 I frequently use 'slime-edit-definition', aka M-x ., to 'jump to definition 
 (and M-x * to jump back). It always works with functions in clojure.core, 
 but only works some of the time with code in my own projects. How does it 
 index the symbols it's able to jump to? Using emacs live I get docstrings, 
 autocomplete and function arg lists for clojure.core functions, but not 
 anything in my namespaces. Is there a way to get emacs/slime/whatever to 
 index these so I can M-x . my way around and see docstrings/arg lists?
 
 There is no explicit indexing that happens with SLIME, the source is
 found dynamically using the meta-data, etc.
 
 Are you sure you are using the right keys? I have always used M-.
 (meta dot) and M-, (meta comma) for these and they work perfectly (as
 long as I am connected to a running Clojure VM, of course).
 
 Regards,
 BG
 
 -- 
 Baishampayan Ghose
 b.ghose at 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 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: Let over Lambda

2012-05-18 Thread Joseph Smith
I've read it and highly recommend it. It won't necessarily help you program in 
Clojure, but it will open your eyes to the seemingly limitless potential of 
macros. You'll find yourself smiling with intrique just about every page- quite 
thought-provoking. 

---
Joseph Smith
j...@uwcreations.com
(402)601-5443


On May 17, 2012, at 9:23 PM, P Martin rawkso...@gmail.com wrote:

 Hi everyone,
 I was perusing Amazon for some books on Clojure and Lisp and came across Let 
 Over Lambda. From its reviews, it seems that this book may be useful for 
 macro development in  Clojure. Has anyone else read this book? Do you think 
 it would be a good book for Clojure work?
 
 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 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 post job ad

2012-03-30 Thread Joseph Smith
This seems like a good place. Where's the job? :)





On Mar 30, 2012, at 7:35 AM, David Jagoe wrote:

 G'day everyone
 
 I am increasingly relying on clojure and plan to use clojureclr and 
 clojurescript in production too. I will soon need to hire a clojure developer 
 and was hoping that someone could suggest a good place to post a job ad. I've 
 never seen a job posted here but I would like to reach the community.
 
 Thanks
 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

-- 
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: Best IDE

2012-01-20 Thread Joseph Smith
emacs. :D

Seriously though, start with viper-mode.

---
Joseph Smith
j...@uwcreations.com
(402)601-5443






On Jan 18, 2012, at 1:35 PM, Jeb Beich wrote:

 Any suggestions for a vim man?
 
 On Wed, Jan 18, 2012 at 1:29 PM, Cedric Greevey cgree...@gmail.com wrote:
 On Wed, Jan 18, 2012 at 11:18 AM, Jay Fields j...@jayfields.com wrote:
  Use emacs, if you want the path of least resistance
 
 *boggles*
 
 Say WHAT?
 
 You've got to be kidding. That's like suggesting that the path of
 least resistance in taking a trip to L.A. involves climbing the north
 face of Everest instead of using an airplane. In particular, the
 learning curve of emacs and the north face of Everest, in a shocking
 coincidence, turn out to have exactly the same geometry. :)
 
 --
 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
 
 
 
 -- 
 Jeb Beich
 http://www.red-source.net/jeb
 
 -- 
 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

Re: i am so bored

2012-01-14 Thread Joseph Smith
How about a native I/O library that'll detect the platform and architecture at 
runtime? Something like java 1.7's nio, but they'll work on clojure hosted on 
1.5.x? Make use of JNA to make native calls to get file system details, etc. 

Right now you cannot even stat a file from clojure without calling the stat 
command from a shell. :/


---
Joseph Smith
j...@uwcreations.com
(402)601-5443


On Jan 14, 2012, at 6:12 AM, Dennis Haupt d.haup...@googlemail.com wrote:

 hi there,
 
 i am looking for something to do, preferably something that makes me
 rich, but that is not a must have - if it's interesting, i'll code for free.
 
 i can offer almost 15 years of coding experience (important: while being
 open minded the whole time). i am a one man army, if you will :)
 (procedural, OO (that one for money), FP, even some assembler). one
 thing i have not yet done is write something big without static type
 checking, so that'll be new.
 
 clojure has caught my interest. in general, high level programming has.
 i played around with clojure a bit and would like to get something done
 that has at least some purpose. are there any small/new projects looking
 for help?
 
 -- 
 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


Re: join in clojure

2011-03-05 Thread Joseph Smith
Welcome!

---
Joseph Smith
j...@uwcreations.com
(402)601-5443


On Mar 5, 2011, at 3:52 AM, jaya kala kathiravan.kala...@gmail.com wrote:

 hai! how are you I join in clojure
 today .
 thanking 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 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: Regarding lexical scoping and usage of 'let' in a recursive function call

2010-11-12 Thread Joseph Smith
In this case 'memoize' returns a memoized version of the function 'f', which 
closes over 'mem'. Each time 'memoize' is called a new atom is created, not 
each time the function it returns is called.


---
Joseph Smith
j...@uwcreations.com






On Nov 11, 2010, at 2:06 PM, Manoj wrote:

 I am a newbie to Clojure, so have some confusion around lexical
 scoping especially when let is used in a recursive function call. To
 be more precise, I am taking the example memoize() function used for
 explaining the concept of atom at clojure.org.
 
 Here is how it is explained:
 
 (defn memoize [f]
  (let [mem (atom {})]
(fn [ args]
  (if-let [e (find @mem args)]
(val e)
(let [ret (apply f args)]
  (swap! mem assoc args ret)
  ret)
 
 (defn fib [n]
  (if (= n 1)
n
(+ (fib (dec n)) (fib (- n 2)
 
 (time (fib 35))
 user= Elapsed time: 941.445 msecs
 
 (def fib (memoize fib))
 
 (time (fib 35))
 
 user= Elapsed time: 0.044 msecs
 
 My question is when let is used in this context, wouldn't it create
 a fresh binding to a new atom{}? Any explanation would be highly
 appreciated.
 
 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 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: Clojure Conference Poll

2010-01-26 Thread Joseph Smith

+1 Lincoln/Omaha Nebraska.   :)

---
Joseph Smith
j...@uwcreations.com
(402)601-5443


On Jan 26, 2010, at 2:29 PM, Michel Vollebregt klmn...@gmail.com  
wrote:



+1 for Europe

On Jan 26, 12:22 am, mudphone kyle...@gmail.com wrote:

+1 Paris

On Jan 22, 11:54 pm, Konrad Hinsen konrad.hin...@fastmail.net  
wrote: On 22 Jan 2010, at 22:15, Wilson MacGyver wrote:



I vote let's turn this into a clojure vacation, and hold it in an
exotic location.



Otherwise, hey, Columbus Ohio is as good as any other city. :)



My vote is for Paris, France :-)



Konrad.


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


Re: gui repl

2010-01-07 Thread Joseph Smith
This is very interesting, but I cannot seem to get Clojure code to execute in 
it. I have it installed and field thinks it is installed. Do I need to somehow 
switch modes?


---
Joseph Smith
j...@uwcreations.com





On Jan 4, 2010, at 3:42 PM, Marc Downie wrote:

 
 Well, if people are in the mood for fun, hybrid, Clojure REPLs... 
 
 The latest version of Field (a mac-only open source IDE for digital art) 
 secretly supports Clojure as one of its embedded languages (screenshot here, 
 more information about Field here). This means you can write:
 
 # these lines are Python (strictly, Jython)
 xxx =15
 vv = Vector3(1.2,0,1) # Vector3 is actually Java Class
 
 // start-clojure
 
 (defn asum [#^floats xs]
   (areduce xs i ret (float 0)
   (+ ret (aget xs i
 
 (println (asum (float-array [xxx (.x vv) 3])))
 
 // end-closure
 
 # back to Python, in beta 11
 _clojure.asum(array('f', [1,2,3]))
 
 ---
 
 Installation instructions upon request: it's just an undocumented hack right 
 now, but it's a working hack. You can use it to write code against the 
 Field's OpenGL graphics system or Processing libraries. If anybody is excited 
 (rather than repulsed or outraged) by this we could use some Clojure hacking 
 talent to make it real.
 
 best,
 
 Marc.
 
 On Mon, Jan 4, 2010 at 2:17 PM, Brian Goslinga quickbasicg...@gmail.com 
 wrote:
 Nice.  This reminds me of some of the things you can do in CLIM.
 
 --
 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

-- 
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: Parenthesis Inference

2009-12-19 Thread Joseph Smith
Very abstract java example (as concise as possible):

ListObject processList(ListObject oldObjects)
{
   ListObject newObjects = ArrayListObject;
   for(Object object : oldObjects) 
   {
  newObjects.add(manipulate(object));
   }
   return newObjects;
}

Clojure equivalent:

   (defn processList [#^Object list] 
 (for [object list] (manipulate object)))

I realize this is a very pedestrian example, but a couple things to note (and 
I'm sure mentioned previously):
 - Lisps are much more expressive, in general
 - Compared to most languages there is significantly less syntactic noise- 
There is just enough syntax to delimit the code.
 - The code is a data-structure (homoiconicity), and it is very easy to see 
where the expression begins and ends (this is good for readability, code 
formatters, etc)
 - Lisps are very consistent- no special code formatting rules to remember. 
Despite what seems like a large number of parentheses there are far less 
'control' characters. 
I.e. instead of : . ; ( ) { }  you have ( ), and usually fewer of them.
 - Most programmers rely on their IDE/Editor or indentation to make sure they 
are matching curly-braces correctly, 
   which is made harder by blocks of code that frequently extend beyond the 
height of your screen. 
   IDEs/editors can match parentheses as well. :) 
 - The parentheses make the code sleek and aerodynamic

---
Joseph Smith
j...@uwcreations.com
(402)601-5443





On Dec 19, 2009, at 11:21 AM, David Nolen wrote:

 On Sat, Dec 19, 2009 at 8:25 AM, Martin Coxall pseudo.m...@me.com wrote:
 
  I guess it's mostly a matter of judging a language by its long-term
  merits instead of initial appearance -- just like with so many other
  things in life.
 
 
 That - right there - is a tacit admission that the Clojure community will 
 find it actively desirable that it remain a minority language, so we can all 
 feel smug that we understand something those poor average programmers were 
 too simple to see.
 
 I don't think anybody in the Clojure community wants to Clojure to be a 
 fringe language. Considering the ML now has about 3K subscribers (up 2500 
 from 14 months ago) I think Rich Hickey and the community have done a fair 
 job touting it's advantages.
 
 However, there are somethings about every language that you just have to 
 accept. Lisp's parentheses are one of those things. For example, it's really 
 not worth complaining about Python's enforcement of significant whitespace. 
 Sure people sing it praises now, but to this day there still fruitless 
 discussions about the matter mostly initiated by people with only a passing 
 familiarity of the language.
  
 You know there's nothing wrong with allowing Clojure to display its elegance 
 upfront, rather than making programmers work for it like it's some 
 Presbytarian admission exam.
 
 You are not the first to bring up the concern about parentheses and you will 
 certainly not be the last. My advice would be to let the matter drop. People 
 who aren't going to learn Lisp just because it has parentheses aren't going 
 to be converted. But from the variety of programmers on this list, parens are 
 not a significant deterrant for programmers coming from the background of 
 Java, Scala, JavaScript, C, C++, Objective-C, OCaml, Haskell, Prolog, Erlang, 
 PHP, Perl, Python, Ruby, etc.
  
 
 Martin
 
 --
 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

-- 
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: Parenthesis Inference

2009-12-19 Thread Joseph Smith
Oops.. left two parentheses out in my Java code. Guess that just furthers my 
point. :)

  ListObject newObjects = ArrayListObject();






On Dec 19, 2009, at 12:04 PM, Joseph Smith wrote:

 Very abstract java example (as concise as possible):
 
 ListObject processList(ListObject oldObjects)
 {
ListObject newObjects = ArrayListObject;
for(Object object : oldObjects) 
{
   newObjects.add(manipulate(object));
}
return newObjects;
 }
 
 Clojure equivalent:
 
(defn processList [#^Object list] 
  (for [object list] (manipulate object)))
 
 I realize this is a very pedestrian example, but a couple things to note (and 
 I'm sure mentioned previously):
  - Lisps are much more expressive, in general
  - Compared to most languages there is significantly less syntactic noise- 
 There is just enough syntax to delimit the code.
  - The code is a data-structure (homoiconicity), and it is very easy to see 
 where the expression begins and ends (this is good for readability, code 
 formatters, etc)
  - Lisps are very consistent- no special code formatting rules to remember. 
 Despite what seems like a large number of parentheses there are far less 
 'control' characters. 
   I.e. instead of : . ; ( ) { }  you have ( ), and usually fewer of them.
  - Most programmers rely on their IDE/Editor or indentation to make sure they 
 are matching curly-braces correctly, 
which is made harder by blocks of code that frequently extend beyond the 
 height of your screen. 
IDEs/editors can match parentheses as well. :) 
  - The parentheses make the code sleek and aerodynamic
 
 ---
 Joseph Smith
 j...@uwcreations.com
 (402)601-5443
 
 
 
 
 
 On Dec 19, 2009, at 11:21 AM, David Nolen wrote:
 
 On Sat, Dec 19, 2009 at 8:25 AM, Martin Coxall pseudo.m...@me.com wrote:
 
  I guess it's mostly a matter of judging a language by its long-term
  merits instead of initial appearance -- just like with so many other
  things in life.
 
 
 That - right there - is a tacit admission that the Clojure community will 
 find it actively desirable that it remain a minority language, so we can all 
 feel smug that we understand something those poor average programmers were 
 too simple to see.
 
 I don't think anybody in the Clojure community wants to Clojure to be a 
 fringe language. Considering the ML now has about 3K subscribers (up 2500 
 from 14 months ago) I think Rich Hickey and the community have done a fair 
 job touting it's advantages.
 
 However, there are somethings about every language that you just have to 
 accept. Lisp's parentheses are one of those things. For example, it's really 
 not worth complaining about Python's enforcement of significant whitespace. 
 Sure people sing it praises now, but to this day there still fruitless 
 discussions about the matter mostly initiated by people with only a passing 
 familiarity of the language.
  
 You know there's nothing wrong with allowing Clojure to display its elegance 
 upfront, rather than making programmers work for it like it's some 
 Presbytarian admission exam.
 
 You are not the first to bring up the concern about parentheses and you will 
 certainly not be the last. My advice would be to let the matter drop. People 
 who aren't going to learn Lisp just because it has parentheses aren't going 
 to be converted. But from the variety of programmers on this list, parens 
 are not a significant deterrant for programmers coming from the background 
 of Java, Scala, JavaScript, C, C++, Objective-C, OCaml, Haskell, Prolog, 
 Erlang, PHP, Perl, Python, Ruby, etc.
  
 
 Martin
 
 --
 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
 
 
 -- 
 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

Re: Trying to rewrite a loop as map/reduce

2009-12-17 Thread Joseph Smith
What are you using to generate the pretty rainbow perens on your website? 

---
Joseph Smith
j...@uwcreations.com
(402)601-5443





On Dec 17, 2009, at 5:25 PM, Meikel Brandmeyer wrote:

 Hi,
 
 Am 16.12.2009 um 17:26 schrieb Meikel Brandmeyer:
 
 Well. It was claimed it is cleaner... Just asking...
 
 I wrote down my thoughts in a small blog post: http://tr.im/HW5P
 
 Sincerely
 Meikel
 
 -- 
 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


Re: Clojure analysis

2009-12-12 Thread Joseph Smith
I think referring to clojure as a multiparadigm languge is incorrect.

---
Joseph Smith
j...@uwcreations.com
(402)601-5443


On Dec 11, 2009, at 3:04 PM, kusi kusim...@gmail.com wrote:

 http://kusimari.blogspot.com/2009/12/analysing-clojure-programming-language.html

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


Re: reduce with-precision using BigDecimal

2009-11-30 Thread Joseph Smith
setScale returns a new BigDecimal with a given scale, it does not  
change the original value.

e.g.)
user= (def mybd (BigDecimal. 40))
#'user/mybd
user= (.setScale mybd 4)
40.M
user= mybd
40M


---
Joseph Smith
j...@uwcreations.com
(402)601-5443





On Nov 30, 2009, at 12:00 AM, John Harrop wrote:

 On Mon, Nov 30, 2009 at 12:22 AM, Joseph Smith j...@uwcreations.com  
 wrote:
 What you want is to set the 'scale' of the BigDecimal.

 There doesn't seem to be a nice clojure macro for it, but this works:
user= (.setScale (reduce + [15.00M 15.01M 3.00M 3.01M]) 3)
36.020M

 That's what with-precision does, on a temporary basis. But for 36.02  
 to be represented with-precision has to be at least 4 it seems.  
 Looks like with-precision is all the digits, scale is the ones right  
 of the decimal point.

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

Re: reduce with-precision using BigDecimal

2009-11-30 Thread Joseph Smith
I see- Sounds like we're on the same page. :)
---
Joseph Smith
j...@uwcreations.com
(402)601-5443





On Nov 30, 2009, at 11:14 AM, John Harrop wrote:

 On Mon, Nov 30, 2009 at 7:07 AM, Joseph Smith j...@uwcreations.com  
 wrote:
 setScale returns a new BigDecimal with a given scale, it does not  
 change the original value.

 I did not claim otherwise. The effect of with-precision is like an  
 implicit (.setScale foo) around every BigDecimal foo, only more  
 efficient since it's handled internally by the BigDecimal class and  
 its helper, MathContext.

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

Re: reduce with-precision using BigDecimal

2009-11-29 Thread Joseph Smith
What you want is to set the 'scale' of the BigDecimal.

There doesn't seem to be a nice clojure macro for it, but this works:
user= (.setScale (reduce + [15.00M 15.01M 3.00M 3.01M]) 3)
36.020M


---
Joseph Smith
j...@uwcreations.com
(402)601-5443





On Nov 29, 2009, at 2:02 PM, Gareth jones wrote:

 Agh that makes sense, I thought I was going crazy but I guess it's
 obvious now you point it out... Thanks for the help :D

 Gaz

 Sent from my iPhone

 On Nov 29, 2009, at 10:36 AM, Ahmed Fasih wuzzyv...@gmail.com wrote:

 Hi, without knowing much about what's going on, note that

 user= (reduce + [15.00M 15.01M 3.00M 3.01M])
 36.02M
 user= (with-precision 3 (reduce + [15.00M 15.01M 3.00M 3.01M]))
 36.0M

 So an intermediate step in the calculation is rounded down to 3
 decimals and that rounding error is carried through. So the 9M with
 3-precision would mean 9.00M.

 Amazing! It might be getting in your way here, but functions changing
 their operation because they were called via with-precision speaks
 to a flexibility that I've only seen in Lisps.

 On Nov 28, 10:27 pm, Gaz gareth.e.jo...@gmail.com wrote:
 Hi, apologies if this is a silly question. Im having some confusion
 with the following code:

 (with-precision 3 (/ 36.02M 4.00M))
 9.01M

 This is what i would expect. This however:

 (with-precision 3 (/ (reduce + [15.00M 15.01M 3.00M 3.01M])
 4.0M))
 9M

 Seems a bit odd? Or am I missing something obvious :(

 Thanks for any help.

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

-- 
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: A Clojure Highlife

2009-11-28 Thread Joseph Smith
Very cool. I had originally planned to add some stats keeping to my  
implementation along with connected component coloring (hence the  
ref'd maps). I also found refs convenient for synchronizing my  
neighbor calculations with grid updates since I have random seeding,  
the ability to change the grid while it is running, and pausing. Looks  
like your implementation will always maintain a correctly calculated  
grid.

You might replace:
 (defn render [#^Graphics g b]
   (doseq [y (range height)]
 (doseq [x (range width)]
   (let [cell (cell-at b x y)]
   (if (= cell 0)
 (.setColor g Color/WHITE)
 (.setColor g Color/BLACK))
   (.fillRect g (* x cell-width) (* y cell-height)
  (dec cell-width) (dec cell-height))

with:

(defn render [#^Graphics g b]
   (doseq [y (range height) x (range width)]  ...

No need for the nested doseqs.

I'm thinking... clojuriffic? clojured? clojonic? :)

---
Joseph Smith
j...@uwcreations.com
(402)601-5443





On Nov 26, 2009, at 3:37 AM, Chris Jenkins wrote:

 Thanks for sharing this. Coincidentally, I just wrote my first  
 Clojure program which was... an implementation of Conway's Game of  
 Life :-) I took a different approach - I represented the board as a  
 vector of vectors of integers (1 for alive, 0 for dead) and then  
 implemented a new-board function that takes a board as an argument  
 and returns the next generation of that board. It seemed the  
 functional way to do it. I then create an atom whose state is a grid  
 and repeatedly call (swap! board new-board) in order to move it  
 through the generations.

 I'll copy the source to my little program at the bottom of this  
 email. If anyone has any comments on the style or possible  
 improvements then I would be very interested to hear them. I'm  
 particularly keen to hear how close to idiomatic Clojure style it is  
 (is there a Clojure equivalent of the adjective Pythonic?)

 (import
  '(java.awt Color Graphics Dimension FlowLayout)
  '(javax.swing JPanel JFrame JButton Timer BoxLayout)
  '(java.awt.event MouseListener ActionListener ActionEvent))

 (set! *warn-on-reflection* true)

 (def width  50)
 (def height 20)
 (def cell-width 10)
 (def cell-height 10)

 (def sleep-time 100)

 (def initial-board
 ; (apply vector (replicate height
 ;  (apply vector (replicate width 0)
  [[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 1 1 0 0 0 0 0 0  
 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 1 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 1 1 0 0 1 1 0 0  
 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0] [0 0 0 0 0 0 1 1 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0  
 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 1 1 0 0  
 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  
 0 0]])

 (def board-atom (atom initial-board ))

 (def running-atom (atom false))

 ;; Board manipulation functions

 (defn print-board [b]
   (doseq [row b]
 (println (str row

 (defn within [v min max]
   (and (= v min) ( v max)))

 (defn cell-at [b x y]
   (if (and (within x 0 width) (within y 0 height))
 (nth (nth b y) x)
 0))

 (defn occurences [l item]
   (count (filter #(= % item) l)))

 (defn new-cell-value [cell neighbours]
   (let [num-1s

Re: A Clojure Highlife

2009-11-18 Thread Joseph Smith
The m-surrounding-neighbors-seq function only memoizes sequences  
containing Refs surrounding a particular ref at (x,y). I do this to  
avoid the recalculation of the coordinates of the cells surrounding  
each cell. As I understand it, memoization caches return values for  
input values.

For example, the the Ref for cell (3,4) has Refs at [(2,3) (3,3) (4,3)  
(2,4) (4,4) (2,5) (3,5) (4,5)] surrounding it. It is only memoizing a  
sequence of these Refs, once for each point in the grid, not for every  
grid. If it was indeed doing that it wouldn't take long before the JVM  
ran out of memory- the simulation is very unlikely to hit a cycle :)


Use the clojure libs I include in the bundle on my website: 
http://www.solussd.com/wp-content/uploads/2009/11/highlife.zip


---
Joseph Smith
j...@uwcreations.com
(402)601-5443





On Nov 16, 2009, at 8:24 PM, Jeff Heon wrote:

 Hi there,

 Unfortunately, I was unable to get it working.
 From what I gather, I'm using the wrong clojure.jar and or clojure-
 contrib.jar.

 Could you tell me which version of theses files you are using?

 Anyway, I was wondering about the memoizing of the function
 surrounding-neighbors-seq.

 It's memoizing for every grid, which I guess is good if the
 application hits a cycle, but if it doesn't, it will unnecessarily
 keep function results for passed grids.

 I'm not sure about the memoizing cache behavior, but if we bet for  
 non-
 repeating grids, I think it might be better to dynamically memoize for
 each grid only.
 This way, memoizing information for passed grids will be GCed.

 I'm thinking about something like this.
 Remove the global def:
 (def m-surrounding-neighbors-seq (memoize surrounding-neighbors-seq))

 Modify the two following count-living-neighbors and get-living-
 neighbors-seq functions to let a memoized version once for each grid:
 See http://paste.lisp.org/display/90541

 Using a let and passing the local memoized function to count-living-
 neighbors felt weird, but it felt better than doing a binding.

 I wonder which would be the idiomatic way to go.

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


Re: A Clojure Highlife

2009-11-18 Thread Joseph Smith
Heh. I had wondered if you had withdrawn the post since I only saw it  
in my email box. No worries- I went back and examined my code to make  
sure it was doing what I thought it was.

---
Joseph Smith
j...@uwcreations.com
(402)601-5443


On Nov 18, 2009, at 7:35 AM, Jeff Heon jfh...@gmail.com wrote:

 Thanks. I got it working with the bundle.

 Arghh, I realized about half an hour after posting that I had
 misunderstood m-surrounding-neighbors-seq.
 I withdrew my post from the Google group, but like they say, nothing
 vanishes without a trace ;)

 I had not realized that since the grid is made out of refs, and since
 the refs themselves do not change, that the grid will always be equal
 to itself and thus not generate new memoization values even if the
 values inside the refs do change.

 These days it seems that not matter how long I think about a reply,
 and no matter how many times I reread it before posting, I'll find an
 error in it just after posting it 8p

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