Re: Destructuring syntax

2012-01-04 Thread Matthew Boston
I'm with Alex. I think of it as though it's a let binding, cause that's basically what's happening; the is bound to the scoped name. On Jan 4, 11:29 am, Alex Miller wrote: > I had the same thought when I first started learning Clojure - I think > the idea is that there is some nice mental resonan

Re: LCUG: 17th January 2012, Malcolm Sparks - Reflections on a real-world Clojure application

2012-01-04 Thread Kevin Lynagh
It's a bit short notice for me to take a holiday to London =) Any chance the talk will be filmed and posted online? On Jan 4, 4:28 am, Kushal Pisavadia wrote: > Happy New Year all! > > The London Clojure User Group are kicking things off with a talk from > Malcolm Sparks this month, titled: Refle

Re: Bug with clojure.contrib.json

2012-01-04 Thread Sean Corfield
On Wed, Jan 4, 2012 at 6:01 AM, Stuart Sierra wrote: > Please check with the more recent clojure.data.json version 0.1.2 and let me > know if it displays the same bug: > http://search.maven.org/#artifactdetails|org.clojure|data.json|0.1.2|jar user> (require 'clojure.data.json) nil user> (def my-h

Re: macro question

2012-01-04 Thread Trevor
That works - thanks. Still, it seems intuitive to build the code as I had originally done. It's too bad code has to get complicated so quickly :) Thank again for the help. On Jan 3, 9:19 pm, Robert Marianski wrote: > On Tue, Jan 03, 2012 at 07:22:22PM -0800, Trevor wrote: > > hmmm macro quest

Re: Codox: an API doc generator for Clojure

2012-01-04 Thread Fogus
> It might be an idea to figure out some standard syntax we could use, > like Markdown, that could be used for formatting docstrings. My vote is for Markdown as well. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email t

Re: "Late provide error" in compiling clojurescript files

2012-01-04 Thread Praki Prakash
Thanks for your response Benjamin. I was leaning towards cyclic dependency myself. I couldn't get closurebuilder.py (which apparently detects cyclic dependencies) but couldn't get it to run on my source. After your response, I did a dependency analysis by hand and found no cycles. However, I narrow

Is there any site hosting the labrepl ?

2012-01-04 Thread Erlis Vidal
Hi guys, I was wondering if there is any site that host the labrepl. I'm following this and I find it very useful, but sometimes I have to change from PC and is a big deal to reinstall everything again, also I want to share it with some friends, but installing it and having everything set up requ

Re: Use You a Spaced Repetition System for Great Good!

2012-01-04 Thread daly
On Tue, 2012-01-03 at 14:45 -0800, Joshua wrote: > Hi Tim, > > Great idea re: GitHub! > > I'm guessing the Clojure decks could cover, multiple things if tagged > appropriately and could be studied in various section. Or there could > be multiple decks dealing with differing material. I'm not very

Re: Storing clojure lists and maps in Redis

2012-01-04 Thread Sam Ritchie
Here's an example of a Ring session store that writes clojure maps to and from Redis: https://github.com/wuzhe/clj-redis-session/blob/master/src/clj_redis_session/core.clj In addition to Deep Freeze, you might check out Kryo, accessible via Alex Miller's Carbonite

Re: Destructuring syntax

2012-01-04 Thread Alex Miller
I had the same thought when I first started learning Clojure - I think the idea is that there is some nice mental resonance when destructuring matches up to your mental model of the data structure (it's literal form). In sequential destructuring, that holds but in maps it doesn't so things look "b

Re: Storing clojure lists and maps in Redis

2012-01-04 Thread Peter Taoussanis
read/pr-str works well, but it's painfully slow relative to something like Redis. JSON libraries and the like would be faster, but might require more contortions if you're using lots of Clojure data types. My 2c: the best overall compromise atm is the Deep-Freeze serialization library (https://gith

Re: "Late provide error" in compiling clojurescript files

2012-01-04 Thread Benjamin Teuber
Hi, I just had the same problem and discovered it was a cyclic dependency - maybe you want to check for that, too.. Regards Benjamin On Jan 3, 9:19 am, Praki wrote: > Hi, > > I have a silly problem compiling my cljs files. I have to run the > cljsc command twice in succession to generate javasc

Clojure/West CFP closes Friday, Jan 6th

2012-01-04 Thread Alex Miller
Hey all, Just a quick note that the Clojure/West CFP (http://clojurewest.org/ call-for-presentations ) will close this Friday January 6th. We've had a great set of talks submitted so far but there have not been many "unsessions" submitted yet (you can see them here: http://clojurewest.org/submitt

Re: Complex Queries with core.logic

2012-01-04 Thread David Nolen
On Wed, Jan 4, 2012 at 8:28 AM, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > I think a few people will find my answer to this stackoverflow question > interesting. It might even give you an idea for a use of core.logic :) > > > http://stackoverflow.com/questions/8705001/how-to

Re: Destructuring syntax

2012-01-04 Thread Ben Smith-Mannschott
On Wed, Jan 4, 2012 at 07:36, Johnny Weng Luu wrote: > One thing that seems weird is the way Clojure destructures a map > > I have this map: {:last-name "Vinge" :first-name "Vernor"} which is passed > to this function: (defn greet-author-2 [{fname :first-name}] ... ) > > Wouldn't it be better doin

Re: Destructuring syntax

2012-01-04 Thread Jay Fields
That does feel a bit more natural, but how would you handle :keys, :as, and :or? On Wed, Jan 4, 2012 at 1:36 AM, Johnny Weng Luu wrote: > One thing that seems weird is the way Clojure destructures a map > > I have this map: {:last-name "Vinge" :first-name "Vernor"} which is passed > to this funct

Re: Bug with clojure.contrib.json

2012-01-04 Thread Stuart Sierra
Please check with the more recent clojure.data.json version 0.1.2 and let me know if it displays the same bug: http://search.maven.org/#artifactdetails|org.clojure|data.json|0.1.2|jar -Stuart Sierra clojure.com -- You received this message because you are subscribed to the Google Groups "Clojur

Bug with clojure.contrib.json

2012-01-04 Thread syou6162
Hi all, I'm using clojure.contrib.json library, and I might encounter a bug of this library. The bug occurs when I use json-str to a map which contains double quotation for a key part. I confirmed the above usign folowing codes (danlarkin's json library is my expected behavior): user=> user=> (u

[ANN] funnyplaces 1.2-beta, for Factual's public API

2012-01-04 Thread dirtyvagabond
funnyplaces is a Clojure client for Factual's public API. (Full Disclosure: I work at Factual.) https://github.com/dirtyvagabond/funnyplaces#readme It's basically the first Clojure project I've released to the wild. Coming from a Java background, was really pleased with how simple it was to build

Re: macro question

2012-01-04 Thread Robert Marianski
On Tue, Jan 03, 2012 at 07:22:22PM -0800, Trevor wrote: > hmmm macro question: > > ; here's a macro that assembles many puts. It serves no purpose to me > (and doesn't even make sense in its current form). It's just something > I hit playing around and learning macros. > > (defmacro doto-putt

Destructuring syntax

2012-01-04 Thread Johnny Weng Luu
One thing that seems weird is the way Clojure destructures a map I have this map: {:last-name "Vinge" :first-name "Vernor"} which is passed to this function: (defn greet-author-2 [{fname :first-name}] ... ) Wouldn't it be better doing: (defn greet-author-2 [{:first-name fname}] ... ) You first

LCUG: 17th January 2012, Malcolm Sparks - Reflections on a real-world Clojure application

2012-01-04 Thread Kushal Pisavadia
Happy New Year all! The London Clojure User Group are kicking things off with a talk from Malcolm Sparks this month, titled: Reflections on a real-world Clojure application. *Format:* The format of this talk will be a whistle-stop tour around many elements of a large Clojure application in use

Re: Do you use Monads in your real clojure applications

2012-01-04 Thread Dragan R
Thank you for your great answer Konrad. On Jan 3, 9:46 am, googlegro...@khinsen.fastmail.net wrote: > Dragan R writes: > >  > On the net I read that "Impure functional programming doesn't really >  > need monads." >  > and "It appears that in the presence of mutable state, a lot of the >  > advant

Re: Do you use Monads in your real clojure applications

2012-01-04 Thread Dragan R
Thanks to all authors for help. Best regards, Dragan Radevic -- 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 fi

Complex Queries with core.logic

2012-01-04 Thread Ambrose Bonnaire-Sergeant
I think a few people will find my answer to this stackoverflow question interesting. It might even give you an idea for a use of core.logic :) http://stackoverflow.com/questions/8705001/how-to-simulate-an-outer-join-in-core-logic Thanks, Ambrose -- You received this message because you are subs

Re: Extending core.match to custom types

2012-01-04 Thread David Nolen
On Wed, Jan 4, 2012 at 3:05 AM, Tassilo Horn wrote: > There's no logic in there. It's just the only place where users like me > are able to return some predicate for the dispatch instead of a > non-function value. > It's not true that that's the only place you can put information - core.match i

Re: Do you use Monads in your real clojure applications

2012-01-04 Thread Meikel Brandmeyer
Hi, Am 04.01.2012 um 10:12 schrieb Thorsten Wilms: >> (defn handler [{:keys [params] :as req}] >> (if (person/valid? params) >> {:status 200 :body (json/generate-string (person/create params))} >> {:status 400})) Or you let the create function return nil on invalid params. (defn handl

Re: Do you use Monads in your real clojure applications

2012-01-04 Thread Thorsten Wilms
On 01/04/2012 03:05 AM, Takahiro Hozumi wrote: In MVC pattern, Model should take responsibility for business logic. Therefore I write validate function for creating in the model. If creating a instance of the model should be safe, I must validate a parameter in the create function. My problem is

Re: Extending core.match to custom types

2012-01-04 Thread Tassilo Horn
David Nolen writes: > Putting that kind of logic in IMatchLookup doesn't make much sense to > me: There's no logic in there. It's just the only place where users like me are able to return some predicate for the dispatch instead of a non-function value. > I'm not sure about the following synta

Re: Really loving Clooj but..

2012-01-04 Thread Arthur Edelstein
Hi Erlis, Just to confirm: there currently aren't any built-in tracing or other special debugging capabilities in clooj. tools.trace is quite cool, though. Arthur -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to