Re: Clojure + Redis

2010-01-05 Thread Gabi
I think you should do "(binding [*print-dup* true] (pr-str value).." instead of just (pr-str value) in the encode-value function. (line 20 in redis_memo.clj) On Jan 4, 2:55 pm, Steve Purcell wrote: > Read the code I posted in this thread and put up on github after you > expressed interest. > >

Re: Maven dependency on release 1.1.0

2010-01-05 Thread Mark Derricutt
Good to know - I didn't realize that had the release in it - how come no /release repo or central syncing? -- Pull me down under... On Tue, Jan 5, 2010 at 10:42 AM, Phil Hagelberg wrote: > You can use http://build.clojure.org/snapshots as a repository. Even > though it has "snapshots" in the URL

Re: Understanding the continuation monad's bind operator

2010-01-05 Thread Konrad Hinsen
On 05.01.2010, at 02:23, Steven E. Harris wrote: > , > | (fn m-bind-cont [mv f] > | (fn [c] > | (mv (fn [v] ((f v) c) > ` > > I'm curious why there's an extra delaying wrapper function there. The > outermost `fn' form taking the argument "c" as a continuation looks > like > it

Re: [ANN] FleetDB: A schema-free database implemented in Clojure

2010-01-05 Thread Rick Moynihan
2010/1/5 Mark McGranaghan : > Hi All, > > I'm happy to announce the alpha release of 'FleetDB', a schema-free > database implemented in Clojure and optimized for agile development. >From a quick skim of the docs, this looks pretty interesting. Some questions: 1) Is it possible to implement a joi

How to add extend print-method without screwing up ?

2010-01-05 Thread Gabi
Hi I am trying to extend Clojures' print-method using defmethod for a library I develop.: How can I do this without affecting users of my lib (i want only my lib to be affected )? (derive clojure.lang.Fn ::fn) (prefer-method print-method ::fn java.lang.Object) (defmethod print-method ::fn [o

Re: clj-peg v0.6 released

2010-01-05 Thread Seth
I forgot to appreciate having something like clg-peg to play with... no clue where my manners went. Is this comparable at all to Scala's parser combinators? On Jan 5, 12:17 am, Richard Lyman wrote: > Yeah, the management software for my site is in flux. Getting RSS done is on > the todo list, but

Re: clj-peg v0.6 released

2010-01-05 Thread Richard Lyman
I'm not familiar with Scala's parser combinators, in addition, I'm fuzzy on the technical definition of a parser combinator. I think I'd call it a parser combinator, since the grammar is embedded in the code using native Clojure data structures, evaluation can be delayed, and grammar definitions c

Re: [ANN] FleetDB: A schema-free database implemented in Clojure

2010-01-05 Thread Anders Rune Jensen
On Tue, Jan 5, 2010 at 1:12 AM, Mark McGranaghan wrote: > Hi All, > > I'm happy to announce the alpha release of 'FleetDB', a schema-free > database implemented in Clojure and optimized for agile development. > > From the homepage at http://fleetdb.org: "FleetDB offers a flexible > and expressive

Re: FleetDB: A schema-free database implemented in Clojure

2010-01-05 Thread Meikel Brandmeyer
Hello Mark, On Jan 5, 1:12 am, Mark McGranaghan wrote: > I'm happy to announce the alpha release of 'FleetDB', a schema-free > database implemented in Clojure and optimized for agile development. This seems very nice on a first look. Maybe exactly what I was looking for: small and easy to use (

Clojure, Maven and Swank

2010-01-05 Thread Kyle R. Burton
Hello, I was wondering if anyone else had run into these issues or might know what we're experiencing. Our project is using the maven clojure plugin (works superbly) and swank. We have a long running service that both runs a swank listener and a Repl when it starts (so we can connect to and inte

Re: extend can't do interfaces?

2010-01-05 Thread David Thomas Hume
On Jan 4, 9:40 pm, Raoul Duke wrote: > > It is interfaces that are more restrictive than protocols, and extend > > can't fix that. This ability to extend an existing type to a protocol > > is a main reason protocols exist. > > i guess i'm horribly confused about the right mental model for all of

Re: [ANN] clj-peg v0.6 released

2010-01-05 Thread Stefan Tilkov
Richard, can you elaborate on the license? The license page says "Permission is granted to use and redistribute this software except for commercial use […]" Stefan -- Stefan Tilkov, http://www.innoq.com/blog/st/ On 04.01.2010, at 23:27, Richard Lyman wrote: > All, > > This project adds sup

Re: Mocking a namespace?

2010-01-05 Thread Brian Hurt
A better solution that looks like it works is this: load the mock module second. Say I have a module I want to mock: (ns tomock) (defn foo [] 4) and a module that requires it: (ns totest (:require tomock)) (defn bar [] (tomock/foo)) So if I create the file mock_tomock.clj which contains:

installing leiningen system-wide?

2010-01-05 Thread Stuart Halloway
We are considering adding leiningen to a chef install for EC2 instances. However, we want lein (and the associated maven cruft) to be available to all users, not just the user running the install script. Is this a solved problem? Stu -- You received this message because you are subscribed t

Release Candidates for clojure-contrib 1.0 and 1.1

2010-01-05 Thread Stuart Sierra
As announced yesterday on the dev list, I have created two release candidates for clojure-contrib. The idea is to get numbered contrib releases that match Clojure version numbers. So contrib 1.0 will work with Clojure 1.0 and contrib 1.1 will work with Clojure 1.1. This does NOT say anything abo

and, why does lein try to put clojure.jar on the BOOTCLASSPATH?

2010-01-05 Thread Stuart Halloway
...when it is also buried in the leiningen standalone? Stu -- 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

Re: [ANN] clj-peg v0.6 released

2010-01-05 Thread Richard Lyman
For now I'd rather be compensated if someone were planning on using clj-peg commercially. I'm not sure how much I'd charge for a commercial-friendly license, and I don't have an automated process for handling billing and production of a differently licensed product, so I'm reluctant to move that di

Re: FleetDB: A schema-free database implemented in Clojure

2010-01-05 Thread Mark McGranaghan
Hi Rick, > 1) Is it possible to implement a join across several collections, > within the same database snapshot? Not, not yet. I may add a feature in the future that looks like: ["snapshot", ] => ["on-snapshot" ] => ["on-snapshot" ] => Once again, Clojure's persistent data structures to

Re: FleetDB: A schema-free database implemented in Clojure

2010-01-05 Thread Mark McGranaghan
Hi Meikel, Yep, what you're looking for is compaction: http://fleetdb.org/docs/queries/compact.html - Mark On Jan 5, 2:59 am, Meikel Brandmeyer wrote: > Hello Mark, > > On Jan 5, 1:12 am, Mark McGranaghan wrote: > > > I'm happy to announce the alpha release of 'FleetDB', a schema-free > > dat

Re: FleetDB: A schema-free database implemented in Clojure

2010-01-05 Thread Mark McGranaghan
Hi Andres, By "automatically maintained indexes" I mean that FleetDB automatically and atomically updates all declared indexes when you insert, update or delete a record. You do need to declare them first though; at this point FleetDB cannot infer what indexes are needed by your application. The

Re: Clojure + Redis

2010-01-05 Thread Steve Purcell
Indeed, thanks - I realized that earlier today myself! -Steve On 5 Jan 2010, at 09:24, Gabi wrote: > I think you should do "(binding [*print-dup* true] (pr-str value).." > instead of just (pr-str value) in the encode-value function. (line 20 > in redis_memo.clj) > > On Jan 4, 2:55 pm, Steve P

Re: Clojure + Redis

2010-01-05 Thread Steve Purcell
Or rather, more importantly, I realised I should bind *print-level* to nil... As for *print-dup*, I guess there's a danger that stored values might become unreadable if any implementation structure classes were to get renamed in a future clojure release. -Steve On 5 Jan 2010, at 09:24, Gabi w

Re: installing leiningen system-wide?

2010-01-05 Thread Phil Hagelberg
Stuart Halloway writes: > We are considering adding leiningen to a chef install for EC2 > instances. However, we want lein (and the associated maven cruft) to > be available to all users, not just the user running the install script. > > Is this a solved problem? You should be fine just chan

Re: installing leiningen system-wide?

2010-01-05 Thread Stuart Halloway
Thanks Phil. It looked like I could change the environment variables, but when I saw the dreaded string ".m2" I became sore afraid. Stu "maven-free for over 40 years" Stuart Halloway writes: We are considering adding leiningen to a chef install for EC2 instances. However, we want lein (a

Re: How to add extend print-method without screwing up ?

2010-01-05 Thread Laurent PETIT
How about creating your own print-method multimethod in a lib of your own, and in your libs, excluding clojure.core/print-method and importing your-lib/print-method instead. Then, in your-lib, make the default print-method invocation just call clojure.core/print-method, create your own private hie

Re: Maven dependency on release 1.1.0

2010-01-05 Thread Phil Hagelberg
Mark Derricutt writes: > Good to know - I didn't realize that had the release in it - how come > no /release repo or central syncing? Nobody's gotten around to it yet is all. -Phil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this gro

Re: and, why does lein try to put clojure.jar on the BOOTCLASSPATH?

2010-01-05 Thread bOR_
Not sure, but wasn't that so that you don't need to compile your project against the same version of clojure as that leiningen was compiled to? On Jan 5, 5:55 pm, Stuart Halloway wrote: > ...when it is also buried in the leiningen standalone? > > Stu -- You received this message because you are

Re: Release Candidates for clojure-contrib 1.0 and 1.1

2010-01-05 Thread Stefan Kamphausen
Hi, On Jan 5, 5:22 pm, Stuart Sierra wrote: > For > 1.1.0:http://clojure-contrib.googlecode.com/files/clojure-contrib-1.1.0-RC1... works for me. Will use it in the following days. If I stay quiet, it continues to work :-) Thanks for providing this. Regards, Stefan -- You received this mes

Re: How to add extend print-method without screwing up ?

2010-01-05 Thread Gabi
Hmm.. I hoped I could avoid this. Multi-methods should be extended, not copied and then extended :) But if there is no other way, I probably settle for this cumbersome solution.. On Jan 5, 11:21 pm, Laurent PETIT wrote: > How about creating your own print-method multimethod in a lib of your > o

Re: installing leiningen system-wide?

2010-01-05 Thread ianp
> We are considering adding leiningen to a chef install for EC2   > instances. However, we want lein (and the associated maven cruft) to   > be available to all users, not just the user running the install script. I guess that if Leiningen just uses the repo/dep stuff from maven then the following

Re: FleetDB: A schema-free database implemented in Clojure

2010-01-05 Thread Meikel Brandmeyer
Hello Mark, Am 05.01.2010 um 18:37 schrieb Mark McGranaghan: > Yep, what you're looking for is compaction: > > http://fleetdb.org/docs/queries/compact.html Doh. Those who can read have a clear advantage. ^^" Ok. After a second look: compact is asynchronous. How do I find out whether it is fin

Re: How to add extend print-method without screwing up ?

2010-01-05 Thread Laurent PETIT
Multi-methods can be extended ... to the extent of what their dispatch-function defines. So for what you want to work, you should have this notion of "from where is the multi-method called" wired in the dispatch function. Imagineyou could redefine the dispatch function (which you can not for print

Re: How to add extend print-method without screwing up ?

2010-01-05 Thread Gabi
Yes. I guess you have a point. Maybe I just wanted too much out of it. This think could be solved easily if defmethod supported hierarchy as arg (or in meta). But on the other hand, such feature would make it very easy to make a total mess.. On Jan 5, 11:59 pm, Laurent PETIT wrote: > Multi-meth

Re: FleetDB: A schema-free database implemented in Clojure

2010-01-05 Thread Rick Moynihan
2010/1/5 Mark McGranaghan : > Hi Rick, > >> 1) Is it possible to implement a join across several collections, >> within the same database snapshot? > > Not, not yet. I may add a feature in the future that looks like: > > ["snapshot", ] > => > > ["on-snapshot" ] > => > > ["on-snapshot" ] > => >

1.1.0 *release* of clojure-contrib?

2010-01-05 Thread Mark Derricutt
Is there likely to be a RELEASE version of clojure-contrib 1.1.0 in the maven repo to match clojure 1.1.0 at all? The lack of a release build prevents using the maven release plugin to run with any project using it :( Also - if 1.1.0 is released, why is build.clojure.org/snapshots still getting

Re: 1.1.0 *release* of clojure-contrib?

2010-01-05 Thread Jarkko Oranen
On Jan 6, 2:21 am, Mark Derricutt wrote: > Is there likely to be a RELEASE version of clojure-contrib 1.1.0 in > the maven repo to match clojure 1.1.0 at all? > > The lack of a release build prevents using the maven release plugin to > run with any project using it :( > > Also - if 1.1.0 is rele

Re: FleetDB: A schema-free database implemented in Clojure

2010-01-05 Thread Mark McGranaghan
> Ok. After a second look: compact is asynchronous. How do I find out whether > it is finished or whether there is still a compaction going on? And related: > how do I shut down the server gracefully? There is currently no query for checking whether compaction is going on, though I am working on

Re: 1.1.0 *release* of clojure-contrib?

2010-01-05 Thread Sean Devlin
There is a release candidate for contribs 1.0.0 and 1.1.0 http://groups.google.com/group/clojure/browse_thread/thread/6570c2969d8b956 It'll be out soon. Sean On Jan 5, 8:29 pm, Jarkko Oranen wrote: > On Jan 6, 2:21 am, Mark Derricutt wrote: > > > Is there likely to be a RELEASE version of clo

Having difficulties with compilation in slime, emacs and clojure-project

2010-01-05 Thread Rob Lachlan
I've been trying to compile clojure files from emacs. The issue I run into is of my own clj files not being found on the classpath. (If I'm trying to compile a standalone file, which references only clojure core, there's no problem. It's when I have multiple files, and I'm trying to include a fi

Re: Having difficulties with compilation in slime, emacs and clojure-project

2010-01-05 Thread Konrad Hinsen
On 06.01.2010, at 07:26, Rob Lachlan wrote: but when I put it in .emacs, and invoked it, the function seemed to get stuck. I'm asked in the mini-buffer for the project root, and I write it in and press return, but nothing happens. I just keep getting carriage returns in the mini-buffer. Any i

Re: Having difficulties with compilation in slime, emacs and clojure-project

2010-01-05 Thread Rob Lachlan
I have src and test in the directory I'm passing in. The problem however, seems to be on the emacs end. In the mini-buffer when I enter in Project root: and press return, the cursor just moves to the next line in the mini- buffer. So I think that the clojure-project function is getting stuck ri