Re: clojure.string/capitalize API

2012-12-12 Thread Grant Rettke
On Wed, Dec 12, 2012 at 8:12 AM, Pierre Allix
pierre.allix.w...@gmail.comwrote:

 I think it does not follow principle of least astonishment. I would have 
 expected to convert only the first character. Moreover converting the other 
 characters make the function almost useless, I for instance had this string 
 to capitalize:


Fro that principle, who is the least astonished who is it based 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://groups.google.com/group/clojure?hl=en

Re: Best practices for java libraries

2012-12-10 Thread Grant Rettke
Sounds like a good candidate for the Clojure documentation project.

On Mon, Dec 10, 2012 at 5:33 PM, Mikera mike.r.anderson...@gmail.comwrote:

 Some thoughts from various Java libraries I have wrapped:

 - Normal functions are generally best for wrapping
 - It can often make sense to have a protocol that dispatched on the type
 of the Java object and/or clojure params for polymorphism and extension.
 Your public functions should often call the protocol functions (after
 applying any defaults / validation / argument re-ordering etc.)
 - It can make sense to turn mutable Java APIs into immutable Clojure ones
 in some cases. Depends on whether the Java API allows this and how much you
 care about performance.
 - Try to type hint with interfaces or abstract base classes only. It gets
 messy if you start making special cases for specific concrete types, and is
 probably a sign of incoherent design if you feel you need to do this. Best
 to figure out the small set of Java abstractions that you want your API to
 work with / expose and stick to functions that maipulate these.
 - Ensure you have zero reflection warnings. Apart from the performance
 cost, they are usually a sign of a logic error.
 - I usually find the need for a few constructor functions to handle
 different use cases. Not sure that having a 1-arg constructor from a map is
 the best low level option - this will depend on the Java API. Often a 0-3
 arg constructor, a clone constructor or one that takes a ListObject seem
 to be the most common. If there are a lot of options, I'd tend to make
 these keyword params.
 - Keyword args are your friend - they often translate to setXXX or addXXX
 calls in a Java API and enable you to wrap quite a lot of complexity as
 extra parameters to one function. I think these are better than map
 parameters on average, YMMV.


 On Monday, 10 December 2012 13:21:09 UTC+8, Michael Grubb wrote:

 I've been searching for some best practices when it comes to wrapping
 existing Java libraries to make them more clojurized.
 Unfortunately I've not found much.
 While I know enough to make something that works for me, I'd like to
 write it in such a manner that it can be used (and read) by others
 and not make them cringe in doing so.

 My first attempt was to simply write function wrappers around the java
 interop calls.
 This worked fine and was maintainable.  Then I discovered 'lein check'
 and saw a whole lot of warnings about reflection.

 This led me to my second attempts.  This time I wrote multimethods to
 dispatch on type of arguments and in each defmethod argument list
 I gave type hints for each argument.  This indeed resolved the reflection
 warnings, but I fear that the resulting code is rather messy and not
 too pleasant to read either.  This made me wonder if all the type
 checking I'm doing in the multimethod dispatch function isn't just as bad as
 the reflection that would take place.

 For my purposes and this particular library I'm not really concerned with
 performance, yet someone else may be.  Can anyone offer me some
 advice on how best to approach a project like this?

 Kind regards,
 Michael

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




-- 
Grant Rettke | ACM, AMA, COG, IEEE
gret...@acm.org | http://www.wisdomandwonder.com/
Wisdom begins in wonder.
((λ (x) (x x)) (λ (x) (x x)))

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

parenface support in clojure (parenface-plus)

2012-12-09 Thread Grant Rettke
Here[1] is an enhancement to parenface[2] that adds support for the
editor and REPL for Clojure, Jess, and Elisp.

1 http://marmalade-repo.org/packages/parenface-plus

2 http://marmalade-repo.org/packages/parenface

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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 raytracing scene description language

2012-12-09 Thread Grant Rettke
On Sun, Dec 9, 2012 at 6:03 PM, Mikera mike.r.anderson...@gmail.com wrote:
 Any thoughts / ideas / feedback?

What if you try keeping it pretty close to the current POV syntax/format?

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Coming from Common Lisp to Clojure

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 12:07 PM, Sean Corfield seancorfi...@gmail.com wrote:
 Clojure feels like a VERY simple language with almost no
 syntax. Having recently read more Scheme / CL code, I can see how folks
 coming from those languages think Clojure is cluttered.

Why do they think it is cluttered? What does that mean?

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 11:11 AM, David Nolen dnolen.li...@gmail.com wrote:
 On Thu, Oct 18, 2012 at 12:01 PM, JvJ kfjwhee...@gmail.com wrote:

 I'm not sure if anyone's done this before, but I'm fed up with writing
 code that looks like this:


 What problem does this solve given you can do the following?

 (let [a 1
   _ (println a)
   b 2
   _ (println b)
   c 3
   _ (println c)]
...)

-1 to using a binding form to do sequencing. That said, not sure what is better!

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 1:55 PM, Alan Malloy a...@malloys.org wrote:
 It's rare to get tired of this, because nobody does it: it's not
 common because your interleaved statements are side-effecting only,
 which is not encouraged in Clojure, and rarely needed. Certainly
 sometimes it's the best way to do something, but not so often that I'd
 become frustrated; if anything, having to write such irritating code
 can serve as a good reminder that I shouldn't have so many
 unrestrained side effects scattered through my logic.

It isn't side effecting it is sequencing.

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 1:32 PM, Grant Rettke gret...@acm.org wrote:
 On Thu, Oct 18, 2012 at 11:11 AM, David Nolen dnolen.li...@gmail.com wrote:
 On Thu, Oct 18, 2012 at 12:01 PM, JvJ kfjwhee...@gmail.com wrote:

 I'm not sure if anyone's done this before, but I'm fed up with writing
 code that looks like this:


 What problem does this solve given you can do the following?

 (let [a 1
   _ (println a)
   b 2
   _ (println b)
   c 3
   _ (println c)]
...)

 -1 to using a binding form to do sequencing. That said, not sure what is 
 better!

David so as not to be a total loser here is an alternative that is
maybe the right way but also maybe the very wrong way!

(- ((fn []
  (let [a 1]
(println this is a:  a)
a)))
   ((fn [a]
  (let [b 2]
(println this is b:  b)
(list a b
   ((fn [[a b]]
  (let [c 3]
(println this is c:  c)
(println Sum:  (+ a b c))

JvJ what is your verdict?

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 2:07 PM, David Nolen dnolen.li...@gmail.com wrote:
 On Thu, Oct 18, 2012 at 3:06 PM, Grant Rettke gret...@acm.org wrote:

 (- ((fn []
   (let [a 1]
 (println this is a:  a)
 a)))
((fn [a]
   (let [b 2]
 (println this is b:  b)
 (list a b
((fn [[a b]]
   (let [c 3]
 (println this is c:  c)
 (println Sum:  (+ a b c))


 Why should you have to change the shape of your program to insert some
 debugging statements?

Writing a macro like JvJ did or writing all of your code inside of a
let statement like you did is also changing the shape of your program
just to print debug statements isn't it?

Sorry the way I understood the use case that you need to do something,
anything, maybe some expensive, before doing the *next thing*, and
same goes before the *next thing*. I didn't read it as inserting debug
statements at all.

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 2:09 PM, Ben Wolfson wolf...@gmail.com wrote:
 On Thu, Oct 18, 2012 at 12:01 PM, Grant Rettke gret...@acm.org wrote:
 It isn't side effecting it is sequencing.

 Clojure's let is already sequential, like Scheme's let*: The bindings
 are sequential, so each binding can see the prior bindings. R5RS
 Scheme explicitly states that its let makes no guarantees about
 sequences.

Understood but you don't write entire function definitions inside of a
let block :).

Then again I guess I misunderstood the use case, which is to just
print debug information once in a while.

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 2:50 PM, Mark Engelberg
mark.engelb...@gmail.com wrote:
 Either way works well.  I think Evan's way results in somewhat more compact
 code for the common case, whereas Cgrand's way feels a little more versatile
 (and his flatter cond is what I use).  I strongly urge you to pick one of
 these two techniques and include it in your project.  Once you try it and
 see how much cleaner the code is, you'll be hooked.

Is it poor form to do something like this inside a defn?

 (def a 1)
  (println this is a:  a)
  (def b 2)
  (println this is b:  b)
  (def c 3)
  (println this is c:  c)
  (println Sum:  (+ a b c))

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 3:17 PM, David Nolen dnolen.li...@gmail.com wrote:

 On Thu, Oct 18, 2012 at 4:15 PM, Grant Rettke gret...@acm.org wrote:

 On Thu, Oct 18, 2012 at 2:50 PM, Mark Engelberg
 mark.engelb...@gmail.com wrote:
  Either way works well.  I think Evan's way results in somewhat more
  compact
  code for the common case, whereas Cgrand's way feels a little more
  versatile
  (and his flatter cond is what I use).  I strongly urge you to pick one
  of
  these two techniques and include it in your project.  Once you try it
  and
  see how much cleaner the code is, you'll be hooked.

 Is it poor form to do something like this inside a defn?

  (def a 1)
   (println this is a:  a)
   (def b 2)
   (println this is b:  b)
   (def c 3)
   (println this is c:  c)
   (println Sum:  (+ a b c))


 very poor form. def is always top level.

It is poor form in that it will break things in confusing and horrible
ways or poor form from a style perspective?

When you use def inside a defn is it equivalent to a let binding like this?

(defn foo []
  (def a 1)
  (println a))

(defn foo []
  ((fn [a]
 (println a)) 1))

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 3:32 PM, David Nolen dnolen.li...@gmail.com wrote:
 On Thu, Oct 18, 2012 at 4:22 PM, Grant Rettke gret...@acm.org wrote:


 When you use def inside a defn is it equivalent to a let binding like
 this?

 (defn foo []
   (def a 1)
   (println a))

 (defn foo []
   ((fn [a]
  (println a)) 1))


 Not equivalent.

I see. To what is it equivalent?

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 3:42 PM, Mark Engelberg
mark.engelb...@gmail.com wrote:
 A def, even inside defn, creates and binds a global variable.

Woa, I see, 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


Re: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 3:45 PM, Grant Rettke gret...@acm.org wrote:
 On Thu, Oct 18, 2012 at 3:42 PM, Mark Engelberg
 mark.engelb...@gmail.com wrote:
 A def, even inside defn, creates and binds a global variable.

 Woa, I see, thanks!

Anyone voted for internal define lately?

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
I figured you would use doto for that.

On Thu, Oct 18, 2012 at 4:09 PM, JvJ kfjwhee...@gmail.com wrote:
 Exactly.  Not only debugging, but java interop that involved calling methods
 with side effects.

 On Thursday, 18 October 2012 15:02:47 UTC-4, David Nolen wrote:

 On Thu, Oct 18, 2012 at 2:55 PM, Alan Malloy al...@malloys.org wrote:

 It's rare to get tired of this, because nobody does it: it's not
 common because your interleaved statements are side-effecting only,
 which is not encouraged in Clojure, and rarely needed. Certainly
 sometimes it's the best way to do something, but not so often that I'd
 become frustrated; if anything, having to write such irritating code
 can serve as a good reminder that I shouldn't have so many
 unrestrained side effects scattered through my logic.


 I think from the examples debugging via print statements was the main (and
 reasonable) use case.

 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



-- 
Grant Rettke | ACM, AMA, COG, IEEE
gret...@acm.org | http://www.wisdomandwonder.com/
Wisdom begins in wonder.
((λ (x) (x x)) (λ (x) (x x)))

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 4:05 PM, David Nolen dnolen.li...@gmail.com wrote:
 On Thu, Oct 18, 2012 at 4:45 PM, Grant Rettke gret...@acm.org wrote:
 Anyone voted for internal define lately?
 At this point I think it's highly unlikely to change - the behavior is
 pretty well documented:

I see. Just a thought that an internal define not necessarily 'def'
might be a nice idea for a lot of these cases, but then again hey it
is lisp we can tweak it to our liking.

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: ANN clojure-doc.org (aka CDS), a new community-driven Clojure documentation site

2012-10-11 Thread Grant Rettke
On Thu, Oct 11, 2012 at 12:50 PM, gaz jones gareth.e.jo...@gmail.com wrote:
 I have 3 blog posts I wrote to help some colleagues get up to speed
 with clojure / emacs:

Looks great. You never know what is the best thing for everyone, so
what works for you will probably work for others, too.

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Example of Tetris in Clojurescript.

2012-10-11 Thread Grant Rettke
Please port ultramasterdethris to clojurescript.

On Thu, Oct 11, 2012 at 2:04 PM, Timothy Washington twash...@gmail.com wrote:
 Oooh, I just got hooked on it for about 10 mins. Of course I was just
 testing it.. ahem :)

 Lots of fun !!

 Tim


 On Thu, Oct 11, 2012 at 2:33 PM, Andreas Liljeqvist bon...@gmail.com
 wrote:

 Hi.

 Feel free to check out my Clojurescript Tetris at this location:
 http://clojure-tetris.herokuapp.com/

 Github: https://github.com/bonega/tetris/tree/clojurescript
 Originally started as a swing application and later seesaw.

 I am very impressed with how easy it was adapting the codebase to
 clojurescript.
 Using crossover for sharing clojure code with the main branch.

 I really think that clojurescript could make a difference, but it depends
 on a whole lot of factors.

 Problems:

 The clojurescript compiler (or cljsbuild) often hangs and have to be
 restarted.
 Getting lein-cljsbuild to work right is a bit confusing for newcomers.

 Can I use production profile to choose build-target?

 Heroku's Foreman doesn't seem to compile crossover-cljs, but works fine
 when deploying.

 Thanks to the whole Clojure community for your hard work.

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



-- 
((λ (x) (x x)) (λ (x) (x x)))
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Interest in Scribble for Clojure?

2012-10-10 Thread Grant Rettke
On Tue, Oct 9, 2012 at 1:00 PM, Michael Fogus mefo...@gmail.com wrote:
 Any existing solutions or interest in something like this?

 There are no _public_ solutions as far as I know,

So everyone has their private custom approaches I guess? I'm curious
if people would share them.

 although I think it can be done fairly trivially (famous last words)

lol

 using the existing ClojureScript compiler.

Why?

  I'd love to see it done as an open source project.

Agreed.

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Interest in Scribble for Clojure?

2012-10-10 Thread Grant Rettke
On Wed, Oct 10, 2012 at 1:11 PM, Gary Johnson gwjoh...@uvm.edu wrote:
 A lot of scribble's features are geared towards providing tooling for
 Literate Programming,

I didn't read into Scribble like it's goal was LP, but I could have
missed that and not known enough about LP, too.

 and currently I'm way more than satisfied with
 org-babel.

Interesting. Thanks folks.

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Slightly updated Clojure cheatsheet available

2012-10-09 Thread Grant Rettke
Thanks!

On Mon, Oct 8, 2012 at 11:34 PM, Andy Fingerhut
andy.finger...@gmail.com wrote:
 I haven't created an info format version of it, nor am I aware of anyone else 
 who has.

 I have a Clojure program that starts from a data structure and generates 
 LaTeX and HTML versions of the cheatsheet from that.  It is available here:

 https://github.com/jafingerhut/clojure-cheatsheets/blob/master/src/clj-jvm/clojure-cheatsheet-generator.clj

 as part of this github repo:

 https://github.com/jafingerhut/clojure-cheatsheets

 If you are interested in modifying that to produce TeXinfo format, or info 
 format directly, you are welcome to do so.  I'm not sure I have the time or 
 motivation to modify the program for that purpose, unless it is very similar 
 to one of those.

 Andy

 On Oct 8, 2012, at 7:25 PM, Grant Rettke wrote:

 On Mon, Oct 8, 2012 at 8:41 PM, Andy Fingerhut andy.finger...@gmail.com 
 wrote:
 The only changes since the previous version are to add a mention of 
 *unchecked-math*, and

 Nice! Is there one in Info format out there? I can't find 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



-- 
((λ (x) (x x)) (λ (x) (x x)))
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: *foo*

2012-10-09 Thread Grant Rettke
On Tue, Oct 9, 2012 at 12:54 PM, Brian Craft craft.br...@gmail.com wrote:
 I know I saw an explanation of this on some obscure page, but I can't find
 it now. What's up with the symbols with stars at front  end?

http://mumble.net/~campbell/scheme/style.txt

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: *foo*

2012-10-09 Thread Grant Rettke
Gosh I thought it was in there... maybe it is not. Sorry.

On Tue, Oct 9, 2012 at 12:55 PM, Grant Rettke gret...@acm.org wrote:
 On Tue, Oct 9, 2012 at 12:54 PM, Brian Craft craft.br...@gmail.com wrote:
 I know I saw an explanation of this on some obscure page, but I can't find
 it now. What's up with the symbols with stars at front  end?

 http://mumble.net/~campbell/scheme/style.txt



-- 
((λ (x) (x x)) (λ (x) (x x)))
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE

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


Interest in Scribble for Clojure?

2012-10-08 Thread Grant Rettke
Hi,

Scribble is a DSL for Racket that lets you do some nice stuff for
generating documentation. Examples and documentation are here:

http://docs.racket-lang.org/scribble/

Any existing solutions or interest in something like this?

The value-adds are that you have your in-code documentation executed
and potentially unit tested, making it a very nice to know.

Best wishes,

Grant Rettke

-- 
((λ (x) (x x)) (λ (x) (x x)))
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Slightly updated Clojure cheatsheet available

2012-10-08 Thread Grant Rettke
On Mon, Oct 8, 2012 at 8:41 PM, Andy Fingerhut andy.finger...@gmail.com wrote:
 The only changes since the previous version are to add a mention of 
 *unchecked-math*, and

Nice! Is there one in Info format out there? I can't find 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


Preferred business rules engines in or used by Clojure?

2012-10-07 Thread Grant Rettke
Hi,

May you please share your experience or preferences for rules engines
written in or used from Clojure?

My goal is to:

1. Allow rule definitions separate from the code (though I view rule
definitions as programming to be performed by the programmer).
2. Allow rules to be defined in modules.
3. Provide debugging features such that I may sit with a business
user, and start with a particular scenario of data, and walk them
through how the rules transform the data. The goal is to be able to
answer questions from the business eg I didn't expect this result,
why is it this way?.
4. Debugging.
5. Nice editing.
6. Find something nice for 3-9 month projects with 2-4 developers; in
other words not looking for an enterprise system with licensing priced
accordingly.
7. Any technology is an option because we can probably use it with
some form of interop.
8. Find something that people use for real work for a long time.
9. Find something that costs not more than a thousand USD.
10. Find something that changes how you think, has materials to help
change that, and gets you down the path of thinking about how to write
system with rules engines rather than shoe-horn them into a corner.

Best wishes,

Grant

-- 
((λ (x) (x x)) (λ (x) (x x)))
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: cli latency

2012-10-07 Thread Grant Rettke
On Sun, Oct 7, 2012 at 11:50 AM, Brian Craft craft.br...@gmail.com wrote:
 The two second

 delay to...

 do anything...

 is making...

 me crazy.

Although JRebel is for JEE, it seems like an interesting thing for a fast REPL.

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


Fast REPL restarts Re: Smarter code reloading with tools.namespace 0.2.0

2012-10-05 Thread Grant Rettke
REPL restarts are slow and costly, but the freshness they provide is
obviously so valuable, too.

Has anyone experimented with something like JRebel or some alternative to
provide super-fast like fraction of a section REPL restarts?

On Fri, Oct 5, 2012 at 8:56 AM, Stuart Sierra
the.stuart.sie...@gmail.comwrote:

 Announcing... tools.namespace 0.2.0. Just released, it will reach
 Maven Central in a few hours.

 Short summary: reload code in the REPL with greater accuracy and
 awareness of dependencies.

 Full documentation in the README:
 https://github.com/clojure/tools.namespace

 This is my latest attempt at making REPL development more convenient,
 building on work that reaches back to Lazytest and some of my earliest
 contribs.

 It is hopefully a step towards Never Close a REPL:
 http://dev.clojure.org/display/design/Never+Close+a+REPL

 Have fun, let me know how it goes!
 -S

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




-- 
((λ (x) (x x)) (λ (x) (x x)))
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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 Starting Clojure

2012-10-04 Thread Grant Rettke
I loved Mathematica's documentation that had lovingly maintained
by... in the sidebar or something to that effect. It was really
apparent that the maintainer did lovingly maintain it. Can't seem to
find it at the moment though.

On Thu, Oct 4, 2012 at 2:49 PM, Brent Millare brent.mill...@gmail.com wrote:
 lol, That is really awesome!

 I'm going to have to really read through the sources now.


 On Thursday, October 4, 2012 3:28:41 PM UTC-4, Fogus wrote:

  Here's one approach: Make a github of the code and content that runs the
  site. People fork and make pull requests.

 You talked me into it.

 https://github.com/fogus/www-readevalprintlove-org

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



-- 
((λ (x) (x x)) (λ (x) (x x)))
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: ANN: a Clojure docs site, and github organization

2012-10-04 Thread Grant Rettke
On Thu, Oct 4, 2012 at 6:48 PM, Michael Fogus mefo...@gmail.com wrote:
 readevalprintlove looks like a fancy playground so far.

 You say that as if it's a bad thing.  I'm of the opinion that these
 kinds of efforts should have a low barrier to contribution and be fun.
 It's difficult to motivate people to perform a thankless task, so it
 should seem like play as much as possible along the way.

My co-workers and I were debating this at work the other day. My
worldview is that it takes hard work to learn good things, but at the
same time it can be fun and even brief.  Kent Dybvig's _The Scheme
Programming Language_ is a superb example. The other four developers
said that I'm the 20% and that approach is too pedagogical, that you
need to make everything constant entertainment. _Practical Common
Lisp_ was cited as an example.

I'm just glad there are options.

I'm still looking for Clojure materials that go to this level of detail:

http://docs.racket-lang.org/reference/eval-model.html#(part._module-phase)

Since Clojure is all compiled immediately I assume it doesn't have
phases other than macros compile first.

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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 Starting Clojure

2012-10-03 Thread Grant Rettke
You guys are over-thinking it. Set up a new site, get users, tweak it,
perfect it, it will become the defacto site, and you will make it
really easy for Rich et al to make the switch :). It may take loads of
hard and unappreciated labor though :(. That is why it has to be a
labor of love.

On Wed, Oct 3, 2012 at 8:57 AM, aboy021 arthur.bo...@gmail.com wrote:
 The general feeling seems to be that there is good content out there, but it
 would be nice if it were on Clojure.org, especially from the perspective of
 new users and promoting the language.

 The copyright on the site is to Rich Hickey, and the logo and site design
 are credited to Tom Hickey. Normally I'd try and contact them directly but
 it seems like Rich has got a lot of other (rather wonderful) things to keep
 himself busy, and I'm not sure how to contact Tom.

 A contribution process would be nice. I've heard it mooted that markdown
 files in a git repo might be a nice way of handling it.



 On Tuesday, 2 October 2012 14:07:56 UTC-5, nchurch wrote:

 Clojuredocs is already out there and quite good (though not modified
 much as of late).  However, it doesn't show up very high on Google
 (not even on the first page for Clojure).  There's also Learn
 Clojure, which has a clean design but hasn't been updated in a while
 (and also doesn't seem to have a Github link, so unsure how to
 contribute).

 It would be nice to see Clojure.org itself have a contribution
 process, not unlike Clojure itself.

 On Oct 2, 3:46 am, Yakovlev Roman felix...@gmail.com wrote:
  You can make your site with many examples and good documentation and
  maybe
  it will be at first place at google if it will have great value.
 
  A lot of people here will agree with that. Site could be better place to
  get started ! but old site still there.
 
  As far as i know there is a company behind Scala called TypeSafe and
  they
  got tons of money recently to make the lanugage more popular and
  attractive
  to newbie users. So maybe we see good main site and good web frameworks
  around Scala ( lift and play).
  So maybe Clojure also need something like this. Though Relevance
  company
  supports clojure somehow but i guess not enough for now.
 
 
 
 
 
 
 
  On Tuesday, October 2, 2012 1:13:49 AM UTC+4, aboy021 wrote:
 
   I decided to quickly compare the website experience of starting
   Clojure
   and starting Scala.
 
   I do a Google search for Clojure
   I decide to try the first link, Clojure.org
   There's some basic information. I follow the somewhat obscure link
   halfway
   down the side, Getting Started
   Ok, that looks promising, now I can get a REPL to interact with.
   I follow the link to the Getting Started Documentation (
  http://dev.clojure.org/display/doc/Getting+Started) (isn't that where I
   already was?)
   Still flailing a bit, I follow the link to Mark Volkmann's Tutorial.
   This is the first chance I've had to see what Clojure actually looks
   like
   and how to program in it.
 
   In stark contrast, I try searching for Scala.
   I get presented with an appealing, nicely laid out page with large
   links
   to an introduction to the language and a page on getting started.
   There are links in an easy to navigate menu with Information about the
   language, documentation, code examples, Software, and Developer
   information.
 
   Now, I'm no Scala developer, but at first glance it seems like I've
   found
   a great touch stone that I can use to find out what's happening in the
   language, how it looks, what it can do for me, and I can learn how to
   write
   it.
 
   Another thing that the scala-lang site has is Code Examples. Code
   examples
   are a really nice way for you to get a taste of how a language can
   solve
   common problems, and they can give you a real sense of the flavour of
   the
   language.
 
   A lot of the information for Clojure seems to be there, it's just not
   laid
   out in an attractive easy to use format. Perhaps we could have a
   fundraiser
   to pay for a web designer to make a nice modern website that contains
   the
   information in an easier to digest and more centralised way
 
   The getting started issue is an ongoing problem for Clojure. It's an
   issue
   that keeps coming up in the surveys and on the mailing list. Other
   languages are doing it really well, Scala is just a convenient
   example.
   What does the Clojure community need to do to help support the
   creation of
   something that is on par?

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



-- 
((λ (x) (x x)) (λ (x) (x x)))
http://www.wisdomandwonder.com/
ACM, AMA, 

Re: Meaning of =

2012-10-03 Thread Grant Rettke
The Joy of Clojure book touches on this, it is an important design and
style decision. Great book, good question too. I'm learning about all
this stuff right now and it is all good stuff.

On Wed, Oct 3, 2012 at 3:44 AM, Mark Engelberg mark.engelb...@gmail.com wrote:
 It is surprising at first, but since vectors are used so commonly in Clojure
 instead of lists to represent literal sequential collections of data, it
 turns out to be extremely convenient to be able to compare it for equality
 against sequential collections generated as lists or lazy sequences.
 Basically, all those things are just flat, linear collections, and what we
 really care about from an equality standpoint is whether the collections
 have the same elements in the same order.  Clojure similarly considers
 different types of maps (hash-maps, array-maps, sorted-maps) to be equal if
 the associations are the same.  Ditto for hash-sets and sorted-sets.


 On Tue, Oct 2, 2012 at 10:24 PM, Larry Travis tra...@cs.wisc.edu wrote:

 What is the rationale for this?

 user (=  [1 2 3 4]  '(1 2 3 4))
 true

 I was quite surprised when this turned out to be the cause of a bug in a
 function I am constructing. Vectors and lists differ so substantially in
 their implementation and in their behavior that a vector and a list should
 not be considered equal just because they contain the same elements in the
 same order.

   --Larry


 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with
 your first post.
 To unsubscribe from this group, 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



-- 
((λ (x) (x x)) (λ (x) (x x)))
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Which power function is right for Clojure?

2012-10-02 Thread Grant Rettke
On Mon, Oct 1, 2012 at 7:13 PM, Andy Fingerhut andy.finger...@gmail.com wrote:
 It depends.

 Are you trying to optimize for speed?  Teaching a particular style of
 programming?  Code size?  Range of input values handled correctly?  Time
 to write it?

 Something else?

The most Clojury way of doing it. Perhaps it was too trivial a problem.

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Which power function is right for Clojure?

2012-10-02 Thread Grant Rettke
On Mon, Oct 1, 2012 at 8:29 PM, Mark Engelberg mark.engelb...@gmail.com wrote:
 On Mon, Oct 1, 2012 at 4:45 PM, Grant Rettke gret...@acm.org wrote:
 This naming of a helper function to loop is non-idiomatic, because there
 is a built-in construct loop, which works somewhat like named let in
 Scheme (without the name), allowing you to combine the function definition
 and the initial values at once.  Idiomatic version of this would be:

Oh ok.

 There's a subtle concern here though.  Clojure, by default, uses longs.  If
 you try to do something large, like (acc-pow 2 500), you'll get an overflow
 error.  One easy fix is to change the 1 to 1N, and then you'll get boxed
 numerics.  Another option is to change * to *'.

Nice.

Thanks for the feedback everybody.

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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 Starting Clojure

2012-10-01 Thread Grant Rettke
On Mon, Oct 1, 2012 at 4:13 PM, aboy021 arthur.bo...@gmail.com wrote:
 The getting started issue is an ongoing problem for Clojure. It's an issue
 that keeps coming up in the surveys and on the mailing list. Other languages
 are doing it really well, Scala is just a convenient example. What does the
 Clojure community need to do to help support the creation of something that
 is on par?

Surely they wouldn't mind you contributing to the website.

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


Which power function is right for Clojure?

2012-10-01 Thread Grant Rettke
(ns power.examples)

(defn non-acc-pow [base exp]
  (if (zero? exp)
1
(* base (non-acc-pow base (dec exp)

(defn acc-pow [base exp]
  (letfn [(loop [base exp acc]
(if (zero? exp)
  acc
  (recur base (dec exp) (* base acc]
(loop base exp 1)))

(defn lazy-pow [base exp]
  (letfn [(loop [cur]
(cons cur (lazy-seq (loop (* cur base)]
(nth (take exp (loop base)) (dec exp

(defn iter-pow [base exp]
  (nth (take exp (iterate (partial * base) base)) (dec exp)))

(defn apply-pow [base exp]
  (apply * (repeat exp base)))

(= 16
   (non-acc-pow 2 4)
   (acc-pow 2 4)
   (lazy-pow 2 4)
   (iter-pow 2 4)
   (apply-pow 2 4))

Originally posted here:
http://www.wisdomandwonder.com/article/6430/which-power-function-is-right-for-clojure

-- 
((λ (x) (x x)) (λ (x) (x x)))
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Transforming an ugly nested loop into clojure code

2012-09-30 Thread Grant Rettke
On Sun, Sep 30, 2012 at 2:59 PM, arekanderu arekand...@gmail.com wrote:
 I am trying to port an ugly piece of code from Ruby to clojure.

May you share the original code?

 So far I
 have only ported it to clojure by keeping the same way it was written in
 Ruby and i am trying to re-write it the clojure way because...wellits
 very ugly.

Why does my-map have vectors storing maps inside instead of a map with
maps inside?

 I have a complex hash map which it's structure is always the same and the
 keys always known and by using the values in those keys, i make some
 function calls with those values as parameters. You can find a simplified
 version of the map and the function which steps into the map below.

May you write some tests to demonstrate what you want to accomplish
with the ugly map and share them here?

 I would really appreciate it if someone could propose an alternative way
 of writing the above function or at least to point me where can I look for
 some useful clojure functions that will help me do what I want but in a
 cleaner way.

Once you provide tests then we have a better chance at helping.

--
((λ (x) (x x)) (λ (x) (x x)))
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: [ILC2012] CALL FOR PARTICIPATION

2012-09-27 Thread Grant Rettke
Same goes for ICFP:

http://icfpconference.org/icfp2012/accepted.html

On Thu, Sep 27, 2012 at 1:05 AM, Jianshi Huang jianshi.hu...@gmail.com wrote:
 Just curious, why there are no Clojure speakers and papers?

 I think projects like cascalog, clojure.logic and light table are
 brilliant showcases for Lisp. The lightning talks session is still
 open for submissions.

 -- Forwarded message --
 From: KURODA Hisao kur...@msi.co.jp
 Date: Wed, Aug 8, 2012 at 5:47 PM
 Subject: [ILC2012] CALL FOR PARTICIPATION
 To: lisp-...@lispworks.com



 INTERNATIONAL LISP CONFERENCE 2012: Call for Participation
 ==

 The Association of Lisp Users (ALU) is pleased to announce ILC 2012, to be
 held in Kyoto, Japan October 21st-24th. Please make a note of the following
 important dates and events.

 0.  Conference Home Page
 http://international-lisp-conference.org

 1.  Conference Schedule Outline
 http://international-lisp-conference.org/2012/schedule.html.

 2. Technical papers are currently being reviewed and speakers will be
 announced shortly:
 http://international-lisp-conference.org/2012/speakers.html

 3. Registration:
 http://international-lisp-conference.org/2012/registration.html

 4. Please reserve your hotels early, as availability is limited this time of
 the year in Kyoto:
 http://international-lisp-conference.org/2012/paypal-online.html#sec-2

 5. We are proud to announce  following distinguished speakers:
 -- Mark Battyani: Successful Lisp Entrepreneur
 -- Christian Queinnec: Author of Lisp In Small Pieces
 -- Ikuo Takeuchi:  Renown Japanese Inventor of the TAK-function
 -- Eiiti Wada: Famous Japanese Lisp Guru -- Designer of Happy Hacking Keyboard

 ___
 Lisp Hug - the mailing list for LispWorks users
 lisp-...@lispworks.com
 http://www.lispworks.com/support/lisp-hug.html



 --
 Jianshi Huang

 Co-founder and CTO at Maptia (maptia.com)

 LinkedIn: jianshi
 Twitter: @jshuang
 Github  Blog: http://huangjs.github.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



-- 
((λ (x) (x x)) (λ (x) (x x)))
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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: Questions regarding do form

2012-09-27 Thread Grant Rettke
I'm reading _The Joy of Clojure_ right now, and they touch on it,
which is nice coming from Scheme/Racket.

On Thu, Sep 27, 2012 at 10:40 AM, Russell Whitaker
russell.whita...@gmail.com wrote:
 On Thu, Sep 27, 2012 at 8:26 AM, arekanderu arekand...@gmail.com wrote:
 Thank you Meikel for your so helpful replies.


 Thanks also from a lurker, to whom these facts were a useful surprise:
 I'd wondered
 the same myself.

 Cheers, R


 On Thursday, September 27, 2012 4:19:44 PM UTC+3, Meikel Brandmeyer
 (kotarak) wrote:

 Hi,

 Am Donnerstag, 27. September 2012 12:16:41 UTC+2 schrieb arekanderu:

 I am new to clojure and I have two questions about do and the way it
 should be used.

 Question 1: Which of the following two functions is more idiomatic and
 why? Both functions produce the same result.

 code
 (defn my-fn [java-object]
   (. java-object firstFunc)
   (. java-object secondFunc)
   (. java-object thirdFunc)
   java-object)
 /code


 The first because defn includes an implicit do. So the second example is
 actually (do (do ...)).

 In this case you could also use doto:

 (defn my-fn
   [pojo]
   (doto pojo
 .firstFunc
 .secondFunc
 .thirdFunc))



 Question 2: Again, which one is more idiomatic and why? Both functions
 produce the same result.

 code
 (defn my-fn [java-object bar]
   (let [bar-bar (. java-object getSomething)
 _   (if (not (is-bar? bar))
   (. java-object (setSomething bar-bar)))]
 java-object))
 /code

 code
 (defn my-fn [java-object bar]
   (let [bar-bar (. java-object getSomething)]
 (do
   (if (not (is-bar? bar))
 (. java-object (setSomething bar-bar)))
  java-object)))
 /code


 The third:

 (defn my-fn
   [pojo bar]
   (let [bar-bar (.getSomething pojo)]
 (when-not (is-bar? bar)
   (.setSomething pojo bar-bar))
 pojo)))

 let also (just like defn) includes an implicit do for the body.

 Hope this helps.

 Kind regards
 Meikel


 --
 Russell Whitaker
 http://twitter.com/OrthoNormalRuss / http://orthonormalruss.blogspot.com/
 http://www.linkedin.com/pub/russell-whitaker/0/b86/329

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



-- 
((λ (x) (x x)) (λ (x) (x x)))
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from 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 : a good start for non-programmers?

2012-09-26 Thread Grant Rettke
It is never too late to learn something new. If you start with Scheme
then you will find loads of excellent pedagogical material that has
been heavily vetted over the years, and you are bound to find that one
of them will speak to you. The excellent thing about starting is
that you can leverage the learning aspect, so when you do move to
Clojure, it will be a logical next step and you will really appreciate
the interesting decisions that were made in the language design.

On Mon, Sep 24, 2012 at 1:11 AM, Gregorius R. gzym...@gmail.com wrote:
 Hello Clojurists!

 I'm a person in middle age (you know, too old to rock'n'roll, to young to
 die) and would like to programm but starting with functional programming.
 Regarding this i have some questions:

 is clojure a good start to learn programming?
 which (prerfer free online) is a good tut to start?
 am i to old for this stuff?

 thnx in advance for all responses
 Greg

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



-- 
((λ (x) (x x)) (λ (x) (x x)))
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE

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