Re: The Perl 6 Summary

2003-08-18 Thread Bryan Donlan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Monday 18 August 2003 10:29 am, Piers Cawley wrote:
   Packfile fun
 So long assemble.pl, it's been good to know you.

 http://xrl.us/puu

Google gives me an error on this:

Unable to find thread. Please recheck the URL.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/QT2Xx533NjVSos4RAh0IAKCl0G9i1qfOKk1/ex98afUhIv96qgCbB4DL
Rg56ptBwVdgylGCwhQO2HVI=
=Jk9W
-END PGP SIGNATURE-



The Perl 6 Summary

2003-08-18 Thread Piers Cawley
Perl 6 Summary for the week ending 20030817
Picture, if you will, a sunny garden unaffected by power cuts, floods,
plagues of frog or any of the other troubles that assail us in this
modern world. Picture, if you will, your summarizer sat in this garden
with a laptop on his knee, cursing the inability of LCD display
manufacturers to make displays that are legible in sunlight. Picture
your summarizer returning to the comfortable chair in the shade of his
book room casting around for a witty and original way to open another
Perl 6 summary. Picture him giving up and starting to type. Here's what
he writes:

We start, as usual, with the the internals list.

  Tail call optimization
Leo Tötsch has started to work on getting IMCC to detect tail calls and
optimize them to either a simple jump or an invoke. If you're not sure
what tail call optimization is I can recommend Dan's What the heck is a
tail call? article on the subject.

http://xrl.us/pun

http://xrl.us/puo -- What the heck?

  Leo's QUERIES from last week
Last week, Leo bundled up a bunch of outstanding questions for Dan, and
Dan answered them. Benjamin Goldberg queried Dan's answer about
find_method, which, if I'm reading things correctly is currently
implemented in the interpreter. Benjamin argued (convincingly I thought)
that, although the method hashes needed to be stored in the interpreter
structure, find_method should be implemented on default.pmc,
allowing for different classes/languages to override its behaviour.

http://xrl.us/pup

  Why ~ for xor?
Michal Wallace wanted to know why ~ maps to both unary bitwise-not and
binary bitwise-xor in IMCC; he expected xor to be ^ and ^^. Leo
explained that it was, at one point at least, the way Perl 6 did it but
that he'd stopped keeping up with the developments in perl6-language. He
noted that, if the Perl 6 operator had been settled, then IMCC should
use that. A quick skim of my copy of *Perl 6 Essentials* tells me that
Perl 6 now uses +, +| and +^ for bitwise and/or/xor, with ~,
~|, ~^ for stringwise and/or/xor.

http://xrl.us/puq

http://xrl.us/pur -- My review of *Perl 6 Essentials*

  Raising Hell
Michal Wallace's Py-Pirate project continues to exercise the edges of
Parrot as he implements more and more of Python's semantics. This time
he needed to know about raising (and catching) exceptions. In particular
he wanted to be able to catch an exception when find_lex failed to
find an appropriately named variable. (Currently, a find_lex failure
doesn't raise an exception, it just kills Parrot). Jos Visser told him
that there were plans to have find_lex throw a real, catchable
exception, or maybe just return undef. See last week's summary for a
pointer to that discussion.

http://xrl.us/pus

  Pirate status and help with instances
Michal Wallace announced that he had just finished an all night coding
spree and that Py-pirate could now handle:

*   functions (closures, recursion, etc)

*   Global variables

*   tuples (but they turn into lists)

*   dictionaries (create, setitem, getitem, print)

*   list comprehensions

*   raise (strings only)

*   try...except (partial)

*   try...finally

*   assert

(At this point, I think we should all pause for moment of wild
applause).

However, he was having a few problems with instantiating objects of a
class. (For those who don't know, Python instances are created by
calling the Class as if it were a function). Leo Tötsch noted that
almost nothing would work, since Parrot's classes and objects weren't
actually finished yet. He agreed with others in the thread who reckoned
that Python classes could be made to work by subclassing the standard
class.pmc to allow it to respond to an invoke by by creating a new
instance. Easy! Michal muttered something about faking classes with
closures but I don't think he went through with it.

http://xrl.us/put

  Packfile fun
So long assemble.pl, it's been good to know you.

http://xrl.us/puu

  Approaching m4
Leon Brocard, Sean O'Rourke and James Michael DuPont looked on in awe as
Bernhard Schmalhofer announced that he'd been working on implementing m4
in Parrot. According to Sean, the implications are staggering... Sure,
plenty of compilers can bootstrap themselves, but how many can generate
their own configure scripts via autoconf? With p4rrot, we may live to
see this dream.

One does worry about Sean's dream life.

http://xrl.us/puv

  Call and return conventions
TOGoS has been thinking about the workings of the Parrot calling
conventions. He wondered if there was a case for making calling and
returning look exactly the same, allowing for cunning stunts with fake
continuations in P1. Luke Palmer really 

Re: The Perl 6 Summary

2003-08-18 Thread Melvin Smith
Piers,

Regarding your Perl6 Essentials summary:

Or, he can write code for IMCC using Parrot Intermediate Language (known 
as PIR for reasons that aren't entirely clear even to one who has been 
watching the mailing list since the Parrot project started)

I suppose noone has much read the README in languages/imcc

PIR is what I named the IMCC language and you are correct in your quote, 
but I've frequently seen people wondering where the
name came from. It isn't really an overlay, it is a compiler with an 
optimizer and register allocator which just happens to emit PASM.
If you have Steven Muchnicks book (spelling?) you will notice it is common 
to name intermediate languages as something with IR in it (MIR, LIR, HIR).
Hope that answers your trivia.

I suppose I could have provided some more explanation (I haven't read the 
book  yet) but as the original author of IMCC  PIR,
I wasn't even contacted out of courtesy to write the chapter and was 
informed after the book was finished. :/

This has been a major stumbling block for me in getting back the 
motivation to help with Parrot again.

-Melvin


Re: The Perl 6 Summary

2003-08-18 Thread Uri Guttman
 MS == Melvin Smith [EMAIL PROTECTED] writes:

  MS I suppose I could have provided some more explanation (I haven't
  MS read the book yet) but as the original author of IMCC  PIR, I
  MS wasn't even contacted out of courtesy to write the chapter and was
  MS informed after the book was finished. :/

  MS This has been a major stumbling block for me in getting back the 
  MS motivation to help with Parrot again.

even though it is not my place as i had nothing to do with the book, i
want to apologize for all for the oversight and slight. my impression is
that the book authors didn't consult with many of the parrot/p6 people
since it would have slowed down writing and production and they were on
a very tight schedule. AFAIK others who should have been co-authors or
should have been consulted were bypassed as you were. and note that it
was o'reilly's decision on how they did the book and they are not
parrot.

so if that helps salve your wound, i am sure you contributions (past and
future) to parrot are welcomed and appreciated by the parrot community
(pretty much those on these lists)

thanx,.

uri

-- 
Uri Guttman  --  [EMAIL PROTECTED]   http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs    http://jobs.perl.org


Re: The Perl 6 Summary

2003-08-18 Thread Robin Berjon
Uri Guttman wrote:
MS == Melvin Smith [EMAIL PROTECTED] writes:
  MS This has been a major stumbling block for me in getting back the 
  MS motivation to help with Parrot again.

so if that helps salve your wound, i am sure you contributions (past and
future) to parrot are welcomed and appreciated by the parrot community
(pretty much those on these lists)
I second that. The imperatives of book production are mercantile, and have 
nothing to do with one's excellent participation in an Open Source effort, 
irrespective of the quality that a given editor may normally have.

I'm certain that when a more definitive book is started, there will be much more 
time to ask all the interesting people for input. Please don't lose your 
motivation :)

--
Robin Berjon [EMAIL PROTECTED]
Research Engineer, Expwayhttp://expway.fr/
7FC0 6F5F D864 EFB8 08CE  8E74 58E6 D5DB 4889 2488


Re: The Perl 6 Summary

2003-08-18 Thread Piers Cawley
Robin Berjon [EMAIL PROTECTED] writes:

 Uri Guttman wrote:
MS == Melvin Smith [EMAIL PROTECTED] writes:
   MS This has been a major stumbling block for me in getting back
 the   MS motivation to help with Parrot again.
 so if that helps salve your wound, i am sure you contributions (past
 and
 future) to parrot are welcomed and appreciated by the parrot community
 (pretty much those on these lists)

 I second that. The imperatives of book production are mercantile, and
 have nothing to do with one's excellent participation in an Open
 Source effort, irrespective of the quality that a given editor may
 normally have.

 I'm certain that when a more definitive book is started, there will be
 much more time to ask all the interesting people for input. Please
 don't lose your motivation :)

Speaking of books. I keep mulling over the idea of attempting to
write a 'Soul of a New Machine' type book for Parrot and Perl 6...