« All tests pass! | Main | Parrot and Perl5 Embedding Repaired. »



Feed You can follow this conversation by subscribing to the comment feed for this post.


Stick this stuff in the database! orElse!!

is the above code "spec" perl6? is this limited to haskell? is it possible for this to manifest itself in the parrot support for perl6?

in any case, wow, over my head, but looks very cool.

grumpY: The "atomically" syntax is not specced down yet, but STM is likely to be part of Perl 6's concurrency model. And yes, one of the summer-of-code projects of perl.org this year is adding this support to Parrot.

Golly, I've barey even played with the non-haskell parts of pugs and not to any useful degree, but this fills my tummy with butterflies.

Interesting to see STM creeping in to Perl6. I'd like to know how Perl6 would prevent 'unsafe' IO taking place inside atomically blocks... but certainly looking forward to orElse and retry. =)

I do have reservations on how assert is implemented though -- it feels rather hacky in comparison with the rest of STM. (c.f. the original Haskell/STM paper, Composable Memory Transactions.) Haven't sat down long enough to work out the details of the alternative I'm thinking of...

Liyang: Pugs prevents IO taking place by unifying IO and STM into the SIO monad, so any use of IO inside an atomic{} block is an exception. :-)

$ ./pugs -e 'atomically { say 1 }'
*** Unsafe IO caught in STM
at -e line 1, column 1-21

Hi Audrey,

Do you have anything written down about how STM works in Perl6? How closely does it follow the GHC implementation?

Also, what kinds of guarantees do you offer? Does the type system of Pugs mean that anything weaker or stronger is offered as compared with GHC?

I'd be interested to know, if any of this information has been abstracted from the implementation itself.


The comments to this entry are closed.

December 2015

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31