On Sep 16, 12:32 am, Timothy Pratley <timothyprat...@gmail.com> wrote:
> I ran program #1 and #2 on Clojure 1.1.0-alpha-SNAPSHOT from git
> -> program #1 output skew
> -> program #2 no output
>
> What version are you using? Could be something that's been fixed
> recently.

I was running a fairly recent, but not the latest version of Clojure.
I've upgraded to the latest from Git, and I now get the same output as
you: I am unable to produce a write-skew in program 2, the "ensure
version".

Another interesting thing happened. I wrote another program using ref
validators only.

http://paste.lisp.org/display/87117#4

That program does produce write-skews. Further, occasionally the
program never terminates! I did (run 100) a few times on my core 2
duo, and the program just looped.

So a few follow-up questions:

* are validators not meat to be used cross ref? I.e. validating a
constraint across multiple refs.

* if they are, why does http://paste.lisp.org/display/87117#4 produce
a write skew? Am I using them incorrectly?

* if they are, when should I use ensure and when should I use a
validator?

Thanks!
/Karl
--~--~---------~--~----~------------~-------~--~----~
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to