Re: WRT *BooleanArray

2006-02-20 Thread Matt Fowles
Leo~

On 2/20/06, Leopold Toetsch [EMAIL PROTECTED] wrote:
 *) the resizable variant is heavily borked WRT allocation size
 fixes welcome

 *) I don't think that *BooleanArray should support:

set P0[0], 3.2
set P0[1], foo
set P0[2], P1

 nor

set N0, P[0]
...

 et al. I think, if you use a BooleanArray with compact storage you are
 knowing why and don't need automatic conversion to/from float, string,
 nor PMC.

 What do you think?

I agree that you don't need string.  PMC you probably want, since
there are boolean PMCs and what not.  Float I am not sure of.

Matt
--
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Re: svn performance

2006-02-17 Thread Matt Fowles
Andy~

On 2/17/06, Andy Dougherty [EMAIL PROTECTED] wrote:
 On Fri, 17 Feb 2006, Matt Fowles wrote:

  All~
 
  On 2/17/06, jesse [EMAIL PROTECTED] wrote:
  
  
  
   On Fri, Feb 17, 2006 at 08:38:26AM -0800, Robert Spier wrote:
 snapshots or releases.  And, since a checkout takes about an hour 
 (last
 time I checked) I tend to be too lazy to fetch one just to make a 
 patch.
   
Only if you're checking out to a Commodore 64.
  
   Or possibly hand-transcribing the bits.
 
  I could check it out over iridium dial up...

 Sigh.  I wish it were that simple, or that funny.

 $ time wget http://cvs.perl.org/snapshots/parrot/parrot-latest.tar.gz

 real0m16.84s
 user0m0.09s
 sys 0m0.20s

 $ time svn co http://svn.perl.org/parrot/trunk parrot-trunk

 real  2:01:50.3
 user 1:02.0
 sys44.9

 It's something specific to svn.  No, I don't know what.

$ svn --version
svn, version 1.1.4 (r13838)
   compiled May 13 2005, 06:29:47

How bout you?

Matt
--
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Perl 6 Summary for 2006-01-24 though 2006-02-07

2006-02-07 Thread Matt Fowles
 parrot leads to problems with
dynamic extensions. Nick Glencross tracked it down to a dependency issue
with dynamic pmcs.

http://xrl.us/jwtu

   Restricted clear_eh
Recently Bob Rogers suggested restricting the scope of which exception
handlers can be cleared by a clear_eh opcode. Leo implemented the
request and applied Bob's tests.

http://xrl.us/jwtv

   *_config.o Issues
Florian Ragwitz posted a few options on how to clean up the  *_config.o
 issues that seem to come up. Warnock applies (lightly as he posted on
Monday).

http://xrl.us/jwtw

   bc Needs Python
Jerry Gay noticed that languages/bc would fail most of its tests without
python. It should probably probe for that.

http://xrl.us/jwtx

   GraphViz of Parrot
Allison Randal posted a pdf of the parrot repository generated by
GraphViz. It is pathological enough that acrobat does not really like
the file. I am told that xpdf deals OK.

http://xrl.us/jwty

   Tcl Globals Failure
Will Coleda noticed that r11431 is suddenly failing a few Tcl tests.

http://xrl.us/jwtz

   Param Count Checks
Leo tried enabling param count checks to see what would fail. The answer
appears to be much. This led to discussion of how to enable and disable
checks on both arguments and returns.

http://xrl.us/jwt2

   Method Look up in Dynamic PMCs
François Perrad wondered why his Lua PMCs were failing to find their new
methods. Leo explained that the necessary methodhash in them was not yet
implemented and gave him a workaround.

http://xrl.us/jwt3

  Perl 6 Language
   as if
Jonathan Lang, Stevan Little, and Rob Kinyon has a discussion about some
sort of type casting or coercion in Perl 6. The conversation sorted of
petered out undecidedly.

http://xrl.us/jwt4

   ff operator
Larry renamed the flip flop operator to  ff . People rejoiced loudly.

http://xrl.us/jwt5

   New T-Shirt
Juerd posted his one line perl 5 to perl 6 conversion T-Shirt to cafe
press. I know at least one summarizer who would not object to having one
show up at his door...

http://xrl.us/jwt6

   Protype Based MMD
Stevan Little posted a link to a nifty paper on Prototype Based MMD.
There is also a short version for the attention impaired. (I read that
one; it is neat.)

http://xrl.us/jwt7

   S06 Questions
Dakkar had a few questions about S06. Larry had a few answers.

http://xrl.us/jwt8

   Named Unicode Characters
larry announced that one could put named Unicode code points into
strings like this \c[LATIN CAPITAL LETTER A, COMBINING RING ABOVE].

http://xrl.us/jwt9

   Perl 6 can goto hell;
Larry announced the addition of a goto statement.

http://xrl.us/jwua

   Something Between State and My
Dave Whipp wondered if he could have a variable that was unique to each
non-recursive invocation of a function. Luke Palmer suggested that env
variables already did this, but Larry pointed out a few nuances there.

http://xrl.us/jwub

   Universal Roles
Yuval Kogman wants a really powerful sort of automatic application of
roles, I think. Warnock applies.

http://xrl.us/jwuc

   Macros
Herbert Snorrason wants more specifics on macros in Perl 6. Larry gave
him some.

http://xrl.us/jwud

   Synopsis Typos
Yiyi Hu and Andrew Savige found a few typos in a few synopses. Larry
graciously fixed them.

http://xrl.us/jwue

   Automatic Instantiation
Darren Duncan wondered if Perl 6 had a way to provide a default value
for uninstantiated variables of a particular type. The led to Larry
going into a little more detail on protype objects, and Matt Fowles
pushing for even more detail.

http://xrl.us/jwuf

   Perl 6 Development Process
Yuval Kogman posted a loose plan for for improving Perl 6's development
momentum. This is a contentious issue, and I will not try to summarize
it directly. Read the link, it is the last one of the summary.

http://xrl.us/jwug

  The usual footer
To post to any of these mailing lists please subscribe by sending email
to [EMAIL PROTECTED],
[EMAIL PROTECTED], or
[EMAIL PROTECTED]. If you find these summaries useful
or enjoyable, please consider contributing to the Perl Foundation to
help support the development of Perl. You might also like to send
feedback to [EMAIL PROTECTED]

http://donate.perl-foundation.org/ -- The Perl Foundation
http://dev.perl.org/perl6/ -- Perl 6 Development site
http://planet.parrotcode.org/ -- Parrot Blog aggregator


Perl 6 Summary for 2006-01-10 though 2006-01-24

2006-01-24 Thread Matt Fowles
 Introspection
Will Coleda wants an API for introspecting PMCs from PASM.

http://xrl.us/jpxg

   FrOSCon Call For Papers
Marcus Thiesen announced that the first Free and Open Source Conference
is looking for papers in both English and German.

http://xrl.us/jpxh

   YAML::Parser::Syck
Bernhard Schmalhofer posted a brief look at what has already been done
with adding support of libsyck and left the door open to anyone who
wished to pick up the torch. Warnock applies.

http://xrl.us/jpxi

   Parrot Link Issues
Klaas-Jan Stol had problems linking parrot. Larry managed to track the
problem down to an old libparrot in /usr/local/lib being picked up
prematurely.

http://xrl.us/jpxj

   Parrot_Context Unused Field
Bob Rogers posted a patch which improved the name of an unused field in
Parrot_Context. Leo applied the patch. Matt Fowles wondered why leave
the unused pointer in at all. Leo explained that it was need for
mark_register_stack to work out correctly, although another pointer
could be moved over it to save those 4 bytes (or even 8 on 64 bit
platforms!).

http://xrl.us/jpxk

   gunie.g Question
Chris Dolan was curious why print was an expression and not a statement
in the punie grammar. Andrew Rodland explained that print was an
expression because it return a value (success or failure).

http://xrl.us/jpxm

   genrpt.pl is Obsolete
Bernhard Schmalhofer noticed that tools/dev/genrpt.pl does the same
thing as parrotbug and could thus be removed. Joshua Hoblitt agreed.

http://xrl.us/jpxn

   Parrot::Config Contains Invalid Info
  Jerry Gay noticed that his Parrot::Config was being created with
invalid data.  Joshua Hoblitt offered to clean up one problem and
asked for takers on another.

http://xrl.us/jpxo

   Rename src/classes to src/pmc
Bernhard Schmalhofer proposed and performed, after favorable reception
of his proposal, a migration from directories name src/classes to
src/pmc.

http://xrl.us/jpxp

   Out of Date Comments
Brad Bowman noticed some comments refering to cache.* in pobj.h. He
provided a patch to remove them. Warnock applies.

http://xrl.us/jpxq

compute_dominance_frontiers  Bug
Bob Rogers found a problem in  compute_dominance_frontiers . Curtis
Rawls suggested simply disabling the function as it was merely a
precursor to SSA which was never finished.

http://xrl.us/jpxr

   Closure::mark Segfault
Bob Rogers found a fixed a segfault in Closure::mark. Leo applied the
patch.

http://xrl.us/jpxs

   Parrot CPAN Bundle?
Jerry Gay suggested making a CPAN Bundle (or possibly several) for
Parrot. Chip liked the idea of having one bundle, and thought that
having several sub-bundles would be more effort than it might be worth.

http://xrl.us/jpxt

   Calling Conventions Details
Leo had a few questions about pdd03 (calling conventions). Chip provided
clarifications.

http://xrl.us/jpxu

   PDD11 Bit Rot
Brad Bowman noticed a bit of rot in pdd11 and polished it up. Jerry Gay
applied the patch.

http://xrl.us/jpxv

   Named Argument Passing
Leo proposed a way of passing named arguments in PIR. Response was
favorable, and he implemented it.

http://xrl.us/jpxw -- proposal

http://xrl.us/jpxx -- implementation

   LuaTables of Floats
Klaas-Jan Stol wondered how to use N values as keys. Leo suggested using
Float PMCs and Matt Fowles warned of the danger of using floating point
values where equality checks might be needed.

http://xrl.us/jpxy

   Argument Passing Bug
Bob Rogers found an issue with the :optional to :slurpy state transition
in process_args, so he fixed it. Leo applied the patch.

http://xrl.us/jpxz

   Object Initialization Changes
Bob Rogers noticed some changes the semantics of object initialization.
He sent a patch with more tests, but Warnock applies.

http://xrl.us/jpx2

   Assertion Failure in Life
Tim Bunce found an assertion failure in ncurses_life.pir. Leo fixed
the problem.

http://xrl.us/jpx3

   ncurses files
Tim Bunce found several different ncurses files in
runtime/parrot/library/ and asked which were generated from the
others. Leo explained that ncurses.pasm was generated from
ncurses.declarations, but that ncurses.pir was hand made. He suggested
splitting them into to parts, one for libncurses and another for libform
NCI functions.

http://xrl.us/jpx4

   Cygwin Build Failures
Greg Bacon was having build troubles on Cygwin. After much work, still
no resolution.

http://xrl.us/jpx5

   HP-UX Alignment Issues
Nick Glencross found a failing assertion on HP-UX. Leo suggested
disabling function pointer alignment on this system since it dist not
appear to be working.

http://xrl.us/jpx6

   .const improvements
François Perrad noticed that .const

Re: Q: Keys can be strings/ints only?

2006-01-20 Thread Matt Fowles
Klaas-Jan~

On 1/20/06, Klaas-Jan Stol [EMAIL PROTECTED] wrote:
 Hi,

 I tried to index aggregates using several types of keys (that is,
 several types of values), and it seems only string and integer values
 can be used as keys. A quick look at the source in
 compilers/imcc/symreg.c confirms this, there is no case for 'N' values
 (and a test makes Parrot say build_key: unknown set).

 Will it be possible to use floating points as keys for arrays? It's up
 to the PMC to implement the indexing correctly, so support for this by
 IMCC should be no problem, I think.

 (I vaguely remember myself asking this sort of question before, quite
 some time ago, but I couldn't find it anywhere in the mail archives --
 sorry about that)

 The reason for this question is LuaTable PMC, which can be used as both
 an array as well as a Hashtable. I'd like to implement proper Lua Table
 behaviour into the LuaTable PMC, but it should be able to cope with code
 like this:

 $P0 = new .LuaTable
 $P1 = new .LuaNumber
 $P1 = 42
 $P0[1.234] =  $P1

 And this currently doesn't work, as mentioned above. (According to the
 PDD on keys, it should be possible to do this:

 op arg, P1[12.34] # Constant number key - handled as constant key

I am not sure how wise an idea this is given the difficult of
comparing floating point numbers for equality.

Matt
--
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Perl 6 Summary for 2006-01-02 though 2006-01-09

2006-01-11 Thread Matt Fowles
Perl 6 Summary for 2006-01-02 though 2006-01-09
All~

Welcome to another Perl 6 Summary. On a complete tangent, if you are
playing World of Warcraft and see a troll hunter named Krynna, she
rocks. She royally saved me. Be nice to her.

  Perl 6 Compiler
   PIL Containers and Roles
Audrey explained that she and Stevan have been putting in effort to
allow Pugs and PIL to bootstrap Roles and eventually the entire object
model.

http://xrl.us/jiza

   Reference and Assignment Semantics
Audrey posted a brain dump focusing on the issues and implications of
how containers, assignment, and auto dereferencing interact.

http://xrl.us/jizb

   Table of Perl 6 Types
Stevan Little posted a summary of his understanding of Perl 6's core
type hierarchy. Larry replied with a few comments and corrections.

http://xrl.us/jizc

  Parrot
   Configure and Symlinks
Alberto Simoes wondered how the configuration system should handle
symlinks. Warnock applies.

http://xrl.us/jizd

   Removed NCI Types
Dan Sugalski wondered why the T and L parameters have been removed from
NCI and how he should work around their absence. Leo suggested you
ManagedStruct PMCs for it and pointed him to the SDL libraries.

http://xrl.us/jize

mkdir  test can fail
Bob rogers posted a patch fixing an unanchored regular expression in the
mkdir test. Warnock applies.

http://xrl.us/jizf

   Build html should use Pod::Find
Joshua Isom suggested that Pod::Find would make building html less error
prone and more robust to changes the Pod structure. Warnock applies.

http://xrl.us/jizg

   CWD on HP-UX
Nick Glencross posted a fix to os.pmc for HP-UX. Alberto Simões applied
the patch.

http://xrl.us/jizh

   Alignment Issues on HP-UX
Nick Glencross posted a back trace from a test failing on HP_UX. His
initial analysis indicates that it is an alignment issue. Warnock
applies.

http://xrl.us/jizi

   Tcl Todo
Will Coleda posted more todos for Tcl. Like last week, I won't summarize
them all. But I am very happy to see Tcl coming along again. I must say
that I always like watching the test percentages climb.

   Parrot 0.4.1
Leo announced the release of Parrot 0.4.1.

   Sun's Compiler No Like CRLF
Andy Dougherty noticed that Sun's compiler was choking on coroutine.pmc
because it had bad line endings. He fixed it, and Jerry Gay applied the
patch.

http://xrl.us/jizj

   atan2 issues
Joshua Hoblitt committed a possible fix for some atan2 issues occuring
on openbsd, solaris, and cygwin. The fix didn't help cygwin or solaris.
No word on openbsd.

http://xrl.us/jizk

   OS.pmc needs a few methods
Will Coleda created a few todo: OS.pmc needs an lstat method, and
methods to set atime and mtime.

http://xrl.us/jizm

http://xrl.us/jizn

   Vanishing Warnings
Will Coleda noticed that a few warnings disappeared. Leo admitted that
he accidentally applied a fix some time ago.

http://xrl.us/jizo

   Configure.pl and Optimize
Andy Dougherty noticed that Configure.pl --optimize no longer worked
correctly. Joshua Hoblitt took the opportunity to clean up that portion
of Configure.pl.

http://xrl.us/jizp

   Event System Question
Klaas-Jan Stol wondered why events (unlike exceptions) are handled after
a little time instead of immediately. Leo explained that this was due to
the asynchronous nature of an events arrival and the inability to resume
execution after a long jump.

http://xrl.us/jizq

   CFLAGS missed two files
Andy Dougherty noticed that the core_ops source files missed come of the
directory rearrangements. Jerry Gay applied the patch.

http://xrl.us/jizr

   File::Temp Issue
Leo noticed an issue in t/run/options. Jerry tracked it down to an old
version of Perl and the File::Temp module and fixed the problem.

http://xrl.us/jizs

   Simple Namespace Question
Joshua Isom wondered how to separate namespaces for find_global calls.
Leo explain that he should use a list like ['Foo'; 'Bar'].

http://xrl.us/jizt

   Credits
The ever modest Nick Glencross updated his name in the credits file to
be a little more understated. Oddly, no one applied the patch.

http://xrl.us/jizu

   parrot config revisited
Nick Glencross posted a few questions, thoughts, and patches involving
parrot_get_config. Leo agreed with most of it, but had a few comments.

http://xrl.us/jizv

   pkgsrc build
Anders Nor Berle provided a few patches making thing work a little more
smoothly with FreeBSD and pkgsrc. Jerry Gay reviewed the patches and
Florian Ragwitz applied the relevant portions. In fact, 0.4.1 got added
to pkgsrc for the curious.

http://xrl.us/jizw

http://xrl.us/jizx -- 0.4.1 added

   static and shared libparrot
Florian Ragwitz provided a patch that fixed the 

Perl 6 Summary for 2005-12-05 through 2005-12-12

2005-12-12 Thread Matt Fowles
Perl 6 Summary for 2005-12-05 through 2005-12-12
All~

Welcome to another Perl 6 summary. This week, like last, Parrot has
produced the highest volume of emails. Fine by me, Parrot tends to be
easiest to summarize. This summary is brought to you by Snow (the latest
soft toy in the house). I would say you should get one, but apparently
Borders stores everywhere are sold out of them. He is quite soft and a
little mischievous. Maybe he belonged to a samurai once...

  Perl 6 Compiler
   Context Confusion
Mike Li wondered how to make his sample code work in Perl 6. Jonathan
Scott Duff pointed out that the part he was curious about, was correct
already. Score one for Perl 6.

http://xrl.us/i7ch

   Unbracketed Text from Text::bracketed
Allison Randal wanted to be able to access the text within
PGE::Text::bracketed's match object. Patrick made it work, and Allison
happily used it.

http://xrl.us/i7ci

   Security Model
Bryan Burgers wondered how Parrot would support security. Luke Palmer
pointed him to the p6i list and explained that Dan did have a plan for
this that he couldn't recall. I recall something about VMS and having
active and allowable capabilities. It sounded really cool when I read
it.

http://xrl.us/i7cj

  Parrot
   Build Failure
David Dyck managed to make the build fail on his bizarre setup. Leo
fixed it.

http://xrl.us/i7ck

   src/revision.c Dependencies
Leo discovered that src/revision.c is missing some dependencies. He
would love it if someone fixed that.

http://xrl.us/i7cm

   Documenting  .lex  Syntax
Klaas-Jan Stol documented the new syntax for lexicals. Jerry Gay applied
the patch.

http://xrl.us/i7cn

   Multidimensional Arrays
Roger Browne found that he could not make multidimensional array access
work with PMCs. Leo said that should be filed as a TODO.

http://xrl.us/i7co

   Directory Reorganization
Jerry Gay has made good progress spearheading the directory
reorganization of Parrot. Rather than give you a bunch of links to
emails that are essentially the same, I will skip them, but thank you
Jerry.

make test  Error on OS X Tiger
Jason Gessner reported a test failure on OS X Tiger. Warnock applies.

http://xrl.us/i7cp

   C3 MRO Test
C3 MRO (C3 P0's younger brother) recently underwent his factory
acceptance test and will be released into the world. Like his older
brother, he also speaks fluent Tibetan. On an unrelated note, Stevan
Little added some test for the C3 method resolution order used in
Parrot.

http://xrl.us/i7cq

   Global Store Hash
Klaas-Jan Stol wanted to access the global store hash directly. Leo
showed him how.

http://xrl.us/i7cr

   Release Goals
Leo kicked off a brain storming session for what to focus on for the
next release. Brains promptly began storming.

http://xrl.us/i7cs

   Sun4 JIT Fix
Andy Dougherty submitted a big fix to make Sun4's JIT link again. Leo
applied the patch.

http://xrl.us/i7ct

   :flat and :slurpy issues
Bob Rogers was having trouble making Parrot eat linguine because it
would not mix :flat and :slurpy arguments. He also found that the
problem was do to premature optimization (actually a
PREMATURE_OPTIMIZATION define) and submitted a fix and test. Leo thanked
him and applied them.

http://xrl.us/i7cu

   Parrot 0.4.0 Luthor
Leo announced the latest release of Parrot 0.4.0 aka Luthor. There was
much rejoicing, but I was left wondering where Leo comes up with these
release names.

http://xrl.us/i7cv

loadlib  Cleanup
Leo has been hunting some uninitialized memory bugs in Parrot's library
loading code. He has been having a difficult time finding the problem,
and thus is looking into a general code clean up to make the problem
easier to find (or possibly just fix it). Jerry Gay said he would make
it work on windows, but no one volunteered for the main portion of the
work.

http://xrl.us/i7cw

   languages/regex/Makefile is not Generated
Jerry Gay noticed that languages/regex/Makefile really ought to be a
generated file. He opened a TODO for it.

http://xrl.us/i7cx

   Fix Parrot IO Test 23
chromatic the ever uncapitalized proferred a patch for a failing
Parrot_IO test. He seemed to feel that someone else ought to review it
as he was not 100% on it. Warnock applies.

http://xrl.us/i7cy

load_bytecode  Fails Outside of Parrot
Bob Rogers noticed that load bytecode didn't work when not in the Parrot
directory. Leo mistakenly fixed a different problem before he fixed this
one. Sounds like a win/win to me.

http://xrl.us/i7cz

   Tcl Win32 Trouble
Jerry Gay noticed a problem building Tcl on Win32. François Perrad
pointed out an old patch from Nick Glencross which apparently solves the
problem. Warnock 

Re: Namespaces (At Long Last)

2005-12-04 Thread Matt Fowles
Leo~

On 12/4/05, Leopold Toetsch [EMAIL PROTECTED] wrote:

 On Dec 4, 2005, at 5:57, Matt Diephouse wrote:

  Roger Browne [EMAIL PROTECTED] wrote:
  Leopold Toetsch wrote:
 
  add_sub($S0, $P0)
 
  add_namespace($S0, $P0)
 
  add_var($S0, $P0)
 
  Which HLLs would use these interfaces?
 
  Maybe I'm missing the point, but I see these being used in the
  implementation of import_into as a way for the source HLL to tell
  the
  target HLL whether to treat each name as a sub, namespace, variable or
  method.
 
  Yes, that's correct.

 And it doesn't answer my question at all, sorry. Which HLLs are able to
 divide their symbols into above categories? Further: as this proposals
 deals with the managment of namespaces, a special typed interface for a
 'namespace' symbol name seems not to be necessary, because if it
 weren't evident, where a namespace is used, we couldn't deal with
 namespaces at all.

 The current implementation disambiguates namespace names from symbol
 names by prepending a '\0' char to the former. Therefore it's always
 clear if a namespace or a 'variable' symbol is used.

 Remaining for me is the distiction between a variable and a function
 symbol:

 - python: no (all names are just names)
 - tcl: afaik no (all names are strings)
 - perl5: sometimes (via sigil, but $ref_tosub)
 - perl6: maybe (sigil is part of the symbol name, but $ref)
 - ???

LISP - yes

Matt
--
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Re: This week's summary

2005-11-30 Thread Matt Fowles
Piers~

On 11/30/05, The Perl 6 Summarizer [EMAIL PROTECTED] wrote:

 So, I hopped into a taxi (and I use the word hopped advisedly) and
 repaired straightway to King's Cross and thence home to Gateshead, where
 my discomfort was somewhat ameliorated by the distraction of preparing
 this week's summary. I hope to be writing next week's summary as well
 because the week after I'll be moving house and don't quite know when
 I'll have my bandwidth back.

That sounds fine to me.  After next weeks I will start writing weekly
summaries until you send me an email saying you are ready to resume. 
Don't hurry on my account; I know moving is a pain.

Matt
--
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Re: Solving '=' confusion: ':=' for aliasing

2005-11-29 Thread Matt Fowles
Chip~

On 11/29/05, Chip Salzenberg [EMAIL PROTECTED] wrote:
 Consider:

P0 = P1
P0 = S1
P0 = I1
P0 = N1

 o/~ One of these things is not like the others
 One of these things just doesn't belong o/~

 And if I have to read:

P0 = new .Integer
P0 = 1

 one more time...  *sigh*

 Therefore, I propose requiring people to spell aliasing as ':='.  This will
 affect all code generated to use P and S registers.  It should be an easy fix
 (albeit an extensive one).  And if we don't do it now, it'll just get harder.

 So here's the lowdown:

P0 := P1  # aliasing:   P0 and P1 point to same PMC
P0 := opcode  # aliasing:   P0 points to PMC returned by opcode
P0 = ...  # assignment: modifies P0, NO MATTER WHAT '...' IS

S0 := S1  # aliasing:   S0 and S1 point to same header
S0 := opcode  # aliasing:   S0 points to header returned by opcode
S0 = ...  # assignment: modifies S0, NO MATTER WHAT '...' IS

I0 := ... # ILLEGAL
I0 = ...  # assignment: modifies I0

N0 := ... # ILLEGAL
N0 = ...  # assignment: modifies N0

 Comments?  Fresh or rotten vegetables?

I very much like it.  I think I may have suggested something like it
earlier (although I might have only thought it).  But, I am very much
in favor of not confusing the two sets of semantics.

Matt
--
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Perl 6 Summary for 2005-11-14 through 2005-11-21

2005-11-21 Thread Matt Fowles
Perl 6 Summary for 2005-11-14 through 2005-11-21
All~

Welcome to another Perl 6 Summary. The attentive among you may notice
that this one is on time. I am not sure how that happened, but we will
try and keep it up. On a complete side note, I think there should be a
Perl guild of some sort on World of Warcraft. It should probably be
horde if there is, both because I hate the alliance and because it fits
better.

  Perl 6 Language
As usual for Pugs, most development continued off list.

http://xrl.us/iipt

   Too Lazy?
Luke Palmer posted a problem he was having with pugs. Warnock applies
(which likely means it was made into a test and fixed).

http://xrl.us/iipu

   Assigning to Named Subrules
Jerry Gay had a question about the semantics of assigning to named
subrules in PGE. Patrick explained that it created an array of capture
objects.

http://xrl.us/iipv

   Keyed Access to Match Objects
Jerry Gay was having trouble with keyed access to match objects. After
some discussion he implemented the keyed routine he needed and
threatened to implement a few more.

http://xrl.us/iipw

   PGE Now  compreg s
Patrick announced that PGE was now a better citizen in the parrot world,
using compreg to locate the compiler instead of find_global.

http://xrl.us/iipx

  Parrot
I am going to get an English muffin. More in a moment... much better.
Peanut butter is a wonderful thing. Where was I?

   Character Classes Done
Jerry Gay wondered if the TODO about strings and character classes was
still open. Patrick said it was resolved and should be closed.

http://xrl.us/iipy

   rx_grammar.pl Progress?
Jerry Gay wondered if rx_grammar.pl had seen any work lately. Warnock
applies.

http://xrl.us/iipz

   N Registers No Longer Get Whacked
Leo, thanks to his new calling scheme, closed an RT ticket from Dec
2004.

http://xrl.us/iip2

   Report SVN Revision in parrotbug?
Jerry Gay resurrected an old ticket wondering whether to add a revision
field to RT tickets.

http://xrl.us/iip3

   Making Parrot Potable
Florian Ragwitz was having trouble drinking Parrot so he wants to expend
some effort to make it more potable. Apparently it does not get drunk so
well by many machines in debian's build farms and he would like to fix
it. When he asked how best to do his work (so as not to upset to many),
Chip suggested a local SVK mirror. Hopefully after he is done even more
people will be able to enjoy drinking the Parrot kool-aid.

http://xrl.us/iip4

   pbc_merge Requires LINK_DYNAMIC
Nick Glencross provided a patch fixing pbc_merge on HP-UX. François
Perrad noted that it was also problem on Win32. Jonathan Worthington
explained that he was aware of the problem and that the dependency on
the dynamic libraries would soon be removed.

http://xrl.us/iip5

   Compilable Option
Will Coleda wants a -c option which will only tell you if the code is
compilable for Parrot.

http://xrl.us/iip6

   Clerihewsiwhatsit?
Inspired by Piers's inspiration from his name, Roger Browne wrote a
Clerihew. Piers and Roger scare me.

http://xrl.us/iip7

   Debug Segments
There was much discussion about what sort of interface to expose to HLL
for debug segments. It looks like something good will come out of it
all.

http://xrl.us/iip8

   Amber for Parrot version 0.3.1
Announced, Roger Browne displaying Amber 0.3.1 aroun': this latest
version, magic cookie, is more than just a rookie.

http://xrl.us/iip9

   t/library/streams.t Failing
Patrick is still having trouble with t/library/streams.t. It sounds like
he would appreciate help, but Warnock applies.

http://xrl.us/iiqa

   PGE::glob Issues
Will Coleda spotted a problem with PGE::Glob. Patrick fixed it.

http://xrl.us/iiqb

find_word_boundary  Unneeded
Patrick posted his explanation of why find_word_boundary was an unneeded
opcode. Too that end he posted a patch updating t/op/string_cs.t.
Warnock applies to both thoughts.

http://xrl.us/iiqc

http://xrl.us/iiqd

   Coroutines Trample Scratchpads
Nick Glencross noted that coroutine_3.pasm was trampling some memory.
Leo said that scratchpads were on their way out. Nick wondered if the
ticket should be closed now, or when this is fixed. I vote that we not
close tickets until the problem is gone, but Warnock applies.

http://xrl.us/iiqe

   MD5 Broken
Chip noticed that MD5 was horribly broken recently. He decided that
parrot should avoid it in favor of the SHA-2 family and maybe Whirlpool.
If you are a crypto dork, you have your job cut out for you.

http://xrl.us/iiqf

Joshua Hoblitt joyously closed an RT ticket about removing $(MAKE_C).

http://xrl.us/iiqg

   inconsistent dll linkage
Jerry Gay announce that the last MSVC 7.1 

Re: website (again)

2005-11-09 Thread Matt Fowles
Will~

On 11/9/05, Will Coleda [EMAIL PROTECTED] wrote:
 - Updated the Where we are section.

From this section: check out This week on Perl 6 by Matt Fowles,
that should also say and Piers Cawley.

Thanks for keeping the website pretty, it is our public face.

Matt


Re: [perl #37577] [PATCH] Fix a couple of minor niggles (-1 - uint, KR prototype)

2005-11-07 Thread Matt Fowles
All~

On 11/6/05, Joshua Juran [EMAIL PROTECTED] wrote:
 On Nov 5, 2005, at 4:27 PM, Joshua Hoblitt via RT wrote:

  [EMAIL PROTECTED] - Tue Nov 01 04:52:22 2005]:
 
  This patch fixes two classes of issue.
 
* Don't assign -1 to an unsigned variable; use ~0U instead as it
  makes it clear that the value is intended to be out-of-band (g++
  warned about this, and C compilers will increasingly)
 
* Change a KR prototype in a config test
 
  Regards,
 
  Nick
 
  I've applied the bit of the patch that removed the KRism in
  config/auto/alignptrs/test_c.in as r9803.  I don't think that anybody,
  myself included, like the idea of using ~0U as a magic value.  Can I
  consider this bug 'resolved'?
 
  Cheers,
 
  -J

 If -1 causes warnings, I'd think it should be replaced.  I agree that
 ~0U isn't readable.  How about defining a named constant?  That solves
 both problems, and has the additional benefit of making the client code
 self-documenting.

Another option is to explicitly cast it as follows:

uint foo = (uint)(-1);

The last set of parens is unecessary, but I like them.  This also
makes it fairly clear that you are doing something odd.

Matt
--
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Re: Compiling parrot with c++

2005-10-26 Thread Matt Fowles
Nick~

On 10/26/05, Nick Glencross [EMAIL PROTECTED] wrote:
 Guy,

 As a follow-up to a discussion a few days ago about binding parrot to
 C++ functions, is making it possible to compile parrot with a C++
 compiler a 'Bad Thing'?

I like the idea, but I tend to like C++ more than reason would dictate.

Matt
--
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Perl 6 Summary for 2005-10-10 through 2005-10-24

2005-10-25 Thread Matt Fowles
=head1 Perl 6 Summary for 2005-10-10 through 2005-10-18

All~

Welcome to another Perl 6 Summary.  Sadly, this week's summary is not
brought to you by cookies as I already finished them.  Sadder still,
it is also brought to you a week late.  On the plus side, Mike
Doughty's Haughty Melodic is quite good.

=head2 Perl 6 Compilers

This was a shockingly high volume fortnight for p6c with 5 different
threads on it!

=head3 Feather:  A Retrospective

Juerd thought that now would be a good time to evaluate the usefulness
of feather to the community.  Warnock applies, but he probably found
answers off list...

http://groups.google.com/group/perl.perl6.compiler/browse_frm/thread/f14d8337b681d4a9/c95fc3fdf6d46f5b#c95fc3fdf6d46f5b
Google Groups : perl.perl6.compiler

=head3 PGE Better, Stronger, Faster

Patrick announced significant internal updates to PGE.  It looks
like things are coming along very nicely.  Yay, Patrick!

http://groups.google.com/group/perl.perl6.compiler/browse_frm/thread/10bff9a3100902a5/7135f5627205f9ca#7135f5627205f9ca
Google Groups : perl.perl6.compiler

=head3 PGE Now With Better Balance

Patrick also announced the subrule CPGE::Text::bracketed which is
similar to CText::Balanced from Perl 5.  Now where, did I put my
darn push-down automata.

http://groups.google.com/group/perl.perl6.compiler/browse_frm/thread/b52eb566b1b74920/19e4709aa8d2ecd6#19e4709aa8d2ecd6
Google Groups : perl.perl6.compiler

=head3 Object Space Thoughts

Stevan Little posted some of his thoughts about how the meta-model can
be built up from run time primitives.  It is pretty neat.

http://groups.google.com/group/perl.perl6.compiler/browse_frm/thread/e97984486b61828b/f34b165f8a919dcf#f34b165f8a919dcf
Google Groups : perl.perl6.compiler

=head3 Parrot PMCs within Pugs

Christian Renz wondered how to get at Parrot's PMCs from Pugs. 
Autrijus admitted that that feature was not currently available, but
offered a commit bit and suggested that adding tests would be a good
start.

http://groups.google.com/group/perl.perl6.compiler/browse_frm/thread/2f09e7c0503ea02f/d200cbd33f975d1d#d200cbd33f975d1d
Google Groups : perl.perl6.compiler

=head2 Parrot

=head3 README.win32

Michael Cartmel fixed a few spelling errors in README.win32.  Joshua
Hoblitt applied the patch.

http://groups.google.com/group/perl.perl6.internals/browse_frm/thread/38ef8ca32b5fab74/f5fdce20a19d50a9#f5fdce20a19d50a9
Google Groups : perl.perl6.internals

=head3 parrot-config.imc Documentation

Roger Browne offered a patch fixing documentation in
parrot-config.imc.  Warnock applies.

http://groups.google.com/group/perl.perl6.internals/browse_frm/thread/2d86e5015608cb9e/43969cc2f25a0f7b#43969cc2f25a0f7b
Google Groups : perl.perl6.internals

=head3 Train Parrot to Flex

In the RT clean up, an old ticket has resurfaced.  Parrot needs to be
updated to use flex 2.5.31, which is incompatible with 2.5.4.  Patches
welcome.

http://groups.google.com/group/perl.perl6.internals/browse_frm/thread/8dc8adf441fa6805/f24be3c94a3dfba7#f24be3c94a3dfba7
Google Groups : perl.perl6.internals

=head3 Dynamism Defeats Static Analysis

Patrick and I had a brief back and forth about detecting PGE
recursion.  The short answer is that it is possible in the static
case, but not in the face of changing rules.  Stupid halting problem,
where did I put my PDA.

http://groups.google.com/group/perl.perl6.internals/browse_frm/thread/b08ed4ac97e3090c/d934e5866bdc9a43#d934e5866bdc9a43
Google Groups : perl.perl6.internals

=head3 void function return

Will Coleda is tired of special casing void functions and wants C() =
function() to be legal in PIR.

http://groups.google.com/group/perl.perl6.internals/browse_frm/thread/c7e54dc1d2b887a9/74dcbe2b279de204#74dcbe2b279de204
Google Groups : perl.perl6.internals

=head3 Bison = 1.75c

Joshua Hoblitt noticed that the newer Bisons have slightly different
error messages than older ones.  He felt that we should either
standardize on the newer bison or explicitly declare error messages. 
No official ruling on which...

http://groups.google.com/group/perl.perl6.internals/browse_frm/thread/79e9151802ec9185/c9d1a7dd3236d16b#c9d1a7dd3236d16b
Google Groups : perl.perl6.internals

=head3 __set_pmc_keyed_*

Patrick needed a way to distinguish C__set_pmc_keyed_int from
C__set_pmc_keyed.  Leo gave it to him.

http://groups.google.com/group/perl.perl6.internals/browse_frm/thread/e8f0cf140b05669a/9a125b4a7524b9f2#9a125b4a7524b9f2
Google Groups : perl.perl6.internals

=head3 HLL type mappings

Roger Browne wondered how he could set HLL type mappings from PIR. 
Leo said it was not yet implemented or speced.  Roger suggested adding
a few opcodes.

http://groups.google.com/group/perl.perl6.internals/browse_frm/thread/5f6e488e14b5b859/39be8e39b16b9d71#39be8e39b16b9d71
Google Groups : perl.perl6.internals

=head3 s/\@(directive)/:$1/g

Jonathan Scott Duff submitted a patch which swapped @directives to
:directives everywhere.  Leo applied most of it in several smaller

Re: [perl #36452] Re: [BUG] PGE recursion, bus error

2005-10-10 Thread Matt Fowles
Patrick~

On 10/9/05, Patrick R. Michaud [EMAIL PROTECTED] wrote:
 On Sun, Oct 09, 2005 at 09:55:44AM -1000, Joshua Hoblitt wrote:
What is the status of this bug?  Should this be a PGE todo item?
  
   My opinion is that it's not a bug -- the normal behavior for
   most programs with infinite recursive loops is that they
   eventually explode.
 
  Sounds reasonable.  I'm sure it would be nearly impossible to catch all
  possible cases of infinite recursion when the grammar is compiled but
  how difficult would it be to trap at runtime?  A simple warning along
  the lines of Warning: production foo has recursed 10,000 times without
  matching any terminal\n would certainly be useful in figuring why it
  blew up...

 We can enter trap recursions without terminals as a possible PGE
 todo item, but unless someone knows an easy implementation or wants
 to take on the task of implementation it's not likely to be resolved
 anytime soon.  :-)

The theoretical implementation of this is quite simple.  Keep a
counter. everytime a token is consumed from the input stream reset it.
 Every time a rule is followed increment the counter.  If the counter
is ever greater than the number of productions in the grammer, then
you have gone into infinite recursion.  The only place where this
technique will fail is where a rule that it is attempting to match
changes dynamically (i.e. mid match).  In such an event you have to
consider the number of productions infinite.

Matt
--
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Re: [perl #36452] Re: [BUG] PGE recursion, bus error

2005-10-10 Thread Matt Fowles
Patrick~

On 10/10/05, Patrick R. Michaud [EMAIL PROTECTED] wrote:
 On Mon, Oct 10, 2005 at 09:11:02AM -0400, Matt Fowles wrote:
  Patrick~
 
  The theoretical implementation of this is quite simple.  Keep a
  counter. everytime a token is consumed from the input stream reset it.
   Every time a rule is followed increment the counter.  If the counter
  is ever greater than the number of productions in the grammer, then
  you have gone into infinite recursion.

 What happens with something like:

 rule atom { A }
 rule binary { . atom | expr \* atom }
 rule expr { binary }

 AB ~~ / expr /

 Here, the '.' in binary keeps consuming the initial A (thus
 resetting the counter), but the atom rule fails, so we take
 the alternation which recurses back to expr and does the whole
 thing all over again (with the counter having been reset to zero).
 So I guess we'd need to backtrack the counter as well...?

 Perhaps what we want to be watching is positions, so that we detect
 when the depth of nested subrules activated from a common input position
 is greater than the total number of defined rules?

 And, of course, in the case of rules containing closures, all bets
 should be off for detecting infinite recursion, since the closure
 could be handling the termination of the recursion based on some
 criteria other than tokens consumed from the input stream.  (But it's
 also probably easy to know when we've executed a closure and thus
 disable the check for infinite recursion when that happens.)

You are right about backtracking, rather than a simple counter we need
to keep track of the current recursion depth from a particular
position.  I agree that we would have to disable this for rules
containing code.  Perhaps a better approach would be to perform a bit
of static analysis on the grammar and look for left recursions at
creation time (I believe that is a known problem).  Then we can just
warn once up front and go on our merry way recursing at matchtime.

Matt
--
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Re: [perl #36452] Re: [BUG] PGE recursion, bus error

2005-10-10 Thread Matt Fowles
Patrick~

On 10/10/05, Patrick R. Michaud [EMAIL PROTECTED] wrote:
 On Mon, Oct 10, 2005 at 10:45:54AM -0400, Matt Fowles wrote:
  Perhaps a better approach would be to perform a bit
  of static analysis on the grammar and look for left recursions at
  creation time (I believe that is a known problem).  Then we can just
  warn once up front and go on our merry way recursing at matchtime.

 I think this approach falls back into my category of
 unless someone wants to take on the task of implementation it's not
 likely to be resolved anytime soon...  :-) :-)

 In a dynamic environment like the one we have (parrot/perl) I find it's
 really hard to say what constitutes creation time, especially since
 we can refer to subrules dynamically ( $foo, ::$foo, etc. ) and
 our grammars have inheritance in which a rule defined by a parent
 grammar can invoke a rule defined later in a child grammar.  As with
 closures, we could probably punt on performing any analysis of
 rules with dynamic references or that refer to rules outside of
 the current grammar.  But given that we can't really know until
 matchtime what subrule will be invoked by an expression like binary,
 it's hard for me to imagine a whole lot we can do in the way of
 static analysis beforehand.  However, that could easily just be a
 limit of my imagination.

I completely forgot about inheritance.  That basically throws static
analysis out the window.

Matt
--
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Re: [perl #31285] [PATCH] first step in implementing a SCons base build

2005-10-09 Thread Matt Fowles
Joshua~

On 10/9/05, Joshua Hoblitt via RT [EMAIL PROTECTED] wrote:
  [EMAIL PROTECTED] - Mon Oct 03 12:49:55 2005]:
 
  I brought it up on the list first, and Dan was OK with it because
  scons can output a series of commands (like a bat file or batch
  script) to build from scratch (no smart dependency checks).  This also
  provides a way to break the make dependency.
 
  All that having been said, I probably won't get around to finishing
  this anytime soon, and I don't think most of the others are interested
  in it.  Although it also would solve the problem of our make system
  being broken WRT dependency checking.
 

 Matt,

 Is it OK consider this patch withdrawn (at least for the time being) and
 close the bug?

Yeah, that is fine.

Matt
--
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Perl 6 Summary for 2005-09-26 through 2005-10-02

2005-10-04 Thread Matt Fowles
Perl 6 Summary for 2005-09-26 through 2005-10-02
All~

Welcome to another summary, this time a day late because I was in Philly
for Serenity. If you haven't seen Serenity yet you should stop reading
this summary and go see it. The summary will be here when you get back.
I promise.

  Perl 6 Compiler
No postings this week. I blame Piers for scaring them off last week.

  Parrot
   Summary Links
Last weeks load lib thread morphed into a conversation about the life
span of the shortened links that appear in summaries. Piers pointed out
that, although the short links expire, the long links are archived at
perl.org.

http://xrl.us/hvbn

   RT Cleanup
Joshua Hoblitt has been continuing his massive clean up of RT. It makes
me glad of two things: that someone is doing it and that I am not doing
it. I won't post all of the links for these messages, but much work is
getting done.

   debug segments
Jonathan Worthington posted an RFC of his design for debug and source
segments in Parrot's packfiles. People seem to like it generally.
Hopefully the design will be implemented soon.

http://xrl.us/hvbo

   Leo's Context Branch Hits the Mainline
After a few more reviews from Chip, Leo's context branch has been dubbed
ready and has been moved to the mainline. This marks the culmination of
quite a bit of hard work from many people (especially Leo). Nice work
all.

http://xrl.us/hvbp -- bit of review

http://xrl.us/hvbq -- merge

   Amber PMCs
Roger Browne wondered how he should include Amber PMCs. Leo and Will
suggested he put the pmcs into the languages directory similar to the
way Tcl does it.

http://xrl.us/hvbr

   Data::Escape Needs Tests
Jerry Gay added a TODO for tests for Data::Escape. This would be a great
thing for an eager lurker to cut his or her teeth on.

http://xrl.us/hvbs

   Magic Numbers Bad, Magic Strings Good
Last weeks magic thread ended down with the conclusion that Parrot would
use a magic string instead of a magic number.

http://xrl.us/hvbt

   Tests fail on win32
Jerry Gay opened a new RT ticket for some failing tests on Windows.

http://xrl.us/hvbu

   Here Doc in PIR
Will Coleda revived a thread from February about PIR here doc syntax.
Looks like the syntax is ok.

http://xrl.us/hvbv

   Win32 PCRE
François Perrad enabled PCRE on Win32. Jerry Gay applied the patch.

http://xrl.us/hvbw

   PLATFORMS and MinGW
François Perrad updated the PLATFORMS file for MinGW.

http://xrl.us/hvbx

   parrot_config dependency
Nick Glencross provided a patch (for comment only) that eases the
dependency on parrot_config. I am not sure that he got many comments.

http://xrl.us/hvby

   Data::Escape::String Dislikes Unicode
Will noticed that Data::Escape::String doesn't work on Unicode strings.

http://xrl.us/hvbz

   Make Cleanup
Joshua Hoblitt started RT tickets for several things that are part of a
general make system clean up.

http://xrl.us/hvb2

http://xrl.us/hvb3

http://xrl.us/hvb4

   Parrot Leaves Crumbs
Nick Glencross rediscovered the core files that parrot leaves around.
This is a known problem.

http://xrl.us/hvb5

   Parrot Threads
Dave Frost wondered what the plan for Parrot Threading was going to be.
The answer (provided by Leo with more details from Jonathan Worthington)
was OS threads.

http://xrl.us/hvb6

   Once deprecation's lost its fun...
Leo went on a bit of fall cleaning adding things to the deprecated list.
He even threatened to resolve some of them soon.

http://xrl.us/hvb7

http://xrl.us/hvb8

http://xrl.us/hvb9

http://xrl.us/hvca

   Lexical and Variable Sized Register Frames
With the calling conventions having been redone, Leo has plans to move
to system of dynamically sized registers frames with static lexicals
stored directly in them. Chip should produce details soon.

http://xrl.us/hvcb

   Exception Handling Bug
Roger Browne found a bug with exception handlers in the new scheme. Leo
fixed it. I wonder if anyone made a test out of it...

http://xrl.us/hvcc

   Config missing output
Will Coleda noticed that Configure.pl was not outputting a response to a
step on his platform.

http://xrl.us/hvcd

   Parrot 0.3.0 TODO
Robert J Eaglestone wondered what would be a good way of chipping in.
Will Coleda, predictably, tried to turn him towards working for the good
of Tcl.

http://xrl.us/hvce

   Tru64 Issues
Jarkko Hietaniemi appears to have recently come into some time with a
Tru64 machine. He found lots of problems, which he added to RT, so I
won't link them here.

   src/extends.c
chromatic made good on a promise to auto generate src/extends.c
automatically. Leo quibbled over pod, but thought it was good.

http://xrl.us/hvcf

   Calling Vtable 

Re: [perl #31285] [PATCH] first step in implementing a SCons base build

2005-10-03 Thread Matt Fowles
Joshua~

On 10/3/05, Joshua Hoblitt via RT [EMAIL PROTECTED] wrote:
  [EMAIL PROTECTED] - Sun Aug 22 17:19:34 2004]:
 
  All~
 
  This patch is an early step in getting a scons based build system for
  parrot.  Currently, it leaves the make system in place, the goal being
  to add a SCons system alongside the make system until the scons one is
  entirely ready.
 
  This patch allows scons to build foo.c and foo.dump files from
  foo.pmc.  It will automatically detect dependencies between various
  PMC's and rebuild them as appropriate.
 
  Obviously this requires SCons to be installed on the system (and SCons
  requires Python).  But since parrot can be built without it, I figured
  that this was a non-issue.
 
  If any one has a burning itch to implement other parts of this system,
  feel free to email me so we can collaborate.
 
  Have fun,
  Matt
 
 


 Matt,

 There has been alot of discussion about build systems on #parrot
 recently so I'm CCing p6i.

 Is SCons really an option for Parrot?  I don't really know much about it
 but since it's implimented in Python, and Python hasn't been ported to
 all the platforms we hope to run on, wouldn't it introduce a serious
 portability issue?

 -J

I brought it up on the list first, and Dan was OK with it because
scons can output a series of commands (like a bat file or batch
script) to build from scratch (no smart dependency checks).  This also
provides a way to break the make dependency.

All that having been said, I probably won't get around to finishing
this anytime soon, and I don't think most of the others are interested
in it.  Although it also would solve the problem of our make system
being broken WRT dependency checking.

Matt
--
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Re: [perl #17490] Magic is useless unless verifiable.

2005-09-22 Thread Matt Fowles
Jonathan~

On 9/22/05, Jonathan Worthington [EMAIL PROTECTED] wrote:
 Roger Browne [EMAIL PROTECTED] wrote:
  If you do tweak the signature for the packfile format, I suggest you
  take a leaf out of the PNG specification and ensure that the signature
  will robustly detect common errors such as byte order transpositions,
  CRLF-to-newline mappings (e.g. when binary files are FTPd using ASCII
  mode), etc.
 
  See section 12.11 of the PNG specification:
  http://www.faqs.org/rfcs/rfc2083.html
 
 Interesting, thanks - they make some good suggestions there.  Our current
 magic number is 13155a1 - I'm unsure of the rationale behind it, but there
 may be a reason.  If we're going to change the packfile format, we may as
 well make sure we're squeezing whatever use we can out of our magic number.

 Mark A. Biggar [EMAIL PROTECTED] wrote:
  Joshua Hoblitt wrote:
 
  a) live with it
  b) change the magic number to be two identical bytes so the byte
 ordering doesn't matter
  c) shrink the magic number to be a single byte
 
 When I talked about doing something endian-independent, I meant something
 along the lines of store a sequence of, say, 4 bytes that will have certain
 values.  Forget reading the 4 bytes as an int at all, read it as a char[4]
 and check each element is what it should be.  Makes adding support to file
 easy enough, and is my preferred solution.

  d) use a magic number that can also be used as the byte order indicator.
 
 Clever, though not sure it helps with writing something to independently
 identify a Parrot packfile, if it can be one of a number of things (though I
 guess in this case, one of only two things - unless there's some insane
 ordering scheme I've not heard of).

I have seen architectures that swap byte ordering for 8 byte things
(like doubles) but not 4 byte things.  So that gives 3 options and
requires an 8 byte magic number if you want to do it that way.

Matt
--
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Re: #34394: [TODO] implement the splice vtable in *PMCArrays

2005-09-19 Thread Matt Fowles
Jonathan~

On 9/19/05, Jonathan Worthington [EMAIL PROTECTED] wrote:
 Nicholas Dronen [EMAIL PROTECTED] wrote:
  On Sun, Sep 18, 2005 at 11:48:08PM +0100, Jonathan Worthington wrote:
  [ snip ]
 
  I guess if I could offer any advice, it'd be don't be afraid of asking
  questions and also expect to have to look at the source to figure some
  stuff out, because the docs aren't always as great or up to date as you
  might hope.  Noting where the docs seem wrong/missing/unclear, or if you
  can and have the time sending in a patch to correct them, would be a big
  help.
 
  Taking your advice to heart, I'll dive in with an initial question about
  this particular bug.  :-)
 
  I don't know which particular files *PMCArrays refers to in #34394.
  I assume that at least some of the C source files in classes/ that
  use Parrot_default_splice instead of their own splice instead of
  Parrot_*PMCArray_splice are the ones that need to be changed.
 
 $ grep -l Parrot_default_splice *.c | grep array
 fixedbooleanarray.c
 fixedfloatarray.c
 fixedintegerarray.c
 fixedpmcarray.c
 fixedstringarray.c
 floatvalarray.c
 resizablebooleanarray.c
 resizablefloatarray.c
 resizableintegerarray.c
 resizablepmcarray.c
 resizablestringarray.c
 sarray.c
 stringarray.c
 
  I'll start with fixedpmcarray.c, but #34394 also mentions boolean arrays.
  Any others?
 
 The C files are not the things you want to be modifying, but rather the .pmc
 files in the classes directory.  The .c files are generated from the .pmc
 files.  So when you modify a .pmc file, then do a make, a new .c file is
 generated and then compiled, etc.
 
 The ticket says:-
 
 The splice opcode has the functionality of the perl5 function, so that
 should be rather straight to implement. See also classes/array.pmc:splice.
 
 FixedPMCArray can have a splice too, if the array limit isn't hit.
 
 So I guess this means implement splice in ResizablePMCArray.pmc and
 FixedPMCArray.pmc first.  Then later other arrays can be done, but I'm
 guessing again from the ticket that they used a different allocation scheme
 and that needs changing too.  There's quite a bit to this task I think - so
 I suggest have a go at the *pmcarray.pmc files first.

I updated the allocation schemes about a month ago.  So they should
all use the same one (except boolean which uses bits (I think)).

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Perl 6 Summary for 2005-09-12 through 2005-09-19

2005-09-19 Thread Matt Fowles
Perl 6 Summary for 2005-09-12 through 2005-09-19
All~

Welcome to another Perl 6 Summary, this time brought to you with a
shorter pause (::grumble:: $WORK ::grumble::) and assisted by cookies.

  Perl 6 Compilers
   Circular Preludes for Fun and Confusion
Yuval Kogman posted a really interesting idea of using a circular
prelude to facilitate creation of a new run time. If the prelude defines
everything it can in terms of itself (even circularly if need be), then
a new run time implementer can break the circle wherever is most
convenient for the run time. It looks really cool to me.

http://xrl.us/hn6h

   PxPerl Site Change
Grégoire Péan announced that he was having problems with his old domain
and that PxPerl is now hosted at http://pxperl.com

http://xrl.us/hn6i

  Parrot
   13! == BIG!
James Ghofulpo noticed that the example factorial program included with
Parrot gives incorrect results on 32 bit machines. Will Coleda offered
to clean the old PASM examples into shiny new PIR.

http://xrl.us/hn6j

   Properly Formatted POD
Unlike these summaries, Parrot's docs should be in properly formatted
POD. Joshua Hoblitt provided patches to fix them up and test them.
Bernhard Schmalhofer applied the patches.

http://xrl.us/hn6k

   Bad IMCC Error Message
Joshua Hoblitt opened an RT ticket for the error message imcc outputs
upon seeing a non-existent PMC. No takers yet.

http://xrl.us/hn6m

   Globbing Like Tcl
Amos Robinson opened am RT ticket requesting Tcl Syntax Globbing in PGE.

http://xrl.us/hn6n

   AMD64 Build Error
Joshua Hoblitt posted a build error involving posix_memalign on AMD64.
Warnock applies.

http://xrl.us/hn6o

   TODO: Call for B0rked
chromatic the capless put out a call for specific TODO items that Parrot
needed. Many people provided suggestions.

http://xrl.us/hn6p

   Documentation Keyword Tagging
Joshua Hoblitt opened a ticket requesting keyword tagging (via  ) .

http://xrl.us/hn6q

   leo-ctx5 on Win32
François Perrad solved a few link problems on Win32 for the leo-ctx5
branch. Jonathan Worthington applied it.

http://xrl.us/hn6r

   Support Different Compilers
Andy Dougherty provided a patch making it easier to compile parrot with
a different options then Perl 5. Bernhard Schmalhofer tentatively
applied it, but despite his fears nobody hollered.

http://xrl.us/hn6s

   Tcl Leo's Context
My that sounds dirty Regardless Leo and Will Coleda, with much help
from assorted others) managed to get all of the Tcl tests passing in the
leo-ctx5 branch.

http://xrl.us/hn6t

   4 Down 7204 to Go
Andy Dougherty posted a patch which eliminates 4 of Parrot 7208 compiler
warnings on SPARC. Warnock applies.

http://xrl.us/hn6u

   Circular Finalization Returns From the Dead
Nicholas Clark wondered how Parrot would handle PMC loops with
finalizers. Leo and I provided some ideas. Nothing is officially specced
yet.

http://xrl.us/hn6v

   make cleaner
Joshua Hoblitt provided a patch which makes make clean cleaner. Warnock
applies.

http://xrl.us/hn6w

   Pack Packfiles, Fix Fixups
Jonathan Worthington split the fixup and unpack functionality of
Packfiles so that he could later create a pbc_merge. Later he did that.

http://xrl.us/hn6x -- earlier

http://xrl.us/hn6y -- later

   Taking Exception to Leo's Tcl
Some days my head is just in the gutter. Will Coleda update Tcl to use
exceptions for TCL_RETURN, which apparently simplifies things.

http://xrl.us/hn6z

   Tcl on Windows
Jerry Gay noticed that Tcl was not building on Windows. Will Coleda
suspected that it got fixed; he was right.

http://xrl.us/hn62

   Implementing Splice
Nicholas Dronen decided to try and implement splice in *PMCArrays, after
suggestions from Leo and Jonathan Worthington. I have found these Arrays
to be good starting points in the past. Good luck, Nick.

http://xrl.us/hn63

   Optimize MinGW
François Perrad provided a patch making  Configure.pl --optimize  and
 Configure.pl --optimize=flags  work on MinGW. Jonathan Worthington
applied it.

http://xrl.us/hn64

  Perl 6 Language
   Object Model Pictures
Stevan Little posted the latest pictures of his MetaModel. Nathan Gray
thanked him and put out a quiet request for a diagram about roles.

http://xrl.us/hn65

   Coersive Context
Juerd posted his thoughts about using types as context specifiers and
coercers. Reaction seemed interested but limited.

http://xrl.us/hn66

   Perl 6 and Undefined Behavior
Nicholas Clark asked if Perl 6 was going to have any undefined behavior
or guarantee any sequence points. Larry does not want to have any
undefined behavior, but thinks that the reference implementations quirks
might be the definer for certain things. He did point 

Re: destruction of loops

2005-09-15 Thread Matt Fowles
Nick~

Dan's plan was to do a topographic sort of the object tree to avoid
this problem for non-loops and to break loops randomly.  I believe he
was even tempted to call rand in there just to make sure people didn't
come to depend on a behavior...

I think it might be wise for us to make all the destruction calls
before memory reclamation and replace each objects vtable with undef
after its call.

Matt

On 9/15/05, Nicholas Clark [EMAIL PROTECTED] wrote:
 On Wed, Sep 07, 2005 at 02:37:33PM +0200, Leopold Toetsch wrote:
 
  Parrot calls the destroy vtable function for all PMCs that have marked
  themselves with PObj_active_destroy_FLAG, when the object gets recycled
  due to GC *or* at program exit.
 
 If I have 2 objects in a self-referencing loop, what happens?
 
 A---+
 ^   |
 |   v
 +---B
 
 Clearly mark and sweep can spot these things before the end of the world,
 but how does all the destruction work? The GC has to call one PMC's destroy
 first, so let's call that one A.
 
 A's destroy gets called. At this time A is pointing to a valid B object,
 so it can make calls on B.
 
 At the end of this call, A is (presumably) in a consistent state, but not
 a state consistent with having other methods called on it. But is its
 vtable still active? Or is the vtable replaced with something else?
 
 Because what must come next is that B's destroy gets called. And as B still
 has a pointer to A, B might (naïvely) try to make calls on A.
 
 Or are all objects that actively destroy themselves also expected to
 actively swap their vtables to something safe?
 
 I'm not sure if this messy call on a destructed object scenario can occur
 for non-active-destroy objects.
 
 Nicholas Clark
 


-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Re: destruction of loops

2005-09-15 Thread Matt Fowles
Nick~

On 9/15/05, Nicholas Clark [EMAIL PROTECTED] wrote:
 On Thu, Sep 15, 2005 at 01:13:17PM -0400, Matt Fowles wrote:
  Nick~
 
  Dan's plan was to do a topographic sort of the object tree to avoid
  this problem for non-loops and to break loops randomly.  I believe he
  was even tempted to call rand in there just to make sure people didn't
  come to depend on a behavior...
 
 I agree with the use of rand.
 
  I think it might be wise for us to make all the destruction calls
  before memory reclamation and replace each objects vtable with undef
  after its call.
 
 Setting to undef is in effect what Perl 5 does (although this can only
 happen at global destruction time), because when a scalar is reclaimed,
 its 24 flag bits are set to all zero, which is consistent with undef.
 
 I'm not sure that there is any other safe way, and it seems better that the
 VM does it rather than rely on every PMC duplicating the code. Although the
 idea of a PMC that has both finalize and destroy vtable entries clouds the
 issue, because it would still need to see its vtable for destroy.
 
 I wonder if it makes sense for these to have an undef derivative that has
 destroy and actually stores 1 item - the original vtable entry, and swaps
 that vtable back in just to call destroy.

I disagree with the choice to have both finalize and destroy...  If we
must have both we could ensure that destroy is called immediately
after finalize (but before VTABLE swap).

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Perl 6 Summary for 2005-08-15 through 2005-08-22

2005-08-22 Thread Matt Fowles
Perl 6 Summary for 2005-08-15 through 2005-08-22
All~

Welcome to another monday summary, which hopefully provides some
evidence that mondays can get better. It always feels like writing
summaries is an uphill battle, perhaps I should switch to writing about
Perl 6 Language first and Perl 6 Compilers last. Then it will be
downhill... Maybe next time.

  Perl 6 Compilers
   More Random Pictures
Autrijus posted links to two more images he had created. This time the
images were not about pugs, but were just kind of cute. He also provided
an explanation of one when prompted.

http://xrl.us/g8bw

   Methods as Functions
Yiyi Hu noticed that a method of one argument could not be used as
function. Autrijus offered Yiyi a commit bit, but also kindly posted the
resolution to Perl 6 Language. Thanks Autrijus!

http://xrl.us/g8bx

   Methods on Code Blocks
Yiyi Hu discovered that  { a b c }.paris  would cause pugs to spin out
of control. Luke Palmer fixed it. Hopefully one of the two of them added
a test...

http://xrl.us/g8by

   Autrijus's Secret Sauce
Kris Bosland asked a few question I have been wondering about Autrijus
new graphics. Autrijus kindly provided the answers.

http://xrl.us/g8bz

   Documentation Attack
Kevin Tew has decided the best way for him to delurk is to update
documentation for Pugs. chromatic and Dudley Flanders both provided
support, information, and suggestions for him.

http://xrl.us/g8b2

   Neko VM
Nicolas Cannasse announed his release of a high level multi language VM
and wondered what others thought of creating a Perl 6 to to Neko
compiler. Autrijus and Leo provided a few corrections and comments.

http://xrl.us/g8b3

  Parrot
   The FAQ, She is GONE!
Amias Channer noticed that the faq on parrotcode.org was gone. While he
was warnocked, the faq appears to be back.

http://xrl.us/g8b4

   Platform Specific C Files
Stephen Hill wanted to know where to put a platform specific C file to
provide missing functionality. Leo provided a few friendly pointers.

http://xrl.us/g8b5

   TclArray.get
Amos Robinson provided an implementation of get for TclArray. Will
greatfully applied the patch.

http://xrl.us/g8b6

   ICU Being Passed Up
Adrian Lambeck wondered if icu was being passed up by Configure.pl.
Warnock applied. So Adrian took matter into his own hands by providing a
possible solution. Jerry Gay offered to take ownership of the problem if
no ICU enabled soul picked it up. No progress reports since then
though...

http://xrl.us/g8b7

http://xrl.us/g8b8

   Java on Parrot
Tim Bunce asked some preliminary questions about Java on Parrot. I
provide preliminary answers, and Nattfodd and Autrijus posted links to
related work. The important question of what it should be called
remained unraised. I vote for Jot.

http://xrl.us/g8b9

   gdbmhash.t Failures
Tim Bunce noticed that gdbmhash.t was failing with an unhelpful error
message. Andy Dougherty provided a patch that made the error message
slightly more helpful. Jerry Gay applied it.

http://xrl.us/g8ca

   BEGIN Blocks
Leo posted some thoughts and information about BEGIN blocks in Perl 6
and the @IMMEDIATE pragma in PIR, it involved creating constant PMCs and
freezing them into the bytecode. Then he made it work.

http://xrl.us/g8cb -- thoughts

http://xrl.us/g8cc -- actions

   Amber for Parrot
Citing chatter overheard on its intelligence networks Parrot raised the
terror alert to Amber, or maybe Roger Browne released version 0.2.3 of
his Eiffel-like scripting language, Amber. I can never keep track of
these things.

http://xrl.us/g8cd

   Tcl parray
Amos Robinson offered to provide an implementation of Tcl's parray
inluding tests. Will wanted to apply it, but the attachment did not come
through.

http://xrl.us/g8ce

   Parrot vs Neko
Nicolas Cannasse wondered why Parrot performed so poorly on the fib
benchmark. Leo explained that this benchmark stressed a currently
unoptimized portion of parrot (function calls). He also provided a few
pointers on which benchmarks parrot did well on.

http://xrl.us/g8cf

   Using PMCs from C
Klaas-Jan Stol's Lua compiler uses only PMCs. Thus he wanted to know how
to access these PMCs from NCI functions. Leo provided an answer, but
also suggest he looked at the new calling conventions which would do
auto-conversion in both directions.

http://xrl.us/g8cg

   PMC for Reference Counting
Nicholas Clark posted a relatively full analysis of how the DODs
registration system could be generalized for further reuse. He also
asked for ideas about names. I think the whole thing looks good and that
AddrRegistry is a good name. Perhaps that has too many vowels...
AddrRgstry and sometimes AddrRgstr 

Re: Parrot - Java integration

2005-08-16 Thread Matt Fowles
Tim~

On 8/15/05, Tim Bunce [EMAIL PROTECTED] wrote:
 Anyone given any thought to Parrot - Java integration?
 
 Possible?

Definitely.

 Practical?

You would likely lose some speed, but that is really all.

 How much would would be involved?

Not a whole lot more than making a java compiler for anything else. 
But it would still be the somewhat large undertaking of making a java
compiler.  (Yes, this is a bit of a duck cause I don't know specifics)

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Re: [Fwd: call opcodes cleanup]

2005-08-10 Thread Matt Fowles
Leo~

On 8/10/05, Leopold Toetsch [EMAIL PROTECTED] wrote:
 [ /me warnock fighting - and update below for method calls ]
 
  Original Message 
 Subject: call opcodes cleanup
 Date: Thu, 21 Jul 2005 09:52:07 +0200
 From: Leopold Toetsch [EMAIL PROTECTED]
 To: Perl 6 Internals perl6-internals@perl.org
 
 
 There are still some leftovers of the old calling scheme, which I'd like
 to get rid of (1,2) or change slightly (3):
 
 1) bare invoke
 
 This opcode assumes P0 = Sub, P1 = Continuation
 
 2) bare invokecc
 
 This opcode assumes P0 = Sub
 
 3) invoke Px
 
 This opcode assumes P1 = Continuation, but it has a double usage: call a
 coroutine (not the first time) and yield from a coroutine with this code
 sequence:
 
interpinfo Px, .INTERPINFO_CURRENT_SUB
invoke Px
 
 Instead I'd like to have distinct opcodes, that carry the effects on
 operands clearly in their signature. The replacement for above would be:
 
 1) invoke PSub, PCont   # call sub with given continuation
 2) invokecc PSub# call sub, create continuation - exists
 3a) invoke PCoro# call sub, leave continuation as is
 3b) yield   # yield results from a coroutine
 
 3a) exists too, but it currently picks up a continuation in P1.
 
 Rational: the register allocator has to track the usage of all symbols.
 For all the implicit register usage, extra code is needed that tracks
 register usage. See trunk imcc/cfg.c for details.

I like this, especially the motivation.

 -
 
 Method call opcodes
 
 We currently have these opcodes:
 
 4a) callmethod
 
 Implicit registers used: S0 = method, P1 = continuation, P2 =
 invocant/object
 
 4b) callmethod Smeth
 
 5a) callmethodcc
 5b) callmethodcc Smeth
 
 We probably need just one opcode:
 
 5) callmethodcc Pinvocant, Smeth
 (maybe callmethod Pinvocant, Smeth, Pcont)

I think that we should have the second option (as that is an easy way
to have tailmethods).  We might also want a C callmethod Pinvocant,
Pmeth, Pcont  if we allow methods that are pmcs.  (This might allow
hoisting the string lookup outside a loop or something).

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Perl 6 Summary for 2005-08-02 through 2005-08-10

2005-08-10 Thread Matt Fowles
Perl 6 Summary for 2005-08-02 through 2005-08-10
All~

Welcome to another summary, brought to you by chinese food. The
attentive among you will notice that this summary is a day late, because
I did not feel like doing it yesterday. If only I could do that at
work...

  Perl 6 Compilers
   Pugs Argument Processing
Vadim Konovalov submitted a patch to pugs affecting @*ARGS processing.
Maybe it got applied, maybe not, Warnock applies.

http://xrl.us/g3op

   Type Inferencing
Autrijus wants to type push perl 6's type inferencing as far as it can
go (and maybe a little beyond). To this end he has been soliciting input
from all comers. It looks like he has put a lot of thought and research
into it. One day I expect to be thanking Autrijus for important (if
likely difficult to understand) compiler errors and warnings..

http://xrl.us/g3oq

   WWW::Kontent Release
Brent 'Dax' Royal-Gordon announced the release of WWW::Kontent 0.01: a
flexible web content management system written in Perl 6 and executable
with Pugs. It looks nifty to me... Maybe we need to fight Ruby on Rails
with Perl 6 on Pylons or something. That doesn't quite have the right
ring to it... there has to be something catch there somewhere.

http://xrl.us/g3or

   Array Interpolation
Phil Crow wondered why his arrays were not being interpolated in pugs.
Ingo Blechschmidt and Patrick explained that @foo does not
interpolate, but @foo[] does. I sense a frequently asked question
here...

http://xrl.us/g3os

   Pugs 6.2.9 Released
Autrijus announced the release of Pugs 6.2.9. It is full of nifty new
feaures including the ability to lay on hands!

http://xrl.us/g3ot

   Whitespace Before Parens
Andrew Shitov wondered why whitespace between function name and parens
was no longer allowed. Autrijus explained that it allows  print (1+2)*3
 to print 9 instead of 3. As someone who just last week explained the
pecularity of ruby printing 3 in the above situation to a complete
novice, I welcome the change.

http://xrl.us/g3ou

   Contain Model Pictures
Autrijus posted a few pretty pictures explaining the compiler and
container models. While the compiler model was readily understandable to
me, the container one wasn't. Fortunately, when prompted Autrijus
provided a great explanation to accompany the diagram.

http://xrl.us/g3ov -- thread

http://xrl.us/g3ow -- containers

http://xrl.us/g3ox -- compilation

   PxPerl 5.8.7-4
Upon discovering that Pugs released a new version, Grégoire Péan
released a new version of PxPerl that includes the new Pugs. I (and many
others) thank Grégoire for lowering the entry bar for Perl 6 hacking on
windows.

http://xrl.us/g3oy

   Hosting Lexical Declarations
Declaring lexicals mid block confuses things, expecially declaring them
mid statement as in  $x = $x + my $x if $x; . Autrijus proposed
hoisting declarations of lexicals to the top of the block.
Unfortunately, this can make CALLER:: do funny things. Thus, he suggests
outlawing it. Larry agreed.

http://xrl.us/g3oz

  Parrot
   export LD_LIBRARY_PATH
Bdonlan noticed that parrot's test suite was not setting LD_LIBRARY_PATH
which makes tests fail. Leo pointed out that most users manually set
their LD_LIBRARY_PATH as parrot often needs this, but he agreed that the
tests should do it just in case.

http://xrl.us/g3o2

   Improved Argument Processing for ops2c.pl
Tom submitted a patch which improves the command line argument
processing powers of ops2c.pl. Warnock applies.

http://xrl.us/g3o3

   ANSI Escape Codes in Parrot
Klaas-Jan Stol was having trouble putting special characters like ANSI
clear screen and ¥ into strings. Nick pointed out that he need to be
careful with encodings and escapes. In parrot \O is an octal escape,
in Lua it is apparently not.

http://xrl.us/g3o4

   Parrot 0.2.3
Leo announced the release of Parrot 0.2.3 Serenity, which reminds me,
Firefly is coming back soon!! I can't wait! Oddly google seems to have
swallowed his release notice but not his warnings...

http://xrl.us/g3o5

   Strange Filename Based Bug
Michal Wallace found a bug that would disappear if the file was renamed.
Leo, with the help of valgrind, provided Michal with a pointer. Michal
used that to find a likely culprit and provide a patch, which Leo then
refined.

http://xrl.us/g3o6

   GDBM Hash on MinGW
François Perrad provided a patch fixing gdbmhash on MinGW. Bernhard
Schmalhofer applied it.

http://xrl.us/g3o7

   PyString Link Problem
François Perrad also fixed a link problem with pystring.o. Jonathan
Worthington applied that patch.

http://xrl.us/g3o8

   Filling a Large Data Structure
Amir Karger wanted to know how to fill a large data structure in PIR
other than 

Re: [perl #36647] 'make languages' should continue after building a language failed

2005-07-27 Thread Matt Fowles
Will~

Doesn't make have something called PHONY to handle that exact case?

Matt

On 7/27/05, Will Coleda [EMAIL PROTECTED] wrote:
 This is because there's a directory called tcl. Since the directly
 already exists, there'd be nothing to make.
 
 Picking a dummy target like this is a way to force the target to
 always be built, regardless.
 
 On Jul 27, 2005, at 10:00 AM, Jerry Gay via RT wrote:
 
  leo's fix (r8695) works just fine on windows :)
 
  but what is all this .dummy business?
 
tcl: tcl.dummy
tcl.dummy:
- $(MAKE_C) tcl
tcl.test:
- $(MAKE_C) tcl test
tcl.clean:
- $(MAKE_C) tcl clean
 
 
  can't that just be
tcl:
- $(MAKE_C) tcl
  etc.
 
  ~jerry
 
 
 
 


-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-Stan Kelly-Bootle, The Devil's DP Dictionary


Perl 6 Summary for 2005-07-19 through 2005-07-26

2005-07-26 Thread Matt Fowles
 plugged a few leaks caused by string_to_cstring.
Leo applied the patch.

http://xrl.us/gv67

   Deleting Globals/Lexicals
Matt Diephouse noted that there was no way to delete globals or
lexicals. Leo posted one (untested) way to do it.

http://xrl.us/gv68

   Generating Win32 Executables
Jonathan Worthington laid some ground work for generating executables on
windows. Leo applied the patch.

http://xrl.us/gv69

   Library Loading on Win32
Jonathan Worthington beefed up the library searching logic in Parrot to
be a little more Windowsy. Leo applied the patch.

http://xrl.us/gv7a

   PBC Merge Utility
Leo posted a request for a utility that could merge several pbc files
into one.

http://xrl.us/gv7b

   Calling Super Methods
Matt Diephouse noticed that there was no way to call the method from a
super class. Leo pointed out a way to do it by accessing the slots of
the parent directly.

http://xrl.us/gv7c

   Cmd Buffer Reallocation
Greg Bacon fixed a bug in the reallocation of the cmd buffer on Win32.
Jonathan Worthington applied the patch.

http://xrl.us/gv7d

   Data::Dump(PGE)
Will Coleda added a TODO for making PGE's match objects compatible with
Data::Dumper.

http://xrl.us/gv7e

   does Hash
Will Coleda wants Data::Dumper to check if an object does Hash or Array
and dump it thusly if no default dump is implemented.

http://xrl.us/gv7f

   rx.ops's future
Will Coleda wondered what the future of the rx ops. Brent 'Dax'
Royal-Gordon, who wrote them, recons they are not long for this work. He
reckonned that the intstacks and the bitmap handling code might be worth
saving.

http://xrl.us/gv7g

   Debugger - List breakpoints
Will Coleda noticed that the debugger was not quite compatible with
perl's. Leo replied that the debuggers whole command loop was a mess
that required a turn of the crank.

http://xrl.us/gv7h

   \u escape issues
Will Coleda opened a ticket for some unicode escape issues. Leo asked
for a test case.

http://xrl.us/gv7i

   string - int conversions
Matt Diephouse noticed that there was no opcode Octal and Hex
conversions. Leo suggested adding one of the form  set Ix, Sy, Ibase #
Ibase = 2..36 .

http://xrl.us/gv7j

   Make  make languages  Failures Nonfatal
Bernhard Schmalhofer suggested that  make languages  should not give
up after the first failure, but should instead build the remaining
languages.

http://xrl.us/gv7k

   Dynclasses on Windows
Nick Glencross and Jonathan Worthington discussed how to make dynclasses
build on windows.

http://xrl.us/gv7m

   Resizable*Array Allocation
Matt Fowles submitted a patch making all the various Resizeable*Array
pmcs share their allocation strategy. Bernhard Schmalhofer applied the
patch.

http://xrl.us/gv7n

   MMD Roundup - Take 2
Nicholas Clark attempted to dewarnock a suggested change by Leo.
Unfortunately, his thoughts on the matter were this is really a call
for the designer to make, isn't it?. Leo suggested starting a WARNOCKED
file for these things. Will countered that adding it to the DESIGN
section in docs/ROADMAP, so Chip needs only look in one place.

http://xrl.us/gv7o

   Parrot Failures on OS X
Nicholas Clark forwards some failures on OS X to the Parrot list (from
the Ponie one).

http://xrl.us/gv7p

   Parrot Needs stderr
Nicholas Clark noticed that running parrot with a closed stderr, makes
parrot unhappy.

http://xrl.us/gv7q

   GMC
Alexandre Buisse and many others have been talking about his Generation
Mark and Compact Garbage Collector. Plans are rapidly taking shape.

http://xrl.us/gv7r

  Perl 6 Language
   User Defined Context Behavior
Ingo Blechschmidt wanted to know how to make is own custom class that
would act specially in list context. Thomas Sandlaß suggested
overloading infix:=. Sadly, his answer doesn't seem to have made it
to google groups.

http://xrl.us/gv7s

   Hash Creation with Duplicate Keys
Ingo Blechschmidt noticed that in Perl 5 hash definitions the right most
duplicate one, whereas the left most wins in Perl 6. He was wondering if
this was a bug or not. Luke explained that it was that way for named
variable bindings. Larry figured it should be that way ONLY for named
variable binding. If Pugs has not done it yet, some brave soul could
probably add tests and find it implemented before they had finished
committing.

http://xrl.us/gv7t

   Tail Calls, Methods, and Currying
Brent 'Dax' Royal-Gordon wondered about Tail calls, noting that the
current method  $obj.can('meth').goto($obj, [EMAIL PROTECTED]);  was 
kinda ugly.
Larry mused that  return g()  should go ahead and tail call. If the
code does not want a tailcall there then it should avoid it manually.

http://xrl.us

[perl #36644] [PATCH] switched resizable*arrays to use resizablepmcarray's allocation strategy

2005-07-25 Thread Matt Fowles via RT
), NEEDED_SIZE(sd-size));
-PObj_active_destroy_SET(dest);
-return dest;
+PMC *copy = SUPER();
+/* copy trimmed extra space */
+PMC_int_val2(copy) = PMC_int_val(SELF);
+return copy;
 }
 
 }
@@ -192,6 +189,7 @@
 Initial version  - Matt Fowles 2004-06-11
 Changed allocator to double size - Matt Fowles 2004-06-15
 Added push_integer   - Bernhard Schmalhofer 2004-10-17
+moved available size to int_val2 - Matt Fowles 2005-07-22
 
 =cut
 
Index: classes/resizablefloatarray.pmc
===
--- classes/resizablefloatarray.pmc	(revision 8687)
+++ classes/resizablefloatarray.pmc	(working copy)
@@ -22,12 +22,6 @@
 
 #include parrot/parrot.h
 
-typedef struct _SizeFloatData {
-INTVAL size;
-FLOATVAL data[1];
-} SizeFloatData;
-#define NEEDED_SIZE(n) ((n-1)*sizeof(FLOATVAL) + sizeof(SizeFloatData))
-
 pmclass ResizableFloatArray extends FixedFloatArray need_ext does array {
 
 
@@ -42,15 +36,15 @@
 */
 
 FLOATVAL get_number_keyed_int (INTVAL key) {
-SizeFloatData *sd;
+FLOATVAL *data;
 if (key  0)
 internal_exception(OUT_OF_BOUNDS, 
 ResizableFloatArray: index out of bounds!);
 if (key = PMC_int_val(SELF))
 DYNSELF.set_integer_native(key+1);
 
-sd = (SizeFloatData *)PMC_data(SELF);
-return sd-data[key];
+data = (FLOATVAL *)PMC_data(SELF);
+return data[key];
 }
 
 /*
@@ -65,15 +59,15 @@
 */
 
 void set_number_keyed_int (INTVAL key, FLOATVAL value) {
-SizeFloatData *sd;
+FLOATVAL *data;
 if (key  0)
 internal_exception(OUT_OF_BOUNDS, 
 ResizableFloatArray: index out of bounds!);
 if(key = PMC_int_val(SELF))
 DYNSELF.set_integer_native(key+1);
 
-sd = (SizeFloatData *)PMC_data(SELF);
-sd-data[key] = value;
+data = (FLOATVAL *)PMC_data(SELF);
+data[key] = value;
 }
 
 /*
@@ -94,28 +88,42 @@
 */
 
 void set_integer_native (INTVAL size) {
-SizeFloatData *sd;
 if (size  0)
 internal_exception(OUT_OF_BOUNDS, 
 ResizableFloatArray: Can't resize to negative value!);
 
-sd = PMC_data(SELF);
-PMC_int_val(SELF) = size;
-if (sd == NULL) {
-sd = mem_sys_allocate(NEEDED_SIZE(size));
-sd-size = size;
-} else if (size = sd-size) {
-sd-size = size  2 * sd-size ? 2 * sd-size : size;
-sd = mem_sys_realloc(sd, NEEDED_SIZE(sd-size));
-} else if (size  sd-size / 2) {
-sd-size = size * 3 / 2;
-sd = mem_sys_realloc(sd, NEEDED_SIZE(sd-size));
-} else {
+if(!PMC_data(SELF)) {
+/* empty - used fixed routine */
+if (size  8) {
+SUPER(8);
+PMC_int_val(SELF) = size;
+PMC_int_val2(SELF) = 8;
+}
+else {
+SUPER(size);
+PMC_int_val2(SELF) = size;
+}
+}
+else if (size = PMC_int_val2(SELF)) {
+PMC_int_val(SELF) = size;
+/* we could shrink here if necessary */
 return;
 }
-
-PMC_data(SELF) = sd;
-PObj_active_destroy_SET(SELF);
+else {
+INTVAL cur, needed;
+cur = PMC_int_val2(SELF);
+if (cur  8192)
+cur = size  2 * cur ? 2 * cur : size;
+else {
+needed = size - cur;
+cur += needed + 4096;
+cur = ~0xfff;
+}
+PMC_data(SELF) = mem_sys_realloc(PMC_data(SELF),
+cur * sizeof(FLOATVAL));
+PMC_int_val2(SELF) = cur;
+PMC_int_val(SELF) = size;
+}
 }
 
 /*
@@ -129,18 +137,10 @@
 */
 
 PMC* clone () {
-SizeFloatData *sd;
-PMC * dest = pmc_new(INTERP, SELF-vtable-base_type);
-
-if (!PMC_data(SELF))
-return dest;
-PMC_int_val(dest) = PMC_int_val(SELF);
-sd = PMC_data(SELF);
-
-PMC_data(dest) = mem_sys_allocate(NEEDED_SIZE(sd-size));
-mem_sys_memcopy(PMC_data(dest), PMC_data(SELF), NEEDED_SIZE(sd-size));
-PObj_active_destroy_SET(dest);
-return dest;
+PMC *copy = SUPER();
+/* copy trimmed extra space */
+PMC_int_val2(copy) = PMC_int_val(SELF);
+return copy;
 }
 
 /*
@@ -154,13 +154,8 @@
 */
 
 void push_float (FLOATVAL value) {
-INTVAL size;
-SizeFloatData *sd;
-
-size = PMC_int_val(SELF);
-DYNSELF.set_integer_native(size+1);
-sd = (SizeFloatData *)PMC_data(SELF);
-sd-data[size] = value;
+INTVAL nextix = DYNSELF.elements();
+DYNSELF.set_number_keyed_int(nextix, value);
 }
 
 /*
@@ -176,19 +171,16 @@
 FLOATVAL pop_float

Perl 6 Summary for 2005-07-05 through 2005-07-12

2005-07-12 Thread Matt Fowles
Perl 6 Summary for 2005-07-05 through 2005-07-12
All~

Welcome to another summary from the frog house. A house so green it can
be seen from outerspace (according to google earth).

  Perl 6 Compiler
   Building Pugs Workaround
Sam Vilain posted a useful work around to the error error: field
`_crypt_struct' has incomplete type which occurs on some systems.
Fortunately, Salvador Ortiz Garcia found a fix.

http://xrl.us/gqjy

http://xrl.us/gqjz

   Pugs, Pirate. Pirate, Pugs.
Autrijus began plotting with the Pirate folks. Thoughts include unifying
PIL and PAST or possibly retargeting PIL to PAST. Perhaps the result
should be a more nautical dog... maybe schipperke.

http://xrl.us/gqj2

   Implicit Invocants and Pain
Larry (as will be summarized later) ruled that  ./method  was gone. he
further ruled that  .method  would pitch fits at either compile or run
time if  $_ =:= $?SELF  was false. Autrijus found this quite difficult
to implement. Talk continues, my instincts tell me that this too will
pass, although Larry assures us that it is absolutely permanent for at
least a week.

http://xrl.us/gqj3

  Parrot
   Key Question
Klass-Jan Stol found that using a assigning a floating point value to a
key and then using it make parrot segfault. Warnock applies.

http://xrl.us/gqj4

   Parrot Copyrights
Allison Randal hinted that The Perl Foundation has almost finished
hammering out some legal stuff and there will soon be sweeping changes
throughout the repository addressing copyright issues.

http://xrl.us/gqj5

   Character Classes in Globs
Will Coleda noted that Tcl would pass more tests if PGE supported
characters classes in globs. Patrick, unable to resist the siren call of
passing tests, implemented it.

http://xrl.us/gqj6

   Amber for Parrot
Roger Browne announced that he had succeed in extracting viable DNA from
a Parrot encased in amber since the Jurasic age. Either that or he
release Amber version 0.2.2... not sure which.

http://xrl.us/gqj7

   Leo's Branch
Leo has created a branch in SVN (branches/leo-ctx5) of his work
implementing the new calling conventions. This led to some discussion of
how to deal with optional arguments.

http://xrl.us/gqj8

http://xrl.us/gqj9

   Leo's Branch Meets mod_parrot
Jeff Horwitz posted some observations and troubles he was having with
Leo's branch of new calling conventions. Leo warned that the branch was
still young, but would gladly take test cases.

http://xrl.us/gqka

   Leo's Branch Meets PGE
After the initial discussion of optional parameter, Patrick updated the
leo_ctx5 branch of PGE to the new calling conventions. All tests pass.

http://xrl.us/gqkb

   Get onto the Bus
Matt Diephouse found a Bus Error when running
languages/tcl/examples/bench.tcl. Warnock applies.

http://xrl.us/gqkc

   MinGW Patch Resurrection
François Perrad resurected a patch from mid June with a set of action
items. Warnock applies.

http://xrl.us/gqkd

   Scared Parrots Like Scheme
Joh Lenz posted an announcement that he had an alpha version of Chicken
(a Scheme to C compiler) backending to Parrot. Leo provided answers to
some of his questions.

http://xrl.us/gqke

   Bytecode vs PMCs
Matt Diephouse posted a list of questions about the place of PMCs. Some
of the core tradeoffs include: maintability, portability, optimization,
duplicate implementations, and security.

http://xrl.us/gqkf

   make svnclean
Leo pointed out that make svnclean got removed, but that he found it
useful. Chip suggested that it be renamed make svnclobber, as it does
more than just clean.

http://xrl.us/gqkg

   pmc2c.pl Bug
Nicholas Clark found a bug in the shortcut to avoid writing a pmc dump
file. Warnock applies.

http://xrl.us/gqkh

   Define cache
Nicholas Clark suggested that it was probably not wise to #define
cache. So they removed it.

http://xrl.us/gqki

   Parrots Getting Smarter
Leo pointed out that at least one parrot understood the concept of zero,
putting it some distance ahead of romans when it comes to math. Once the
Parrots start to grow opposable thumbs, I will welcome our new Parrot
overlords.

http://xrl.us/gqkj

   Leo's Branch Meets Exceptions
Leo posted two suggestions for how the new calling conventions could
interact with Exceptions. Autrijus liked the one that unifies exception
handlers with the rest of calls and returns.

http://xrl.us/gqkk

   Control Flow Graph Bugs
Curtis Rawls noted what he thought might be a bug in the
compute_dominators function. Leo confirmed that it was likely a bug.
Later he posted a note saying he was working on a new implementation for
some of the CFG algorithms. He asked for a hand, but Warnock applied.
Actually, I think I have 

Re: Summarizer Suggestion...

2005-07-06 Thread Matt Fowles
Will~

On 7/6/05, Will Coleda [EMAIL PROTECTED] wrote:
 
 It would be nice if the summarizers also summarized the various
 Planet RSS feeds of journal entries, if those entries were
 sufficiently relevant.

I would be willing to do that, but I can't speak for Piers...

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: [perl #36437] [BUG] PGE recursion, bus error

2005-07-01 Thread Matt Fowles
All~

On 7/1/05, Luke Palmer [EMAIL PROTECTED] wrote:
  Attempting to come up with a simplistic math grammar that has one possible
  operand (A) and one possible operator (*) - so that things like A, A*A, and
  A*A*A*A*A are all parsed. This simplistic example (thanks to spinclad on
  #perl6) cause PGE to explode.
 
  $ cat ta.p6r
  grammar f;
  rule atom  { A }
  rule binary { expr \* atom }
  rule expr { binary }
 
 That probably shouldn't die so horribly, but it should die.  We don't
 support left-recursive grammars, and this is one.  A
 non-left-recursive grammar that matches the same language is:
 
 grammar f;
 rule atom { A }
 rule binary { atom \* binary }

Not to pick gnits or show off my ignorance too much, but shouldn't the
binary rule make the second part optional somehow?

 rule binary { atom [\* binary]? }

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: coroutines

2005-06-30 Thread Matt Fowles
Leo~

On 6/30/05, Leopold Toetsch [EMAIL PROTECTED] wrote:
 Nice summary with examples:
 
 ftp://ftp.inf.puc-rio.br/pub/docs/techreports/04_15_moura.pdf
 
 and we still have to define semantics of parrot couroutines, e.g. WRT
 argument passing. See also Dan's blogs about couroutines,

I prefer the option of repassing arguments to coroutines.  It is
slightly easier to emulate not repassing with repassing then vice
versa.  That and it just feels more powerful to me.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Parrot Segfault

2005-06-29 Thread Matt Fowles
Jens~

On 6/29/05, Jens Rieks [EMAIL PROTECTED] wrote:
  #13 0x0808588e in main (argc=1, argv=0xb8ac) at imcc/main.c:637
 Can you please run
 print ((char**)0xb8ac)[1]
 to find out which file causes the coredump??

Sure!

 gdb ./parrot core
snip/
Core was generated by `./parrot --gc-debug
/home/mfowles/perl6/parrot/t/pmc/io_1.pir'.
Program terminated with signal 6, Aborted.
snip/
(gdb) print ((char**)0xb8ac)[0]
$3 = 0xb9ee /home/mfowles/perl6/parrot/t/pmc/io_1.pir
(gdb) print ((char**)0xb8ac)[1]
$4 = 0x0

Hope that helps,
Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Perl 6 Summary for 2005-06-21 through 2005-06-28

2005-06-29 Thread Matt Fowles
Patrick~

On 6/29/05, Patrick R. Michaud [EMAIL PROTECTED] wrote:
 On Tue, Jun 28, 2005 at 08:11:24PM -0400, Matt Fowles wrote:
 Parrot Loses with Fedora Core 4
  Patrick reported that Fedora Core 4 and Parrot don't get along well. Leo
  suggested a possible solution. No response from Patrick.
 
 An update:
 
 Patrick submitted a patch based on Leo's suggestion, Leo applied
 the patch, and now Fedora Core 4 (gcc 4.0) and Parrot seem to get
 along just fine.
 
 I guess I should've cc'ed my patch to the list...?

It is generally my preferences to see things started on the list
finished on the list.  But then again, I am in a slightly odd
position...

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Parrot Segfault

2005-06-29 Thread Matt Fowles
Leo~

On 6/29/05, Leopold Toetsch [EMAIL PROTECTED] wrote:
 Matt Fowles wrote:
 
  Core was generated by `./parrot --gc-debug
  /home/mfowles/perl6/parrot/t/pmc/io_1.pir'.
 
 Ah. ok. That's a TODO tests that is supposed to fail. It is testing io
 opcodes with undefs and integer PMCs.
 
 As soon as the io opcodes are methods in ParrotIO we get type safety and
 appropriate error messages.

Would it be reasonable to not run tests that are known to leave core
files?  I feel like after a successful build there should not be
evidence like this left around...

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Parrot Segfault

2005-06-28 Thread Matt Fowles
All~

Although all tests pass, a core file is created during the test run. 
Here is a little snippet from GDB.  I am running a fairly stock Debian
Testing x86 (slightly out of date).

(gdb) list
1006INTVAL
1007PIO_putps(theINTERP, PMC *pmc, STRING *s)
1008{
1009ParrotIOLayer *l = PMC_struct_val(pmc);
1010ParrotIO *io = PMC_data0(pmc);
1011assert((unsigned int)l != 0xdeadbeefU);
1012assert(io != 0);
1013return PIO_write_down(interpreter, l, io, s);
1014}
1015
(gdb) p l
$1 = (ParrotIOLayer *) 0xdeadbeef
(gdb) bt
#0  0x4020e741 in kill () from /usr/lib/debug/libc.so.6
#1  0x40024771 in pthread_kill (thread=595, signo=0) at signals.c:65
#2  0x40024a7b in __pthread_raise (sig=1073917184) at signals.c:187
#3  0x4020e4d4 in *__GI_raise (sig=6) at
../linuxthreads/sysdeps/unix/sysv/linux/raise.c:34
#4  0x4020fa08 in *__GI_abort () at ../sysdeps/generic/abort.c:88
#5  0x40207b3f in *__GI___assert_fail (assertion=0x0, file=0x0,
line=0, function=0x8219864 PIO_putps) at assert.c:83
#6  0x08128193 in PIO_putps (interpreter=0x826e050, pmc=0x82a93e8,
s=0x843c7d8) at io/io.c:1011
#7  0x080e9c67 in Parrot_print_p_sc (cur_opcode=0x84d837c,
interpreter=0x826e050) at io.ops:308
#8  0x08158aa0 in runops_slow_core (interpreter=0x826e050,
pc=0x84d837c) at src/runops_cores.c:153
#9  0x08156f0d in runops_int (interpreter=0x826e050, offset=0) at
src/interpreter.c:750
#10 0x08157de5 in runops (interpreter=0x826e050, offs=0) at src/inter_run.c:81
#11 0x080c3031 in Parrot_runcode (interpreter=0x826e050, argc=1,
argv=0xb8ac) at src/embed.c:831
#12 0x080c2e72 in Parrot_runcode (interpreter=0x826e050, argc=1,
argv=0xb8ac) at src/embed.c:765
#13 0x0808588e in main (argc=1, argv=0xb8ac) at imcc/main.c:637

Thanks,
Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


myconfig
Description: Binary data


Perl 6 Summary for 2005-06-21 through 2005-06-28

2005-06-28 Thread Matt Fowles
Perl 6 Summary for 2005-06-21 through 2005-06-28
All~

Long time no see... err, write... uh, read... um... this. Yeah, long
time no this. As Piers hinted, two weeks ago I moved. Moving sucks. For
those of you who care, I am still in Cambridge, for those of you who
care more, I think you misunderstand the summarizer/summary reader
relationship. Essentially it revolves around summaries, and the summary
of my move is Cambridge to Cambridge.

As Piers noted last week, this is a low volume high action week. In no
small part do to the hack-a-thons. Last week's was in Austria, this
week's is near Toronto. Perhaps some nice soul who was actually at these
hack-a-thons will summarize it when it is over.

  Perl 6 Compiler
Patrick announced that PGE now supports grammars and more built-in
rules. He even offered to field requests for built-in rules (although he
would prefer patches).

http://xrl.us/gkev

   Caller's Context
Gerd Pokorra wanted to know how to determine if his sub is called in
void context. He conjectured that want might fill his wants. No response
yet.

http://xrl.us/gkew

   Self Hosting Goals
Millsa Erlas explained that one good reason for Perl6 to be self hosting
is that it would allow the people who love it most (Perl hackers) to
hack on it. The theory being that low level languages like C
unnecessarily narrow the field of contributors (especially those that
only know perl). Some concerns were expressed over confusion about the
language Ponie should be written in. No one disputes this... C.

http://xrl.us/gkex

  Parrot
   Indexing Hashtables
Klaas-Jan Stol asked for a clue bat with respect to indexing hash tables
in PIR. Joshua Juran and Leo each took a swing.

http://xrl.us/gkey

   Parrot Loses with Fedora Core 4
Patrick reported that Fedora Core 4 and Parrot don't get along well. Leo
suggested a possible solution. No response from Patrick.

http://xrl.us/gkez

   Default Method Resolution Order
Roger Browne wondered what the default MRO order was. Leo provided the
answer: left-to-right, depth-first, discard all but the last occurrence
of duplicates, divine intervention.

http://xrl.us/gke2

   Win32 Tests Failing
Craig the Last-Nameless-One posted a list of failing tests and problems
on Windows. Leo provided a few answers.

http://xrl.us/gke3

   Method Inheritance Needs Perl Loving
Leo announced a perl job for the interested: method inheritance in the
PMC compiler. This naturally led to discussion of numerical hierarchies.
I was a little disappointed the quaternions got mentioned, but
Hamiltonian and Surreal Numbers were left out. Honestly, where are our
priorities.

http://xrl.us/gke4

   Tracing and Debugging Pain
Matt Diephouse posted a general description of the problems he was
having with tracing, debugging, and GC. Warnock might apply in a day or
two.

http://xrl.us/gke5

   Segmented Context and Register Memory
Chip posted a partial reply to Leo's context and register overhaul
patch. Andy Dougherty responded to some of Chip's finer points. If you
are interested in the nuances of C's pointer pain, this thread makes an
interesting read.

http://xrl.us/gke6

   Improving Parrot's Test Framework
chromatic wants to improve parrots test framework by stealing ideas from
Test::Class. He wants to know if anyone else is interested in this.

http://xrl.us/gke7

   setattribute Fails with Multi-level Inheritance
Roger Browne opened a ticket describing an error with setattribute when
several layers of inheritance are used.

http://xrl.us/gke8

   Register Allocation Bug
Leo opened a ticket for a problem with improper control flow tracking.
Bill Coffman wondered whether the new register design had been
implemented yet.

http://xrl.us/gke9

   Pass by Value PMCs
Klaas-Jan Stol mused that the new calling conventions could be leveraged
to allow passing PMCs by value.

http://xrl.us/gkfa

   Parrot Fall Down Go Boom
Matt Fowles reported a segfaulting parrot that passes its tests. Sadly,
no one solved his problem in the 4 hours between his posting it and
writing the summary.

http://xrl.us/gkfb

  Perl 6 Language
   You Know That, But You Go On
As Piers noted, arguments about  ./method  vs  .method  continue.
Like Piers, I don't like ./. I guess I was the only person who did
like $^ as the invocant. Ah well, I guess I will just go on
summarizing...

http://xrl.us/gkfc

   Binding Functions
Piers wanted to use a Ruby idiom involving rebinding functions. Damian
told him that he could, but also pointed him to  wrap .

http://xrl.us/gkfd

   OO Questions
BÁRTHÁZI András posted a question about method calls in Perl 6. Juerd
and Piers provided answers.

http://xrl.us/gkfe

   Autoload

Re: Attack of the fifty foot register allocator vs. the undead continuation monster

2005-06-12 Thread Matt Fowles
Chip~

On 6/12/05, Chip Salzenberg [EMAIL PROTECTED] wrote:
 I'd like like to note for other readers and the p6i archives that
 Piers has failed to grasp the problem, so the solution seems pointless
 to him.  I'm sorry that's the case, but I've already explained enough.

This response worries me firstly because of its rudeness and second
because of the problem itself.  As I see it there are four
possibilities a:

1) Chip is right, Piers is wrong.  This is a complex problem and
refusing to explain it means that others will doubtless also
misunderstand it, which you have a chance to preempt here.

2) Chip is wrong, Piers is right.  This is a complex problem and
refusing discussion on it would be a costly mistake.

3) Chip is right, Piers is right. The two of you have are working from
a different base set of definitions/axioms or misunderstood each other
in some other way.

4) Chip is wrong, Piers is wrong.  Shutting down open conversation so
forcefully and caustically will prevent discussion in the future and
this problem will continue to haunt parrot as no viable solution has
been seen.

Regardless of which of these possibilities is true.  I see a need for
more discussion of this issue.  Preferably a discussion that does not
degrade into backhanded insults.  I have my own ideas about this
problem, but I will save that for another response.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Regarding Google's Summer of Code 2005

2005-06-03 Thread Matt Fowles
All~

On 6/3/05, Curtis Rawls [EMAIL PROTECTED] wrote:
 On 6/3/05, Leopold Toetsch [EMAIL PROTECTED] wrote:
  Dheeraj Kumar Arora wrote:
  I m interseted in  one of LLVM project
   Implement well-known optimizations in PIR compiler (SSA - 
   register
   allocation)
 
  [ I have answerd this ]
 
  Parrot is a register based virtual machine with 32*4 registers. There
  are a lot of studies WRT optimizations and register allocations for
  compilers and hardware CPUs but probably all these things can be applied
  to Parrot too. See also imcc/cfg.c and imcc/reg_alloc.c for existing code.
 
  I'm not a computer scientist nor am I able to follow most of the papers
  regarding various optimization techniques or the needed infrastructure
  to implement it
 
  Anyway, there are folks on our mailing list like Curtis Rawls, who could
  probably better summarize what's needed and what should be done.
 
   Can Any send me the details?
 
  Yes please, folks.
 
  leo
 
 Wow, thanks for the link to the Summer of Code, that looks like fun!
 (I know I'll be thinking about my proposal all day at work : ).
 
 I don't have my TODO list with me, I will try to post it later today.
 
 I have been working and thinking about improvements to the Parrot/IMCC
 optimizer for a while now.  Implementing SSA is definitely at the top
 of my list, because it simplifies a lot of optimizations and makes
 some others possible.  The biggest challenge is to graft such a big
 change onto a working system, with small changes at a time.

I know that Melvin Smith (aka Mr JoltCola) was planning on a full
scale rewrite of imcc.  His plan involved SSA.  I don't know what came
of that; I think that he ran out of tuits...

But you might ask him where he is.  I cc'ed him on this email...
 
Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Register Allocation and Continuations problem definition

2005-06-03 Thread Matt Fowles
All~

On 6/3/05, Bill Coffman [EMAIL PROTECTED] wrote:

 There are several threads in the parrot mailing list that discuss the
 continuations problem. I hoped to be able to address parrot register
 allocator again, at some point, but it could be a while before I get to
 that. In the mean time, search the perl6-internals mailing list for
 continuations and register allocation. I'm sure you'll find it.

I would actually very much like to see this issue moved on.  In the
hopes of getting everything up to speed quickly I will try and
summarize all of the discussions and suggestions that have been made. 
I am NOT trying to advocate any particular solution (yet), I just want
to make sure that everyone is on the same page.

I propose that we use this thread to ensure that we are not talking
past each other.  Discussions about specific solutions should and
religion should have a seperate thread.


PROBLEM:

Continuations can be invoked repeatedly.  Whenever a continuation is
reinvoked, the registers must be in a defined state or the code will
behave incorrectly.


BASIC ANALYSIS

The actual state of the registers does not matter as long as it is
well defined.

A) If the registers are defined to be garbage, then every continuation
will start by returning them to the state it expects.

B) If the registers are defined to be preserved, then every
continuation merrily chugs along.

Unfortunately these each have issues and as such much debate ensued.


SUGGESTED SOLUTIONS

1) Context includes registers

+ continuations don't have to preserve specifc registers
+ register allocator can ignore continuations wrt spilling
- copying overheard
- value based registers (IN) return to old values
- pointer based registers (SP) cannot have their pointers moved or
require double indirection


2) Return Continuations include registers, non don't

+ register allocator can remain mostly ignorant
+ only non return continuations need to worry
- promoting a return continuation will force copying as plan (1)


3) register are not restored

+ simple to explain
- register allocator must add many extra interference edges
- largely prevents reuse of register 


4) variable sized register frames

+ never have unused registers
+ no need for a register allocator
+ could correspond directly to scratchpad
- more complicated
- no register reuse
- large architectural change
- more custom allocation (can't pool register sets)


I believe the official spec calls for (2); however, I do not believe
that it is currently implemented.

Once again in this thread please try to remain objective and just
summarize/correct.  We can start a new thread to hash out the minutia
of pro's/con's and new ideas, I just want everyone to be on the same
page.
 
Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Perl 6 Summary for 2005-05-24 through 2005-05-31

2005-05-31 Thread Matt Fowles
Perl 6 Summary for  2005-05-24 through  2005-05-31
All~

Welcome to another Perl 6 summary, brought to you by Aliya's new
friends, Masha Nannifer and Philippe, and my own secret running joke.
Without further ado, I bring you Perl 6 Compiler.

  Perl 6 Compiler
   method chaining
Alex Gutteridge discovered that he couldn't chain attribute access like
 $bowl.fish.eyes.say;  in Pugs. Later he provided his example in test
form (in case anyone wanted to add it). Maybe they were added to the
test suite, maybe not: Warnock applies.

http://xrl.us/f95k

   Pugs link issues on Debian Sid
BÁRTHÁZI András was having trouble making Pugs work on Debian Sid with
perl 5 support. Autrijus provided helpful pointers. I assume from his
final silence that the final pointer worked.

http://xrl.us/f95m

   Pugs.AST.* compilation
Samuel Bronson wanted to speed up the compilation of Pugs.AST.* modules
by turning off optimizations. Autrijus told him that this was a core
module that needed it speed, and optimizations would stay.

http://xrl.us/f95n

   Pugs.Types export list
Samuel Bronson added an export list to Pugs.Types. Autrijus happily
applied it and send him a commit bit.

http://xrl.us/f95o

   export withArgs from Main
Samuel Bronson added an export to Main. Samuel Bronson happily applied
it himself this time.

http://xrl.us/f95p

   out-of-date hs-plugins
Vadim was having trouble compiling Pugs with Parrot support. Autrijus
helped him fix his problem, and there was much rejoicing.

http://xrl.us/f95q

   chomp problem
Jens Rieks found a problem with chomp and submitted a test. Warnock
applies.

http://xrl.us/f95s

   Pugs makefile issue
Grégoire Péan noticed that pugs was creating a useless Pugs.exe.bat.
Autrijus asked if he would be willing to investigate a patch. He
responded that he would put it in his queue.

http://xrl.us/f95t

   loop or do
Gerd Pokorra wondered why  do { ... }  was in Pugs reasoning that 
loop { ... } while  was the correct thing. Luke Palmer explained that 
do { ... }  was part of the with or without a postfix  while .

http://xrl.us/f95u

   PxPerl 5.8.6.2 with Pugs 6.2.5 and Parrot 0.2.0
Grégoire Péan announced that the release of PxPerl 5.8.6.2 which
includes Pugs 6.2.5 and Parrot 0.2.0. This means that windows folk can
test Pugs and Parrot without having to fight with compilers.

http://xrl.us/f95v

   BUILD errors
Carl Franks was confused by that handling of a named argument to a
constructor. He asked for confirmation but none was provided. Perhaps
this poor summary save him.

http://xrl.us/f95w

   whitespace and function calls
David D Zuhn didn't know that whitespace between and function call and
its parentheses was forbidden. Carl told him that and about the  .() 
variant which allows whitespace.

http://xrl.us/f95x

   Pug's make cean issues LONG commands
Carl Franks noticed that make clean issued a command so long that it
broke his nmake. Fortunately he had a really old nmake and updating
fixed the problem.

http://xrl.us/f95y

  Parrot
   thr_windows.h with MinGW
François Perrad provided a patch fixing two compilation problems in
thr_windows.h. Warnock applies.

http://xrl.us/f95z

   Parrot Slides?
Adam Preble posted a request for slides and notes on Parrot and Perl 6
for a presentation he was working on. Many people provided links in
various languages. I usually steal from Dan's presentations when I need
something like this...

http://xrl.us/f952

   Problems with Perl 5.6.1
François Perrad had a problem building Parrot with MinGW and Perl 5.6.1.
The problem was related to windows and its binary vs text distinction.
This problem will also crop up if you ever try to seek on files in
windows. Not that I have ever lost several days debugging that problem.

http://xrl.us/f953

   ordered hash thoughts
Leo posted his thoughts on a modification to ordered hash as adding a
new element by index breaks the string hashing part of it. Dan suggested
that the ordered hash just pitch exceptions in the bad cases as it was
designed to be lightweight and fast.

http://xrl.us/f954

   subrules tests
Dino Morelli provided a patch adding tests for subrules to PGE. Warnock
applies.

http://xrl.us/f955

   python on parrot
Bloves inquired as to the state of python on parrot. The phrasing of the
question itself provided some confusion. Michal Wallace provided a link
to pirate, hoping it would help.

http://xrl.us/f956

   Resizable*Array defeats list.c
Slowly but steadily my {Fixed,Resizable}typeArray PMCs are defeating
the less consistent array implementations. Leo offered the job of
slaying list.c to any interested partied. Jerry Gay expressed interest.

http://xrl.us/f957

   

Perl 6 Summary for 2005-05-03 through 2005-05-17

2005-05-18 Thread Matt Fowles
Perl 6 Summary for 2005-05-03 through 2005-05-17
All~

Welcome ot another fortnight's summary. Wouldn't it just figure that I
can't think of anything sufficiently non-sequiterish to amuse myself.
Perhaps I need a running gag like Leon Brocard or chromatic's
cummingseque capitalization Maybe I should start one and not tell
you. That could be fun.

Sorry for spelling errors, gmails spell checker is busted for the moment.

  Perl 6 Compiler
   pugs commit emails
If you have ever been foolish enough to want to get an email for every
commit in Pugs, Sam Vilain created a way to help you sip from the
firehose. Have fun.

http://xrl.us/f5q7

   given when nested
Luke Palmer had a question about how nested when statements in a given
block should act. His intuition disagreed with Pugs, but most others
supported Pugs.

http://xrl.us/f5q8

   I don't need to walk around in circles
Autrijus has made Pugs into a registered compiler for Parrot. Since Pugs
already allowed you to embed parrot code (well pir anyway) directly into
perl 6, this allows you to embed the perl 6 in your pir in your perl 6.
Now the possibilities are endless, at least until you blow your mental
stack. Those of you with tail call optimization in your mental stack may
simply go into an infinite loop if you prefer.

http://xrl.us/f5q9

   xor on lists
Trewth Seeker expressed his opinion about the proper definition of xor
quite strongly. Unfortunately, his opinion is at odds with established
mathematics, as Mark Biggar pointed out to him.

http://xrl.us/f5ra

   PGE features update
Patrick provided an update on the state of the Perl Grammar Engine. It
has many nifty new features.

http://xrl.us/f5rb

   Pugs on Cygwin
Rob Kinyon and Gaal Yahas worked to improve Pugs support for Cygwin.
Unfortunately the thread winds down with an unanswered question,
fortunately Stevan clued me in on IRC that things are working just yet.

http://xrl.us/f5rc

   Pugs gets some objects and some rules
Autrijus announced that Pugs now has basic support for Objects and
Rules. Sometimes he scares me. Usually he just makes me really want to
learn haskell though.

http://xrl.us/f5rd

   regression test
Miroslav Silovic provided a regression test for hyper ops. Some people
just don't appreciate the fun of regressing.

http://xrl.us/f5re

   basic test for classes
Stevan Little provided a patch for a simple object test. Autrijus
applied it. Odd, cause I am pretty sure that Stevan has the commit
bit...

http://xrl.us/f5rf

   torturing PGE
Juerd provided a link to a big rule that could segfault PGE. Kind
reminds me of a homework assignment I had to create a regular expression
which matched all strings of numbers that did not contain any repeated
digits. Easy in perl, but hard in math. I think the resultant regex was
somewhere around 17 MB.

http://xrl.us/f5rg

   Pugs 6.2.3 with Live CD
Autrijus released Pugs 6.2.3 which contains 10% more awesome then Pugs
6.2.2. You should check it out on the live CD that Ingo Blechschmidt
released.

http://xrl.us/f5rh -- release anouncement

http://xrl.us/f5ri -- live CD

   PXPerl meets Pugs
Grégoire Péan announced that he has added Pugs binaries to his windows
distribution of Perl. Pretty cool. Autrijus innocently asked him to take
on the slightly larger task of producing binaries of Parrot too, so that
Pugs could be at its more powerful.

http://xrl.us/f5rj

  Parrot
Wow did you see how I mentioned Parrot before going into. That was like
an awesome transition. My high school english teachers would be so
proud...

   character classes
Patrick wants character class opcodes of the form find first and find
first not. Leo pointed him to some hysterical raisins who might help.

http://xrl.us/f5rk

   PGE on MinGW
François Perrad fixed a problem with building PGE on MinGW. Patrick
applied the patch.

http://xrl.us/f5rm

   PIO_fdopen return value
Luke Palmer both intoduced me to the wonderfully cute phrase untodid
and provided a patch making PIO_fdopen return NULL when give bad flags.
Leo applied the patch, but Melvin Smith warned that this might be a bad
idea. Silence after that.

http://xrl.us/f5rn

   embedding initialization
Jeff Horwitz was having trouble embedding PIR into C. Leo provided some
pointers. Jeff was happy.

http://xrl.us/f5ro

   Test::Builder updates
Previously, Michael G Schwern announced an update to Test::Builder.
chromatic asked if it was worth the upgrade. Michael replied probably,
but I don't think anyone has acted on it.

http://xrl.us/f5rp

   miniparrot
Robert Spier created a miniparrot at Bernhard Schmalhofer request. This
miniparrot does not replace our make system, but it does make our
  

Perl 6 Summary for 2004-04-26 through 2005-05-03

2005-05-03 Thread Matt Fowles
Perl 6 Summary for 2004-04-26 through 2005-05-03
All~

Welcome to another weeks summary. This week I shall endeavor not to
accidentally delete my summary or destroy the world. So here we go with
p6c.

  Perl 6 Compilers
   implicit $_ on for loops
Kiran Kumar found a bug in pugs involving  for  loops which use $_ but
don't iterate over it. Aaron Sherman and Luke Palmer confirmed the bug.
No word as to its final status, but given the rate of development of
pugs...

http://xrl.us/fyof

   Pugs Darcs trouble
Glenn Ehrlich noticed that pugs's darcs repository wasn't getting
updated. Sam Vilain explained that occasionally a daemon needed to be
kicked.

http://xrl.us/fyog

   Memory Game v0.2
BÁRTHÁZI András announced the release of the latest version of Memory.
He also put out a call for 85x75 pixel photos for the next version.

http://xrl.us/fyoh

   Haddock for Pugs
Stuart Cook decided that the easiest way for him to understand Pugs
internals was to provide better documentation. To that end he started
working with haddock to automatically generate cross linked
documentation for pugs. He even met with some success.

http://xrl.us/fyoi

/haskell.org/haddock/ in http:

is export  trait
Garrett Rooney wondered why the  is export  trait appeared to do
nothing in Pugs. Stevan Little explained that it was just a place holder
which, while it parses, does nothing semantically yet.

http://xrl.us/fyoj

   Pugs 6.2.2
Autrijus proudly announced the release of Pugs 6.2.2. It features a
great many changes. High on that list is a great number of speed ups and
thread safe, dead lock free internal storage.

http://xrl.us/fyok

   Pugs on Cygwin
Rob Kinyon noticed that Pugs was having trouble on Cygwin. He has made
some headway rectifying the situation, although work remains.

http://xrl.us/fyom

   Pugs TODO model
Stevan has put some more thought into the TODO model for Pugs. His
latest suggestion, annotating todo tests with a flag indicating why they
are not passing, seems a little less hackish then the last one and
received general support.

http://xrl.us/fyon

   Parrot hiding inside Pugs
Autrijus wanted to embed the newly released PGE. PGE is written in PIR
which runs on Parrot. So, Autrijus decided to embed Parrot into Pugs. He
also posted an interesting link to JHC as a possible bootstrap solution.

http://xrl.us/fyoo

/repetae.net/john/computer/jhc/jhc.html in http:

   new PGE released
Maybe I should have mentioned this first... Patrick R. Michaud released
a new version of the Parrot Grammar Engine. It is written entirely in
PIR and generates PIR code. It has many features but not enough tests...
cough hint /cough

http://xrl.us/fyop

  Parrot
   Monthly Release?
Jared Rhine wondered the monthly releases included April. Chip announced
that April's release would be slushier then most, but would start on the
fourth.

http://xrl.us/fyoq

http://xrl.us/fyor

   t/op/debuginfo.t failure
François Perrad noticed a failure in with debuginfo. Leo pointed out
that it was an issue of flushing output handles. Francois provided a
patch (well actually two). Warnock applies to the second.

http://xrl.us/fyos

   ParTcl Happy?
Will Coleda thought that ParTcl's GC bugs were finally fixed. Leo burst
his bubble. Apparently these GC bugs can disappear and reappear
according to sun spot activity.

http://xrl.us/fyot

   segfault in load_bytecode
Nick Glencross submitted a patch fixing a segfault in load_bytecode.
Jens pointed out that it should use real_exception instead of
internal_exception. chromatic offered to write the test. No official
committed message though...

http://xrl.us/fyou

   large PackFile tinker
Leo implemented a change in the interpreter PackFile structure which has
been under discussion for a long time. Unfortunately, it has the
potential to break a lot of JIT stuff. Tests and fixes would be greatly
appreciated.

http://xrl.us/fyov

   PMC inheritance issue
Nicholas Clark was having some trouble with his Perl5 PMCs. Later he
posted a mea culpa email, but Leo provided some useful pointers
anyway.

http://xrl.us/fyow

   RT cleanup
Bernhard Schmalhofer cleaned out an old ticket from RT.

http://xrl.us/fyox

   RFC assign Px, Py
Some time ago, Leo requested comments on the semantics of assign. Brent
'Dax' Royal-Gordon tried to de-Warnock the thread with his support. He
also suggested a clone operator.

http://xrl.us/fyoy

   NULL in real_exception
Nicholas Clark was getting bitten by a NULL pointer deref in
real_exception. Leo pointed him toward the correct approach.

http://xrl.us/fyoz

   unary operator overhaul
Having finished overhauling the infix operators, Leo set to work

Re: disassemble segfaults

2005-05-03 Thread Matt Fowles
Bob~

On 5/3/05, Bob Rogers [EMAIL PROTECTED] wrote:
. . . but I can't figure out why.  I thought the patch below would
 help, but it appears that the value of c is itself broken somehow.
 
 . . .
 This GDB was configured as i586-suse-linux...
 (gdb) r runtime/parrot/library/config.pbc
 Starting program: /usr/src/parrot/disassemble 
 runtime/parrot/library/config.pbc
 [New Thread 16384 (LWP 24464)]
 [New Thread 32769 (LWP 24466)]
 [New Thread 16386 (LWP 24467)]
 [New Thread 32771 (LWP 24468)]
 
 Program received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 16384 (LWP 24464)]
 0x08083966 in Parrot_disassemble (interpreter=0x8253d00) at 
 src/embed.c:880
 (gdb) bt
 #0  0x08083966 in Parrot_disassemble (interpreter=0x8253d00) at 
 src/embed.c:880
 #1  0x08082871 in do_dis (interpreter=0x8253d00) at src/disassemble.c:99
 #2  0x0808283f in main (argc=2, argv=0xb554) at src/disassemble.c:79
 (gdb)
 
 I find disassemble useful, but it seems subject to periodic bit rot.
 So, I think I would like to write some basic tests for it.  Is it worth
 extending Parrot::Test to include disassemble_output_is, etc., or should
 I do something more special-purpose?
 
 -- Bob Rogers
http://rgrjr.dyndns.org/
 
 
 Index: embed.c
 ===
 --- embed.c (revision 7955)
 +++ embed.c (working copy)
 @@ -877,7 +877,7 @@
  if (line-label)
  PIO_printf(interpreter, L%li:\t, line-label-number);
  c = pdb-file-source + line-source_offset;
 -while (*c != '\n'  c)
 +while (*c  *c != '\n')
  PIO_printf(interpreter, %c, *(c++));
  PIO_printf(interpreter, \n);
  line = line-next;
 

Not knowing any of the surrounding code, shouldn't that be

while (c  *c != '\n')



Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Alpha development box?

2005-04-25 Thread Matt Fowles
All~

I am near boston so worst case senario I can take it.  But I would
prefer not to if another option is there.

Matt

On 4/25/05, Bob Rogers [EMAIL PROTECTED] wrote:
From: Nicholas Clark [EMAIL PROTECTED]
Date: Mon, 25 Apr 2005 10:37:07 +0100
 
On Sun, Apr 24, 2005 at 09:46:03PM -0400, Bob Rogers wrote:
 
 available; if the money were forthcoming, it could even run Tru64.  Is
 the Parrot project interested in using such a box?  If so, under what
 OS?  And where/how should such a box be hosted/administered?
 
Quite possibly, although I personally wouldn't be one of the people 
 actually
involved in getting something a new home.
 
Which country is the box currently in?
 
Nicholas Clark
 
 It's in Boston, Massachusetts.  It's located in a university research
 center (quite a Perl-friendly one, BTW), and the admin team says they
 would consider hosting and/or administering the box on their network,
 depending on how much access is required.
 
 -- Bob
 


-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Perl 6 Summary for 2005-04-12 through 2005-04-19

2005-04-19 Thread Matt Fowles
Perl 6 Summary for 2005-04-12 through 2005-04-19
All~

Sadly, a slip of the mouse cause me to delete a partially completed
summary, so I am going to push ahead on the rewrite without a witty
intro. Feel free to make one up for yourself involving stuffed animals,
musicians, and dinner.

  Perl 6 Compilers
   Pugs 6.2.0
Autrijus release Pugs 6.2.0 marking the first major milestone for Pugs.
This includes most of the control flow primitives of Perl 6 and is a
testament to the solid work that all of the lambdacamels have been
putting in.

http://xrl.us/ftoo

   CGI.pm and multi byte characters
BÁRTHÁZI András was having trouble encoding and decoding multi byte
characters in CGI.pm. This led to a general discussion of how to escape
such characters in URLs as well as when to call  chr .

http://xrl.us/ftop -- discussion

http://xrl.us/ftoq -- more discussion

   auto currying?
Matthew D Swank wondered if he really needed an extra set of parens to
simultaneously call a function generator and its generated function.
Autrijus told him that yes he did as Perl 6 is not quite Haskell yet.

http://xrl.us/ftor

   case insensitive P5 regex
BÁRTHÁZI András wanted to use the :i switch on P5 regexes. Autrijus
implemented it, but Larry noticed that this introduced a flag ordering
dependency. As a result the new way to supply flags to a perl 5 regex is
 rx:P5imsxg/.../ .

http://xrl.us/ftos

   Cookbook Ettiquette
Marcus Adair wondered if there were rules of etiquette he should obey
when writing examples for the Perl 6 Cookbook. In particular, should
examples run and be only one file. Ovid suggested that one file was a
good idea, but was open to contrary arguments.

http://xrl.us/ftot

   Austrian Parrot/Pugs Hackathon
Thomas Klausner announced that on June 9-10 in Vienna Austria there
would be a Hackathon featuring the collective might of Autrijus, Chip,
Leo, and more. When that much brain power gets together only two things
can happen: much hacking and much drinking.

http://xrl.us/ftou

   encoding illegal byte sequences in strings
BÁRTHÁZI András wanted to know if he could encode an illegal byte
sequence in a string. Much discussion ensued, but Larry promised that it
would be possible.

http://xrl.us/ftov

   Test::TAP
Yuval Kogman announced the release of two new modules to CPAN which
provid Pugs smoke html.

http://xrl.us/ftow -- announcement

http://xrl.us/ftox -- smoke em if you got em

   quoting constructs
Roie Marianer noticed that pugs was missing some quoting constructs and
implemented them. This led to discussion of interoplation and corners
cases. As usual Larry provided both answers and questions. Roie produced
a patch which Autrijus applied.

http://xrl.us/ftoy -- discussion

http://xrl.us/ftoz -- useful pugs hacking pointer

http://xrl.us/fto2 -- the patch

   Code Block as Argument
Stevan Little found some bugs with passing a code block to a function in
pugs. Warnock applies.

http://xrl.us/fto3

   Push, Pop, Shift, and Unshift on Infinite Lists
Stevan Little has been playing with push, pop, shift, and unshift on
infinite lists. He thinks he has found a bug, although maybe he just
hasn't let it run long enough... Larry provided answers as to the
correct semantics.

http://xrl.us/fto4 -- shift unshift

http://xrl.us/fto5 -- push pop

   'cd' issue in Makefile
Jonathan Worthington noticed a Win32 issue in the Makefile. He can point
to the offending line in the autogenerated makefile, but that is not
where it should be fixed. Warnock applies.

http://xrl.us/fto6

   hyperoperator tests
David Christensen provided a patch for hyperoperators. Unfortunately,
character set transcodings ate his patch.

http://xrl.us/fto7

   shift oddity
Stevan Little noticed that shift did not act like pop. Larry noted that
the example were not semantically valid, but even so Pugs should not
freeze.

http://xrl.us/fto8

   Pugs SEGV
Aaron Sherman managed to make Pugs segfault. Autrijus thinks it might
already be fixed.

http://xrl.us/fto9

  Parrot
   Dynamic Perl 2
William Coleda provide the second of his patched to move Perl*PMC out of
the core. Leo applied it.

http://xrl.us/ftpa

   SVN revision in bug reports
jreiks (Jens?) reported a difficult to reproduce bug. This caused Leo to
pine for having the SVN revision in the bug report. Brent 'Dax'
Royal-Gordon commented that this was a good idea. Jens Rieks offered to
implement it.

http://xrl.us/ftpb

   Win32 SDL
Jerry Gay tried to get SDL working on Windows. There was some give and
take, but in the end he got his wish.

http://xrl.us/ftpc

   -l/path/to/icu
Andy Dougherty provided a patch making Configure.pl provide a link flag
to ICU 

Perl 6 Summary for 2005-03-22 through 2005-04-05

2005-04-05 Thread Matt Fowles
  Perl 6 Language
   ceil and floor
Ingo Blechschmidt wondered if ceil and floor would be in the core.
Warnock applies... Although Unicode operators would let me define
circumfix \lfloor \rfloor (although I only know how to make those
symbols in tex...). Hmmm... using tex to right Perl 6 code...
interesting idea... at least then I could figure out how to make all the
special symbols. Maybe someone should make a package for that.

http://xrl.us/foe7

   s/// object?
Stevan Little wanted to know if s/// could return some sort of magic
object that could be poked or prodded. Larry explain, no.

http://xrl.us/foe8

   markup like features
Michele Dondi asked if perl 6 would have markup like features in it.
Luke Palmer asked for a more full explanation of what was meant. Warnock
applies.

http://xrl.us/foe9

   the many moods of  does 
Thomas Sandlaß wondered if S14 would actually be written or if tie/bless
were eaten by does, enumerating the many powers of does. Larry explained
that does will probably have mutated bless and then explained the
contexts under which does does each of its powers.

http://xrl.us/fofa

   the many moods of  does 
To follow up his question about does, Thomas Sandlaß wondered about is
(specifically whether it stubbed or initialized its variable). Larry
explained that is would probably initiliaze its variable and explained
how one could use  is Ref  to stub but not initiliaze something.

http://xrl.us/fofb

   perl5 - perl6 converter
Adam Kennedy dropped a line to the list about PPI 0.903, which could
form a good base for a Perl 5 to Perl 6 convert. Larry explained that he
was actually using PPD (the actual Perl parser) to construct such a
tool. He also explained his approach on how he was going to do it.
Actually it is a really cool approach for those of you who like elegant
design approaches, you should check it out. I'll give you a hint, it
starts by writing a glorified version of cat.

http://xrl.us/fofc

   p5 library compatibility?
Andrew Savige wondered if p6 would maintain the interface for most p5
libraries. chromatic almost died of fright from the suggestion. Juerd
suggested a deprecated namespace for such things. Larry gave him a ponie
instead. Later Larry thought that perhaps a special namespace for those
libraries that could be automatically converted might be appropriate.

http://xrl.us/fofd

http://xrl.us/foff -- later

   importing constants and header files
Song10 wondered if there was an easy way to import constants from a
module and not have to specify their full scope in the includers file.
Larry explained that p6 would have policy modules which would allow
this. He then began to let his mind explore the possibility of allowing
these modules to return a string to evaluate in the user's scope. Then
he realized how nasty textual inclusion was in C and C++, and figured
that a hygenic policy would be better.

http://xrl.us/fofg

   giving lists more operators
Juerd constructed a table of string, integer, and list operators. He
noticed that list had blank spots where string and integer both had
things. He then suggested quite a few more operators to fill these
blanks... This morphed into a discussion of code complexity and reading
code.

http://xrl.us/fofh -- operators

http://xrl.us/fofi -- complexity

   string pain
Chip wondered what exactly set  str  apart from Str and the impact
this had on Unicode support. Larry and Rod Adams explained that  str 
specified a raw bytes view of strings and required explicit casts
between different Unicode levels.

http://xrl.us/fofj

   xx on CodeRefs
Luke Palmer wondered if the xx operator could be overloaded to
repeatedly run a coderef and slap the results together. Other liked it,
but no word from on high.

http://xrl.us/fofk

   running pugs
Adam Preble had some strange problems with Pugs's make install target.
Warnock applies.

http://xrl.us/fofm

   maniplulation many dimensional hashes
Zhuang Li wanted to know how to manipulated hashes of unkown dimension.
Luke Palmer provided the answer.

http://xrl.us/fofn

   Semantics of Currying
Yuval Kogman has been implementing currying in PUGS. As such, he has
found some of the corner cases that have not been well specified. Thus
he, Larry, Luke Palmer, and Thomas Sandlaß delve into these mysteries.

http://xrl.us/fofo

   multi paradigmatic perl 6
Someone named Eddie posted a fairly long message to p6l on the google
groups interface suggesting that Perl 6 support delegation and other
programming paradigms. Sadly, no one told him that it already does both
of those things, because nobody got his email. Google groups does not
send messages back to the list.

http://xrl.us/fofp


Re: other language compiler to parrot?

2005-04-02 Thread Matt Fowles
All~

On Apr 2, 2005 3:53 PM, William Coleda [EMAIL PROTECTED] wrote:
 As far as I know, no one is working on these at the moment.
 
 Volunteers welcome, of course. ^_^
 
 [EMAIL PROTECTED] wrote:
  hi,all
  have a Php compiler to parrot project?
  have a ruby compiler to parrot project?
 


There is a ruby project, although I think it is dead, called cardinal.
http://rubyforge.org/projects/cardinal/

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: [PROPOSAL] infix MMD operators

2005-03-28 Thread Matt Fowles
Leo~


On Mon, 28 Mar 2005 12:22:29 +0200, Leopold Toetsch [EMAIL PROTECTED] wrote:
 Leopold Toetsch [EMAIL PROTECTED] wrote:
 
  5) infix method signature change:
 
 METHOD PMC* add( [INTERP, SELF,] PMC* rhs, PMC ´*dest) {
   if (!dest)
  dest = pmc_new(INTERP, SELF-vtable-base_type);
   ...
   return dest;
 }
 
  If the destination PMC is passed in, it's used else a new PMC of an
  appropriate type is created.
 
 The same scheme should of course be introduced with all the unary prefix
 and postfix operators:
 
   METHOD PMC* absolute( [INTERP, SELF,] PMC ´*dest) {
 if (PMC_IS_NULL(dest))
dest = pmc_new(INTERP, SELF-vtable-base_type);
 VTABLE_set_integer_native(INTERP, dest, abs(PMC_int_val(SELF)));
 return dest;
   }
 
 and
 
   op abs(out PMC, in PMC)
   op n_abs(out PMC, in PMC)

Why bother with the IS_NULL check if we have the n_ variant already?
 Why not have one option unconditionally use the destination pmc and
the other unconditionally create a new destination pmc?

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: [PROPOSAL] infix MMD operators

2005-03-27 Thread Matt Fowles
Leo~


On Sun, 27 Mar 2005 16:37:41 +0200, Leopold Toetsch [EMAIL PROTECTED] wrote:
 5) infix method signature change:
 
METHOD PMC* add( [INTERP, SELF,] PMC* rhs, PMC ´*dest) {
  if (!dest)
 dest = pmc_new(INTERP, SELF-vtable-base_type);
  ...
  return dest;
}
 
 If the destination PMC is passed in, it's used else a new PMC of an
 appropriate type is created.

I would actually appreciate a refresher on the original motivation
behind never autogenerating a LHS.  I recall being told it has
something to do with tied data, but I was never clear on exactly how
that related.  I would think that tied data would only require
VTABLE_assign method, and would not care how its RHS was created (via
an add or mul or whatever).

Thus I would argue for having most operators create their result (but
having a special assign that would call a VTABLE method) and forcing
languages with active data to go through a two step assignment

$P0 = $P1 + $P2 # P0 created
$P3 - $P0 # P3 gets to run its tied code

and languages like python which have immutable scalars could always use

$P0 = $P1 + $P2 # P0 created


One concern that occurs to me is that this would cause more new PMC
allocations.  But I am whether or not that is true.

 7) separate inplace methods
 
 Opcodes like:
 
d += r# add d, r
 
 are currently using the normal add method with the destination set to
 SELF. This is suboptimal, especially, when the destination PMC is
 morphed to a different type (e.g. due to bigint promotion) which
 destroys the value of SELF.
 
 It's just cleaner to have distinct inplace methods, it's very likely
 also needed anyway, as method overloading would not work if the inplace
 operations are the same.
 
 Therefore we have:
 
infix __i_add, d, r
 
 and in *.pmc
 
METHOD void i_add( [INTERP, SELF, ] PMC* r) {...}
 

I think this one is very necessary.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: [perl #34548] [TODO] Replace classes/pmc2c.pl with classes/pmc2c2.pl

2005-03-23 Thread Matt Fowles
All~


On Wed, 23 Mar 2005 17:19:09 +0100, Leopold Toetsch [EMAIL PROTECTED] wrote:
 Bernhard Schmalhofer via RT [EMAIL PROTECTED] wrote:
  [mdiep - Di 22. Mär 2005, 14:35:02]:
 
  pmc2c2.pl is the new pmc2c.pl. Both currently exist in Parrot CVS.
  Either pmc2c.pl should be deleted or pmc2c2.pl should be renamed to
  pmc2c.pl.
 
  A better location might be 'build_tools/pmc2c.pl
 
 Yep.
 
  Should we wait for that, until it is decided whether we will switch to
  SVN? I think that SVN preserves change history for moved files.
 
 That's the question. Are we switching to SVN?

I vote yes.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Perl 6 Summary for 2005-03-07 through 2005-03-22

2005-03-22 Thread Matt Fowles
Perl 6 Summary for 2005-03-07 through 2005-03-22
All~

Welcome to yet another fortnights summary. I believe this is the highest
volume I have ever seen the three lists at simultaneously. Hopefully
they will keep it up, because good work is being done. To aid in the
epic endeavour of summarizing all this, I have had to add some new Jazz
to my playlist. We will see how it works out. If it doesn't work well,
blame Seton.

  Perl 6 Language
   the actual name of ?SUB
David Storrs wanted to know how he could get the name of ?SUB. Larry
told him that $?SUBNAME would be the most reliable way to get the short
name.

http://xrl.us/fiip

   Unlimited Argument Patterns
Luke Palmer has tasted the forbidden fruit of Haskell and now he wants
more of it in Perl 6. In particular he wants even more powerful pattern
matching of arguments for MMD. Rod Adams speculated that Larry had
decided Perl 6 would not be ML... In the end no real consensus, but
don't hold your breath seems to be the feeling.

http://xrl.us/fiiq

   Limited Argument Patterns
Wolverian was a little unsure of what exactly  sub foo(0) {...} 
meant. Larry explained that it was just sugar for  sub foo ( $bar of
Int where { $_ == 0 } $bar ) { ... } .

http://xrl.us/fiir

   List Constructors
Wolverian made a list of list constructors, asking what each did. Larry
explained: For the most part, the same thing as perl 5, a few would
produce a warning.

http://xrl.us/fiis

   Decorating Primitives
The question arose of how decorating objects with roles interacted with
low level types. Larry came to the conclusion that it was OK, unless you
wanted to decorate a single element in a primitive array.

http://xrl.us/fiit

   splat operator in assignment
Juerd was unsure how splats and list assignment interacted. The answer
is that list assignment is exactly the same as Perl 5 to allow for
extending return list.

http://xrl.us/fiiu

   Logic Programming
Rod Adams pointed out that much of logic programming could be
implemented using the rules engine. Unfortunately, the syntax gets a
little hairy and cumbersome. Larry said that this particular goal might
be something that is not addressed immediately in 6.0, but possibly
differed instead. Ovid rumbled about porting a Warren Abstract Machine
to Parrot... I would like it.

http://xrl.us/fiiv

   Locale-KeyedText
Darren Duncan finished up the first non-core Perl 6 module. Being
properly hubristic, he asked for a critique. His questions touched on
subjects including subtypes, module loading, and strictness...

http://xrl.us/fiiw -- critique request

http://xrl.us/fiiy -- misc questions

   bar $f =?= $f.bar
Rod Adams wondered what would happen if he had both a sub and a method
name bar. What would  $f.bar  and  bar $f  do? Jonathan Scott Duff
explained that  $f.bar  would call the method while  bar $f  would
call the sub.

http://xrl.us/fiiz

   MMD object
Rod Adams wants a single object to represent all of the possible multi
methods associated with a particular short name. It seems that Rod
dranks some of the lisp cool-aid (although in this case, I agree). He
explained how this allowed the dispatch scheme to be changed on a multi
by multi basis and also allowed for nice introspection. This led to a
discussion of how this would work with lexically installed multi
methods, and if this would trip people up. No real consensus seemed to
appear...

http://xrl.us/fii2

   :fooo != :foo('o'); :fooo == :foo{'o'}
Juerd wondered what the implications of a mapping to ('a') were. Larry
replied that it did not map in that manner.

http://xrl.us/fii3

   lazy loading of object
Yuval Kogman wondered how he could get his objects to load lazily. Larry
told him that delegation would probably be the best bet.

http://xrl.us/fii4

   throwing from higher up the call stack
Thomas Yandell wants a way to throw from further down the call stack.
Sadly he was warnocked.

http://xrl.us/fii5

   sprintf
Juerd wants an sprintf like function  f/FORMAT/EXPR/ . Larry seems to
think that  EXPR.as(FORMAT) will suffice, especially if as is a list
op. 

http://xrl.us/fii6

   S29, builtin function
Rod Adams has been hard at work creating a list of build in functions.
He has a version up at /www.rodadams.net/Perl/S29.html in http:. This
led to good discussions about what things had alternate forms and what
did not.

http://xrl.us/fii7 -- discussion

http://xrl.us/fii8 -- more discussion

   python to eliminate reduce()
Aristotle Pagaltzis posted a link explaining why reduce will be
eliminated in Python 3000. This led to a brief discussion of various
design philosophies.

http://xrl.us/fii9

   SEND + MORE = JUNCTIONS
Sam Vilain fixed up 

Perl 6 Summary for 2005-02-22 though 2005-03-07

2005-03-07 Thread Matt Fowles
Perl 6 Summary for 2005-02-22 though 2005-03-07
All~

Welcome to yet another fortnight summary. Once again brought to you by
chocolate chips. This does have the distinction of being the first
summary written on a mac. So if I break into random swear words, just
bear with me.

  Off list development
In more related news, It has been pointed out to me that development
goes on off list on places like IRC. I briefly contemplated, quitting my
job and tracking such things full time, but then I decided that it would
be better if I just accepted brief submissions for the summary. Thus I
will be adding a fourth section to the summaries based on contributions.
If you would like to make a contribution, email me with a brief summary.
Please include the name by which you would like to be attributed (sadly
the process I use is likely to mangle any unicode characters). Please
make all links full, I will shorten them. Thanks

  Perl 6 Language
   not()
It turns out that not() (with no arguments) made perl 5 core dump for
a while, and it took us five years to figure that out. In perl 6 it will
be a list op and calling it with no arguments will return a null list or
an undef depending on context.

http://xrl.us/fdb9

   junctions and threading
I had hoped that last week the concerns about threading would have been
addressed. I was mistaken. A new crop of concerns surfaced and died down
fairly quickly (as the chief proponent, Damien, was away).

http://xrl.us/fdca

   serializing to various languages
Somehow the discussion of junctions morphed into a discussion of sets,
which morphed back into junctions, which morphed into a discussion of
serialization to different languages. Interesting stuff, but I wouldn't
hold me breath for it...

http://xrl.us/fdcb

   Performance Analysis and Benchmarks
Adam Preble posted an offer to develop some benchmarks for perl 6.
Unfortunately, I think he posted it to google groups. Also, he probably
should have posted it to p6c or p6i as the language folk tend to wave
their hands and say magic occurs but correctness is preserved when it
comes to optimization.

http://xrl.us/fdcc

   send + more = junctions
Autrijus posted an example using junctions, instead of parents, to solve
the classic

SEND MORE + = MONEY

problem. Markus Laire asked for a clarification, and Rod Adams pointed
out that he felt that it would not work as the interdependence of the
es was not captured. This does lead to the question of how one should
right prolog like code (including unification and backtracking) in Perl
6. No answers were offered.

http://xrl.us/fdcd

   Pairs as lvalues
Ingo Blechschmidt wondered what the behavior of pairs as lvalues would
be. The answer is that you would get an error for attempting to modify a
constant.

http://xrl.us/fdce

   Perl 6
Roberto Bisotto wanted to know where he could download perl 6 to start
playing with it. We embarrassedly told him that a full implementation
was not yet available, but pugs was gaining ground quickly.

http://xrl.us/fdcf

   hash keys
Autrijus wanted to know if hash keys were still just strings or if they
could be more. The answer is that by default they would be strings, but
they could be declared as having a different  shape . This led to a
discussion of hashing techniques such as the .bits, .canonicalize, or
.hash methods.

http://xrl.us/fdcg

   Dynamically scoped dynamic scopes
Dave Whipp wanted to make dynamically scoped dynamic scopes. My head
hurt, but apparently Larry's didn't as he replied piece of cake, the
syntax [and implementation] are left as an exercise to for the would be
module author.

http://xrl.us/fdch

   Parameters to rules
Rod Adams asked how he could specify arguments to rules so they could be
more function like. Larry explained that there were several syntaxes
each of which would coerce its arguments in slightly different ways. He
then mused that perhaps there were too many, I agree there are too many.

http://xrl.us/fdci

   compile time signature checking
Ahbijit Mahabal wondered how type checking would work for cases where it
was not easy to determine the types at compile time. The answer:
checking will be defered to runtime. In the end it seems that Perl 6
will blur the line between runtime and compile time heavily. Perhaps it
will provide nifty support for staged programming, meta-perl6 here we
come...

http://xrl.us/fdcj

   %*CONFIG and %?CONFIG
Brian Ingerson asked about the CONFIG hash and what sort of secondary
sigil it would have. Larry explained that $?CONFIG held to config for
the machine compiling the program and $*CONFIG held the config for the
machine running the program. Then he made some noice about parsing,

Perl 6 Summary for 2005-02-08 through 2005-02-22

2005-02-22 Thread Matt Fowles
Perl 6 Summary for 2005-02-08 through 2005-02-22
All~

Welcome to yet another fortnight summary. Lately p6l has been out
stripping p6i in volume. While this used to be the norm, lately it has
become a rare occurrence. Strange... Anyway, this summary would be
brought to you buy cookies, but I ate them all. So instead this summary
is brought to you by the remaining chocolate chips. In other news,
Autrijus Tang has just officially been promoted to first name only
status in the summaries based on both his stellar work with Pugs and his
highly identifiable name. He now joins the ranks of Larry, Dan, Madonna,
and Leo.

  Perl 6 Language
   do { } while?
David Storrs wanted to know what the best way to say  do { }
while($foo);  was. Larry told him that  s/do/loop/  would suffice.

http://xrl.us/e77k

   nest as a primitive looping operation
Timothy Nelson gets credit for resurrecting the oldest thread I have
seen brought back recently. Over two years ago, he mentioned a powerful
looping structure that allowed for recursion. Now he has found a use for
it.

http://xrl.us/e77m

   Loop Entry
Joe Gottman wanted to execute a closure every time a loop was entered,
not upon every iteration. He thought ENTER happened only once ever, but
it turns out that it will do what he wants.

http://xrl.us/e77n

   pop %hash
Rod Adams wants to be able to pop a key value pair our of a hash. Others
wondered what it would be used for. Someone mentioned an OrderedHash...

http://xrl.us/e77o

   higher order operators
Timothy Nelson wanted to have meta-operators. Larry gave him the full
unicode character set with which to define them. Tim was happy.

http://xrl.us/e77p

   none and nor delimiter
Thomas Sandlaß suggests using  \  as a none junction delimiter. He
then extended this idea to provide a logical nor,  \\ . Autrijus
suggested  !  for none. There was some argument about whether nor
deserved such huffmanization. Also, I think that the difference between
 //  and  \\  would continually escape me. I have enough troubles
writing code to deal with windows filesystems.

http://xrl.us/e77q

   Kudos to Autrijus
Damian proudly welcomed Autrijus to the ranks of the last-nameless-ones.
He also lauded his amazing work at forcing a lazy language to pull a
lazier one. I think we all agree.

http://xrl.us/e77r

   containers vs object references
Rod Adams wondered whether there was a litmus test that could determine
if something deserved its own sigil. The answer appears to be mostly
history. Larry suggested a simplistic way to create new sigils, although
it would not provide interoplation. I think a blessed method for
defining new sigils which do interpolate and provide some sort of type
constraint and context would be really nifty. Also I want a million
dollars in small, non-consecutive, unmarked bills. If you have either of
these please mail it to me.

http://xrl.us/e77s

   printing true
Autrijus wondered about true and fasle. Are they just 1 and 0? #t and
#f? Larry answered bool::true and bool::false, but true and false would
suffice when there was no ambiguity.

http://xrl.us/e77t

   quoted = LHS
Juerd wondered if  =  auto-quoted its left hand side. Yes.

http://xrl.us/e77u

   @ x 75 ~ $zap =?= (@ x 75) ~ $zap
Juerd mistakenly thought that ~ bound tighter than x. Only unary ~ binds
that tightly, so he is safe.

http://xrl.us/e77v

   getting the key|value of a pair
Steve Peters wondered how he could get the key or value from a pair. It
turns out that the .key and .value method will do what he wants until
some twisted soul overrides them...

http://xrl.us/e77w

   Junctiuons and Autothreading
By far the longest topic this week was junctions. Some people worry that
their autothreaded behavior will cause plagues to ravage the earth and
novices programmers to go blind. Others feel that without it Perl6 will
be a language suitable only to pond scum and cobol programmers. While
one side believes that autothreading repition of sid effects will crash
any database that interacts with Perl6, the other side believes that
requiring extra pragmas to unlock their full power will prevent
junctions from curing cancer. Either way someone is going to be unhappy.
It looked like the pendulum was swinging towards autothreading, but its
chief proponenet will be away next week, so who knows if it can survive
undefended. My favorite suggestion in all of this was to make Perl6 a
pure functional language and introduce monads.

http://xrl.us/e77x

http://xrl.us/e77y

http://xrl.us/e77z

http://xrl.us/e772

   nullary vs nonslurpy
Autrijus found it distressing that to get his quicksort to sort quickly
he had to make an empty signature slurpy. Larry 

Perl 6 Summary for 2005-01-31 through 2004-02-8

2005-02-08 Thread Matt Fowles
Perl 6 Summary for 2005-01-31 through 2004-02-8
All~

Welcome to yet another summary in which I will undoubtedly confuse to
homophones. Probably more than a few this week as I am a little tired.
But perhaps the alien on my window or the vampire on my monitor will
help straighten it all out.

  Perl 6 Language
   autothreading generalization
Luke Palmer's thread about auto-threading seems to have wound down
without much resolution, or at the very least without a syntax that I
like.

http://xrl.us/e26z

   Featherweight Perl6
Autrijus Tang introduced Featherweight Perl6, a side-effect-free subset
of Perl6. FP6 is the first step on a journey for Pugs to conquer the
world.

http://xrl.us/e262

   Value Types vs Implementation Types
Autrijus Tang in his work on FP6 became confused by types. He asked some
questions about Types on perl 6 language and was apparently told to go
to perl 6 compilers. From perl 6 compilers, he was told he should really
be on perl 6 language. Sorry for the run around, the proper place for
questions about language semantics is perl 6 language as he originally
posted. Eventually all of that was settled and he even got his question
answered.

http://xrl.us/e263 -- original post

http://xrl.us/e264 -- retry with less compiler speak

   Logic Programming in Perl 6
Ovid asked what logic programming in perl 6 would look like. No answer
yet, but I suppose I can pick the low hanging fruit: as a limiting case
you could always back out the entire perl 6 grammar and insert that of
prolog.

http://xrl.us/e265

   the leaning tower of numbers
Autrijus Tang asked what sort of number tower Perl6 had. He was planning
(and implemented) that of Scheme until he gets an answer.

http://xrl.us/e266

   some quick questions
Autrijus Tang asked a few questions about operators in specific
contexts. He got a few answers, although I don't think he got them all.

http://xrl.us/e267

   getopt::signature
Juerd wants to be able to give his script a general signature which
magically parses command line arguments. Many people thought it was a
cool idea that should be provided as a module rather than in the core.
This led to talk about creating a signature object which could be passed
to this module so that it doesn't need macros. Sounds good to me.

http://xrl.us/e268

   S03 inconsistency
Juerd found a knit to pick. No comment about whether to pick the first
or second option though...

http://xrl.us/e269

   regex precedence
Nicholas Clark wondered about adding a little operator precedence to
regexes so that people could avoid a few common problems. Sounds like a
good idea to me...

http://xrl.us/e27a

   pipe dreams
Juerd wondered if he could mix = and == in a sane way. The answer
appears to be no. Once you bring in == you should stick with it.

http://xrl.us/e27b

   4  $x  2 == true?!?
Autrijus Tang wondered how junctions and chained comparators worked. He
found that under certain semantics, one can receive very troubling
answers. Larry agreed with Autrijus that the unintuitive semantics
should be avoided.

http://xrl.us/e27c

  Perl 6 Compilers
   Pugs 6.0.0
Autrijus Tang released Pugs 6.0.0. It has many cool features and was
created in only 6 days. A testament to the power of Haskel or the
caffeine intake of Autrijus. (Although to be fair he skipped more
version numbers then Java did in its jump to 5.0...)

http://xrl.us/e27d -- anouncement

http://autrijus.org/pugs/ -- pugs website
http://use.perl.org/~autrijus/journal/ -- implementation journal

  Parrot
   gdbmhash warning
Bernhard Schmalhofer fix a problem where gdbmhash could make configure
produce a warning. Leo applied it.

http://xrl.us/e27e

   PyNCI
Sam and Leo worked out the correct way to create NCI methods for Python.
Leo ended by proposing a table to assist Parrot based on the current
language, no answer to that idea...

http://xrl.us/e27f

   makefile cleanup
Bernhard Schmalhofer cleaned up some of the makefiles and configure
system. Leo applied the patch.

http://xrl.us/e27g

   ParrotIOLayer* const or not
François Perrad provided a patch making the ParrotIOLayer* const in the
API. Leo applied it, but Melvin warned that while this may be safe now,
the API intended to allow mutability. I think for the moment it is still
in though...

http://xrl.us/e27h

   Win32 Parrot
Ron Blaschke helped Parrot back onto its feet in the windows world.

http://xrl.us/e27i

http://xrl.us/e27j

http://xrl.us/e27k

http://xrl.us/e27m

http://xrl.us/e27n

http://xrl.us/e27o

http://xrl.us/e27p -- latest results

   Parrot_load_bytecode failure?
Ian Joyce wondered what would happen if Parrot_load_bytecode failed. The
answer: 

Perl 6 Summary for 2005-01-18 through 2005-01-31

2005-01-31 Thread Matt Fowles
Perl 6 Summary for 2005-01-18 through 2005-01-31
All~

Welcome to another double feature summary. Sadly, this one was delayed
because of an argument that I was/am having with my connection.
Fortunately, a generous neighbor has allowed me to use his connection
for the time being. So, with that random act of kindness in mind, I
bring you

  Perl 6 Language
   Perl 6 on E
Rich Morin wondered if features of the language E would be supported on
Perl 6. Larry told him that many would, and As a limiting case, you can
always back out the entire Perl grammar and install the E grammar in its
place. This was left as an exercise for the reader.

http://xrl.us/exm4 -- the thread

http://www.erights.org/ -- E's homepage

   challenge the Palmer...
Luke Palmer produced answers to Austin Hastings's How do I questions.
Anyone else with such questions should send them to the list lest Luke's
learnedness loses luster.

http://xrl.us/exm5

   refactoring Perl automatically
Matisse Enzer re-re-raised the thread on refactoring Perl. This time he
posted a link to EPIC an Eclipse plugin that uses Devel::Refactor.
Unfortunately, I think that he is still using the google groups
interface to post the language. I shall repeat, emails posted via google
groups do NOT make it to the list itself.

http://groups-beta.google.com/group/perl.perl6.language/browse_frm/thre
ad/d31481c114e88a11/8fde39f7f7418669?_done=%2Fgroup%2Fperl.perl6.languag
e%3F_doneTitle=Back+to+topics_doneTitle=Backd#8fde39f7f7418669 --
thread http://e-p-i-c.sourceforge.net/ -- EPIC http://xrl.us/exm6

   loops, bare blocks, and my head hurts
Juerd wondered if last/redo could be used outside loops. Larry provided
the long answer. The short answer is no, things act basically rationally
so that return, next, and last all behave as expected.

http://xrl.us/exm7

   where without type
Juerd wondered if he could use a where clause with a type. The answer is
yes, as it will often be wanted to restrict values admitted to a
multimethod. This led me to the evil thought of putting side-effects in
a where clause on several multi-methods and watching the pain of
resolution cause very difficult to find bugs. Sometime I think that my
mind looks for nasty ways to write bad code a little too much.

http://xrl.us/exm8

   Autothreading
Luke Palmer posted his musing about autothreading. I must say it looks
powerful enough to blow off your entire lower body if you shoot yourself
in the foot.

http://xrl.us/exm9

  Perl 6 Compiler
   Pugs
Not just ugly dogs anymore, they are also P6 interpreters written in
Haskel. Sounds really cool to me.

http://xrl.us/exna

  Parrot
   MMD and meta-stuff
In a thread that was also posted to p6l (sorry about that), I attempt to
explain how parrot object system is already very close to the Common
Lisp Object System and why it should become even closer. I am not sure
if I succeeded or not. My ability to express really abstract thoughts
without a white board is poor.

http://xrl.us/exnb

   RT clean up
Will Coleda has been putting an extensive amount of work into cleaning
up part for public presentation with a focus on RT and organization.

http://xrl.us/exnc -- Hall of Shame 15308

http://xrl.us/exnd -- ROADMAP

http://xrl.us/exne

http://xrl.us/exnf

http://xrl.us/exng

http://xrl.us/exnh

http://xrl.us/exni

http://xrl.us/exnj

http://xrl.us/exnk

http://xrl.us/exnm

http://xrl.us/exnn

http://xrl.us/exno

http://xrl.us/exnp

http://xrl.us/exnq

http://xrl.us/exnr

   argv[0]
Wukk (who is Will when I get off key) wants the name of the invoked
executable. Dan upped the anti by offering the full and base name
variants of the interpreter, the program, and the invoked thing.

http://xrl.us/exns

   OSCON
Robert Spier put out a call for OSCON proposals.

http://xrl.us/exnt

   read and readline
Matt Diephouse has been working on getting read and readline cleaned up.

http://xrl.us/exnu -- RT ticket

http://xrl.us/exnv -- discussion

http://xrl.us/exnw -- partial resolution

http://xrl.us/exnx -- an offered patch

   test_main.c
Bloves posted a patch updating test_main.c. Unfortunately, it turns out
that this file is obsolete and needs to be removed.

http://xrl.us/exny

   MinGW support
François Perrad provided a patch to improve MinGW support. Leo applied
it.

http://xrl.us/exnz

   Compile problems
Will Coleda has a failing fresh build. Warnock applies.

http://xrl.us/exn2

   NCI improvements
Bernhard Schmalhofer provided a patch improving NCI stuff. Leo applied
it.

http://xrl.us/exn3

   VS.NET 2003
Sriram Krishnan fought through a build on VS.NET 2003. He overcame
problems and even posted a summary. 

This weeks summary

2005-01-26 Thread Matt Fowles
All~

I have been struggling with my internet for the past 4 days, so this
weeks summary will be part of a double feature fortnight's summary
next week.  Figured that I would provide advanced notice though...

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Proposed vtable changes WRT method lookup

2005-01-18 Thread Matt Fowles
All~

On Tue, 18 Jan 2005 10:18:52 +0100, Leopold Toetsch [EMAIL PROTECTED] wrote:
 Sam Ruby [EMAIL PROTECTED] wrote:
  Leopold Toetsch wrote:
 
  Below inline attached is a proposal for vtable changes, mainly WRT
  method lookup.
 
  First, a general question: under what circumstances is it OK and/or
  expected for the opcode Cgetclass and the VTABLE entry
  VTABLE_get_class to return different results?
 
 No. The opcode should just call VTABLE_get_class() and return, what that
 method returns.
 
  At the moment, these return quite different results for all of the
  standard PMCs.
 
 The Cgetclass opcode currently returns, what the type registry
 Cclass_hash provides. This is ok for the standard PMCs, because the
 registered class is Cvtable-data. But the opcode should just call
 VTABLE_get_class().
 
  The more general observation behind this question: if Parrot is going to
  provide a mechanism by which a class can override get_class, then the
  runtime should depend on such interfaces instead of bypassing them and
  attempting to standardize on mechanisms.
 
 Yes. The proposed changes are one step towards that goal. I'd like to
 have a standard interface for classes, a default implementation for
 Parrot core PMCs and Parrot standard objects, and all the phases of
 class manipulation should of course be overridable, i.e. the individual
 methods are all called through vtable functions.

It looks like we are creating ourselves a reasonable subset of the
Common Lisp Object System here.  Given that CLOS was created to allow
Lisp programs to modify their objects' semantics to those of a
different dialect of Lisp, perhaps we could learn from their
structure.

We have an mro array just like CLOS, we have a class PMC just like
CLOS.  If we add to it support.  MMD, however, is where things begin
to differ.  Instead of havng the find_method with the extra mmd_nr, we
could have a MMD_Resolution PMC which would then get the mro from each
class, and figure out which method to call based on that.  Logically
this would make some sense as no single class can have the smarts to
do MMD since it depends on all objects involved.  This also allows
each MMD function to dispatch according to the language which defined
the function (and thus the MMD_Resolution PMC for that function).

Hope that makes sense,
Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Proposed vtable changes WRT method lookup

2005-01-18 Thread Matt Fowles
Leo~


On Tue, 18 Jan 2005 16:52:52 +0100, Leopold Toetsch [EMAIL PROTECTED] wrote:
 Matt Fowles [EMAIL PROTECTED] wrote:
 
  ...  If we add to it support.  MMD, however, is where things begin
  to differ.  Instead of havng the find_method with the extra mmd_nr, we
  could have a MMD_Resolution PMC which would then get the mro from each
  class, and figure out which method to call based on that.
 
 That was Cvtable-dispatch in the proposal. Cfind_method is just
 called to query one object or class, if it can do the method. Finding
 the final (MMD) function is done separately with a distinct vtable
 method (and probably implemented inside some meta class PMC).

That makes sense.  If the vtable-dispatch method is attatched to some
PMC, what provides that PMC?  Is it the MMD function being called
(what I would suggest), some environmental one, or something else?

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Perl 6 Summary for 2005-01-11 through 2005-01-18

2005-01-18 Thread Matt Fowles
Perl 6 Summary for 2005-01-11 through 2005-01-18
Welcome to yet another Perl Summary brought to you by music and pizza
(although the pizza is late in arriving). Like many summaries before it,
we start with an attempt at non sequitur and Perl 6 Language.

  Perl 6 Language
   idiomatic Perl 6
Stéphane Payrard expressed a desire for more Perl 6 sample code. Luke
Palmer issued the following, possibly foolish, response: post some
\how do I\s to the list, and I'll reply with code. Austin Hastings
posed a couple, not response yet...

http://xrl.us/er2z

   generalized tainting
Yuval Kogman posted an interesting musing about contagious properties
(if you get your value from someone with a contagious property, you get
the property too). No responses, but it sounds interesting...

http://xrl.us/er22

   stick/pick
Richard H. suggested a new pair of functions stick/pick which would have
modifiers such that push, pop, shift, unshift, and splice could all be
calls to stick or pick with appropriate modifiers. Unfortunately, I
think he posted it to the google groups interface, as it is there but
not on the list :-(

http://xrl.us/er23

   Perl 6 IDE again.
Matisse Enzer re-raised the question of the feasibility of an IDE for
Perl 6. Unfortunately it was re-raised on google groups (I think).

http://xrl.us/er24

   1x6 vs 6
The dimension slice issues continue to grind with new suggestions from
David Green and Craig DeForest.

http://xrl.us/er25

   life span of loop counters
Joe Gottman wants an easy way to restrict the lifespan of his loop
counter to his loop. Some folk (myself included) did not like the answer
of wrap it in a scope. Some others (myself excluded) thought the answer
don't use loop, use for was a bit of a cop-out.

http://xrl.us/er26

   forany  forall
Jonathan Lang wondered how to check if a condition is true for any
element of an array or for all elements. The answer are the aptly named
junction creaters any() and all().

http://xrl.us/er27

  Perl 6 Compiler
Already reached p6c and no pizza :-( Ah well, it was a light week.

  Parrot Internals
Already p6i and no pizza :-(. Although it was close, after I wrote the
head2 my door buzzed. It was just a neighbor who got locked out, but
that would have been impressive timing.

   blib in 25 seconds
Peter Christopher asked for a 25 second summary of the ./blib directory.
Apparently this is harder than Hamlet in 30 seconds, as one of the two
has been done.

http://xrl.us/er28

   searching archives
Peter Christopher wanted to know if there was a way he could search the
mailing list archives. Steve Fink pointed him to groups.google.com and
the ever popular discussion topic aardvarks.

http://xrl.us/er29

   dynclasses with external dependencies
Bernhard Schmalhofer wondered if there was a reasonable way to check for
external dependencies for dynamic PMCs that does not involve the core
Parrot configure step. Later he supplied a patch with his GDBMHash pmc,
which motivated the question. Leo applied it and hinted at a mythical
multi-stage configure

http://xrl.us/er3a -- question

http://xrl.us/er3b -- patch

   s/interpreter/INTERP/g
Bernhard Schmalhofer provided a patch making the above clean up all
over. Leo and Sam applied different parts of it.

http://xrl.us/er3c

   black-ops parrot
Robert Spier posted a link to the new listing for Parrot on CIA.
Nicholas Clark dove for cover assuming he was going to be disappeared.

http://cia.navi.cx/stats/project/parrot -- CIA http://xrl.us/er3d --
actual post

   PDD problems on the website
Dave Brondsema noticed that PDDs 4-6 were not finding their way to the
website properly. Will Coleda fired off a patch.

http://xrl.us/er3e

   cleaning old tickets
Will Coleda, in his never ending role as RT janitor, closed out a few
obsolete tickets. Thanks Will.

http://xrl.us/er3f -- stone-age exceptions

http://xrl.us/er3g -- assemble.pl

http://xrl.us/er3h -- languages/imcc

   Scope and Timely Destruction
Leopold Toetsch raised the recurring issue of timely destruction. It
turns out that timely destruction is hard. Various people made various
suggestions. Let me state one thing clearly as if I don't, Dan doubtless
will: Parrot will NOT use reference counting of any kind. There are a
great many reasons for this some of which Luke Palmer explained.

http://xrl.us/er3i

   ParrotIO* should have been PMC*
Peter Christopher provided a patch fixing a pointer declaration bug. Leo
applied it.

http://xrl.us/er3j

   questions for the compiler FAQ
Some time ago, a compiler faq was started. It was to contain answers to
questions that people posted to the list. Will Coleda posted 2 such
questions, but got Warnocked.


Perl 6 Summary for 2004-01-03 through 2004-01-11

2005-01-11 Thread Matt Fowles
Perl 6 Summary for 2004-01-03 through 2004-01-11
Welcome to another Perl 6 summary. In this summary, we will explore such
thrilling issues as multi-dimensional slices of Chinese food. After all,
the amount of sauce any piece of Chinese food can absorb is proportional
to its surface area, which is a direct function of the number of
dimensions in which it is sliced (provided that we ignore degenerate
cases like fractal cuts of Peking duck).

  Perl 6 Language
   1x6 vs 6
Craig DeForest wondered how to disambiguate a 1x6 2D array slice from a
6 element 1D array slice. He suggested a syntax inspired by PDL. Larry
admitted to not having examined this particular issue and stated that he
was open to suggestions. Some suggestions arrived.

http://xrl.us/eout

   code as comment
Stéphane Payrard wanted to know if there is an easy way to alias
arguments to a function. Thus allowing a longer version for readability
when calling the function and a short version inside the function. Larry
suggested $s is namedsubject, which I like. The thread then devolved
into punning in French.

http://xrl.us/eouu -- main thread on p6l

http://xrl.us/eouv -- initial post on p6c

  Perl 6 Compiler
   Pascal - Pcode - Parrot - Profit
Sven Schubert asked about the feasibility of putting Pascal on Parrot.
He noted that with the infrastructure mentioned in Perl 6 and Parrot
Essentials the problem would not be too bad. Apparently Essentials
makes a few promises that we have yet to live up to. But we are working
towards it. In the mean time, Stéphane Payrard suggested a way for him
to kill to bird with one stone: Pcode.

http://xrl.us/eouw -- Pcode suggestion

http://xrl.us/eoux -- initial post

   Grammar improvements
Luke Blanshard submitted some rules for Perl6::Grammar. Luke Palmer
committed a slight variantion of his work, and the hacking commences...

http://xrl.us/eouy

  Parrot
   pop_pad
Peter Christopher wondered why pop_pad had not been implemented last
week. This week Leo implemented it and asked for tests.

http://xrl.us/eouz

   Resizable arrays
Simon Glover asked why ResizablePMCArray was so different from all of it
Resizable*Array bretheren. The answer is the Leo improved it. This
brings up an obvious task for someone looking for a reasonably friendly
chunk of Parrot to work on. Rationalizing the implementation of the
various Resizable*Arrays would probably be a good task for a novice
looking to dig into something. Perhaps one who is on winter break...

http://xrl.us/eou2

   Parrot 0.1.1 nci troubles
Ian Joyce noticed that parrot 0.1.1 was having some trouble with nci.t.
Leo admitted that this was the case, but it is fixed in CVS.

http://xrl.us/eou3

   test or benchmark
Nicholas Clark wondered if resizablestringarray.t was actually a
benchmark, because it had a big number which was really hurting his poor
machine. Simon Glover admitted to the copy paste error.

http://xrl.us/eou4

   x86 solaris 2.5.1 and 2.7
Andy Bach and Nicholas Clark worked towards getting parrot happier on
the aforementioned architecture. This thread seemed to peter out when
Nicholas asked how do we run a callback unconditionally after
gccversion is known, independent of its value?.

http://xrl.us/eou5

   VTABLE_call_method
Leo and Sam had a disagreement about whether a call_method vtable would
make sense. I think that we are waiting for higher intervention...

http://xrl.us/eou6

   updated perlhist.txt
Will Coleda applied Bernhard's patch updating perlhist.txt and
streams.t.

http://xrl.us/eou7

   Warnock Warnocked
Will Coleda applied the long Warnocked update to Warnock's contact
information with only a trace of irony.

http://xrl.us/eou8

   gcov of perlarray.pmc reaches 100%
Simon Glover got perlarray.pmc to have full test coverage. Nifty. Some
brave soul (possibly fitting an earlier description) should try this
with the Fixed*Arrays...

http://xrl.us/eou9

   Parrot under Solaris 9
Nicholas Clark, Andy Doughery, and Christian Aperghis-Tramoni all tried
to convince Parrot to work on Solaris. They are brave souls.

http://xrl.us/eova

   parrot-config updates
Peter Christopher asked questions about the parrot-config.imc. He also
provided an initial solution.

http://xrl.us/eovb -- questions

http://xrl.us/eovc -- solutions

   Key Question
Simon Glover noticed some bad behavior with respect to Key PMCs. Leo and
Sam both admitted that it was bad and that some work needed to be done.

http://xrl.us/eovd

   Parrot PDL
Bernhard Schmalhofer posted a pointer to PDL. Luke Palmer pondered
Piddles as Parrot PMCs. Craig DeForest proposed a path passing through
PDL's PP and pausing at Parrot. (Parenthetically, perhaps the
preponderance of Ps in 

Perl 6 Summary for 2004-12-06 through 2004-12-20

2004-12-20 Thread Matt Fowles
Perl 6 Summary for 2004-12-06 through 2004-12-20
All~

The observant among you might notice that I missed last week's summary.
With the hubbub and confusion of the holidays, I blame ninjas, in
particular Ryu Hyabusa. Given that Christmas is next weekend and New
Years is the weekend after that, what you are like to see in the future
are a pair of 10 day summaries are some other equally irregular pattern.
If you are thinking of using the dates of my summaries to seed a random
number generator, I would advise against it as I can be really easily
bought ;-) Without more ado, I give you this fortnight's summary
starting with

  Perl 6 Language
   Lexical scope of parametric declaration blocks
Ashley Winters wanted to know what the differences between type
parameter lists and sub parameter lists. Luke Palmer could not think of
any.

http://xrl.us/ef7f

   object representation
Abhijit Mahabal noticed that S12 allowed one to supply an object layout
to  bless()  and wondered if one could really have two instances of
the same class with different layouts. Larry admitted that he had
probably not intended for that to be the case.

http://xrl.us/ef7g

   capturing into a hash, hypothetically
Patrick R. Michaud wondered about capturing things into a hash in S05,
as ident now captures. Larry admitted that it was probably supposed
to be  («ident»), but also noticed that this exposed a blind spot in
the design. He went on to ruminate about this blind spot and ways to
solve it. Much churning went on and it seems that multiple different
(but identically named) rule captures can now be performed by adding
information after a dash ala ws-1 ws-2 ws-3.

http://xrl.us/ef7h

   custom subscripting
When talking about key Type for a hash, Larry offhandedly commented
about attaching a block to a hash or array to provided custom
subscripting. Many people drooled over the awesome syntactic sugar this
could provide them.

http://xrl.us/ef7i

   undeclared attributes
Dave Whipp hoped that he need not predeclare his attributes as they
necessarily start with $. the fact that a new variable is an attribute
is easy to determine. Abhijit Mahabal thought that it would not be a
good idea, but then asked if classes could be declared as not strict.
Still waiting for more official word...

http://xrl.us/ef7j

   classes which autovivify attributes
Abhijit Mahabal wondered about creating a class that populates it
attributes on demand, as some of them might be rarely used. Larry
suggested that it would be something that one should not undertake
lightly and a simple hash attribute would provide most of what is
wanted. This also morphed into the eternal debate about strictures and
one liners. There has to be a joke in there somewhere A stricture, a
one-liner, and Larry Wall walk into a bar...

http://xrl.us/ef7k

   auto my
Rod Adams wondered if having my occur automatically for new variables
might be worthwhile. Several people commented that some languages
already do this and it is simply an aesthetic choice. The concensus
seems to be that Perl has already made this choice and is sticking with
its answer.

http://xrl.us/ef7m

  Perl 6 Compiler
At long last google has picked up P6C, I guess I have slightly mixed
emotions about this as it takes a running gag from me. Alas, I will have
to find another.

   PGE tests
Markus Laire began working on a formerly small script to convert perl
5's regex tests to PGE. He produced a modest 700 tests a few of which
pass. Nice work. Patrick suggested only running the script once and
thereafter maintaining the tests external to perl5.

http://xrl.us/ef7n -- initial post

http://xrl.us/ef7o -- Patrick's suggestion

http://xrl.us/ef7p -- how to deal with abiguity converting

   On your marks, get set, HACK!
Luke Palmer opened the door to hacking and has requested rules for parts
of the Perl 6 Grammar. Patrick posted a link to the SVN repository for
it.

http://xrl.us/ef7q

https://svn.perl.org/perl6

  Parrot
   \0namespace
Leo commited a fix to support namespace mangling.

http://xrl.us/ef7r

   store global = invalidate method cache
Leo commited a fix to invalidate the method cache when a global is
stored.

http://xrl.us/ef7s

   pow, hash, batman sound effect!
Leo added pow and hash as vtables and opcodes. He also renamed
new_extended to instantiate.

http://xrl.us/ef7t

   base scalar semantics
Leo asked for comments about base PMC semantics and receive none.

http://xrl.us/ef7u

   split now independant of Perl
James deBoer provided a patch removing the dependancy on Perl Array in
split. Will applied it.

http://xrl.us/ef7v

   SVN
Periodically every project project has a thread about 

Re: continuation enhanced arcs

2004-12-08 Thread Matt Fowles
Leo~


On Wed, 8 Dec 2004 20:29:00 +0100, Leopold Toetsch [EMAIL PROTECTED] wrote:
 So my conclusion that (in combination with restoring registers to the
 values of continuation creation) I,S,N registers are almost unusable is
 correct?

I would disagree.  Let me take the above example and work with it a little:

  $I0 = 10
loop:
  $P0 = shift array
  dec $I0
  if $I0 goto loop

We are (for the moment) assuming that shift array somehow causes a
full continuations to be taken and then invoked it in a subsequent
call.  Then this code would infinite loop; however, so would this code
as the second call is returning through the first calls continuation.

  $P0 = shift array
  $P1 = shift array

On the other hand, if every call to shift array took a full
continuation, did some stuff, and eventually returned through its
return continuation.  Then neither would infinite loop, as every call
to shift array would have its own return continuation.

What this means is that care must be taken when you are writing code
that you expects to be invoked multiple times.  However, if you are a
function that on your second invocation returns via the continuation
from you first invocation, you should probably expect to be called
again because it happened the first time!  If you are expecting other
behavior, it is probably because one person wrote the whole chain of
calls and had some extra knowledge about the caller.  This author may
have to be a little wary about value vs reference semantics, but
programmers are fairly used to that pitfall by now.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: svn

2004-12-08 Thread Matt Fowles
Will~


On Wed, 08 Dec 2004 19:19:07 -0500, William Coleda [EMAIL PROTECTED] wrote:
 Is there a plan at any point to move to an svn repository from cvs?
 
 I'd like to work on a patch to move all the perl* pmcs into dynclasses, which 
 would involve quite a bit of file moving, and I'll happily wait for svn if 
 we're going that way, since it'll be smoother.
 

While I personally like the idea, I think it is unlikely given how
much slower svn is on sizable repositories.  Of course I have not
tried it recently, so maybe that has changed...

All that being said, I am in absolutely no position of authority about this...

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Perl 6 Summary for 2004-11-29 through 2004-12-06

2004-12-07 Thread Matt Fowles
Leo~

Yup.

From: James deBoer [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Date: Sat, 04 Dec 2004 15:50:36 -0500
Subject: Re: [perl #32769] [PATCH] Standardizes and improves the
formatting of internal_exception() calls

Matt


On Tue, 7 Dec 2004 09:23:34 +0100, Leopold Toetsch [EMAIL PROTECTED] wrote:
 Matt Fowles [EMAIL PROTECTED] wrote:
 
 internal exception clean up
  James deBoer submitted a patch that cleans up internal exception output.
  Then later he submitted a second better version of the patch. Warnock
  applies.
 
  From: James deBoer
  Date: 03.12.2004
 
 ... I will post a new patch shortly.
 
 Did I miss the second patch?
 
 leo
 


-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Perl 6 Summary for 2004-11-29 through 2004-12-06

2004-12-06 Thread Matt Fowles
Perl 6 Summary for 2004-11-29 through 2004-12-06
All~

Last week I asked for help identifying the source of a quotation. One
friendly soul suggested Alan J. Perlis, but could not find an actual
attribution. It did lead me to find a very applicable (and in my mind
funny) quote from Perlis, which I will now inflict upon you all, before
your regularly scheduled summary:

When someone says I want a programming language in which I need only
say what I wish done, give him a lollipop. -Alan J. Perlis

  Perl 6 Language
   qq:i
Jim Cromie wondered if there could be a qq:i which sometimes
interpolates and sometimes doesn't depending on whether the variable had
been previously defined. There was some discussion which led to the
conclusion that this was just asking for strange bugs.

http://xrl.us/d95h

   getters and setters
John Siracusa wanted to know if Perl 6 would allow one to expose a
member variable to the outside world, but then later intercept
assignments to it without actually having to switch to using getters and
setters in all of the code that uses the variable. The answer: yes, yes
you can.

http://xrl.us/d95i

   « foo 
Richard Proctor asked if he could do list of words». Juerd pointed out
that this had already been asked. Which brings us to the fine point, ask
not Larry for he will tell you both yes and no. Although in this case I
think he said, probably...

http://xrl.us/d95j

   flipflop operator
Juerd wondered about the fate of the flipflop. Larry explained that
while it had lost the election it was still going to work hard for you
in the Senate. Err, that's not quite right, he said that It's leaving
syntactically but not semantically., but the new syntax has not been
specified...

http://xrl.us/d95k

   temp $var
Alexey Trofimenko wanted to know whether  temp  would preserve or
destroy its old value. Larry is leaning towards the Perl 5 semantics of
destroying, I think.

http://xrl.us/d95m

   state vs my
Alexey Trofimenko wondered how much advice about optimizing Ruby also
applied to perl. Unfortunately, he also misunderstood the  state 
specifier. The topic then quickly veered into what exactly  state 
does.

http://xrl.us/d95n

   specifying a hash's key type
Abhijit Mahabal wanted to know if he could specify a hash's key type.
The answer is yes, but the exact syntax seems to be worth a discussion.
Luke Palmer, in his Mathematician's rage, attempted to shoot down any
usage of Domain and Range, as they really should be Domain and Codomain.

http://xrl.us/d95o

http://en.wikipedia.org/wiki/Range_%28mathematics%29 -- wikipedia:
range Range (mathematics) - Wikipedia, the free encyclopedia

   container methods
Ashley Winters wants to have syntax for calling a method on the
container object rather than the containee. Luke Palmer agreed that this
was problematic. Larry appears to be in no hurry to add more operators
for this one, yet.

http://xrl.us/d95p

   slight discrepancy between synopses
Stéphane Payrard pointed out a small issue in some synopses. Larry
replied oops.

http://xrl.us/d95q

   arrays, lists, iterators, functions, coroutines, syntax
Many people suggested many things about the best thing to replace the
now missingop. I think Larry is leaning towards adding a undare
 =  op, which would do cool things. I don't thing anything is final
yet.

http://xrl.us/d95r -- iterators as functions

http://xrl.us/d95s -- unary  =  talk

   Push/Pop/Pull/Monkey
Many folk voiced their dislike of shift and unshift. I must agree with
them, but they also suggested a great many alternatives, including
pull/put, get/unget, and even getting rid of Push/Pop. I must say that I
really dislike that last idea, fortunately I am no alone. Currently we
are waiting for inspiration to strike.

http://xrl.us/d95t

   Topicalization
It was noticed that  for  might override one's topic at undesired
times. Larry rumminated about ways to solve this.

http://xrl.us/d95u

   Required Whitespace
Rod Adams does not like inconsistent whitespace rules. Larry explained
why the existing rules really were consistent.

http://xrl.us/d95v

  Perl 6 Compilers
The lack of traffic on p6c has given me another space to abuse. You
should listen to Soul Coughing. If you would like to join in the fun
of abusing p6c, you should submit tests. Nothing is more abusive then
stress testing ;-)

  Parrot
   Tuning and Monitoring
Matt S asked how much support for tuning and monitoring. This week I
exercise the awesome powers of the summarizer and invoke the mighty
Warnock's Dilemnia.

http://xrl.us/d95w

   imcc.globals--
Leo removed some imcc globals. Nice work.

http://xrl.us/d95x

   ensure directories exist first

Re: continuation enhanced arcs

2004-12-03 Thread Matt Fowles
Leo~


On Fri, 3 Dec 2004 09:26:24 +0100, Leopold Toetsch [EMAIL PROTECTED] wrote:
 Ok. I'll try to summarize, where I see the problem. No diagrams, just
 code :)
 
 [snip]

Thanks for the clear explanation.  I did not realize that S registers
could switch pointers, that does make things a little harder.  I have
a recommendation for a possible hybrid solution.  Incur the cost of
spilling I,S,N registers heavily.  Restore the state of P register.

I suggest this because it seems likely that P registers will have much
greater pressure on them then the others.  This would allow us to
minimize the spilling of them (where spilling is most likely), while
still allowing the usage of I,S,N registers (which are less likely to
be used to the point of spilling.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: continuation enhanced arcs

2004-12-03 Thread Matt Fowles
Leo~


On Fri, 3 Dec 2004 09:26:24 +0100, Leopold Toetsch [EMAIL PROTECTED] wrote:
 Ok. I'll try to summarize, where I see the problem. No diagrams, just
 code :)

 [snip]

Thanks for the clear explanation.  I did not realize that S registers
could switch pointers, that does make things a little harder.  I have
a recommendation for a possible hybrid solution.  Incur the cost of
spilling I,S,N registers heavily.  Restore the state of P register.

I suggest this because it seems likely that P registers will have much
greater pressure on them then the others.  This would allow us to
minimize the spilling of them (where spilling is most likely), while
still allowing the usage of I,S,N registers (which are less likely to
be used to the point of spilling.

(Sorry for sending this to you twice Leo, accidentally did not cc the list)

Matt
--
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: continuation enhanced arcs

2004-12-02 Thread Matt Fowles
All~

I must admit I am a little confused as to what the problem is.  Given
that any continuation which was originally created as a return
continuation will restore its registers, all code which uses P/S
registers will work as expected.  Furthermore, I/N registers will be
usable accross function calls, it is just that continuations will
cause the same to computate as before to be repeated (which is really
not that much of a spanner in the works).

Please don't draw the same diagrams and claim that registers life is
secretly extended.  That is not the case, as the invocation of the
(once) return continuation will restore the register allocation to the
correct state that code after it is expecting.


Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Parrot Strong typing

2004-12-01 Thread Matt Fowles
Cameron~


On Wed, 01 Dec 2004 16:53:32 +1000, Cameron Zemek [EMAIL PROTECTED] wrote:
 The FAQ mentions that the JVM and CLR (.Net VM) are not suited to
 dynamic languages. I was wondering why this is the case.
 
 Also could the Parrot VM be used effectively with strong typing
 languages. I would like to at some stage try to implement a proof of
 concept of a language that has strong typing. For example:
 def name = new string (maxLength = 15)
 name = this name is too long # throws an InvalidValue exception
 def postcode = new integer (minValue = 0, maxValue = )
 postcode = -1 # throws an OutOfBoundsException
 
 Basically, the idea is to be able to set constraints on variables, and
 define new datatypes that have contraints. Also be able to set methods
 that can do custom validation of the new value. The idea of the language
 is for use to write database-centric applications.

I don't think that what you are referring to there is actually strong
typing.  Strong typing is more generally concerned with detecting type
errors at compile time (as oposed to range errors at runtime).  While
it would be possible to detect the errors in the example you gave at
compile time, your mention of exceptions leads me to believe that you
want runtime behavior.

Strong typing can be more clearly seen in something like haskell where
you can define a function

len [] = 0
len [ _ | A ]  = 1 + len A

the compile will automatically detect that the len function has the
signature list of * - int and will then issue a compile time error
if you call len foo.

Hope that helps to clarify things,
Matt


-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: continuation enhanced arcs

2004-12-01 Thread Matt Fowles
Bill~


On Tue, 30 Nov 2004 22:12:30 -0800, Bill Coffman [EMAIL PROTECTED] wrote:
 On Tue, 30 Nov 2004 14:45:39 -0500, Dan Sugalski [EMAIL PROTECTED] wrote:
 
 
  At 11:20 AM -0800 11/30/04, Jeff Clites wrote:
  % cat continuation6.ruby
  def strange
   callcc {|continuation| $saved = continuation}
  end
  
  def outer
   a = 0
   strange()
   a = a + 1
   print a = , a, \n
  end
 
  Through the joys of reference types, a will continue to increase
  forevermore, assuming the compiler hasn't incorrectly put a in an int
  register. (Which'd be wrong)
 
 I can see that there is true magic in the power of using references in
 this way.  Nonetheless, how can the compiler figure out that it can't
 use an integer here?  The compiler should use integers when it can,
 but it sounds like you are saying that when a variable crosses a sub
 call (which might invoke a continuation) it will then have to be a PMC
 or String to do the right thing.

This has come up before.  It turns out that the compiler will likely
be able to make very few optimizations of this sort on its own. 
However, user code rarely needs this kind of optimization.  Library
code is what should really get it, and the library author can provide
hint/directives to the compiler for cases like this.  If you took a
continuation inside a callback from a library routine and then invoked
it, I don't think that you would have any reasonable guess what the
library routine would do, so either behavior would seem reasonable.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Parrot Strong typing

2004-12-01 Thread Matt Fowles
Michael~


On Wed, 1 Dec 2004 09:44:37 -0500, Michael Walter
[EMAIL PROTECTED] wrote:
 Hey,
 
 On Wed, 1 Dec 2004 09:33:27 -0500, Matt Fowles [EMAIL PROTECTED] wrote:
  Strong typing can be more clearly seen in something like haskell where
  you can define a function
 
  len [] = 0
  len [ _ | A ]  = 1 + len A
 Actually, in Haskell this would be:
 
 len [] = 0
 len (_:a) = 1 + len a
 
  the compile will automatically detect that the len function has the
  signature list of * - int
 In Haskell this would be:
   forall a b. (Num b) = [a] - b
 
 (A function from a list of things to an arbitrary numeric type. That's
 sexy, btw.)
 
  and will then issue a compile time error if you call len foo.
 As Strings in Haskell are lists of chars, this will work just fine wink ;-)
 
 Confusingly yours,
 Michael
 

I should have known there would be a real Haskell fan in the room...

Thanks for the catch,
Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: continuation enhanced arcs

2004-11-30 Thread Matt Fowles
Dan~


On Tue, 30 Nov 2004 08:28:35 -0500, Dan Sugalski [EMAIL PROTECTED] wrote:
 At 1:45 AM -0800 11/29/04, Jeff Clites wrote:
 
 
 On Nov 28, 2004, at 2:48 AM, Piers Cawley wrote:
 
 I just thought of a heuristic that might help with register
 preservation:
 
 A variable/register should be preserved over a function call if either of 
 the
 following is true:
 
 1. The variable is referred to again (lexically) after the function has
 returned.
 2. The variable is used as the argument of a function call within the
 current compilation unit.
 
 That doesn't solve it, though you'd think it would. Here's the
 counter-example:
 
x = 1
foo()
print x
y = 2
return y
 
 You'd think that x and y could use the same memory location
 (register, variable--whatever), since ostensibly their lifetimes
 don't overlap. But continuation re-invocation can cause foo() to
 return multiple times, and each time it should print 1, but it
 won't if x and y use the same slot (it would print 2 each time
 after the first). In truth, their lifetimes do overlap, due to the
 hidden (potential) loops created by continuations.
 
 Except... we've already declared that return continuations are
 special, and preserve the registers in the 16-31 range. So when we
 return from foo, regardless of how or how many times, the pointer to
 x's PMC will be in a register if it was in there before the call to
 foo, if it's in the preserved range. So in this case there's no
 problem. Things'll look like:
 
x = 1 # new P16, .Integer; P16 = 1 # P16 has pointer value 0x04
foo() # foo invocation
print x # P16 still has pointer value 0x04
y = 2 # new P16, .Integer; P16 = 2 # P16 now has pointer value 0x08
return y # Passes back 0x08
 
 With more or less clarity.

I think that the concern is for the circumstance where foo() promotes
it return continuation to a full continuation.  Then, that guarantee
is no longer provided (I think), and repeated invocation could leave y
in P16 rather than x.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: continuation enhanced arcs

2004-11-30 Thread Matt Fowles
Dan~


On Tue, 30 Nov 2004 09:49:54 -0500, Dan Sugalski [EMAIL PROTECTED] wrote:
 At 9:36 AM -0500 11/30/04, Matt Fowles wrote:
 
 
 Dan~
 
 
 On Tue, 30 Nov 2004 08:28:35 -0500, Dan Sugalski [EMAIL PROTECTED] wrote:
   At 1:45 AM -0800 11/29/04, Jeff Clites wrote:
 
 
   On Nov 28, 2004, at 2:48 AM, Piers Cawley wrote:
   
   I just thought of a heuristic that might help with register
   preservation:
   
   A variable/register should be preserved over a function call if
 either of the
   following is true:
   
   1. The variable is referred to again (lexically) after the function has
   returned.
   2. The variable is used as the argument of a function call within the
   current compilation unit.
   
   That doesn't solve it, though you'd think it would. Here's the
   counter-example:
   
  x = 1
  foo()
  print x
  y = 2
  return y
   
   You'd think that x and y could use the same memory location
   (register, variable--whatever), since ostensibly their lifetimes
   don't overlap. But continuation re-invocation can cause foo() to
   return multiple times, and each time it should print 1, but it
   won't if x and y use the same slot (it would print 2 each time
   after the first). In truth, their lifetimes do overlap, due to the
   hidden (potential) loops created by continuations.
 
   Except... we've already declared that return continuations are
   special, and preserve the registers in the 16-31 range. So when we
   return from foo, regardless of how or how many times, the pointer to
   x's PMC will be in a register if it was in there before the call to
   foo, if it's in the preserved range. So in this case there's no
   problem. Things'll look like:
 
  x = 1 # new P16, .Integer; P16 = 1 # P16 has pointer value 0x04
  foo() # foo invocation
  print x # P16 still has pointer value 0x04
  y = 2 # new P16, .Integer; P16 = 2 # P16 now has pointer value 0x08
  return y # Passes back 0x08
 
   With more or less clarity.
 
 I think that the concern is for the circumstance where foo() promotes
 it return continuation to a full continuation.  Then, that guarantee
 is no longer provided (I think), and repeated invocation could leave y
 in P16 rather than x.
 
 Nope. The guarantee's still there. Promotion will force things up the
 call chain to get marked as un-recyclable, but registers still get
 restored on invocation.

In that case, I am confused.  When does the guarantee NOT apply?

Thanks,
Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Lexicals, continuations, and register allocation

2004-11-30 Thread Matt Fowles
Dan~


On Tue, 30 Nov 2004 10:22:29 -0500, Dan Sugalski [EMAIL PROTECTED] wrote:
 At 9:15 PM +0100 11/23/04, Leopold Toetsch wrote:
 
 
 Below inline/attached are some thoughts WRT the subject.
 
 leo
 
 
 Lexicals, continuations, and register allocation
 
 1) Recent discussions have shown that we obviously can't handle all
 the side effects of continuations correctly. Reusing preserved
 (non-volatile) registers after a call isn't possible any more, due to
 loops in the CFG a continuation might create.
 
 I admit, I've been watching the discussion and I just don't
 understand why there's a problem.
 
 So far as I can tell there are two cases here:
 
 1) A return continuation
 
 2) A regular continuation
 
 We've already established that a return continuation preserves the
 top half of the registers (though I think that's not been clear) so
 there's just no problem there -- at the point a return continuation
 returns, [IPSN]16-31 will be as they were when the return
 continuation was created. Which, in practice, makes the I and N
 registers useless for variables like loop counters, though fine for
 constants (both real and effective) So continuations, as such, don't
 make any difference here. A return is a return, and if it works right
 the first time it should work right all the times.
 
 The second case, where code takes an arbitrary continuation that
 returns to location X, wherever X is. I'm missing the problem there,
 too. Assuming there's a way to note the destination to the register
 allocator (with those points being places where all registers must be
 assumed to be trash) I'm not seeing the problem either. There are
 only two cases here, where the destination is marked and where it
 isn't. If it's marked, the register allocator assumes things are
 dirty and loads everything, which is fine. If it's unmarked, the code
 has essentially shot itself and everything quietly goes to hell since
 you've lied to the register allocator and you shouldn't do that.
 Which is fine too. Don't Do That.
 
 N.B. that this is an issue that only affects the PIR register
 allocator -- I'm not seeing a case where this can be an issue for
 anything else, including plain assembly. If I'm missing something
 this would be a good time to point out the missing bits.

That makes sense to me (and in fact matches what I have been failing
to articulate for a while now), thanks for the clarification.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Lexicals, continuations, and register allocation

2004-11-30 Thread Matt Fowles
Leo~


On Tue, 30 Nov 2004 17:30:43 +0100, Leopold Toetsch [EMAIL PROTECTED] wrote:
 
 
 Dan Sugalski [EMAIL PROTECTED] wrote:
  At 9:15 PM +0100 11/23/04, Leopold Toetsch wrote:
 Below inline/attached are some thoughts WRT the subject.
 
 leo
 
 
 Lexicals, continuations, and register allocation
 
 1) Recent discussions have shown that we obviously can't handle all
 the side effects of continuations correctly. Reusing preserved
 (non-volatile) registers after a call isn't possible any more, due to
 loops in the CFG a continuation might create.
 
  I admit, I've been watching the discussion and I just don't
  understand why there's a problem.
 
  So far as I can tell there are two cases here:
 
  1) A return continuation
 
  2) A regular continuation
 
  We've already established that a return continuation preserves the
  top half of the registers (though I think that's not been clear) so
  there's just no problem there --
 
 That term preserves needs some more clarification. Some months ago we
 used the savetop / restoretop opcodes. They made a copy of half of
 the register frame and restored it on return. The caller and the
 subroutine did executed in the registers inside the interpreter
 structure. We decided to give up this scheme in favour of the indirect
 register addressing.
 
 Now we have a new register frame, where a subroutine is executing.
 Returning from the subroutine returns to the other register frame, which
 of course means that the registers are preserved, because the subroutine
 executed in a freshly allocated and of course different register frame.
 
  ... at the point a return continuation
  returns, [IPSN]16-31 will be as they were when the return
  continuation was created. Which, in practice, makes the I and N
  registers useless for variables like loop counters, though fine for
  constants (both real and effective)
 
 Huh? You are now back with register copying? With the additional benefit
 that we can't use integer loop counters anymore? Sorry, I can't believe
 that you are proposing such a broken usage of (return) continuations.

Not necessarily, you only need to copy in the case where a return
continuation was promoted.  Thus, you can avoid copying for the common
call/return case.  Also, we could allow hints that indicate a point
below which continuations do not need to be promoted (although this is
an optimization).  Also, it is not that broken.  In fact it has
identical semantics to the old save/restore ones.  Recall that the
restore would overwrite the I/N values with what they were at save
time.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: continuation enhanced arcs

2004-11-30 Thread Matt Fowles
Jeff~


On Tue, 30 Nov 2004 10:15:00 -0800, Jeff Clites [EMAIL PROTECTED] wrote:
 
 
 
 On Nov 30, 2004, at 5:28 AM, Dan Sugalski wrote:
 
  At 1:45 AM -0800 11/29/04, Jeff Clites wrote:
  On Nov 28, 2004, at 2:48 AM, Piers Cawley wrote:
 
  I just thought of a heuristic that might help with register
  preservation:
 
  A variable/register should be preserved over a function call if
  either of the
  following is true:
 
  1. The variable is referred to again (lexically) after the function
  has
 returned.
  2. The variable is used as the argument of a function call within the
 current compilation unit.
 
  That doesn't solve it, though you'd think it would. Here's the
  counter-example:
 
   x = 1
   foo()
   print x
   y = 2
   return y
 
  You'd think that x and y could use the same memory location
  (register, variable--whatever), since ostensibly their lifetimes
  don't overlap. But continuation re-invocation can cause foo() to
  return multiple times, and each time it should print 1, but it
  won't if x and y use the same slot (it would print 2 each time
  after the first). In truth, their lifetimes do overlap, due to the
  hidden (potential) loops created by continuations.
 
  Except... we've already declared that return continuations are
  special, and preserve the registers in the 16-31 range. So when we
  return from foo, regardless of how or how many times, the pointer to
  x's PMC will be in a register if it was in there before the call to
  foo, if it's in the preserved range. So in this case there's no
  problem. Things'll look like:
 
x = 1 # new P16, .Integer; P16 = 1 # P16 has pointer value 0x04
foo() # foo invocation
print x # P16 still has pointer value 0x04
y = 2 # new P16, .Integer; P16 = 2 # P16 now has pointer value
  0x08
return y # Passes back 0x08
 
  With more or less clarity.
 
 But the problem isn't preservation per se. When a continuation
 (originally captured inside of foo) is invoked, the frame will be
 restored with the register contents it had when it last executed, so
 P16 in your annotations will have pointer value 0x08 after the first
 time that continuation is invoked (because y = 2 will have executed
 and changed the register contents). That will result in print x
 printing the value 2, which is wrong from the perspective of the code
 (that line should always print 1). To do-the-right-thing, the
 register allocator either has to use a separate register to hold y, or
 needs to do some other preservation dance (instead of relying on
 preserved registers). And again, I think the reason for this is that
 the lifetimes of x and y overlap, so you can't just use the same
 register to store them. The only surprising part of all of this is that
 their lifetimes in fact overlap--they only overlap due to
 continuations, and wouldn't otherwise. It's the implicit branch from
 the return to the op-after-the-call-to-foo that's causing them to
 overlap.

We can handle this fairly easily by having the promotion swap in a new
invoke vtable for the return continuation.  The new invoke vtable will
put into place a copy of its context (rather than the context itself).
 Thus promoted return continuations can be invoked repeatedly (at the
cost of a memory copy), and non-promoted ones can be invoked once and
then immediately added to the continuation free list (possibly by
their invoke function).

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: continuation enhanced arcs

2004-11-30 Thread Matt Fowles
Jeff~

On Tue, 30 Nov 2004 11:20:50 -0800, Jeff Clites [EMAIL PROTECTED] wrote:
 On Nov 30, 2004, at 10:27 AM, Dan Sugalski wrote:
 
 
 
  At 10:15 AM -0800 11/30/04, Jeff Clites wrote:
 
  Oh. No, it won't. We've declared that return continuations will always
  leave the top half registers in the state they were when the return
  continuation was taken. In this case, when it's taken to pass into
  foo, P16 is 0x04. When that return continuation is invoked, no matter
  where or how many times, P16 will be set to 0x04. This does make
  return continuations slightly different from 'plain' continuations,
  but I think this is acceptable.
 
 Ah, I see.
 
 
 
  None of this should have anything to do with return continuations
  specifically, since this is the case where the body of foo (or
  something called from it) creates a real continuation, which as I
  understand it is supposed to promote the return continuations to
  real continuations all the way up the stack.
 
  The return continuations have to maintain their returny-ness
  regardless, otherwise they can't be trusted and we'd need to
  unconditionally reload the registers after the return from foo(),
  since there's no way to tell whether we were invoked via a normal
  return continuation chain invocation, or whether something funky
  happened down deep in the call chain.
 
 Yeah, so I think that won't work correctly. Here's an example from Ruby
 which I posted in a previous thread. If the return from the call to
 strange() by outer() always restores the registers as of the point the
 (return) continuation was created, then the below would print out a =
 1 over and over, but really it's intended that the value should
 increase, so with the behavior you describe, the following Ruby code
 wouldn't work right:
 
 % cat continuation6.ruby
 def strange
  callcc {|continuation| $saved = continuation}
 end
 
 def outer
  a = 0
  strange()
  a = a + 1
  print a = , a, \n
 end
 
 # these two lines are main
 outer()
 $saved.call
 
 % ruby continuation6.ruby
 a = 1
 a = 2
 a = 3
 a = 4
 a = 5
 a = 6
 a = 7
 a = 8
 a = 9
 a = 10
 ...infinite loop, by design

a would need to be stored in a RubyInt PMC.  In such a situation it
would work as the register for a is actually a pointer to its value. 
An optimizer might try and lower a to an I register, but that would be
an invalid optimization.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: continuation enhanced arcs

2004-11-29 Thread Matt Fowles
All~


On Mon, 29 Nov 2004 14:51:43 +0100, Leopold Toetsch [EMAIL PROTECTED] wrote:
 Luke Palmer [EMAIL PROTECTED] wrote:
  It seems to me that there is no good solution to this problem without
  annotating the register set or killing the register allocator.
 
 I think I've proposed a reasonable solution: putting lexicals in
 registers.

I would appreciate it if Dan (who I cc'ed this to directly) would
weigh in on this thread.  I think that we have present most of the
options as clearly as we can, and a decision on how to move forward
would be appreciated.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Segfaults on signal_(1|2)

2004-11-29 Thread Matt Fowles
All~

I get segfaults (mentioned previously) on signal_1.pasm and signal_2.pasm

Despite these, make test reports success.

For the interested:
[EMAIL PROTECTED]:~/parrot$ uname -a
Linux fowles 2.6.8-1-686 #1 Thu Nov 11 13:18:29 EST 2004 i686 GNU/Linux

Fairly stock debian system (usually pretty forgiving).

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Lexicals, continuations, and register allocation

2004-11-24 Thread Matt Fowles
Leo~

On Wed, 24 Nov 2004 16:42:31 +0100, Leopold Toetsch [EMAIL PROTECTED] wrote:
 And as a side effect it will make Dan's evils subs compile, because
 long-lived lexicals already have their storage aka register. Only temps
 need a register allocated.

What happens to temps that need to cross function calls in your scheme?

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Lexicals, continuations, and register allocation

2004-11-24 Thread Matt Fowles
Leo~


On Wed, 24 Nov 2004 17:25:05 +0100, Leopold Toetsch [EMAIL PROTECTED] wrote:
 Matt Fowles [EMAIL PROTECTED] wrote:
  Leo~
 
  On Wed, 24 Nov 2004 16:42:31 +0100, Leopold Toetsch [EMAIL PROTECTED] 
  wrote:
  And as a side effect it will make Dan's evils subs compile, because
  long-lived lexicals already have their storage aka register. Only temps
  need a register allocated.
 
  What happens to temps that need to cross function calls in your scheme?
 
 These would go along with the lexicals in the non-volatile area. But
 such temps are rare (AFAIK). You need a HLL construct like:
 
   a = b + c + foo()

I am not sure that they are as rare as you think.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


phantom core files

2004-11-23 Thread Matt Fowles
All~

Aperiodically I notice that my parrot directory has quite a few core
files in it (usually around 6), even though I have done nothing with
it except cvs -q update -dP; [make realclean;perl Configure.pl;]
make; make [full]test.  Usually it says that all of the tests pass or
one or two tests fail, but I don't notice it dieing painfully...  Are
these core files anything of significances?

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Lexicals, continuations, and register allocation

2004-11-23 Thread Matt Fowles
Leo~

On Tue, 23 Nov 2004 21:15:33 +0100, Leopold Toetsch [EMAIL PROTECTED] wrote:
 Below inline/attached are some thoughts WRT the subject.
 
 leo
 
 
 Lexicals, continuations, and register allocation
 
 1) Recent discussions have shown that we obviously can't handle all
 the side effects of continuations correctly. Reusing preserved
 (non-volatile) registers after a call isn't possible any more, due to
 loops in the CFG a continuation might create.
 
 There are two proposed, accepted but undesirable work arounds:
 a) don't reuse registers - drawback spilling
 b) refetch all from lexicals - drawback execution time

Have we seen that this actually destroys us?  Meaning, if we add the
extra CFG arcs, do we start spilling like mad?  If not, this is much
ado about nothing.

I proposed an alternate scheme that has minimal impact on existing
code.  Right now we guarantee that return continuations restore all
non-volatile registers.  If we extend that guarantee to all
continuations, everything would just work with the caveat that changes
to value registers (as opposed to reference registers) are lost.  This
is not a real loss though because refetch all lexicals already
requires backing store for I and N registers.

I suspect that Dan will be unhappy with both my answer and yours
though, so we should probably hear his solution, which I think may be
to add the extra CFG arcs.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Lexicals, continuations, and register allocation

2004-11-23 Thread Matt Fowles
Leo~

On Tue, 23 Nov 2004 23:26:39 +0100, Leopold Toetsch [EMAIL PROTECTED] wrote:
 Matt Fowles wrote:
 
  Have we seen that this actually destroys us?  Meaning, if we add the
  extra CFG arcs, do we start spilling like mad?  If not, this is much
  ado about nothing.
 
 Please first have a look at Dan's recent posting about Evil Sub. Then
 estimate, how many subs may be called in 14000 basic blocks. For 100
 subs only you get ~1 more edges ...
 
 Second, having this arcs means just that in that range i.e. from the
 first subroutine to the last, you can't reuse a register around a call.
 Question: how many from ~23000 registers might be effected. Please note
 the currently rather low spill count despite the huge register usage.

Won't your approach put every one of those things in its own register?
 
  I proposed an alternate scheme that has minimal impact on existing
  code.
 
 C source code or bytecode? The latter isn't effected at all in my scheme
   if you just swap the two register ranges (I don't care currently). The
 impact on C source changes would be low, even JIT works with just
 s/ctx\.bp/ctp/g

I meant it at the C level.  This feels to me like a fairly major
internal change.  Thus, I am a little surprised that the impact would
be as low as you claim.  But you are definitely the authority on that.


  ... Right now we guarantee that return continuations restore all
  non-volatile registers.  If we extend that guarantee to all
  continuations, everything would just work with the caveat that changes
  to value registers (as opposed to reference registers) are lost.  This
  is not a real loss though because refetch all lexicals already
  requires backing store for I and N registers.
 
 You are missing the point. It's not a question of preserving, it's
 register re-using. And forcing all I and N registers into lexical PMCs
 totally defeats the optimized usage of these registers.

I don't think that I am.  I understand that the question is one of
reuse.  However, if a continuation restores registers to the data they
had when the continuation was taken, then all of the registers will
contain the things that exactly as the original allocator expects
them.  Code later on can overwrite those registers safe in the
knowledge that any continuation which would jump back to the original
point would also set up its own registers.  Thus, there is no need for
adding backward branches to the CFG.  Also, you do not force all I,N
registers into lexical PMCs.  You only force those ones that need
changes across re-invocations of a continuation to persistent to
persist.  I would expect that such usages are extremely infrequent and
would not occur in finely tuned code.  The majority of uses for I,N
registers will be optimizations on number crunching, such algorithms
will likely not use continuations.  In fact, such algorithms are
usually not stateful at all, and thus would be completely unaffected.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Lexicals, continuations, and register allocation

2004-11-23 Thread Matt Fowles
Leo~

On Wed, 24 Nov 2004 04:55:24 +0100, Leopold Toetsch [EMAIL PROTECTED] wrote:
 Matt Fowles [EMAIL PROTECTED] wrote:
 
  Won't your approach put every one of those things in its own register?
 
 I've clearly stated that lexicals aka non-volatiles have distinct
 registers.

Thus for these large subs, won't this be a large overhead?

  ...  However, if a continuation restores registers to the data they
  had when the continuation was taken, then all of the registers will
  contain the things that exactly as the original allocator expects
  them.
 
 Yes. We had that scheme until the indirect register frame addressing.
 It was:
 
savetop
invokecc
restoretop
 
 It was too slow - remember a factor of 5!

Yes, but that is because we COPIED the data for every invocation. 
With what I am proposing we would only need to copy the data when
invoking a full continuation (so that the full continuation can be
invoked again later without disturbing its registers).  Invoking
return continuations would be exactly the same as it is now.  Thus you
only pay the cost if you are trying to do funny things with
continuations.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: continuation enhanced arcs

2004-11-22 Thread Matt Fowles
Bill~


On Mon, 22 Nov 2004 11:49:59 -0800, Bill Coffman [EMAIL PROTECTED] wrote:
 sub1()  ---+  -+
 ... ||
 sub2()  +-+ |
 ...| |
 sub3()  ---+-+
 
 In the continuations enhanced control flow graph (the control flow
 graph (cfg), after one considers the effects of continuations), it is
 possible for any subroutine to jump back to the exit point of any
 previous subroutine.  Leo has drawn the picture a few times, as above,
 showing the complex web of links from any sub to any sub.  It is the
 control flow graph which provides the register allocator with the
 information it nees to determines which variables interfere.  They
 interfere if they could be active at the same time.  If they
 interfere, they must be assigned different registers.

It is also possible for functions to jump forward to the return
continuation of a function called later on (this requires that
function to be called, store it continuation somewhere, and then jump
back to a function before the one in question, but it can happen.)

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Continuations, basic blocks, loops and register allocation

2004-11-17 Thread Matt Fowles
Leo~

Thanks for the clarification.

Matt


On Wed, 17 Nov 2004 08:48:58 +0100, Leopold Toetsch [EMAIL PROTECTED] wrote:
 Matt Fowles [EMAIL PROTECTED] wrote:
 
  ...  Thus you can consider all of the
  following questions (even though they will be phrased as statements).
 
  1)  After a full continuation is taken all of the registers must be
  considered invalid.
 
 Calling a subroutine allocates a new register frame, that subs register
 frame pointer in the context points to these fresh registers.
 
 A continuation restores the context it captured, i.e. at the place,
 where it was created. This is true for all continuations. Inside the
 context there is a *pointer* to a register frame, which is therefore
 restored too.
 
 The effect of taking a continuation is therefore to restore registers to
 that state where the continuation was created. Due to calling conventions
 a part of the registers is volatile (used during a call or as return
 results), while the other part is non-volatile.
 
 Until here there is no difference between return or full continuation.
 
 The effect of a full continuation can be to create a loop, where the
 known control flow doesn't show a loop. Without further syntax to denote
 such loops 1) is true. This register invalidation happens, if a
 preserved register was e.g. only used once after the call and then that
 register got reassigned, which is allowed for a linear control flow but
 not inside a loop.
 
 This has per se nothing to do with a continuation. If you got an opcode
 that does *silently* a goto again_label the CFG doesn't cope with the
 loop, because it isn't there and things start breaking. The effect of a
 full continuation *is* to create such loops.
 
  2)  After a return continuation is taken, the registers can be trusted.
 
 Yes, according to usage in pdd03.
 
  3)  If someone takes a full continuation, all return continuations
  down the callstack must be promoted.
 
 If one *creates* a full continuation ...
 
  4)  After a function call, some magic needs to happen so that the code
  knows whether it came back to itself via a return continuation and can
  trust its registers, or it came back via a full continuation and
  cannot trust them.
 
 No. It's too late for magic. Either the CFG is known at compile time or
 refetching in the presence of full continuations is mandatory. For both
 the code must reflect the facts.
 
  Corrections welcome,
  Matt
 
 leo
 


-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Continuations, basic blocks, loops and register allocation

2004-11-16 Thread Matt Fowles
Leo~

On Tue, 16 Nov 2004 09:23:24 +0100, Leopold Toetsch [EMAIL PROTECTED] wrote:
 Matt Fowles [EMAIL PROTECTED] wrote:
 
 [ continuations should restore registers ]
 
  I am sorry, but I don't understand what you are trying to say here.
  Would you mind rewording it for me?
 
 Imagine a simple loop:
 
 i = 0
   lp:
 foo()
 inc i
 if i  10 goto lp
 
 Looking at the loop counter a programmer or optimizer could easily
 decide that using an I-Reg for it instead of a P-Reg is fine. Now comes
 your proposed implementation for continuations: they copy the register
 frame on creation and restore it on invocation. Besides of the big cost
 of the memcpy's this simple loop above suddenly stops working, depending
 on the implementation of foo() - which might be outside your control.
 
 BTW in an early stage we had exactly this behavior of continuations.
 This was abandoned. The subject was IIRC something like Should
 continuations close over registers. The answer was clearly no.

There is one thing I am not sure about here.  The loop will work
correctly for each seperate invocation of the appropriate
continuation.  The first time you call foo i is 0.  The second time i
is 1.  If foo ever invokes the full continuations that it captured at
one of these points, then i will go back to whatever it was when that
continuation was captured.  All of this seems like reasonable behavior
to me.  In the general case our optimizer will not be able to downgrad
i from a P to an I register anyway, as foo could mess with $CALLER::i
or whatever.  Thus, I am not sure that I by your argument.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Continuations, basic blocks, loops and register allocation

2004-11-16 Thread Matt Fowles
Leo~

On Tue, 16 Nov 2004 16:37:04 +0100, Leopold Toetsch [EMAIL PROTECTED] wrote:
 
 
 Matt Fowles [EMAIL PROTECTED] wrote:
  Leo~
 
  On Tue, 16 Nov 2004 09:23:24 +0100, Leopold Toetsch [EMAIL PROTECTED] 
  wrote:
 
  i = 0
lp:
  foo()
  inc i
  if i  10 goto lp
 
  There is one thing I am not sure about here.  The loop will work
  correctly for each seperate invocation of the appropriate
  continuation.
 
 No. Imagine, foo() is not a simple function anymore. Someone e.g. Jens
 Rieks[1], discovers that the algoritm is simpler implemented with
 continuations. So inside foo() the return continuation of foo() is
 copyied, stored elsewhere, passed along to another function, and that
 one now suddenly returns via this continuation to your loop.  If this
 invocation of the continuation would restore registers suddenly the loop
 will become an infinite one, as Ci is always restored to zero.
 
 [1] Have a look at runtime/parrot/library/Streams/Sub.imc
 
 leo
 

I disagree with that analysis.  Let us consider the actual effect of
such an implementation.

First iteration

i = 0;
foo(); #at this point a continuation created capturing i=0, promoted
by Jens and stuff happens
#eventually it is invoked, restoring i=0
i++; #i = 1
foo(); #at this point a NEW return continuation is created capturing
i=1; promoted by Jens...
#eventually it is invoked, restoring i=1
i++; #i = 2
...

Thus every single invocation of foo will have an i one greater than
the last.  If foo's algorithm had an error and did not use the new
return continuation to recreate its internal continuation each time,
then you would be correct.  But that would be a bug in the
implementation of foo.

As the following code

#set up for foo
foo()
#set other stuff for foo
foo()

would be an infinite loop alway returning immediately after the first
invocation of foo.

I looked at Sub.imc and think it would work because write always
creates a new Continuation for each invocation of write.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: [PROPOSAL] for a new calling scheme

2004-11-16 Thread Matt Fowles
Dan~


On Tue, 16 Nov 2004 12:22:23 -0500, Dan Sugalski [EMAIL PROTECTED] wrote:
 An updated PDD 03 is in the repository. It's
 clear on what the caller populates, what the
 callee sees, and what happens to all the
 different registers.

At line 72, Note that fact if a return continuation object is created
explicitly, rather than by an invocation op, what is the remainder of
this sentence?

Thanks,
Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Continuations, basic blocks, loops and register allocation

2004-11-16 Thread Matt Fowles
Dan~


On Tue, 16 Nov 2004 12:29:19 -0500, Dan Sugalski [EMAIL PROTECTED] wrote:
 At 11:52 AM -0500 11/16/04, Matt Fowles wrote:
 
 
 Leo~
 
 On Tue, 16 Nov 2004 16:37:04 +0100, Leopold Toetsch [EMAIL PROTECTED] 
 wrote:
 
 
   Matt Fowles [EMAIL PROTECTED] wrote:
Leo~
 
On Tue, 16 Nov 2004 09:23:24 +0100, Leopold Toetsch [EMAIL PROTECTED] 
  wrote:
 
i = 0
  lp:
foo()
inc i
if i  10 goto lp
 
There is one thing I am not sure about here.  The loop will work
correctly for each seperate invocation of the appropriate
continuation.
 
   No. Imagine, foo() is not a simple function anymore. Someone e.g. Jens
   Rieks[1], discovers that the algoritm is simpler implemented with
   continuations. So inside foo() the return continuation of foo() is
   copyied, stored elsewhere, passed along to another function, and that
   one now suddenly returns via this continuation to your loop.  If this
   invocation of the continuation would restore registers suddenly the loop
   will become an infinite one, as Ci is always restored to zero.
 
   [1] Have a look at runtime/parrot/library/Streams/Sub.imc
 
   leo
 
 
 I disagree with that analysis.
 
 You would, however, in this case be incorrect.
 
 The loop variable must have a backing store outside of the register
 set. The contents of registers must be assumed to be unreliable when
 a continuation is continued. If we declare that they are put back
 into the state they were when the continuation was taken, which is
 reasonable though not required, the values of non-reference type
 registers (ints and floats) will be reset. The rference type
 registers (strings and PMCs) will also be reset so the pointers to
 the string/pmc structs will be what they were when the continuation
 was taken, but as they are references the referred-to thing may have
 changed and the changed value will be seen.

I am having trouble in that I agree with what you are saying, but I am
coming to a different conclusion.  I think that foo would create a new
continuation (from it return continuation) each time it is called, and
thus things below it on the call stack would be unaffected by its own
internal continuation tricks (assuming for the moment that registers
are put back into place by continuations).

Since both you and Leo are arguing against me here, it seems like that
I am wrong, but I would like to figure out exactly why I am wrong so
that I can correct my train of thought in the future.

Thanks,
Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: Continuations, basic blocks, loops and register allocation

2004-11-16 Thread Matt Fowles
Leo~

On Tue, 16 Nov 2004 18:32:07 +0100, Leopold Toetsch [EMAIL PROTECTED] wrote:
 Matt Fowles wrote:
 
 
  I disagree with that analysis.  Let us consider the actual effect of
  such an implementation.
 
  First iteration
 
  i = 0;
  foo(); #at this point a continuation created capturing i=0, promoted
  by Jens and stuff happens
  #eventually it is invoked, restoring i=0
  i++; #i = 1
  foo(); #at this point a NEW return continuation is created capturing
 
 That would work if there is a one to one representation of the invoation
 of foo() an it's continuation. But no one guarantees that.

I suppose that what I am arguing is that anyone who does not maintain
such a one-to-one representation (at least from the perspective of
code calling foo()); full well deserves what they get.  They are
restoring the execution to an earlier state by invoking an old
continuation.  If the earlier state called them again the first time,
they should probably expect the earlier state to call them again the
second time.  Unless they have some specific knowledge that the
earlier state will change it behavior (because things in the heap have
changed), there should be no expectation for it to.

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: [PROPOSAL] for a new calling scheme

2004-11-16 Thread Matt Fowles
Dan~

On Tue, 16 Nov 2004 13:00:39 -0500, Dan Sugalski [EMAIL PROTECTED] wrote:
 At 12:56 PM -0500 11/16/04, Matt Fowles wrote:
 At line 72, Note that fact if a return continuation object is created
 explicitly, rather than by an invocation op, what is the remainder of
 this sentence?
 
 Now checked into CVS.

Earlier in that same paragraph you state that registers 16-31 will be
set  To which groups of registers are you referring, P or (I,S,P,
and N)?

I don't mean to be trouble some, I am just trying to make sure it is
clear and I understand it.

Thanks,
Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


Re: [PROPOSAL] for a new calling scheme

2004-11-16 Thread Matt Fowles
Dan~

On Tue, 16 Nov 2004 13:14:00 -0500, Dan Sugalski [EMAIL PROTECTED] wrote:
 At 1:11 PM -0500 11/16/04, Matt Fowles wrote:
 
 
 Dan~
 
 On Tue, 16 Nov 2004 13:00:39 -0500, Dan Sugalski [EMAIL PROTECTED] wrote:
   At 12:56 PM -0500 11/16/04, Matt Fowles wrote:
   At line 72, Note that fact if a return continuation object is created
   explicitly, rather than by an invocation op, what is the remainder of
   this sentence?
 
   Now checked into CVS.
 
 Earlier in that same paragraph you state that registers 16-31 will be
 set  To which groups of registers are you referring, P or (I,S,P,
 and N)?
 
 All of them. Clarification on its way in.

Thanks, I think I have run out of nits

Matt
-- 
Computer Science is merely the post-Turing Decline of Formal Systems Theory.
-???


  1   2   >