At nothingmuch's request, I changed all IORef and HashTable in Pugs to use TVar, a STM-powered, concurrency-safe, deadlock-free storage. For people who were not following along, here is a presentation and paper about STM as used in GHC.
This means that all our variable access are automatically atomic -- i.e. there can never be corrupted pads when pads are shared among multiple async blocks.  By nothingmuch and my benchmarking, there is no visible performance loss.
In other news, I eliminated the troublesome mutual module recursion, to pave a way for a new EvalT monad transformer that can expose atomic {} to Perl 6 level.  The idea is that this should work:
    my ($x, $y) = (1, 2);
    async { atomic { $x = $y * 10; $y = $x * 10 } };
    async { atomic { $x = $y * 10; $y = $x * 10 } };
    async { atomic { $x = $y * 10; $y = $x * 10 } };
    atomic { $x = $y * 10; $y = $x * 10 };
    say "$x, $y"; # always "20000000, 200000000"
But this should throw a catchable exception:
    # die "Can't perform IO inside atomic {} block"
    atomic { say "Hello, World!" };
I'm having some problems in modeling the neccessary MonadCont continuation semantic, so atomic is not exposed right now.  However, as a happy side effect, the elimination of mutual recursion has improved performance by another 15% or so.  Yay for a fast Pugs!
There are many other notable changes today as well:
VOpaque value type, to encapsuate any other types into an opaque reference.  The upshot is that we should be able to manipulate arbitary Haskell types (and by extension, C types) as Pugs objects soon.
eval_is and eval_ok, then proceeds to implement .wrap. Juerd, I and nothingmuch all agreed that the current semantics in S06 (based on Hook::LexWrap) is very awkward, and conflicts with how .assuming behaves; we worked out a much more perlish semantics, and nothingmuch proceeded to implement it.
FIRST; his work may also provide a more generic trait system for other structures to use.
BEGIN {...} block tests, and more.
Makefile.PL, so the interactive shell should be usable for people who needs the -package readline flag.
pick's behaviour on one junctions: one(1).pick should return 1, but one(1,1).pick should be undef.
run-smoke.pl
Re:Um, can you fix the URLs?
autrijus on 2005-05-03T13:17:33
Why, sure, fixed, thanks!