Re: IDE agnostic question on user assistance (emacs/vimClojure users help appreciated too !)

2010-07-21 Thread Aaron Cohen
On Wed, Jul 21, 2010 at 9:33 AM, Meikel Brandmeyer wrote: > Hi, > > On Jul 21, 1:35 pm, Jeff Rose wrote: > > > Really, there isn't a way to start processes from VIM? How about just > > opening a temporary buffer for the output of the nailgun server, and > > then start it with a bang!? > > I was

Re: IDE agnostic question on user assistance (emacs/vimClojure users help appreciated too !)

2010-07-21 Thread j-g-faustus
On Jul 20, 10:15 am, Laurent PETIT wrote: > Oh, maybe I understand: by "partial drafts", you mean "pseudo-code", > directly written in clojure, is it this ? It could be pseudo-code or partial implementations or code that is more or less complete but won't compile because the functions or libs it

Re: Two convenience methods

2010-07-21 Thread B Smith-Mannschott
On Wed, Jul 21, 2010 at 23:45, Travis Hoffman wrote: ... > The second function is suggested as an addition to clojure.set. The > "disjoint?" function decides if two sets have no elements in common. > This can easily be done using: > >  (not (nil? (intersection s1 s2))) > > but this implementation

Re: gobble up a collection 2 at a time

2010-07-21 Thread David Cabana
Here's my take: (defn mmap [f coll] (->> coll (partition 2) (map (fn [[x y]] (f x y) For instance: user> (mmap + (range 8)) (1 5 9 13) user> (mmap * (range 8)) (0 6 20 42) You probably want to think about whether you'll see input sequences with an odd number of terms, and how

Re: Literate Clojure - a good lead ...

2010-07-21 Thread Tim Daly
Antony Blakey wrote: On 22/07/2010, at 3:08 AM, Tim Daly wrote: "Language integration" is a false goal. It is technically possible to call functions in any language from latex but unnecessary in general. It is technically possible to generate latex from any language. Have you read t

Re: gobble up a collection 2 at a time

2010-07-21 Thread Wilson MacGyver
you have to partition it first. user=> (partition 2 [1 2 3 4 5 6 7 8]) ((1 2) (3 4) (5 6) (7 8)) let's say we want to add the numbers. user=> (map #(apply + %) (partition 2 [1 2 3 4 5 6 7 8])) (3 7 11 15) On Wed, Jul 21, 2010 at 10:20 PM, Glen Rubin wrote: > Hi!  I want to process a collect

Re: gobble up a collection 2 at a time

2010-07-21 Thread jim
Use partition: (map (apply myfcn) (partition 2 [1 2 3 4 5 6 7 8])) Or something like that. Not at a REPL so that's from memory. Experiment with partition at the repl and it'll become clear. Jim On Jul 21, 9:20 pm, Glen Rubin wrote: > Hi!  I want to process a collection 2 elements at a time usi

gobble up a collection 2 at a time

2010-07-21 Thread Glen Rubin
Hi! I want to process a collection 2 elements at a time using map. My function accepts 2 parameters (a,b) and returns a result (c): (myfcn [a b]) => c so I want to iterate myfcn over a collection and create a new sequence for example let's say myfcn sums a and b, then i would like to do some

Re: Literate Clojure - a good lead ...

2010-07-21 Thread martin_clausen
A good example of this for a non-trivial app is here: http://genprog.adaptive.cs.unm.edu/asm/instructions.html /mac On Jul 21, 8:54 am, Tassilo Horn wrote: > On Wednesday 21 July 2010 06:32:02 Mark Engelberg wrote: > > Hi Mark, > > > I would definitely welcome a literate Clojure tool. > > You m

Re: BUG: Clojure hierarchies (affects 1.2-beta1)

2010-07-21 Thread Michał Marczyk
Made a ticket for this here (including the simple diagnosis): https://www.assembla.com/spaces/clojure/support/tickets/406-typo-in-underive-causes-breaking-in-the-resulting-hierarchy No patch, since my CA wasn't ack'd yet... Sincerely, Michał -- You received this message because you are subscri

Re: Two convenience methods

2010-07-21 Thread Frederick Polgardy
Ok you said this too. :) But the non-booleanness of (some ...) isn't that important. The result of (some ...) is truthy, and can be used in any boolean context. -Fred -- Science answers questions; philosophy questions answers. On Jul 21, 2010, at 8:07 PM, Frederick Polgardy wrote: > http://ri

Re: Two convenience methods

2010-07-21 Thread Frederick Polgardy
Oops, you already said that, my bad. :) -- Science answers questions; philosophy questions answers. On Jul 21, 2010, at 8:13 PM, Frederick Polgardy wrote: > Or [using clojure.set] (empty? (intersection s1 s2)). > > -- > Science answers questions; philosophy questions answers. > > On Jul 21, 20

Re: Two convenience methods

2010-07-21 Thread Frederick Polgardy
Or [using clojure.set] (empty? (intersection s1 s2)). -- Science answers questions; philosophy questions answers. On Jul 21, 2010, at 4:45 PM, Travis Hoffman wrote: > The second function is suggested as an addition to clojure.set. The > "disjoint?" function decides if two sets have no elements i

Re: bug: clojure.walk removes all the metadata

2010-07-21 Thread Pedro Teixeira
On Jul 21, 9:59 pm, Pedro Teixeira wrote: > On Jun 22, 6:23 pm, Krešimir Šojat wrote: > > > While traversing the data structure both prewalk and postwalk remove > > all the metadata: > > > user=> (require '[clojure.walk :as w]) > > nil > > user=> (def data {:a ^{:a :this-is-a} [1 2 3]}) > > #'use

BUG: Clojure hierarchies (affects 1.2-beta1)

2010-07-21 Thread David Nolen
(derive ::bar ::foo) (underive ::bar ::foo) (derive ::bar ::foo) results in a NullPointerException. Also any further attempts to use derive, say: (derive ::b ::a) also results in a NullPointerException. -- You received this message because you are subscribed to the Google Groups "Clojure" gro

Re: Two convenience methods

2010-07-21 Thread Frederick Polgardy
http://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/some -- Science answers questions; philosophy questions answers. On Jul 21, 2010, at 4:45 PM, Travis Hoffman wrote: > (defn any? > "Returns true if (pred x) is logically true for one x in coll, else > false." > {:added "1.

Re: bug: clojure.walk removes all the metadata

2010-07-21 Thread Pedro Teixeira
On Jun 22, 6:23 pm, Krešimir Šojat wrote: > While traversing the data structure both prewalk and postwalk remove > all the metadata: > > user=> (require '[clojure.walk :as w]) > nil > user=> (def data {:a ^{:a :this-is-a} [1 2 3]}) > #'user/data > user=> (meta (:a data)) > {:a :this-is-a} > user=>

Re: Literate Clojure - a good lead ...

2010-07-21 Thread Antony Blakey
On 22/07/2010, at 3:08 AM, Tim Daly wrote: > "Language integration" is a false goal. It is technically possible to > call functions in any language from latex but unnecessary in general. > It is technically possible to generate latex from any language. Have you read the paper? Being able to auto

Re: Literate Clojure - a good lead ...

2010-07-21 Thread Mark Engelberg
On Wed, Jul 21, 2010 at 3:10 PM, Mark Fredrickson wrote: > I've been playing around with a Emacs mode (more properly looking at > existing multi-major-mode work). I'm open to ideas on how to make it > play better with a REPL. As always, any form can be sent via C-C C-C. > What more did you have in

Re: Literate Clojure - a good lead ...

2010-07-21 Thread Mark Fredrickson
> I'd be perfectly happy with a LaTeX-based solution, although I > understand the appeal of something more "within Clojure". I've been playing with a Clojure solution: http://github.com/markmfredrickson/changeling I just pushed a version to clojars as well. > As a first approximation, literate

Re: clojure-contrib replace-first-str

2010-07-21 Thread jandot
Thanks Stuart. Got it working now. jan. On Jul 21, 2:28 pm, Stuart Halloway wrote: > Hi Jan, > > These functions in contrib are deprecated (and will be marked so as soon as > we have time to make a pass through contrib). > > Please use the functions in clojure.string. > > Stuart Halloway > Cloj

Two convenience methods

2010-07-21 Thread Travis Hoffman
I've found two convenience methods to be of use to me in my project, and I'm not certain where I ought to share them. So, I thought I'd share them here, for your consideration. Sorry, I'm a bit of a n00b to Clojure. :-) The first I would suggest for inclusion in core.clj; it is very similar in beh

Re: Clojure Map function possible bug.

2010-07-21 Thread Ruben
Thanks for your response guys. Ruben On Jul 21, 9:30 am, Stuart Halloway wrote: > Hi Ruben, > > What you are missing is thatmapis the wrong function to use here.Mapis lazy, > and combiningmapwith something side-effecty like println will lead to > confusion. > > doseq will give you what you wan

Re: randomizing a vector

2010-07-21 Thread Ryan Waters
I'm currently using clojure 1.1 and wasn't aware of shuffle in the contrib libraries. It felt like a wheel reinvention ... I should have looked harder! Thank you. On Wed, Jul 21, 2010 at 12:51 PM, Randy Hudson wrote: > Clojure 1.2 has a shuffle function. If you're using 1.1, you can just > cop

Re: Aleph and Conjure

2010-07-21 Thread Zach Tellman
To clarify, I didn't mean gary's last snippet. I meant this could work with the linked Ring middleware: (defn aleph-to-ring-handler [req] (respond! req (ring-handler req))) as would the variation David's been using for his "hello world" benchmarks: (defn aleph-to-ring-handler [req] (future

Re: Aleph and Conjure

2010-07-21 Thread Zach Tellman
On Jul 21, 11:51 am, David Nolen wrote: > On Wed, Jul 21, 2010 at 2:42 PM, Zach Tellman wrote: > > Both of those seem to be about persisting data across requests.  I > > apologize if I'm being dense, but how does the threading model affect > > how they work? > > They wrap the handler, that is the

Re: Aleph and Conjure

2010-07-21 Thread gary b
On Jul 21, 11:42 am, Zach Tellman wrote: > Both of those seem to be about persisting data across requests.  I > apologize if I'm being dense, but how does the threading model affect > how they work? The flash and session middleware functions update the response returned from the handler function.

Re: Aleph and Conjure

2010-07-21 Thread David Nolen
On Wed, Jul 21, 2010 at 2:42 PM, Zach Tellman wrote: > Both of those seem to be about persisting data across requests. I > apologize if I'm being dense, but how does the threading model affect > how they work? They wrap the handler, that is they expect to see the request and the response. That

Re: Aleph and Conjure

2010-07-21 Thread Zach Tellman
Both of those seem to be about persisting data across requests. I apologize if I'm being dense, but how does the threading model affect how they work? On Jul 21, 11:28 am, gary b wrote: > On Jul 21, 10:40 am, Zach Tellman wrote: > > > I don't think anything in the Ring utilities are thread-awar

Re: Why does using a dynamic binding make a function impure?

2010-07-21 Thread Daniel Werner
On 20 July 2010 11:50, Paul Richards wrote: > So back to my example: > > (def forty-two 42) > > (defn func [] (* forty-two forty-two)) > > (defn other-func [] (binding [forty-two 6] (func))) > > > "func" is impure, and "other-func" is pure.  It's really nothing to do > with whether the "binding" k

Re: Implementing a protocol with using a base implementation?

2010-07-21 Thread Toni Batchelli
Hi Meikel, This is awesome! You just did a big chunk of what I was about to try to do :). Sorry for the late response, I've been off the grid for a few days... With your second proposed solution, the defrecord-with-defaults macro, one can achieve very good performance while keeping some of the f

Re: Aleph and Conjure

2010-07-21 Thread gary b
On Jul 21, 10:40 am, Zach Tellman wrote: > I don't think anything in the Ring utilities are thread-aware, so they're > all okay to use.   The flash and session middleware in Ring core are two examples where Ring assumes the thread per request model. http://github.com/mmcgrana/ring/blob/master/ri

Re: Aleph and Conjure

2010-07-21 Thread Zach Tellman
Also, I've just created a mailing list for Aleph at http://groups.google.com/group/aleph-lib, since it seems like that might reduce the clutter here. On Jul 21, 10:40 am, Zach Tellman wrote: > I don't really understand what's being debated here.  Aleph is fully > Ring-compliant in every way but i

Re: Leiningen 1.2.0 released!

2010-07-21 Thread Phil Hagelberg
On Tue, Jul 20, 2010 at 2:43 PM, Daniel Gagnon wrote: >> Mostly we need volunteers to port the changes from the bash script to the >> batch file and test the changes. Also I don't think the self-install feature >> will ever work with lein.bat due to the lack of a way to download files. We >> may s

Re: Literate Clojure - a good lead ...

2010-07-21 Thread Mark Engelberg
I'd be perfectly happy with a LaTeX-based solution, although I understand the appeal of something more "within Clojure". As a first approximation, literate programming needs to make it easy to enter English text with code snippets that run. Haskell does this by assuming that in a file ending in .

Re: randomizing a vector

2010-07-21 Thread Randy Hudson
Clojure 1.2 has a shuffle function. If you're using 1.1, you can just cop the 1.2 implementation. On Jul 21, 1:18 pm, Ryan Waters wrote: > http://gist.github.com/484747 > > - - - > > My sad little program has a number of issues and I would welcome > suggestions on any aspect of it.  I come from a

Re: randomizing a vector

2010-07-21 Thread Michael Gardner
On Jul 21, 2010, at 12:44 PM, Michał Marczyk wrote: > The biggest problem with the code is that it reconstructs the entire > `ordered-ips` vector minus the last entry picked at each iteration. It > would be simpler and *much* more performant to do > > (shuffle ordered-ips) > > Also note that Clo

Re: randomizing a vector

2010-07-21 Thread Michał Marczyk
The biggest problem with the code is that it reconstructs the entire `ordered-ips` vector minus the last entry picked at each iteration. It would be simpler and *much* more performant to do (shuffle ordered-ips) Also note that Clojure 1.2 provides an `rand-nth` function for doing (let [i (count

Re: Aleph and Conjure

2010-07-21 Thread Zach Tellman
I don't really understand what's being debated here. Aleph is fully Ring-compliant in every way but its threading model. I don't think anything in the Ring utilities are thread-aware, so they're all okay to use. I'm not very familiar with Compojure, but as long as you're willing to make an expli

Re: Literate Clojure - a good lead ...

2010-07-21 Thread Tim Daly
Antony Blakey wrote: On 21/07/2010, at 10:29 PM, Tim Daly wrote: The PLT Scheme mechanism mentioned above is a good idea but it has a niche quality to it. Latex is an industry standard publication language. Many books and technical papers, especially in mathematics, use it. Some conferenc

randomizing a vector

2010-07-21 Thread Ryan Waters
http://gist.github.com/484747 - - - My sad little program has a number of issues and I would welcome suggestions on any aspect of it. I come from an imperative programming background and clojure is my first experience with a functional or lisp language. I'd like to take a list of things (really

Re: Aleph and Conjure

2010-07-21 Thread Marko Kocić
On Jul 21, 4:38 pm, Janico Greifenberg wrote: > On Wed, Jul 21, 2010 at 4:11 PM, Marko Kocić wrote: > > Something like ring-aleph-adapter, however trivial it might be to > > implement, will help in seamlessly switching existing applications to > > aleph/netty. > > But why would that be useful?

Re: Installing emacs using leiningen on Windows Vista

2010-07-21 Thread leonelag
> . And cygwin uses ':' as a CLASSPATH > separator, so correct these too at the bottom of the script. Hm, Classpath is tricky to set up correctly in cygwin. The JVM executable in Windows expects your classpath to be separated with a semicolon, so even if you're on cygwin, you should use that. O

Re: Slime, debug-repl & clojure debugging toolkit

2010-07-21 Thread George Jahad
Karl, I use the debug-repl all the time and don't see errors like this. You can use the standard debug-repl from with slime's *inferior-lisp* buffer. Try it from there and see what you get. If that fails, try it from outside of emacs entirely in a regular command line repl and see if it behaves

Re: Aleph and Conjure

2010-07-21 Thread Janico Greifenberg
On Wed, Jul 21, 2010 at 4:11 PM, Marko Kocić wrote: > Something like ring-aleph-adapter, however trivial it might be to > implement, will help in seamlessly switching existing applications to > aleph/netty. But why would that be useful? Maybe I'm missing something here, but I thought the idea beh

Re: alter atom while iterating

2010-07-21 Thread Meikel Brandmeyer
Hi, > user=> (let [rs2 (r 2 true) >              rs3 (r 3 true)] >          (for [r2 rs2 >                r3 rs3] >            [r2 r3])) Note: this of course holds the head of the sequences. If this is not desired, you will have to bite the bullet and pay the cost of multiple calls to the seq gen

Re: Aleph and Conjure

2010-07-21 Thread gary b
On Jul 21, 7:11 am, Marko Kocić wrote: > Something like ring-aleph-adapter, however trivial it might be to > implement, will help in seamlessly switching existing applications to > aleph/netty. There is a Ring adapter for Netty: http://github.com/datskos/ring-netty-adapter. -- You received this

Re: alter atom while iterating

2010-07-21 Thread Meikel Brandmeyer
Hi, On Jul 21, 4:00 pm, ka wrote: > 1:13 user=> (def k (for [a (r 2 true)] a) ) > Called (r 2) > #'user/k > > Why do you think for doesn't have 'lazy-for' semantics already? Because then the above would look like: user=> (def l (hypothetical-lazy-for [a (r 2 true)] a)) #'user/l user=> Compare

Re: Aleph and Conjure

2010-07-21 Thread Marko Kocić
> Clojure, because of the JVM, doesn't tie your hands this way. If you want to > do everything evented go ahead. Do everything with threads? Go ahead. Want > to mix the two designs together like Aleph? Sure. All while not losing the > elegant brevity of a Node.js app. Something like ring-aleph-ada

Re: Slime, debug-repl & clojure debugging toolkit

2010-07-21 Thread Ramakrishnan Muthukrishnan
On Wed, Jul 21, 2010 at 6:04 PM, Krukow wrote: >  0: com.trifork.intrafoo.clj.extract_contacts > $extract_all.invoke(NO_SOURCE_FILE:1) >      Locals: >        pref = /Users/krukow/workspaces/trifork/intrafoo_clj/ > contactdata/ >        cli = org.apache.commons.httpclient.httpcli...@6078b973 >    

Re: alter atom while iterating

2010-07-21 Thread ka
@Meikal, Hi, I get what you mean. Consider the following func - (defn r [n lazy?] (.println System/out (str "Called (r " n ")")) (let [r-lazy-seq (fn r-lazy-seq [i n] (lazy-seq (when (< i n) (.println System/out (str "Real

Re: Literate Clojure - a good lead ...

2010-07-21 Thread Antony Blakey
On 21/07/2010, at 10:29 PM, Tim Daly wrote: > The PLT Scheme mechanism mentioned above is a good idea > but it has a niche quality to it. > > Latex is an industry standard publication language. Many > books and technical papers, especially in mathematics, > use it. Some conferences require it. A

Re: IDE agnostic question on user assistance (emacs/vimClojure users help appreciated too !)

2010-07-21 Thread Meikel Brandmeyer
Hi, On Jul 21, 1:35 pm, Jeff Rose wrote: > Really, there isn't a way to start processes from VIM?  How about just > opening a temporary buffer for the output of the nailgun server, and > then start it with a bang!? I was a but unclear on what I mean with background: I can start processes from V

Re: Clojure Map function possible bug.

2010-07-21 Thread Stuart Halloway
Hi Ruben, What you are missing is that map is the wrong function to use here. Map is lazy, and combining map with something side-effecty like println will lead to confusion. doseq will give you what you want. Stu Stuart Halloway Clojure/core http://clojure.com > Hi all, > > when I execute t

Re: clojure-contrib replace-first-str

2010-07-21 Thread Stuart Halloway
Hi Jan, These functions in contrib are deprecated (and will be marked so as soon as we have time to make a pass through contrib). Please use the functions in clojure.string. Stuart Halloway Clojure/core http://clojure.com > Hi, > > I'm using replace-str and replace-first-str (from clojure-co

Re: Aleph and Conjure

2010-07-21 Thread David Nolen
On Tue, Jul 20, 2010 at 10:38 PM, Victor S wrote: > Thank you all for the input, it has made me understand some new > things. > > I find node.js push for NIO as the de-facto mode of existence for web > apps interesting, and I was trying to have my cake and eat it too. > JS programming just doesn'

Re: Literate Clojure - a good lead ...

2010-07-21 Thread Tim Daly
The PLT Scheme mechanism mentioned above is a good idea but it has a niche quality to it. Latex is an industry standard publication language. Many books and technical papers, especially in mathematics, use it. Some conferences require it. All publishers support it and it is widely used. Traditio

Re: Clojure Map function possible bug.

2010-07-21 Thread Laurent PETIT
2010/7/21 Ruben > Hi all, > > when I execute the following code: > > (def users (ref [])) > > ;works > (defn print-users [] > (with-query-results res ["select id,username,password from users" ] > >(dorun >(dosync (ref-set users res ) ) >) > ) > ) > > > and then

Re: Slime, debug-repl & clojure debugging toolkit

2010-07-21 Thread Krukow
On Jul 21, 8:47 am, Ramakrishnan Muthukrishnan wrote: > On Wed, Jul 21, 2010 at 11:52 AM, Krukow wrote: > > > I am interested in getting the combination of Emacs+slime+swank- > > clojure, alex-and-georges.debug-repl and clojure debugging toolkit to > > work together. > > debug-repl is kind of int

Clojure Map function possible bug.

2010-07-21 Thread Ruben
Hi all, when I execute the following code: (def users (ref [])) ;works (defn print-users [] (with-query-results res ["select id,username,password from users" ] (dorun (dosync (ref-set users res ) ) ) ) ) and then execute (map #(println %) @users) i get b

Re: Complex type in clojure

2010-07-21 Thread Travis Hoffman
I'm still working on it. I was waiting for 1.2 to branch, and to for some other changes to the basic types to happen. Really, I just need a little free time and a kick-in-the-pants! I'll try to get it done this week. -Travis On Jul 20, 11:09 am, Mike Benfield wrote: > The lack of complex number

Re: Aleph and Conjure

2010-07-21 Thread Victor S
Thank you all for the input, it has made me understand some new things. I find node.js push for NIO as the de-facto mode of existence for web apps interesting, and I was trying to have my cake and eat it too. JS programming just doesn't look all that appealing. - V On Jul 20, 1:46 pm, Peter Schu

Re: Complex type in clojure

2010-07-21 Thread Travis Hoffman
I'm still working on it. I've been waiting for the 1.2 release to branch, and also for the other work on the basic types to settle down. Also, I need a little free time. I'll try to get back to it this week. -Travis On Jul 20, 11:09 am, Mike Benfield wrote: > The lack of complex numbers is keepi

Re: Leiningen 1.2.0 released!

2010-07-21 Thread Daniel Gagnon
On Tue, Jul 20, 2010 at 9:51 AM, Phil Hagelberg wrote: > On Mon, Jul 19, 2010 at 3:00 PM, Daniel Gagnon > wrote: > > By the way, what's left to do for the Windows support to stop being > > experimental? > > Mostly we need volunteers to port the changes from the bash script to the > batch file an

Re: IDE agnostic question on user assistance (emacs/vimClojure users help appreciated too !)

2010-07-21 Thread Jeff Rose
On Jul 19, 8:19 pm, Meikel Brandmeyer wrote: > Starting the server is up to the user. Rule 1: Vim is not an IDE. There is a > plethora of tools for handling classpaths questions. I personally use gradle; > before that I used simple shell scripts with project relative CLASSPATH and > that's it.

Re: Memoizing tree recursive calls

2010-07-21 Thread Mike Meyer
On Tue, 20 Jul 2010 13:11:12 -0700 (PDT) Aravindh Johendran wrote: > If we have tree recursive procedure such as the follows, how can we > use memoize it so that it automatically caches the values it has > already computed . [example elided] > Maybe memoize should go the same way as the co

Re: Aleph and Conjure

2010-07-21 Thread Jeff Rose
While Aleph's event model is slightly different from what Ring was originally designed for (the servlet API), I think it would be really easy to use with Ring. In Aleph you explicitly respond to a request, while in Ring you return a response map. Unless I'm missing out on something, you can hooku

Re: Leiningen 1.2.0 released!

2010-07-21 Thread Jeff Rose
Absolutely! Leiningen and its plugin system are wonderful in their simplicity. Thanks a lot. -Jeff On Jul 20, 6:55 pm, Brian Carper wrote: > On Jul 18, 5:17 pm, defn wrote: > > > I think I speak for everyone when I say: "thank you". > > inc > > --Brian -- You received this message because y

Re: terracotta?

2010-07-21 Thread Paul Stadig
There are agents, atoms, vars, seqs, and lisp macros all of which may make Clojure a more appealing alternative to Java for use with Terracotta. My goal was to get Clojure working with Terracotta, period. Most of the work I did was actually focused on vars so that you could define a function and h

Re: Congomongo question - how to update all records?

2010-07-21 Thread Meikel Brandmeyer
Hi, > > So, is there some sort of recipe for updating all records without > > first loading them all into memory? Maybe you can first do your doall but only retrieve the ids. Then later on you can retrieve the entry by id and update it. Something like this: (defn update-db! [] (doseq [id (do

Re: Congomongo question - how to update all records?

2010-07-21 Thread Mark Engelberg
So does no one here use congomongo? On Sat, Jul 10, 2010 at 1:17 PM, Mark Engelberg wrote: > Let's say I have a table called :table, and a column called :col, and > I want to go through all the records in the table and set the :col > value to 0.  I had been doing it like this: > (defn update-db!