Re: PDD 23 Exceptions - ready for implementation

2006-07-21 Thread Allison Randal

chromatic wrote:


Here's what I don't understand.  Why is there talk of a stack to keep track of 
various flow control constructs?  Doesn't a CPS system use a linked list of 
continuations to handle normal flow control?  If that works there, why not 
another linked list of continuations to handle exceptional flow control?


I would ultimately like to see exceptions head down that road. But an 
exceptions stack is a good first approximation, and is at least safer 
than the current combined control+exceptions stack.


(CPS is, BTW, a part of Parrot internals in need of more documentation.)

Allison


Re: NCI and libparrot Question

2006-07-21 Thread Leopold Toetsch
Am Freitag, 21. Juli 2006 07:53 schrieb chromatic:
> Should this code work?  I think so.

This can't work for several reasons:

1) the NCI call signatures don't match the C functions' args:

.store_nci_func( 'const_string', 'ppt' )

should be: 'SIt'  (return STRING*, interp & C-cstring args)

.store_nci_func( 'string_to_cstring', 'tpp' )

should be: "tIS"  (return C-string, interp & STRING args)

(You could use 'pIt' and 'pIp' signatures too, then the STRING* result of the 
'const_string' would be wrapped into a ManagedStruct PMC).

2) print does *not* take c-strings, but STRINGs, therefore:

hello = string_to_cstring( interpreter, greet_string )
print hello

is likely to just segfault.

> -- c

leo


r13411 - Add a failing sprintf test (sprintf "%-20x", -1)

2006-07-21 Thread Leopold Toetsch
There are 3 problems with the test:

%x takes an *unsigned int*, the conversion from -1 to UI can use internally an 
arbitrary (and unspecced, arch-specific) amount of bits.

The test is wrong for 64-bit architectures.

And finally: trailing whitespace in tests is *bad*.

leo


Re: S04 - forbidden coding-style

2006-07-21 Thread Markus Laire

On 7/20/06, Smylers <[EMAIL PROTECTED]> wrote:

Markus Laire writes:

> S04 seems to say that a style like this can't be used by
> perl6-programmers:
>
> loop
>  {
>...
>  }
> while $x;
>
> I like this style, as it lines up both the keywords and the curlies.

As of yesterday you can get very close to this by putting a space-eating
backslash after the closing brace:

  loop
   {
 ...
   }\
  while $x;

That still has the keywords and the braces aligned.


Yes. First I didn't like that additional slash, but now that I think
it more, it does give a nice visual clue that C belongs to the
preceding block.

(And that doesn't affect auto-indenting in vim)

--
Markus Laire


Re: PDD 23 Exceptions - ready for implementation

2006-07-21 Thread Bob Rogers
   From: Allison Randal <[EMAIL PROTECTED]>
   Date: Fri, 21 Jul 2006 00:24:13 -0700

   chromatic wrote:

   > Here's what I don't understand.  Why is there talk of a stack to keep 
track of 
   > various flow control constructs?  Doesn't a CPS system use a linked list 
of 
   > continuations to handle normal flow control?  If that works there, why not 
   > another linked list of continuations to handle exceptional flow control?

Both are implemented as linked lists, now and for the (to me)
conceivable future.  For most purposes, though, they behave like stacks.
Furthermore, the codebase uses identifiers like "control_stack",
"Stack_Entry", etc, so I have fallen into the habit of calling them
"stacks".  I think it would be good to change at least some of these
names, but changing my habits of speech may take longer.  :-/

   (And my apologies to chromatic for not replying sooner; the original
post got buried, and I lost track of the fact that I hadn't replied.)

   I would ultimately like to see exceptions head down that road. But an 
   exceptions stack is a good first approximation, and is at least safer 
   than the current combined control+exceptions stack.

   (CPS is, BTW, a part of Parrot internals in need of more documentation.)

   Allison

Two weeks ago I started writing something I had been thinking about for
a year now, tentatively called "Continuations, Coroutines, And All That:
An informal introduction to creating advanced control structures in
Parrot."  It is still mostly an outline, though -- it's hard to write a
tutorial about features for which the spec is in flux.  ;-}

-- Bob


Problems Installing Parrot

2006-07-21 Thread Mr. Shawn H. Corey
Hi,

I am trying to install Parrot and the README file has this:

You'll need a C compiler, a linker and a make program of course. If you
will be linking with the ICU library you have to download and install it
before configuring Parrot.

Get it from http://www-306.ibm.com/software/globalization/icu/downloads.jsp

I have downloaded the icu4j_3_4_4.jar but have no idea what to do with
it. Could someone please help?


-- 
__END__

Just my 0.0002 million dollars worth,
   --- Shawn

"For the things we have to learn before we can do them, we learn by
doing them."
  Aristotle


Re: Problems Installing Parrot

2006-07-21 Thread Jonathan Rockway



I have downloaded the icu4j_3_4_4.jar but have no idea what to do with
it. Could someone please help?
  
You'll want to get icu4c (icu for C), not icu4j (for java).  If you get 
the tgz C version, just tar xzvf it, cd source; ./configure; make; make 
install.  Note that most Linux distros have packages for icu.  apt-get 
install libicu.* will get everything you need on Debian.  (On other 
distros, be sure to install the -dev or -devel pacakages).


Anyway, here's where I got it from:
ftp://ftp.software.ibm.com/software/globalization/icu/3.4.1/icu-3.4.1.tgz

Regards,
Jonathan Rockway


Re: S04 - forbidden coding-style

2006-07-21 Thread Larry Wall
On Thu, Jul 20, 2006 at 05:03:32PM +0100, Smylers wrote:
: Markus Laire writes:
: 
: > S04 seems to say that a style like this can't be used by
: > perl6-programmers:
: > 
: > loop
: >  {
: >...
: >  }
: > while $x;
: > 
: > I like this style, as it lines up both the keywords and the curlies.
: 
: As of yesterday you can get very close to this by putting a space-eating
: backslash after the closing brace:
: 
:   loop
:{
:  ...
:}\
:   while $x;
: 
: That still has the keywords and the braces aligned.

It's possible we can find a way to dwim that without the backslash,
but for now I'd say that check-at-the-end loops are so much rarer
than closing braces in general that it's a worthwhile hit even if we
end up requiring the backslash on that particular style.  The problem with
any attempt to dwim it is that

   loop
{
  ...
}

   while $x {...}

looks like the same thing to the parser unless we delay deciding
about the "while" until the second {...}, or unless we make blank
lines significant (shudder).  Alternately, a loop statement always
attempts to slurp a subsequent while or until (much like "if" slurps
an "else"), and then we rely on the fact that you will get a syntax
error as soon as you hit the second {...}, and we force any infinite
loop writer to use a semicolon to prevent the the syntax error:

   loop
{
  ...
};

   while $x {...}

The problem with relying on the syntax error is that every time you rely
on a syntax error to find one problem, two offsetting problems can
really ruin your day.  Suppose they meant the above but said this:

   loop
{
  ...
}
   while $x{...}

So that particular dwim has a robustness strike against it, or at least
half a strike.

However, I'd guess that "infinite" loops will probably be more common
in practice than loop-while, since you tend to write exit-in-the-middle
loops using an infinite loop and "last if".  We didn't even allow the
loop-while form in the initial design of Perl 6, and forced you to write
that as an "infinite" loop:

   loop
{
  ...
  last unless $x;
}

Another thing that needs to be said is that we probably should not
consider ourselves beholden to a coding style guide designed for
a different language with a different lexical structure.  We've
certainly abandoned C and Unix culture in a number of other areas.
We're trying to make a language that will generalize into the future,
and that means we want to minimize special cases while making the
basic constucts more powerful.  Trying to dwym on loop-while may fall
into the category of a special case that makes something else error
prone.  One thing I've tried to guard in the lexical structure of
Perl 6 is that there are certain fixed sync points where we can know
that something is done with no more than one token of lookahead.
Semicolons have traditionally filled that role, and currently line-ending
curlies are in the same category.  Likewise we try very hard never to
give a meaning to two terms in a row, because treating that as an
error catches lots of mistakes.

An if-else doesn't violate this because else is not something that can
occur as the beginning of another statement.  Unfortunately, "while"
and "until" are in that category...

So another possibility is to introduce an else-ish word:

loop
  {
...
  }
mumble while $x;

but that that's even longer to type than the backslash "unspace", and
doesn't help with statement modifiers in general.  So I'm inclined
to stick with the backslash for now.  'Course, you can always write
your own grammar too--which is something we officially try to encourage
but unofficially try to discourage. :)

Anyway, despite what I said about abandoning C culture, I like K&R-style
bracketing myself, so Perl is naturally a bit prejudiced in that direction.
I've only gone more to that style as my eyes have got worse, since it lets
me blow up the font and still keep a lot of lines on the page.  I think
GNU style is wasteful of our natural resources.  :)

All that being said, I do think the backslash is ugly, so it's
possible we might end up biasing the curly rule the other way if the
next token looks like a statement modifier.  Still thinking about how
it will all work in practice, and in particular which failure modes
can give very good error messages like "Current line misinterpreted
as statement modifier, so previous line's } needs to be }; instead".
Or "Current line misinterpreted as statement, so previous line's }
needs to be }\ instead".  And how often an ambiguous trailing {...}
might accidentally occur in a conditional expression...

It ain't easy.  Maybe we should just make statement modifiers uppercase
and burn out everyone's eye sockets. :)

Larry


Re: S04 - forbidden coding-style

2006-07-21 Thread Jonathan Scott Duff
On Thu, Jul 20, 2006 at 10:18:57AM -0700, Larry Wall wrote:
> It ain't easy.  Maybe we should just make statement modifiers uppercase
> and burn out everyone's eye sockets. :)

Or just give them some sort of syntactic marker ... I know!

loop {
...
}
:while $loopy;

eat :if $hungry;
go_postal :when $aggravation > 10;
.sleep :until .rested;

*Everybody* wants the colon!  ;-)

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]


ICU advantages? was Re: Problems Installing Parrot

2006-07-21 Thread Chris Dolan

On Jul 21, 2006, at 9:48 AM, Jonathan Rockway wrote:

I have downloaded the icu4j_3_4_4.jar but have no idea what to do  
with

it. Could someone please help?

You'll want to get icu4c (icu for C), not icu4j (for java).  If you  
get the tgz C version, just tar xzvf it, cd source; ./configure;  
make; make install.  Note that most Linux distros have packages for  
icu.  apt-get install libicu.* will get everything you need on  
Debian.  (On other distros, be sure to install the -dev or -devel  
pacakages).


Anyway, here's where I got it from:
ftp://ftp.software.ibm.com/software/globalization/icu/3.4.1/ 
icu-3.4.1.tgz


On a related note, I understand that ICU is recommended but not  
required for Parrot (right?).  After searching in the Parrot docs  
subdir a couple weeks ago, I couldn't find more than that.  Questions:


 1) Is there documentation on how ICU relates to Parrot somewhere  
that I missed?

 2) How important is ICU?
 3) If I build Parrot without ICU, what repercussions should I expect?

This would be a good entry for the FAQs for a cage cleaner.

Thanks,
Chris

--
Chris Dolan, Software Developer, Clotho Advanced Media Inc.
608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703
vCard: http://www.chrisdolan.net/ChrisDolan.vcf

Clotho Advanced Media, Inc. - Creators of MediaLandscape Software  
(http://www.media-landscape.com/) and partners in the revolutionary  
Croquet project (http://www.opencroquet.org/)





Re: NCI and libparrot Question

2006-07-21 Thread chromatic
On Friday 21 July 2006 00:57, Leopold Toetsch wrote:

> This can't work for several reasons:
>
> 1) the NCI call signatures don't match the C functions' args:
>
>   .store_nci_func( 'const_string', 'ppt' )
>
> should be: 'SIt'  (return STRING*, interp & C-cstring args)
>
>   .store_nci_func( 'string_to_cstring', 'tpp' )
>
> should be: "tIS"  (return C-string, interp & STRING args)
>
> (You could use 'pIt' and 'pIp' signatures too, then the STRING* result of
> the 'const_string' would be wrapped into a ManagedStruct PMC).

I don't see documentation for the S or I parameters anywhere in the NCI PDD.  
Is there a better place for them?

> 2) print does *not* take c-strings, but STRINGs, therefore:
>
>   hello = string_to_cstring( interpreter, greet_string )
>   print hello
>
> is likely to just segfault.

I did oversimplify the code somewhat.  Here's what I really want to run.

-- c


Re: FAQ Questions (WAS: ICU advantages? was Re: Problems Installing Parrot)

2006-07-21 Thread Mr. Shawn H. Corey
Chris Dolan wrote:
> On Jul 21, 2006, at 9:48 AM, Jonathan Rockway wrote:
> 
>>> I have downloaded the icu4j_3_4_4.jar but have no idea what to do with
>>> it. Could someone please help?
>>>
>> You'll want to get icu4c (icu for C), not icu4j (for java).  If you
>> get the tgz C version, just tar xzvf it, cd source; ./configure; make;
>> make install.  Note that most Linux distros have packages for icu. 
>> apt-get install libicu.* will get everything you need on Debian.  (On
>> other distros, be sure to install the -dev or -devel pacakages).
>>
>> Anyway, here's where I got it from:
>> ftp://ftp.software.ibm.com/software/globalization/icu/3.4.1/icu-3.4.1.tgz
> 
> On a related note, I understand that ICU is recommended but not required
> for Parrot (right?).  After searching in the Parrot docs subdir a couple
> weeks ago, I couldn't find more than that.  Questions:
> 
>  1) Is there documentation on how ICU relates to Parrot somewhere that I
> missed?
>  2) How important is ICU?
>  3) If I build Parrot without ICU, what repercussions should I expect?
> 
> This would be a good entry for the FAQs for a cage cleaner.

If you're collect questions for the FAQ, here are some Andy Lester
answered for me:

>
> First, my background. I am an experienced programmer having worked with
> Perl since version 4 and worked with C for many years before that. I
> have worked with SCCS and RCS but not CVS nor SVN.

Basically the same stuff.

> 1. Do I need root privileges to install Parrot? Do I need it for Cage
> Cleaners?

You don't even need root at all.  You can build in a local directory and
not install.

> 2. How much disk space does this take? What's the best way to get it
> without using too much disk space?

My build directory is 194MB.



> 3. My ISP offers unlimited downloads between midnight and 7 AM (and
> unlimited uploads anytime). Is there away to get CVS/SVN to do its
> updates in this time slot? Or rather is there a way to limit it so it
> doesn't automatically update without permission?

It won't update automatically.  Once you have the stuff on your local
system, Subversion is pretty parsimonious with the bandwidth

> 4. Is there a naming convention for Parrot's root directory or can I
> stick it just anywhere?

Anywhere.

> 5. What would be the difference between using SVN and SVK
>  ?

Unless you're a Subversion whiz, stick with Subversion, not svk.


Please sign up for perl6-internals, soon to be renamed parrot-porters,
at lists.perl.org.  That's where our discussions go on, and where all
the cage cleaners are starting to accumulate.  There I can talk about
some high-level plans, and people can pick at things that they find most
interesting.  Plus, you can share your questions with other developers, too.

Thanks for joining!

xoxo,
Andy

-- 
Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance







-- 
__END__

Just my 0.0002 million dollars worth,
   --- Shawn

"For the things we have to learn before we can do them, we learn by
doing them."
  Aristotle


Re: NCI and libparrot Question

2006-07-21 Thread Leopold Toetsch
Am Freitag, 21. Juli 2006 20:08 schrieb chromatic:
> On Friday 21 July 2006 00:57, Leopold Toetsch wrote:
> > (You could use 'pIt' and 'pIp' signatures too, then the STRING* result of
> > the 'const_string' would be wrapped into a ManagedStruct PMC).
>
> I don't see documentation for the S or I parameters anywhere in the NCI
> PDD. Is there a better place for them?

src/call_list.txt is probably the best place to look. And a good one to look 
into occasionally, I've mixed up 'I' and 'J' - sorry.

> I did oversimplify the code somewhat.  Here's what I really want to run.

Without futher looking - you have to replace a lot of 'p's (some structure) 
with 'J' (the Interpreter* interp structure). E.g.

  .store_nci_func( 'Parrot_readbc', 'ppt' )

=>

  .store_nci_func( 'Parrot_readbc', 'pJt' )

You migh also grep for enter_nci_method in src/pmc/*.c - all METHODs in .pmc 
are converted to NCI calls in the .c files with appropriate signatures.

> -- c

leo


Help Understanding Configure.pl Output

2006-07-21 Thread Mr. Shawn H. Corey
Hi,

I ran `perl Configure.pl` and I have some questions about its output.

First:

Determining if your C compiler is actually gcc.yes.
Determining if your C compiler is actually Visual C++...no.
Enabling optimization...no.

The first two makes sense given my system:
 but what does
the last mean? Does it mean only the C compiler or everything? Does it
means it has disabled all optimization -O0 or using the default (which I
think is -O1)?


Second:

Determining if your platform supports GMP...no.
Determining if your platform supports readline..no.
Determining if your platform supports gdbm..no.

How important are these? Parrot compiles without them but am I missing
something?


-- 
__END__

Just my 0.0002 million dollars worth,
   --- Shawn

"For the things we have to learn before we can do them, we learn by
doing them."
  Aristotle


Re: S04 - forbidden coding-style

2006-07-21 Thread Larry Wall
On Fri, Jul 21, 2006 at 12:07:52PM -0500, Jonathan Scott Duff wrote:
: Or just give them some sort of syntactic marker ... I know!
: 
: loop {
: ...
: }
: :while $loopy;
: 
: eat :if $hungry;
: go_postal :when $aggravation > 10;
: .sleep :until .rested;
: 
: *Everybody* wants the colon!  ;-)

Well, hmm, I actually thought of that one, but left it out since it's
ambiguous when a term is expected (unless we start turning pairs into
reserved words too).

Larry


[svn:perl6-synopsis] r10348 - doc/trunk/design/syn

2006-07-21 Thread audreyt
Author: audreyt
Date: Fri Jul 21 11:40:37 2006
New Revision: 10348

Modified:
   doc/trunk/design/syn/S02.pod

Log:
* S02: rodi++ pointed out a nit:
"say q<< <> >>"
should print " <> " not "<>".

Modified: doc/trunk/design/syn/S02.pod
==
--- doc/trunk/design/syn/S02.pod(original)
+++ doc/trunk/design/syn/S02.podFri Jul 21 11:40:37 2006
@@ -136,7 +136,7 @@
 say #{{
 This comment contains unmatched } and { { { {   (ignored)
 Plus a nested {{ ... }} pair(counted)
-}} q<< <> >>   # says "<>"
+}} q<< <> >>   # says " <> "
 
 Note however that bare circumfix or postcircumfix C<<< <<...>> >>> is
 not a user-selected bracket, but the ASCII variant of the C<< «...» >>


Re: FAQ Questions (WAS: ICU advantages? was Re: Problems Installing Parrot)

2006-07-21 Thread Patrick R. Michaud
On Fri, Jul 21, 2006 at 02:12:57PM -0400, Mr. Shawn H. Corey wrote:
> Chris Dolan wrote:
> > 1. Do I need root privileges to install Parrot? Do I need it for Cage
> > Cleaners?
> 
> You don't even need root at all.  You can build in a local directory and
> not install.

In fact, for those who are developing parrot the current
recommendation is to *not* install it, as it often produces later
collisions between installed and local copies of parrot.

Pm


Re: S04 - forbidden coding-style

2006-07-21 Thread Ruud H.G. van Tol
Larry Wall schreef:

> Maybe we should just make statement modifiers
> uppercase and burn out everyone's eye sockets. :)

Or maybe 
   {
   }.
   while $x ;

-- 
Groet, Ruud


Re: S04 - forbidden coding-style

2006-07-21 Thread Trey Harris

In a message dated Fri, 21 Jul 2006, Ruud H.G. van Tol writes:


Larry Wall schreef:


Maybe we should just make statement modifiers
uppercase and burn out everyone's eye sockets. :)


Or maybe
  {
  }.
  while $x ;


Actually, can't that be made to work already (already by the language 
spec, not by the current compiler featureset) by


method Block::while ($block: Bool $true is deferred) {
   $block() while $true 
}


That would require parens around the boolean expression, though, but I'm 
sure you can fix that with a parsing constraint.


Trey


Re: Help Understanding Configure.pl Output

2006-07-21 Thread Joshua Hoblitt
On Fri, Jul 21, 2006 at 03:04:06PM -0400, Mr. Shawn H. Corey wrote:
> Determining if your C compiler is actually gcc.yes.
> Determining if your C compiler is actually Visual C++...no.
> Enabling optimization...no.
> 
> The first two makes sense given my system:
>  but what does
> the last mean? Does it mean only the C compiler or everything? Does it
> means it has disabled all optimization -O0 or using the default (which I
> think is -O1)?

It means that no optimization is enabled and debugging information is
embedded in the object files.  It's virtually impossible to debug
optimized code and it can dramatically increase compilation times (there
are still quadratic algorithms in most compilers!). So it's reasonable to
default to no optimization when a project is under heavy development.
If you need the speed, pass --optimize to configure.

> Second:
> 
> Determining if your platform supports GMP...no.
> Determining if your platform supports readline..no.
> Determining if your platform supports gdbm..no.
> 
> How important are these? Parrot compiles without them but am I missing
> something?

Those are needed for 'Big' math support, readline, and hash files.  It's
pretty subjective as to whether your missing that functionality or not.

Cheers,

-J

--


pgp1WB9vHbv78.pgp
Description: PGP signature


[svn:perl6-synopsis] r10350 - doc/trunk/design/syn

2006-07-21 Thread larry
Author: larry
Date: Fri Jul 21 12:52:51 2006
New Revision: 10350

Modified:
   doc/trunk/design/syn/S04.pod

Log:
s/loop/repeat/ for test-after loops


Modified: doc/trunk/design/syn/S04.pod
==
--- doc/trunk/design/syn/S04.pod(original)
+++ doc/trunk/design/syn/S04.podFri Jul 21 12:52:51 2006
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall <[EMAIL PROTECTED]>
   Date: 19 Aug 2004
-  Last Modified: 19 July 2006
+  Last Modified: 21 July 2006
   Number: 4
-  Version: 28
+  Version: 29
 
 This document summarizes Apocalypse 4, which covers the block and
 statement syntax of Perl.
@@ -175,6 +175,14 @@
 
 =head1 Loop statements
 
+Looping statement modifiers are the same as in Perl 5.
+Loop modifiers C, C, and C also work as in Perl 5.
+
+There is no longer a C block.  Instead, use a C block
+within the body of the loop.  See below.
+
+=head2 The C and C statements
+
 The C and C statements work as in Perl 5, except that you
 may leave out the parentheses around the conditional:
 
@@ -182,26 +190,59 @@
...
 }
 
-Looping statement modifiers are the same as in Perl 5, except that
-to avoid confusion applying one to a C block is specifically
-disallowed.  Instead of
+=head2 The C statement
+
+Unlike in Perl 5, applying a statement modifier to a C block is
+specifically disallowed:
+
 
 do {
...
-} while $x;
+} while $x < 10;   # ILLEGAL
 
-you should write
+Instead, you should write the more Pascal-like C loop:
 
-loop {
+repeat {
...
-} while $x;
+} while $x < 10;
 
-Loop modifiers C, C, and C work as in Perl 5.
+or equivalently:
 
-There is no longer a C block.  Instead, use a C block
-within the loop.  See below.
+repeat {
+   ...
+} until $x >= 10;
+
+Unlike Perl 5's C loop, this is a real loop block now, so
+C, C, and C work as expected.  The loop conditional
+on a repeat block is required, so it will be recognized even if you
+put it on a line by its own:
 
-=head1 The general loop statement
+repeat
+{
+   ...
+}
+while $x < 10;
+
+However, that's likely to be visually confused with a following
+C loop at the best of times, so it's also allowed to put the
+loop conditional at the front, with the same meaning (the C
+keyword forces the conditional to be evaluated at the end of the loop,
+so it's still C's do-while semantics.)  Therefore, even under GNU style
+rules, the previous example may be rewritten into a very clear:
+
+repeat while $x < 10
+  {
+   ...
+  }
+
+or equivalently:
+
+repeat until $x >= 10
+  {
+   ...
+  }
+
+=head2 The general loop statement
 
 The C statement is the C-style C loop in disguise:
 
@@ -210,13 +251,16 @@
 }
 
 As in C, the parentheses are required if you supply the 3-part spec; however,
-as shown in the previous section, the 3-part loop spec may be entirely
-omitted to write an infinite loop.  If you omit the 3-part loop spec
-you may add a C or C statement modifier at the end
-to make it a "repeat at least once" loop.  Unlike C in Perl 5,
-it's a real loop block, so you may use loop modifiers.
+the 3-part loop spec may be entirely omitted to write an infinite loop.
+That is,
+
+loop {...}
+
+is equivalent to the Cish idiom:
+
+loop (;;) {...}
 
-=head1 The C statement
+=head2 The C statement
 
 There is no C statement any more. It's always spelled C
 in Perl 6, so it always takes a list as an argument:
@@ -293,12 +337,12 @@
 compiler may have to retroactively change the binding of <$_> on the
 left side.  But it's what people expect of a pronoun like "it".)
 
-=head1 The do-once loop
+=head2 The do-once loop
 
 In Perl 5, a bare block is deemed to be a do-once loop.  In Perl 6,
 the bare block is not a do-once.  Instead C is the do-once
 loop (which is another reason you can't put a C or C
-modifier on it).
+modifier on it; use C for that).
 
 For any statement, prefixing with a C allows you to 
 return the value of that statement and use it in an expression:


Re: [svn:perl6-synopsis] r10350 - doc/trunk/design/syn

2006-07-21 Thread Smylers
[EMAIL PROTECTED] writes:

> s/loop/repeat/ for test-after loops

Yay!  That makes things very clear, with different things looking nicely
different.

Smylers


Re: NCI and libparrot Question

2006-07-21 Thread chromatic
On Friday 21 July 2006 11:43, Leopold Toetsch wrote:

> Without futher looking - you have to replace a lot of 'p's (some structure)
> with 'J' (the Interpreter* interp structure). E.g.
>
>   .store_nci_func( 'Parrot_readbc', 'ppt' )
>
> =>
>
>   .store_nci_func( 'Parrot_readbc', 'pJt' )

I'm not convinced; this works just fine from the Perl 5 and Ruby bindings.  
Most of that code uses the interpreter returned from Parrot_new(), rather than 
the current interpreter.  (It only uses the current interpreter as the parent 
argument to Parrot_new()).

> You migh also grep for enter_nci_method in src/pmc/*.c - all METHODs in
> .pmc are converted to NCI calls in the .c files with appropriate
> signatures.

That ought to work.

-- c


Re: [svn:parrot] r13424 - trunk/docs/art

2006-07-21 Thread Will Coleda

Can we discuss this on list a bit?

On Jul 21, 2006, at 5:07 PM, [EMAIL PROTECTED] wrote:


Author: duff
Date: Fri Jul 21 14:07:00 2006
New Revision: 13424

Added:
   trunk/docs/art/

Log:
place for parrot articles



--
Will "Coke" Coleda
[EMAIL PROTECTED]




[perl #39905] [TODO] TGE - line number reporting.

2006-07-21 Thread via RT
# New Ticket Created by  Will Coleda 
# Please include the string:  [perl #39905]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=39905 >


Once a .tg file is compiled to a .pir file, any errors in the  
embedded PIR are reported against the line number
of the generated PIR file.

Instead, the line numbers should be reported against the original .tg  
file.


--
Will "Coke" Coleda
[EMAIL PROTECTED]




Re: FAQ Questions (WAS: ICU advantages? was Re: Problems Installing Parrot)

2006-07-21 Thread Chris Dolan

On Jul 21, 2006, at 1:12 PM, Mr. Shawn H. Corey wrote:


Chris Dolan wrote:

This would be a good entry for the FAQs for a cage cleaner.


If you're collect questions for the FAQ, here are some Andy Lester
answered for me:


I'm not, actually.  :-(

Could you do one of the following, in order of preference:
 1) Write these up as a patch to the FAQ
 2) Write these up as a patch for cage/TODO.pod
 3) Submit an RT bug to add these to the FAQ

Chris

--  
Chris Dolan, Software Developer, Clotho Advanced Media Inc.

608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703
vCard: http://www.chrisdolan.net/ChrisDolan.vcf

Clotho Advanced Media, Inc. - Creators of MediaLandscape Software  
(http://www.media-landscape.com/) and partners in the revolutionary  
Croquet project (http://www.opencroquet.org/)