develooper Front page | perl.perl6.announce | Postings from August 2002

Perl 6 Summary for week ending 2002-08-18

From:
Piers Cawley
Date:
August 19, 2002 16:22
Subject:
Perl 6 Summary for week ending 2002-08-18
Message ID:
8465y6mtjl.fsf@despairon.bofh.org.uk
Somewhat late, but here you all go.

Perl6 Summary for the week ending 20020818
    The story so far... Larry, Tom, Randal, Damian, Jon, Chip, Gnat, Uri,
    Ziggy, Dick and the rest of the gang were chatting with all the other
    cool Perl kids about where Perl was and should be going. Then Jon threw
    a coffee cup and the rest is history...

    So, as is now traditional, we'll kick off with the goings on in
    perl6-internals. Confused? You will be after this week's summary.

  Scratchpad.pmc
    Jonathan Sillito harrassed Dan about subroutines, continuations and and
    other things to do with function calls. He wondered if his
    "scratchpad.pmc" patch fitted what Dan had in mind, and added a few
    supplementary questions. Dan answered the supplementary questions and
    apologised for not having done the docs on this bit of the design,
    saying he'd try and get it out by the end of the week. Melvin Smith
    (whose code was involved in some of the questions) also gave some
    answers.

<http://groups.google.com/groups?threadm=1029179400.8276.37.camel%40localhost.localdomain> -- Questions

<http://groups.google.com/groups?threadm=a05111b14b97e57d7b23d%40%5B63.120.19.221%5D> -- Answers.

<http://groups.google.com/groups?threadm=5.1.0.14.2.20020812225655.030231f0%40pop.mindspring.com> -- More answers

  Perl 6 regexes...
    Last week Dan threw down the 'full perl 6 regex engine' gauntlet, and
    this week Sean "Hero" O'Rourke admitted that he was working on it and
    that he already had a good chunk of it working. Apparently hypothetical
    variables and the various cut operators are looking a little tricky. Dan
    was impressed. Simon told us that, when he said he'd written a Perl 6
    regex parser before breakfast at YAPC, he hadn't been joking, and that
    he'd put it up in his CVS if people want to poke at it. But the crowd
    was strangely silent.

    Steve Fink also had some questions to ask about the regex engine.

<http://groups.google.com/groups?threadm=a05111b05b97cecb019c0%40%5B63.120.19.221%5D>

<http://groups.google.com/groups?threadm=Pine.GSO.4.32.0208112148510.13607-100000%40gradlab.ucsd.edu>

<http://groups.google.com/groups?threadm=86eld4pj4y.fsf%40squash.oucs.ox.ac.uk>

<http://groups.google.com/groups?threadm=20020815204744.GB6028%40foxglove.digital-integrity.com>

  [COMMIT] GC_DEBUG, Some GC Fixes, and Remaining GC Bugs
    Mike Lambert has re-added the GC_DEBUG define. The idea behind this is
    to allow `various limits and settings and logic to be setup such that GC
    bugs occur relatively soon after the offending code.' and generally to
    let you write relatively simple code that will trip the kind of bugs
    that are normally only seen when running complex code. Mike also listed
    the areas where he knows there are still problems.

    Various people have had problems using GC_DEBUG, including at least one
    instance where "<end"> threw a segfault, but it also drew a flurry of
    patches from Jason Gloudon and Steve Fink. Much of the discussion in
    this thread was rather more technical than I have the skills to
    summarize, so I'll just point you at the root node.

<http://groups.google.com/groups?threadm=Pine.LNX.4.44.0208120349360.9252-100000%40jall.org>

  [PATCH] quotematch speedup
    Joseph Ryan did some regex optimization in assemble.pl to speed up the
    matching of strings. For some reason, this kicked off the longest thread
    of the week, about the merits of optimizing a pure perl assembler when
    we should really do it in C if we "really" wanted speed. Or maybe we
    should implement the assembler in Parrot proper. And wouldn't it be cool
    if we could write self modifying code in Parrot (needed for eval, Dan's
    working on a design). Juergen Boemmels spotted that the patch didn't
    quite work as promised and provided a better version, but I don't think
    it's been applied.

    <http://rt.perl.org/rt2/Ticket/Display.html?id=16144>

  Keyed access to PerlArray/PerlHash
    Tom Hughes wondered about the semantics of indexing PerlArrays with
    strings and PerlHashes with integers. He and Dan discussed it back and
    forth for a while, and then Tom posted a patch, which Dan liked the look
    of, but held off on applying while everyone else had a good look. Mike
    Lambert had a look and raised some issues, which Tom addressed and
    issued another, enormous patch.

<http://groups.google.com/groups?threadm=4cdafa644b.tom%40compton.compton.nu>

    <http://rt.perl.org/rt2/Ticket/Display.html?id=16274>

<http://groups.google.com/groups?threadm=b9a604684b.tom%40compton.compton.nu>

  [PASM] problem opening / reading file
    Jerome Quelin has been having some problems with file I/O under parrot
    0.0.7. The consensus seems to be that the current Parrot I/O system is,
    ahem, not as good as it could be, mostly because people have had other
    priorities. Dan asked for a volunteer to help `get I/O off of Melvin's
    altogether too-full plate before his wife hunts [Dan] down and does
    nasty things'. Clinton Pierce seems to have stepped up to handle part of
    what Dan wants. Well done that man.

<http://groups.google.com/groups?threadm=3D49FF79003D8FCF%40mel-rta8.wanadoo.fr>

<http://groups.google.com/groups?threadm=a05111b12b97e572a89b7%40%5B63.120.19.221%5D>

  set Boolean to 2
    Leopold Toetsch found something confusing in the perl 6 compiler which
    ends up generating some unexpected byte code. Peter Gibbs reckoned that
    the generated code was right, but Leopold still sounds unconvinced.

    <http://groups.google.com/groups?threadm=3D5BB5DE.3080109%40toetsch.at>

  [INFO] The first pirate parrot takes to the air
    Peter Gibbs chucked a cat in amongst the parrots when he posted some
    performance numbers for his own private `African Grey' version of Parrot
    which utilizes some GC speed up techniques that Dan had rejected.
    Peter's numbers are impressive, but the techniques used break in some
    places. Peter helpfully posted pointers to his original patches. Dan
    wondered which bits contributed what to the improved performance, and
    explained why he had problems with the approaches that Peter was using.

    This thread also spawned the thread called `Stack Walk Speedups?' which
    was kicked off by Mike Lambert outlining the current workings of the
    GC's stack walking code and wondered if anyone could come up with a
    faster way of doing it (that worked in the face of the constraints on
    Parrot's GC.) Peter Gibbs offered one approach, and Jason Gloudon
    pointed out that his 'stack direction' config patch would help in this
    area too. Jason also offered a patch giving a 12% speedup on his
    machine, which was applied. Mike Lambert is also doing some cunning
    stuff to improve things using Copy On Write (COW) tricks.

<http://groups.google.com/groups?threadm=018501c24533%242c672100%240b01010a%40emkel.co.za>

<http://groups.google.com/groups?threadm=000f01c2453d%24dec0e3e0%240b01010a%40emkel.co.za>

<http://groups.google.com/groups?threadm=a05111b06b9832757422a%40%5B63.120.19.221%5D>

<http://groups.google.com/groups?threadm=Pine.LNX.4.44.0208171342480.12965-100000%40jall.org>

    <http://rt.perl.org/rt2/Ticket/Display.html?id=16278>

  [DRAFT PDD] External Data Interfaces
    Brent Dax donned his Technical Author hat, and offered a draft PDD
    (Parrot Design Document) covering Parrot's external data interfaces.
    Nicholas Clark offered a pile of constructive criticism and discussion
    is ongoing.

<http://groups.google.com/groups?threadm=00b201c24641%249c7a3b30%246501a8c0%40deepblue>

Meanwhile, over in perl6-language
    The strangely named `Autovivi' thread rolled on. Miko O'Sullivan asked
    Larry for some clarification about the default behaviour of
    pass-by-values, Larry wasn't sure because he hasn't worked out the
    syntax yet. Luke Palmer suggested that copy-on-write tricks could be
    used to do let us have our cake and eat it. Deven Corzine suggested
    defaulting to doing pass-by-value, but Larry suspects that that might
    make Perl 6 sub calls even slower than perl 5's. David Whipp wondered
    about threading; nobody replied.

    Deven managed to drag the thread back to its nominal subject of
    Autovivification when he wondered if "<func($x{1}{2}{3})"> would cause
    an implementation headache. Larry explained that it was cases like this
    that made him choose the 'pass by immutable reference', attempting to
    give the speed of pass by reference combined with the guarantees of pass
    by value. Deven pressed his point and wondered what would happen in the
    "is rw" case. Nicholas Clark explained how Perl 5 avoids
    autovivification in this case (but it's only one level deep). Uri
    Guttman pointed out that this is a 'Hard Problem', but Leopold Toetsch
    thought that the Parrot KEY operators may make it relatively easy to
    solve.

<http://groups.google.com/groups?threadm=191690-220028213182451277%40M2W058.mail2web.com>

<http://groups.google.com/groups?threadm=Pine.LNX.4.33.0208130905580.5405-100000%40escher.ties.org>

  A Perl 6 class question
    Last week, Chris Dutton had asked about using Perl 6 to create anonymous
    classes, and proposed a syntax. This week, Allison Randal pointed him at
    the section of Exegesis 4 which described how to do exactly that. Rather
    satisfyingly, the syntax that Chris had invented was exactly the syntax
    used in the Exegesis, so the choice appears to be natural. Trey Harris
    wondered about some of the other clumsinesses in Perl 5 when defining
    classes, and asked some questions about class methods. Damian confirmed
    that most of the clumsiness was going away, and clarified the behaviour
    of "sub"s in a class definition.

<http://groups.google.com/groups?threadm=20020812154423.GA972%40shadowed.net>

  Just reading up on Pike...
    Chris Dutton has been reading up on Pike, and had some observations
    (whilst neglecting to explain what Pike *is*). Apparently pike allows
    you to define combination types "<private string|int bar"> would mean
    that "<bar"> could be a string or an int for instance. Damian wheeled
    out his superpositions hobby horse and suggested "<my any(str,int)
    $bar">, as a way of doing this. Luke Palmer trumped that with "<my
    all(str,int) $foo"> and wondered what such a construct would actually
    *mean*. Damian suggested that it meant Luke needed some serious therapy.
    Nicholas Clark got all boring and practical and wondered how one would
    implement the "any" case. Damian reckons it'd just fall out of the
    implementation of superpositions.

    Somewhere in the thread, Andy Wardley asked a serious question about
    what builtin types perl 6 would had, and what the results of "ref $foo"
    would look like.

<http://groups.google.com/groups?threadm=F2A145AA-B0DA-11D6-9C86-0005020F8EB9%40mac.com>

<http://groups.google.com/groups?threadm=20020818111411.B27478%40dog.ourshack.com>

  Balanced Matches in Regexps?
    Peter Behroozi wondered about using Apocalypse 5 rules to capture
    balanced and wondered if there shouldn't be a "<balanced>" directive.
    Brent Dax pointed Peter at the cunning recursion capabilities that come
    with Apocalypse 5:

      rule parenthesized { \( ( <-[()]>+ | <parenthesized> )* \) }

    Larry commented that he was considering a builtin "<self>" rule that'd
    allow one to refer to the current rule without having to name it. Peter
    then offered his first attempt at a recursive rule to capture nested
    HTML tables.

<http://groups.google.com/groups?threadm=1029603552.1752.58.camel%40dhcppc3>

In brief
    Simon Cozens told us that optimizing something that's only a prototype
    is 'intellectual masturbation'. Personally I'm not sure what's *wrong*
    with masturbation, but that's probably outside the scope of this
    summary.

    Nicholas Clark patched "assemble.pl" so that it could complete its run
    before the heat death of the universe when run under perl 5.005_03.

    Jeff Goff is back and doing cool things with Ruby in parrot.

    Jerome Quelin asked what was wanted in a patch. Consensus seems to be
    either a unified or a context diff, as a mime attachment with a name for
    the patch and a short description of what it does. Tests are always good
    (essential) if you're adding new functionality. So are docs.

    Jerome also offered a patch which implemented a "rand" operator but
    wondered about portability and when to call "srand". Jeff Goff wondered
    if we shouldn't implement our own 'rand' using, say, the Mersenne
    Twister
    (<http://www-personal.engin.umich.edu/~wagnerr/MersenneTwister.html>)
    and Dan pointed out where srand should be called.

    Josef Höök reworked his multidimensional arrays patch one more time and
    *it got applied.* Well done Josef, perseverance pays off in the end.

    Jason Gloudon added a config patch which tests the direction of stack
    growth. Applied.

    Leopold Toetsch wondered why assembler.pl uses its own "PMC.pm" instead
    of the generated "lib/Parrot/PMC.pm". Warnock's Dilemma applies.

    Pete Sergeant has written a `quick and dirty' PASM tokenizer and a
    syntax highlighter based on it.

    Jarkko continues his sterling work of squashing Tru64 compiler warnings.

    Steve Fink has had a crack at adding a "--debugging" flag to
    "Configure.pl". Warnock applies.

    Jerome Quelin won my 'making it easy to keep a running joke going' prize
    when he supplied a Befunge-93 interpreter in parrot, and commented:
    "Note to Leon Brocard: There's a lot more to do in order to provide a
    Befunge-98 compliant interpreter, so don't worry! There's still a lot of
    fun waiting... :o)". Which was very good of him. Thanks Jerome.

    The rule/pattern/regex thing kept going. Damian explained that he'd try
    and use `pattern' for the contents and `rule' for the container. But we
    that we weren't to hold him to that.

    Brent Dax has uploaded a new version of Perl6::Parameters to CPAN. It's
    his attempt allowing one to declare perl 5 subroutines in a Perl 6ish
    style.

Who's who in Perl 6
    Who are you?
        Daniel Alejandro Grunblatt, 21 years university student from
        Argentina.

    What do you do for/with Perl 6?
        I'm mostly doing the JIT for Parrot but occasionally move on to
        another fields (like the Parrot Compiler in Parrot or the Parrot
        Debugger and others).

    Where are you coming from?
        My mother.

    When do you think Perl 6 will be released?
        Some day.

    Why are you doing this?
        I started working on the JIT to learn assembly, and I'm still
        learning it (yes, I'm slow), I want to see Parrot running fast, and
        because it's fun.

    You have 5 words. Describe yourself.
        I like playing basketball, what I haven't done for while now, and
        used to like playing role games.

    Do you have anything to declare?
        No.

Acknowledgements and the funding drive.
    This summary was prepared with the aid of more GNER tea (on the down
    train today). Sadly the GNER ham and cheese toasted sandwich has
    declined; they've replaced the cheddar in the old version with
    Wensleydale, which really doesn't melt as well.

    Because I'm a bit late this week I've not had time to get the estimable
    Pete Sergeant to proofread it for me, so if the spelling is worse and
    the language less coherent this week, just be grateful for Pete's
    sterling work on my earlier summaries.

    Again, if your name appears in this, or any previous summary, and you've
    still not sent your answers, please consider answering the questions in
    the "Perl 6 Who's who?" section and sending your answers to
    5Ws@bofh.org.uk.

    Well, so far nobody dislikes my summaries enough to post an alternative.
    Which is nice. If you think my time writing this is worth anything don't
    give me money, give it to the Perl Foundation
    <http://donate.perl-foundation.org> and help support the ongoing
    development of Perl. Remember, suitably large donations will earn you a
    plug in a future summary, but only if you tell me about it.


-- 
Piers

   "It is a truth universally acknowledged that a language in
    possession of a rich syntax must be in need of a rewrite."
         -- Jane Austen?



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About