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

Re: Best practices for java libraries

2012-12-10 Thread Grant Rettke
@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from 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

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

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

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

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

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

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

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

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

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

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

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

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

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

Re: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
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

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

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

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

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

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

Re: Slightly updated Clojure cheatsheet available

2012-10-09 Thread Grant Rettke
, 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

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

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

Interest in Scribble for Clojure?

2012-10-08 Thread Grant Rettke
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

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

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.

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

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

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

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

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,

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,

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

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

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

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

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

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

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

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