I really, really like this feature. My only complaint is that you have to
use different names for the modifying functions. If the function signatures
will be identical to their non-transient variants, then I guess the primary
arguments would be:
* Clojure convention for names of functions with sid
This won't work unfortunately, because it means that the in-memory transaction
has already commited before the disk write is performed by the agent. If the
application crashed at that point, your write was not durable.
-- Sent from my Palm Pre
ataggart wrote:
On Jun 20, 4:59 pm, Rowdy Rednos
Hey gang,
Metadata support for pure Java objects is not currently supported, because
it requires a modification to the object. Additionally, only some Clojure
objects support metadata, due to the necessity of implementing the IMeta
interface. This can be confusing for new users, and eliminates som
I agree. I think the "breaking into modules" approach is the only scalable
solution.
Someone else mentioned that clojure-contrib is/shouldbe an incubating area
for core, which seems reasonable. There should be a little more pushback
when a project wants to make it into contrib, and it should alrea
Yea, that would work. I don't think the (fn) should be defined anonymously
though, because I could see it being useful on its own. Give it a name!
Thanks,
Stu
On Mon, Mar 16, 2009 at 6:53 PM, Brian Doyle wrote:
>
>
> On Mon, Mar 16, 2009 at 4:21 PM, Stu Hood wrote:
>
>>
If you write your CSV -> XML processing as a function, you could pmap (
http://clojure.org/api#pmap) that function across the list of input files.
pmap will transparently create the threads as needed, and it will probably
be enough to saturate your disk.
Thanks,
Stu
On Mon, Mar 16, 2009 at 5:56
There is a interface 'Counted' that a lot of Clojure data structures
implement to indicate that they provide O(1) for (count).
Thanks,
Stu
On Fri, Mar 13, 2009 at 4:59 AM, Christophe Grand wrote:
>
> Christian Vest Hansen a écrit :
> > I think that count is O(n) for lists, no?
> >
>
> Count is O
Rich has done a lot of work to make sure that when you are working with
primitives, the JVM bytecode ends up being very similar to what Java would
generate. See http://clojure.org/java_interop#toc36
Thanks,
Stu
On Thu, Mar 12, 2009 at 6:20 PM, Howard Lewis Ship wrote:
>
> Well, at some point I'
Laziness hit home for me in Clojure when I noticed that one of our Java
library functions, looking for a Collection, had happily accepted a Clojure
(map ...) object which was going to expand a small set of integers into much
larger objects. Because Clojure deferred the work, they were only generate
> but apply works very well for this use case: (apply < (range 10))
> and it stops as soon as it can:
Alright, I fold... thanks for clearing things up Christophe!
On Tue, Feb 3, 2009 at 3:13 PM, Christophe Grand wrote:
>
> Stu Hood a écrit :
> > I still think the
> >
> This is a common misconception: passing a seq to apply doesn't force its
> evaluation.
Ahh, is this because the [& more] portion is itself a lazy sequence? That's
very cool =)
Hmm, the (reduce + ...) approach works just fine, but if it is already
implemented as reduce, it seems like it would be
ding :)
>
> On Fri, Jan 16, 2009 at 4:21 AM, Stu Hood wrote:
>>> Ah! but a mere hash table is not bi-directional :-)
>> Right =) I got the idea in a Channel 9 video about MS' efforts with STM:
>> http://channel9.msdn.com/shows/Going+Deep/Software-Transactional-Memory-
You do that.
-another Stuart
On Thu, Jan 15, 2009 at 10:32 PM, Stuart Sierra wrote:
>
> I was afraid that would happen. I'll fix it, probably tomorrow.
> -the other Stuart
>
> On Jan 15, 6:27 pm, Stuart Halloway wrote:
> > The improved error reposting in test-is breaks some tests, e.g. from
>
> Ah! but a mere hash table is not bi-directional :-)
Right =) I got the idea in a Channel 9 video about MS' efforts with STM:
http://channel9.msdn.com/shows/Going+Deep/Software-Transactional-Memory-The-Current-State-of-the-Art/(which
reminds me, the spin-lock approach they try is probably fairly
14 matches
Mail list logo