Re: A Taste of cKanren (via a coding challenge)

2011-10-30 Thread Ambrose Bonnaire-Sergeant
Wow! Shows off the advantages of embedding in a language like Scheme too. I'm planning to join you in the implementation in core.logic after November. Keep me (us) posted :) Would CLP be more useful for a predicate dispatch implementation than what core.logic provides currently? Ambrose On Mon

Re: easy sum of squares refactor question

2011-10-30 Thread nchurch
Another solution, this time using Clojure's tail recursion: (defn sum2 [func incr a b] (loop [accum 0 x a] (if (> x b) accum (recur (+ (func x) accum) (incr x) This may be getting ahead of where you are now, so come back and look when you've covered map, reduce, and

Re: easy sum of squares refactor question

2011-10-30 Thread nchurch
All you have to do is abstract the function you want (by 'abstract' I mean "put it in the argument list and replace the function with the variable"): (defn sum2 [func incr a b] (if (> a b) 0 (+ (fn a) (sum2 func incr (incr a) b You wouldn't want to use this code in the real world s

Re: Clojure Conj extracurricular activities spreadsheet

2011-10-30 Thread Brian
Please sign me up for: * ClojureScript * core.logic / minikanren * Go * Jamming with Overtone * The web and Clojure On Oct 30, 6:10 am, Krukow wrote: > On Oct 25, 5:11 pm, Fogus wrote: > > > This should be epic. > > Indeed. Please sign me up for: > > * ClojureScript > * Pallet -- You received

Re: Any reason why slingshot hasn't been updated to support 1.3

2011-10-30 Thread Daniel
Eh, that's what I get for being lazy and using copy+paste. :p I'll have to see if cake handles slingshot differently from midje at some point (maybe contrib turns out to have been the real cause there). I'm not doing that immediately though. On Oct 30, 9:48 pm, Phil Hagelberg wrote: > On Sun,

Re: Any reason why slingshot hasn't been updated to support 1.3

2011-10-30 Thread Phil Hagelberg
On Sun, Oct 30, 2011 at 7:13 PM, Daniel wrote: > This means that in order to use it in cake or leiningen _my_ project > should include ":exclusions [clojure clojure-contrib]]" in order to > prevent the slingshot dependency from forcing a 1.2.1-backed build. Not all Clojure 1.2 projects use contri

Re: Any reason why slingshot hasn't been updated to support 1.3

2011-10-30 Thread Daniel
It's still built against 1.2.1 according to the project file https://github.com/scgilardi/slingshot/blob/0.8.0/project.clj Clojuresphere isn't up-to-date on slingshot, but it indicates the same thing as well, as late as 0.6.1-snapshot http://clojuresphere.herokuapp.com/slingshot/slingshot/0.6.1

easy sum of squares refactor question

2011-10-30 Thread Aquahappy
Hi All, I'm watching Brian Harvey's SICP lecture #3 from Berkeley 61A/Spring 2011 and had a question about how I could refactor the following function so that the (+a 1) can be abstracted to be a function and passed in. Here is the original: (defn square [x] (* x x)) (defn sum [fn a b] (if (

Simple Made Easy - Any Examples?

2011-10-30 Thread aboy021
I very much enjoyed Rich's talk on Simple Made Easy (http:// www.infoq.com/presentations/Simple-Made-Easy). It seemed to address a great many of the frustrations I have in software development and offer real hope of being able to do things better. The things is, it would be really nice to have som

Re: Clojure in Emacs Seemingly Impossible

2011-10-30 Thread Bill Robertson
I've never seen that. Good stuff there. Yes, I agree that the wiki should refer to that page. Thanks! On Oct 30, 8:47 pm, Phil Hagelberg wrote: > On Sun, Oct 30, 2011 at 5:43 PM, Bill Robertson > > wrote: > > Which is exactly the problem with Clojure in Emacs. There are N sets > > of instructio

Re: A Taste of cKanren (via a coding challenge)

2011-10-30 Thread David Nolen
Heh, as someone pointed out this doesn't actually solve the puzzle since I'm not considering putting stones on either side of the scale. Still I think the idea of what cKanren can do is communicated :) On Sun, Oct 30, 2011 at 8:34 PM, Brent Millare wrote: > Looks really cool. Can't wait to see th

Re: Clojure in Emacs Seemingly Impossible

2011-10-30 Thread Phil Hagelberg
On Sun, Oct 30, 2011 at 5:43 PM, Bill Robertson wrote: > Which is exactly the problem with Clojure in Emacs. There are N sets > of instructions out there, and N-1 of them are out of date.  And even > the Nth one is incomplete. "Step 1: Install clojure-mode either from > Marmalade or from git." Do

Re: Clojure in Emacs Seemingly Impossible

2011-10-30 Thread Bill Robertson
Which is exactly the problem with Clojure in Emacs. There are N sets of instructions out there, and N-1 of them are out of date. And even the Nth one is incomplete. "Step 1: Install clojure-mode either from Marmalade or from git." What if you don't know how to do that? So you click through to the

Re: Clojure in Emacs Seemingly Impossible

2011-10-30 Thread Matthew Boston
Definitely take Phils advice and use the instructions on the github site. I just setup a fresh emacs install from scratch (using Phils starter-kit http://technomancy.us/153 and it works flawlessly; and I'm new to emacs this week). mdave - Your dependencies are way old, try this instead. (defproje

Re: A Taste of cKanren (via a coding challenge)

2011-10-30 Thread Brent Millare
Looks really cool. Can't wait to see the talk. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To u

A Taste of cKanren (via a coding challenge)

2011-10-30 Thread David Nolen
Larent Petit pointed out this fun challenge: http://beust.com/weblog/2011/10/30/a-new-coding-challenge/ To get a sense of how cool cKanren and constraint logic programming is I recommend reading my post about solving it using cKanren http://dosync.posterous.com/a-taste-of-ckanren. This is what Wi

Re: Any reason why slingshot hasn't been updated to support 1.3

2011-10-30 Thread Stephen Compall
On Sun, 2011-10-30 at 15:40 -0700, Daniel wrote: > Is there something the > tests didn't cover which is holding off the 1.3 support or can I go > ahead and use it? > > https://github.com/doubleagent/slingshot The official releases 0.5.0 and 0.6.0, at least, work just fine with Clojure 1.3; in wha

Any reason why slingshot hasn't been updated to support 1.3

2011-10-30 Thread Daniel
I would like to use this in my project so I forked it and ran the tests under 1.3 and they all checked out. Is there something the tests didn't cover which is holding off the 1.3 support or can I go ahead and use it? https://github.com/doubleagent/slingshot -- You received this message because

Re: Clojure in Emacs Seemingly Impossible

2011-10-30 Thread Phil Hagelberg
On Sat, Oct 29, 2011 at 10:54 PM, mdave wrote: > On Sep 10, 9:48 pm, Kugathasan Abimaran wrote: >> Follow these instructions, it will >> work..http://riddell.us/ClojureWithEmacsSlimeSwankOnUbuntu.html >> > > Sadly, the instructions break right where it says: Those instructions are badly out of

Re: install clojure-contrib [noob]

2011-10-30 Thread Stuart Sierra
Hi S., Those are very old instructions. Clojure's Git repository is now located at http://github.com/clojure/clojure You can get the latest release of clojure from http://clojure.org/ "clojure-contrib" is no longer one big thing that you download and install. Instead it is a collection of small

install clojure-contrib [noob]

2011-10-30 Thread S. Mosciatti
Hi guys, I'm so sorry, but I'de spend so much time without success, that now i want try to ask, i know that i'm not the first, but please... I'm in Ubuntu 11.04, I' ve installed clojure following this steps, [url]http://riddell.us/ClojureOnUbuntu.html[/url], but i'm stopped here: >Install clojur

Re: clojure.core/max and NaN

2011-10-30 Thread Brian Goslinga
On Oct 30, 4:02 am, bOR_ wrote: > Hi all, > > Ran into something unexpected with "max". > > user> (sd-age-female 13)                                                   > > [10 NaN 0.746555245613119]                                                 > > user> (apply max (sd-age-female 13))            

Re: "Can't take value of a macro" aka "macro noob needs help"

2011-10-30 Thread Brian Goslinga
On Oct 30, 9:22 am, Dennis Haupt wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > i played around a bit > > (defmacro times [times & exprs] >   '(let [countdown# ~times] >      (loop [remaining# countdown#] >        (when (< 0 remaining#) >          ~@exprs >          (recur (dec remai

Re: Clojure in Emacs Seemingly Impossible

2011-10-30 Thread mdave
On Sep 10, 9:48 pm, Kugathasan Abimaran wrote: > Follow these instructions, it will > work..http://riddell.us/ClojureWithEmacsSlimeSwankOnUbuntu.html > Sadly, the instructions break right where it says: Add the following: (defproject test-project "0.1.0" :description "Test Project" :depend

Re: modern clojure summary

2011-10-30 Thread daly
On Sun, 2011-10-30 at 09:04 -0700, Bill Robertson wrote: > On Oct 27, 9:10 pm, falcon wrote: > > > In Rich's most recent talk, "Simple Made Easy," he mentioned that clojure > > for javascript was built from the ground up using protocols and other > > modern clojure constructs. > > > > Is there a

anyone interested in a small game?

2011-10-30 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi community, i decided to create a (small) game in clojure to get a bit of non-theoretical experience. i'm pretty much a clojure noob (only did a few experiments) but have done a few real things in scala - which is totally awesome btw - so i do have

Re: clojure.core/max and NaN

2011-10-30 Thread Mikhail Kryshen
Why does Clojure have it's own naive implementation of max for doubles instead of using max from java.lang.Math which has necessary checks for NaN and the positive and negative zeros? On Sun, 30 Oct 2011 15:36:23 +0100 Ben Smith-Mannschott wrote: > On Sun, Oct 30, 2011 at 10:02, bOR_ wrote: > >

Re: Please try the alphas and betas!

2011-10-30 Thread Colin Yates
Whacky idea - is there a way for people to submit snippets which are run as part of the CI process? The obvious answer is do expect each developer to do this themselves but not everybody has that possibility and it provides very very little feedback to the clojure team. I am thinking a service wh

Re: modern clojure summary

2011-10-30 Thread Bill Robertson
On Oct 27, 9:10 pm, falcon wrote: > In Rich's most recent talk, "Simple Made Easy," he mentioned that clojure > for javascript was built from the ground up using protocols and other > modern clojure constructs. > > Is there a resource which describes clojure using modern concepts, rather > than i

Re: Please try the alphas and betas!

2011-10-30 Thread Bill Robertson
I'm new, so forgive me if this is a bad question. Are the snapshots announced here? Or is it a continuous process? I cloned the repo from github, and it built as 1.4.0 snapshot, if a maven/ivy/lein user wanted that they should target the same thing correct? Then the next questions are, how would yo

Re: "Can't take value of a macro" aka "macro noob needs help"

2011-10-30 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 your magic eye is right. using a backquote fixed it Am 30.10.2011 15:37, schrieb David Powell: > > > On Sun, Oct 30, 2011 at 2:22 PM, Dennis Haupt > mailto:d.haup...@googlemail.com>> > wrote: > > -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > > i

Please try the alphas and betas!

2011-10-30 Thread Rich Hickey
It was nice to get some feedback on the changes in 1.3. It was a bit frustrating though to get them after release, and especially to get them on code that has been available for over 16 months. This after regular Maven releases of alphas starting over a year ago and betas since June. It's a fair

Re: "Can't take value of a macro" aka "macro noob needs help"

2011-10-30 Thread David Powell
On Sun, Oct 30, 2011 at 2:22 PM, Dennis Haupt wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > i played around a bit > > (defmacro times [times & exprs] > '(let [countdown# ~times] > (loop [remaining# countdown#] > (when (< 0 remaining#) > ~@exprs > (recur (d

Re: clojure.core/max and NaN

2011-10-30 Thread Ben Smith-Mannschott
On Sun, Oct 30, 2011 at 10:02, bOR_ wrote: > Hi all, > Ran into something unexpected with "max". > user> (sd-age-female 13) > > > [10 NaN 0.746555245613119] > > > user> (apply max (sd-age-female 13)) > > 0.746555245613119 TL;DR: Don't expect sensible answers when NaN is involved. The implementat

"Can't take value of a macro" aka "macro noob needs help"

2011-10-30 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 i played around a bit (defmacro times [times & exprs] '(let [countdown# ~times] (loop [remaining# countdown#] (when (< 0 remaining#) ~@exprs (recur (dec remaining#)) (defmacro forloop [[i end] & code] `(let [fini

Re: Clojure Conj extracurricular activities spreadsheet

2011-10-30 Thread Krukow
On Oct 25, 5:11 pm, Fogus wrote: > This should be epic. Indeed. Please sign me up for: * ClojureScript * Pallet -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from ne

clojure.core/max and NaN

2011-10-30 Thread bOR_
Hi all, Ran into something unexpected with "max". user> (sd-age-female 13) [10 NaN 0.746555245613119]