random dreaming

4 views
Skip to first unread message

Raoul Duke

unread,
Nov 20, 2009, 6:58:24 PM11/20/09
to CAL Language Discussion
i wish there were the resources available on earth to somehow get the
clojure stm working in/with/under cal (and scala ;-).

Tom Davies

unread,
Nov 21, 2009, 5:26:08 AM11/21/09
to CAL Language Discussion


On Nov 21, 10:58 am, Raoul Duke <rao...@gmail.com> wrote:
> i wish there were the resources available on earth to somehow get the
> clojure stm working in/with/under cal (and scala ;-).

Hi Raoul,

I don't think that's too hard -- I have written my own STM for CAL,
and while I suspect that mine was not nearly as performant as
Clojure's, it seemed to be correct -- I implemented the Santa problem
from Beautiful Code and a bunch of other small programs. I hadn't come
across Clojure at the time, so I didn't try that 'ants' example. I
even persisted committed changes to TVars to a BDB database.

My algorithm had a higher isolation level and locked a lot more (only
one commit in progress at a time, for instance).

I've had a look at Clojure's STM, and it's pretty simple (except for
the bits I can't understand :-). Clojure of course has a richer/
different STM interface than Haskell -- with commutative operations
and actors, for instance. I think you could plug a hacked version of
Clojure's STM into CAL in a few days, ending up with Haskell-style
operations but Clojure's MVCC.

Doesn't Scala already have STM? How good is the implementation, and
how does it compare to Clojure and Haskell?

Tom

Raoul Duke

unread,
Nov 23, 2009, 1:30:27 PM11/23/09
to cal_la...@googlegroups.com
> Doesn't Scala already have STM? How good is the implementation, and
> how does it compare to Clojure and Haskell?

i think there are a few "competing" stms for scala, and nothing that
is yet a de-facto standard there.

sincerely.

Tom Davies

unread,
Nov 23, 2009, 9:28:25 PM11/23/09
to CAL Language Discussion
This looks like an interesting STM implementation:
http://code.google.com/p/multiverse/wiki/Features and would be easier
to integrate with CAL than Clojure's STM would be.
Reply all
Reply to author
Forward
0 new messages