Re: STM in Clojure vs Haskell, why no retry or orElse?

2013-02-19 Thread Mark Engelberg
On Mon, Feb 18, 2013 at 1:41 PM, Tom Hall wrote: > I think it's a shame he wrote the article around Christmas and chose a > less well known problem, I have looked at several Clojure Barbershop > Problem solutions so have a better idea now what an idiomatic solution > to this sort of problem might

Re: STM in Clojure vs Haskell, why no retry or orElse?

2013-02-19 Thread Ben Wolfson
On Tue, Feb 19, 2013 at 2:28 AM, Philip Potter wrote: > > They sound like very interesting features. They also sound lower-level > than Clojure's STM -- if a Clojure STM transaction fails, it will > automatically retry until it succeeds (or hits > LockingTransaction/RETRY_LIMIT, currently 1, w

Re: STM in Clojure vs Haskell, why no retry or orElse?

2013-02-19 Thread Philip Potter
On 18 February 2013 21:41, Tom Hall wrote: >>> Why does Clojure not need retry or orElse when another implementer of >>> STM considers them essential? >> What are retry and orElse? What do they do? > > I had hoped to get a reply from someone with experience of both, as > the quote suggests they ar

Re: STM in Clojure vs Haskell, why no retry or orElse?

2013-02-18 Thread Tom Hall
>> Why does Clojure not need retry or orElse when another implementer of >> STM considers them essential? > What are retry and orElse? What do they do? I had hoped to get a reply from someone with experience of both, as the quote suggests they are for blocking and choice (The article was the first

Re: STM in Clojure vs Haskell, why no retry or orElse?

2013-02-18 Thread Philip Potter
On 18 February 2013 12:30, Tom Hall wrote: > OK, I guess the essence is: > Why does Clojure not need retry or orElse when another implementer of > STM considers them essential? What are retry and orElse? What do they do? > I'm guessing it's because clojures in MVCC but would like confirmation >

Re: STM in Clojure vs Haskell, why no retry or orElse?

2013-02-18 Thread Tom Hall
OK, I guess the essence is: Why does Clojure not need retry or orElse when another implementer of STM considers them essential? I'm guessing it's because clojures in MVCC but would like confirmation and perhaps links to comparisons between STMs and maybe a guide to Clojures. How would you solve th

Re: STM in Clojure vs Haskell, why no retry or orElse?

2013-02-16 Thread vemv
You can increase the chances of generating discussion by boiling down both the relevant content of paper and your program to a minimal, self-contained form. Cheers - Victor On Friday, February 15, 2013 4:05:09 PM UTC+1, thattommyhall wrote: > > A few months ago I reread Simon Peyton Joneses art

STM in Clojure vs Haskell, why no retry or orElse?

2013-02-15 Thread Tom Hall
A few months ago I reread Simon Peyton Joneses article on STM in the Beautiful Code book and decided to try and translate it into clojures STM See the paper here http://research.microsoft.com/pubs/74063/beautiful.pdf He says 'Atomic blocks as we have introduced them so far are utterly inadequate