Re: clojure.string/capitalize API

2012-12-12 Thread Grant Rettke
On Wed, Dec 12, 2012 at 8:12 AM, Pierre Allix wrote: > 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 capita

Re: Best practices for java libraries

2012-12-10 Thread Grant Rettke
le > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups

Re: Clojure raytracing scene description language

2012-12-09 Thread Grant Rettke
On Sun, Dec 9, 2012 at 6:03 PM, Mikera 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@g

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

Re: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 4:05 PM, David Nolen wrote: > On Thu, Oct 18, 2012 at 4:45 PM, Grant Rettke 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 tha

Re: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
> To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this gr

Re: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 3:45 PM, Grant Rettke wrote: > On Thu, Oct 18, 2012 at 3:42 PM, Mark Engelberg > 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 messa

Re: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 3:42 PM, Mark Engelberg 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

Re: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 3:32 PM, David Nolen wrote: > On Thu, Oct 18, 2012 at 4:22 PM, Grant Rettke wrote: >> >> >> When you use def inside a defn is it equivalent to a let binding like >> this? >> >> (defn foo [] >> (def a 1) >> (println a)

Re: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 3:17 PM, David Nolen wrote: > > On Thu, Oct 18, 2012 at 4:15 PM, Grant Rettke wrote: >> >> On Thu, Oct 18, 2012 at 2:50 PM, Mark Engelberg >> 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 2:50 PM, Mark Engelberg 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

Re: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 2:09 PM, Ben Wolfson wrote: > On Thu, Oct 18, 2012 at 12:01 PM, Grant Rettke 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 bin

Re: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 2:07 PM, David Nolen wrote: > On Thu, Oct 18, 2012 at 3:06 PM, Grant Rettke wrote: >> >> (-> ((fn [] >> (let [a 1] >> (println "this is a: " a) >> a))) >>((fn [a] >> (let [b 2]

Re: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 1:32 PM, Grant Rettke wrote: > On Thu, Oct 18, 2012 at 11:11 AM, David Nolen wrote: >> On Thu, Oct 18, 2012 at 12:01 PM, JvJ wrote: >>> >>> I'm not sure if anyone's done this before, but I'm fed up with writing >>> co

Re: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 1:55 PM, Alan Malloy 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 someth

Re: Replacing nested let statements with assignments

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 11:11 AM, David Nolen wrote: > On Thu, Oct 18, 2012 at 12:01 PM, JvJ 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 > _

Re: Coming from Common Lisp to Clojure

2012-10-18 Thread Grant Rettke
On Thu, Oct 18, 2012 at 12:07 PM, Sean Corfield 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 m

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

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

Re: Interest in Scribble for Clojure?

2012-10-10 Thread Grant Rettke
On Wed, Oct 10, 2012 at 1:11 PM, Gary Johnson 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 th

Re: Interest in Scribble for Clojure?

2012-10-10 Thread Grant Rettke
On Tue, Oct 9, 2012 at 1:00 PM, Michael Fogus 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 d

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 wrote: > On Tue, Oct 9, 2012 at 12:54 PM, Brian Craft wrote: >> I know I saw an explanation of this on some obscure page, but I can't find >> it now. What's up with

Re: *foo*

2012-10-09 Thread Grant Rettke
On Tue, Oct 9, 2012 at 12:54 PM, Brian Craft 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 t

Re: Slightly updated Clojure cheatsheet available

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

Re: Slightly updated Clojure cheatsheet available

2012-10-08 Thread Grant Rettke
On Mon, Oct 8, 2012 at 8:41 PM, Andy Fingerhut 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 "Clojur

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

Re: cli latency

2012-10-07 Thread Grant Rettke
On Sun, Oct 7, 2012 at 11:50 AM, Brian Craft 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

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

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 wrote: > Announcin

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

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 wrote: > lol, That is

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 wrote: > It is surprising at first, but since vectors are used

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: Which power function is right for Clojure?

2012-10-02 Thread Grant Rettke
On Mon, Oct 1, 2012 at 8:29 PM, Mark Engelberg wrote: > On Mon, Oct 1, 2012 at 4:45 PM, Grant Rettke 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 > Sch

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

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: Regarding Starting Clojure

2012-10-01 Thread Grant Rettke
On Mon, Oct 1, 2012 at 4:13 PM, aboy021 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 communi

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

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 wrote: > On Thu, Sep 27, 2012 at 8:26 AM, arekanderu wrote: >> Thank you Meikel for your so helpful replies. >> > > Thanks also from a lur

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

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 t