Re: Query re: duction and precedence.

2008-03-30 Thread Darren Duncan

Mark J. Reed wrote:

You anticipated me. So, is there a core method for
foldl/foldr/inject/reduce, or do you have to roll your own as in p5?

On 3/29/08, Larry Wall <[EMAIL PROTECTED]> wrote:

On Sat, Mar 29, 2008 at 10:18:53PM -0400, Mark J. Reed wrote:
: In general, is
:
: [op] (p1,p2,p3,p4...)
:
: expected to return the same result as
:
: p1 op p2 op p3 op p4...
:
: including precedence considerations?

Yes, in fact the section on Reduction Operators uses exponentiation
obliquely in one of its examples of something that should work
right-to-left.  Admittedly it's not clearly stated there...

But the basic idea is always that the reduction form should produce
the same result as if you'd written it out with interspersed infixes.
It's a linguistic construct, not a functional programming construct.
It's not intended to be in the same league as foldl and foldr, and
is only just slightly beyond a macro insofar as it can intersperse
however many operators it needs to for an arbitrarily sized list.
It's not making any attempt to deal with anonymous first-class
functions though.  Call a real function for that. :)


I think it would be powerful while not too difficult for Perl 6's "reduce" 
to be able to do everything you'd get in functional programming, at least 
some of the time.


Generally speaking, as long as the base operator is associative, then

  [op] *$seq_or_array_etc

... should auto-parallelize with a deterministic result; or as long as the 
base operator is both associative and commutative, then


  [op] *$set_or_bag_or_seq_or_array_etc

... should also auto-parallelize with a deterministic result.

And then you get all the functional programming goodies.  The first example 
works for string catenation, but the second doesn't; the second does work 
for sum|product|and|or|xor|union|intersection though.


Some base operators have an identity value in case the input collection is 
empty, as is the case with the above operators, but others only work with a 
non-empty input, such as mean|median|mode.


For other operators, non-assoc etc, the work will probably all have to be 
linear.  Eg difference|quotient|exponentiation.


Something I'm wondering, though, realistically how often would one actually 
be reducing on an operator that is not associative?  What practical use is 
there for [-] (3,4,5) for example?


Are you just supporting that with all operators for parsing rule simplicity 
as per a macro?  I can understand that reasoning, but otherwise ...


I would think it makes sense to restrict the use of the reduction 
meta-operator to just work over operators that are at least associative.


-- Darren Duncan


[perl #52242] perl6 option handling - insufficiently paranoid

2008-03-30 Thread via RT
# New Ticket Created by  Alan Rocker 
# Please include the string:  [perl #52242]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=52242 >



Perl 6 does not defend itself against invalid options. Using an invalid
option results in an ungraceful death rather than a valid error message.

E.g.
$ ./perl6 -x "say 'Hi';"
Error: file cannot be read: -x
current instr.: 'parrot;PCT::HLLCompiler;panic' pc 158
(src/PCT/HLLCompiler.pir:103)



--

Email and shopping with the feelgood factor!
55% of income to good causes. http://www.ippimail.com



[perl #52276] 0-array and 1-array composer broken

2008-03-30 Thread via RT
# New Ticket Created by  Stephane Payrard 
# Please include the string:  [perl #52276]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=52276 >


but  n-array composer with n > 1 works correctly

$ alias rakudo
alias rakudo='./parrot languages/perl6/perl6.pbc'
$ rakudo  -e 'my @a = [1]; say @a[0]'
get_pmc_keyed() not implemented in class 'Integer'
current instr.: '_block10' pc 44 (EVAL_11:25)
called from Sub 'parrot;PCT::HLLCompiler;eval' pc 823
(src/PCT/HLLCompiler.pir:476)
called from Sub 'parrot;PCT::HLLCompiler;command_line' pc 1314
(src/PCT/HLLCompiler.pir:704)
called from Sub 'parrot;Perl6::Compiler;main' pc 8199 (perl6.pir:169)

$  rakudo  -e 'my @a = []; say @a[0]'
error:imcc:syntax error, unexpected COMMA (',')
in file 'EVAL_11' line 15
error:imcc:syntax error, unexpected '\n'
in file 'EVAL_11' line 17
get_pmc_keyed() not implemented in class 'Undef'
current instr.: '_block10' pc 31 (EVAL_11:23)
called from Sub 'parrot;PCT::HLLCompiler;eval' pc 823
(src/PCT/HLLCompiler.pir:476)
called from Sub 'parrot;PCT::HLLCompiler;command_line' pc 1314
(src/PCT/HLLCompiler.pir:704)
called from Sub 'parrot;Perl6::Compiler;main' pc 8199 (perl6.pir:169)

$ rakudo  -e 'my @a = [1,2]; say @a[1]'
2

-- 
cognominal stef


[perl #52264] Bug: duplicate directory names in SVN

2008-03-30 Thread Ted Neward
# New Ticket Created by  "Ted Neward" 
# Please include the string:  [perl #52264]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=52264 >


There appear to be two directories, languages/HQ9plus and languages/hq9plus,
which conflict with one another on case-insensitive filesystems, a la Win32.


 

Ted Neward

Java, .NET, XML Services

Consulting, Teaching, Speaking, Writing

HYPERLINK "http://www.tedneward.com"http://www.tedneward.com

 


No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.1/1348 - Release Date: 3/28/2008
10:58 AM
 


Getting Started - Synopsis

2008-03-30 Thread John M. Dlugosz
I've read copies of the Synopsis documents that I've found on the web 
somewhere.  How do I synchronize with the life copies, and hack on them?

--John


Getting Started - What to try?

2008-03-30 Thread John M. Dlugosz
I've installed the Win32 build of Pugs, but is appears to be incomplete.  How 
do I get the "real thing"?  I've also heard that Pugs is in stasis, so is this 
still a good way to write stuff and learn today?

Likewise, how do I get synched up with the Parrot implementation?  I understand 
the most official grammar is being developed there.  Is there a grammar-checker 
tool that will help me to validate proposed Perl 6 code fragments, even if I 
can't execute it yet?

In general, what are the various repositories and version-control systems used? 
 What ought I install and get working to join up with the Perl 6 community?

--John


Re: Getting Started - Synopsis

2008-03-30 Thread Agent Zhang
On 30 Mar 2008 10:32:03 -, John M. Dlugosz <[EMAIL PROTECTED]> wrote:
> I've read copies of the Synopsis documents that I've found on the web 
> somewhere.  How do I synchronize with the life copies, and hack on them?
>

Most of the Synopses are in the "official svn repos",
http://svn.perl.org/perl6/doc/trunk/design/syn/ . This repos is
"hackable" by only a very small group of people ;)

S29 is currently in Pugs's repos IIRC which can be tweaked as long as
you have a Pugs commit bit which is trivial to obtain. The latest S26
(draft) is in Damian's Perl6::Perldoc on CPAN which also has a copy in
the Pugs repos AFAIK.

The latest HTML version of all the Synopses can be found at
http://perlcabal.org/syn/ , which is automatically updated from both
SVN repositories every one hour by a cron job running on feather.

Cheers,
-agentzh


RE: [perl #52264] Bug: duplicate directory names in SVN

2008-03-30 Thread Ted Neward
Will do at next chance, maybe later today or tomorrow.

Ted Neward
Java, .NET, XML Services
Consulting, Teaching, Speaking, Writing
http://www.tedneward.com
 

> -Original Message-
> From: Bernhard Schmalhofer via RT [mailto:parrotbug-
> [EMAIL PROTECTED]
> Sent: Sunday, March 30, 2008 4:31 AM
> To: [EMAIL PROTECTED]
> Subject: [perl #52264] Bug: duplicate directory names in SVN
> 
> On Sa. 29. Mär. 2008, 20:04:14, [EMAIL PROTECTED] wrote:
> > There appear to be two directories, languages/HQ9plus and
> languages/hq9plus,
> > which conflict with one another on case-insensitive filesystems, a la
> Win32.
> 
> Sorry,
> 
> that was an oversight from my side. I've reimplemented HQ9+ starting
> from 'mk_language_shell' and forgot to remove the old directory
> 'languagest/HQ9plus'.
> This should be fixed in r26641.
> 
> Could you confirm?
> --
> /* [EMAIL PROTECTED] */
> 
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.519 / Virus Database: 269.22.1/1348 - Release Date:
> 3/28/2008 10:58 AM
> 

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.1/1348 - Release Date: 3/28/2008 
10:58 AM
 



Re: Query re: duction and precedence.

2008-03-30 Thread Mark J. Reed
I'm a believer in generalizing where possible, modulo the principles
of KISS and YAGNI. The latter essentially means "at least make it
general enough that you can extend it later without major retooling if
it turns out YNIAA.".  It's pretty surprising what can turn out to be
useful, so I've never been swayed by arguments from "what is it good
for?"...



On 3/30/08, Darren Duncan <[EMAIL PROTECTED]> wrote:
> Mark J. Reed wrote:
> > You anticipated me. So, is there a core method for
> > foldl/foldr/inject/reduce, or do you have to roll your own as in p5?
> >
> > On 3/29/08, Larry Wall <[EMAIL PROTECTED]> wrote:
> >> On Sat, Mar 29, 2008 at 10:18:53PM -0400, Mark J. Reed wrote:
> >> : In general, is
> >> :
> >> : [op] (p1,p2,p3,p4...)
> >> :
> >> : expected to return the same result as
> >> :
> >> : p1 op p2 op p3 op p4...
> >> :
> >> : including precedence considerations?
> >>
> >> Yes, in fact the section on Reduction Operators uses exponentiation
> >> obliquely in one of its examples of something that should work
> >> right-to-left.  Admittedly it's not clearly stated there...
> >>
> >> But the basic idea is always that the reduction form should produce
> >> the same result as if you'd written it out with interspersed infixes.
> >> It's a linguistic construct, not a functional programming construct.
> >> It's not intended to be in the same league as foldl and foldr, and
> >> is only just slightly beyond a macro insofar as it can intersperse
> >> however many operators it needs to for an arbitrarily sized list.
> >> It's not making any attempt to deal with anonymous first-class
> >> functions though.  Call a real function for that. :)
>
> I think it would be powerful while not too difficult for Perl 6's "reduce"
> to be able to do everything you'd get in functional programming, at least
> some of the time.
>
> Generally speaking, as long as the base operator is associative, then
>
>[op] *$seq_or_array_etc
>
> ... should auto-parallelize with a deterministic result; or as long as the
> base operator is both associative and commutative, then
>
>[op] *$set_or_bag_or_seq_or_array_etc
>
> ... should also auto-parallelize with a deterministic result.
>
> And then you get all the functional programming goodies.  The first example
> works for string catenation, but the second doesn't; the second does work
> for sum|product|and|or|xor|union|intersection though.
>
> Some base operators have an identity value in case the input collection is
> empty, as is the case with the above operators, but others only work with a
> non-empty input, such as mean|median|mode.
>
> For other operators, non-assoc etc, the work will probably all have to be
> linear.  Eg difference|quotient|exponentiation.
>
> Something I'm wondering, though, realistically how often would one actually
> be reducing on an operator that is not associative?  What practical use is
> there for [-] (3,4,5) for example?
>
> Are you just supporting that with all operators for parsing rule simplicity
> as per a macro?  I can understand that reasoning, but otherwise ...
>
> I would think it makes sense to restrict the use of the reduction
> meta-operator to just work over operators that are at least associative.
>
> -- Darren Duncan
>

-- 
Sent from Gmail for mobile | mobile.google.com

Mark J. Reed <[EMAIL PROTECTED]>


Re: Getting Started - Synopsis

2008-03-30 Thread Ryan Richter
On Sun, Mar 30, 2008 at 07:28:46PM +0800, Agent Zhang wrote:
> The latest HTML version of all the Synopses can be found at
> http://perlcabal.org/syn/ , which is automatically updated from both
> SVN repositories every one hour by a cron job running on feather.

Actually, that cron job hasn't been working for a long time...

-ryan


Re: [perl #52264] Bug: duplicate directory names in SVN

2008-03-30 Thread Andrew Whitworth
Oh, i'm glad this is a bug in the repository, when it happened to me,
I assumed that my SVN client was broken. Now I dont need to go through
the effort of uninstalling my SVN client, installing a new one, and
checking out the entire repository again.

--Andrew Whitworth

On Sat, Mar 29, 2008 at 11:04 PM, via RT Ted Neward
<[EMAIL PROTECTED]> wrote:
> # New Ticket Created by  "Ted Neward"
>  # Please include the string:  [perl #52264]
>  # in the subject line of all future correspondence about this issue.
>  # http://rt.perl.org/rt3/Ticket/Display.html?id=52264 >
>
>
>  There appear to be two directories, languages/HQ9plus and languages/hq9plus,
>  which conflict with one another on case-insensitive filesystems, a la Win32.
>
>
>
>
>  Ted Neward
>
>  Java, .NET, XML Services
>
>  Consulting, Teaching, Speaking, Writing
>
>  HYPERLINK "http://www.tedneward.com"http://www.tedneward.com
>
>
>
>
>  No virus found in this outgoing message.
>  Checked by AVG.
>  Version: 7.5.519 / Virus Database: 269.22.1/1348 - Release Date: 3/28/2008
>  10:58 AM
>
>


Re: Query re: duction and precedence.

2008-03-30 Thread Mark A. Biggar

Mark J. Reed wrote:

I'm a believer in generalizing where possible, modulo the principles
of KISS and YAGNI. The latter essentially means "at least make it
general enough that you can extend it later without major retooling if
it turns out YNIAA.".  It's pretty surprising what can turn out to be
useful, so I've never been swayed by arguments from "what is it good
for?"...

Something I'm wondering, though, realistically how often would one actually
be reducing on an operator that is not associative?  What practical use is
there for [-] (3,4,5) for example?


The reduce meta-operator over - in APL gives alternating sum, similarly 
alternating quotient for /, which only works if you right associate 
things.


[-] 1,2,3,4,5,6 => 1-2+3-4+5-6 # pseudo-apl

[/] 1,2,3,4,5,6 => (1*3*5)/(2*4*6) #pseudo-apl

note that would break the perl 6 simple rule that [-] 1,2,3 => 1-2-3, 
but gives something much more useful.  There currently is no easy way to 
do alternating sum/quotient in perl6.


--
[EMAIL PROTECTED]
[EMAIL PROTECTED]


S02 questions and comments

2008-03-30 Thread John M. Dlugosz
I'm reading S02.pod with version information:
  Last Modified: 17 Mar 2008
  Number: 2
  Version: 130

Meta-question 1: what is the succinct way to report this?  Is the "Version 130" 
enough?

Meta-question 2: Does this belong on a different mailing list?  I'm also 
including the documented file maintainer as a direct recipient.

3: I copied the file from  
which I'm told is the up-to-date home.  When I ran pod2html, I got a warning 
that 'encoding' is an unknown directive, and also see that the HTML title is 
simply "TITLE".  Do I need a special version of pod2html, or how do I run it 
properly?

4: "Whitespace is not allowed between a variable name and its subscript. 
However, there is a corresponding dot form of each subscript"
The use of "however" looks like it is meant to imply that the dot form allows 
you to add space.  I think this wording is leftover from the "long dot" 
explanation, but now is out of place.  I suggest dropping the "However," from 
the sentence.

I'm also wondering, in general, why we still have the dot forms of the 
subscripting (and other postfix operators) when the long-dot has been replaced 
by the unspace concept.  

--John


Re: [perl #52242] perl6 option handling - insufficiently paranoid

2008-03-30 Thread Patrick R. Michaud
On Sat, Mar 29, 2008 at 12:53:29PM -0700, Alan Rocker wrote:
> Perl 6 does not defend itself against invalid options. Using an invalid
> option results in an ungraceful death rather than a valid error message.
> 
> E.g.
> $ ./perl6 -x "say 'Hi';"
> Error: file cannot be read: -x
> current instr.: 'parrot;PCT::HLLCompiler;panic' pc 158
> (src/PCT/HLLCompiler.pir:103)

Earlier this year there was some discussion of defining a set
of standard command-line options that would be common to all
Perl 6 implementations, and so we've been holding off on
argument processing until that's resolved a bit more.  I haven't
heard much more about it since January -- perhaps we should poke
perl6-language for ideas...?

Thanks!

Pm

P.S.:  Send bug reports for Rakudo/perl6 to <[EMAIL PROTECTED]> --
it helps us keep the tickets straight and discussions in the
correct mailing list.


Re: Query re: duction and precedence.

2008-03-30 Thread Patrick R. Michaud
On Sun, Mar 30, 2008 at 08:21:39AM -0700, Mark A. Biggar wrote:
> The reduce meta-operator over - in APL gives alternating sum, similarly 
> alternating quotient for /, which only works if you right associate 
> things.
> 
> [-] 1,2,3,4,5,6 => 1-2+3-4+5-6 # pseudo-apl
> 
> [/] 1,2,3,4,5,6 => (1*3*5)/(2*4*6) #pseudo-apl
> 
> note that would break the perl 6 simple rule that [-] 1,2,3 => 1-2-3, 
> but gives something much more useful.  There currently is no easy way to 
> do alternating sum/quotient in perl6.

How about...?

# alternating sum of elements in @list
$altsum = [+] ({ $^a - $^b } for @list);

Pm


Re: Query re: duction and precedence.

2008-03-30 Thread Luke Palmer
On Sun, Mar 30, 2008 at 12:56 PM, Mark J. Reed <[EMAIL PROTECTED]> wrote:
> I'm a believer in generalizing where possible, modulo the principles
>  of KISS and YAGNI. The latter essentially means "at least make it
>  general enough that you can extend it later without major retooling if
>  it turns out YNIAA.".  It's pretty surprising what can turn out to be
>  useful, so I've never been swayed by arguments from "what is it good
>  for?"...

Amen.  Incidentally, you'll find that that is the most common response
when a programmer is introduced to a language feature he has not seen
before.

Tell a C programmer about objects, "okay, that's cool, but what is it good for".

Tell a C++ programmer about closures, "hmm, that just seems like it
would lead to bad design".

Tell a scheme programmer about laziness, "weird, I can't see how I
would ever use that".

Luke


S02 questions and comments - unspace

2008-03-30 Thread John M. Dlugosz
"Any contiguous whitespace (including comments) may be hidden from the parser 
by prefixing it with \. ... using unspace lets you line up postfix 
operators:"

%hash\  .{$key}
@array\ .[$ix]
$subref\.($arg)


What does the dotted form have to do with this?  It just confuses the example.

%hash\   {$key}
@array\  [$ix]
$subref\ ($arg)

Then, explain that 

"the dotted form can further help line up on arbitrary boundaries, since 
the unspace requires at least two characters.  If you need to shift the postfix 
over by only one character, use a dot.

%hash\ {$key}
@array.[$ix]
$subref($arg)

If you wish to use dots on all the lines for consistency, you might end up with 
something like:

%hash\  .{$key}
@array\ .[$ix]
$subref\.($arg)

As a special case to support this, a backslashed dot where a postfix is 
expected is considered a degenerate form of unspace. 
ORIGINAL TEXT CONTINUES



"Whitespace is not allowed before the parens, but there is a corresponding .() 
operator, plus the ``unspace'' forms that allow you to insert optional 
whitespace and comments between the backslash and the dot:"

The dotted form is not required to use unspace to insert optional whitespace.  
State that this is the same as the deal with subscripts, and xref the thing I 
opened this note with.

-

MyType\ .::\ .{'$foo'}  # same thing with unspaces


That is the same thing with unspaces AND dots.

MyType\ ::\ {'$foo'}  # same thing with unspaces

could be added to the list, right?

--

You can also use the :key($value) form to quote the keys of option pairs. To 
align values of option pairs, you may use the ``unspace'' postfix forms:

:longkey\  .($value)
:shortkey\ .
:fookey\   .{ $^a <=> $^b }


Same thing - that is using unspace AND using dots.


:longkey\  ($value)
:shortkey\ 
:fookey\   { $^a <=> $^b }


--

I think that concludes my "unspace rant".  That is, my confusion on reading the 
S02 on unspace being linked with dots, I presume to be documentation relics and 
I recall a much earlier discussion on "long-dot" which did link the concepts.  
Proceeding on that assumption, I constructively noted the offending passages 
and suggested changes in the text.

I hope that helps the effort, as well as my own understanding.

--John



[BUG] static build not working?

2008-03-30 Thread Leopold Toetsch
Hi,

while I wanted to help Infinoid finding `make -jn` bugs, I had an idea: build 
a static parrot and compare nm symbols for diffs [1].

But the static build failed. I used to do:

[EMAIL PROTECTED]:~/svn/parrot/leo> cat doits
perl Configure.pl --maintainer --parrot_is_shared=0 "$@" 2>&1 | tee make.log 
&& \
make -j1 all test

which failed here:

./miniparrot config_lib.pasm > runtime/parrot/include/config.fpmc
./miniparrot: error while loading shared libraries: libparrot.so.0.6.0: cannot 
open shared object file: No such file or directory

leo

[1] the idea being:

compile static parrot with -j1
nm parrot > syms_j1# maybe nm -a

compile static parrot with -j8
nm parrot > syms_j8

diff syms_j1 syms_j8 | head

The (1.) error/problem could be in the file at/before the first different 
lines.


[perl #52202] [BUG]: Rakudo build attempted on Win32 but couldn't get to Hello World

2008-03-30 Thread James Keenan via RT
On Sat Mar 29 14:46:28 2008, [EMAIL PROTECTED] wrote:
> On Friday 28 March 2008 11:14:03 James Keenan wrote:
> 
> > This is one of a series of tickets reporting issues encountered at a
> > Parrot/Rakudo buildfest held at Toronto Perlmongers on March 27,
> 2008.
> >
> > On the same Win32 box mentioned in RT 52198, the developer attempted
> > to build Rakudo, but 'say "Hello world"' was unsuccessful.  Can  
> >
> anyone help diagnose the problem?  See attached log.
> 
> > .\perl6bool.c(192) : warning C4716: 'Parrot_Perl6Bool_ro_pop_float'
> : must
> > return a value .\perl6bool.c(198)
> 
> That's awfully weird.  That message tends to appear when trying to
> compile a
> PMC that hasn't been updated to PDD 17 standards.  Does the problem
> appear
> with a 'make realclean'?  Is this a fresh checkout?  Are there local
> modifications?
> 
> -- c
> 

Let me see if I can get the original tester to post an update.

kid51



Re: [perl #52242] perl6 option handling - insufficiently paranoid

2008-03-30 Thread ajr

> and so we've been holding off on argument processing until that's
resolved a > bit more.
>
Should it matter what's in the "allowed" class? From the beginning, there
ought to be a default "if I don't know what this is, spit it back" action.
What happens before that point is irrelevant.

> P.S.:  Send bug reports for Rakudo/perl6 to <[EMAIL PROTECTED]> --
Will do.


--

Email and shopping with the feelgood factor!
55% of income to good causes. http://www.ippimail.com



Re: Getting Started - Synopsis

2008-03-30 Thread Agent Zhang
On Sun, Mar 30, 2008 at 9:23 PM, Ryan Richter
<[EMAIL PROTECTED]> wrote:
>
>  Actually, that cron job hasn't been working for a long time...
>

I've just checked the cronjob mails and it seems to me that the
update-syn script is working fine. So the Synopses are still fresh :)

I think you meant the auto-smoke script, which indeed has been failing
due to a build error while linking pugs (after make veryclean):

Linking pugs.new ...
/usr/bin/perl util/gen_prelude.pl -v -i src/perl6/Prelude.pm -i
ext/Math-Basic/lib/Math/Basic.pm -p ./pugs --output
blib6/lib/Prelude.pm.yml
# ./pugs -Iext/Math-Basic/lib -C Parse-YAML Prelude.pm >
blib6/lib/Prelude.pm.yml
Generating precompiled Prelude, Math::Basic... pugs: Internal error:
Invalid grammatical category: "Bool"
Please file a bug report.
Output is empty at util/gen_prelude.pl line 189.
system: [/usr/bin/perl util/gen_prelude.pl -v -i src/perl6/Prelude.pm
-i ext/Math-Basic/lib/Math/Basic.pm -p ./pugs --output
blib6/lib/Prelude.pm.yml]:  at util/build_pugs.pl line 600.
make: *** [pugs] Error 1

It only affects the passing/failing marks for the embedded test
snippets ;) I'd like to seek help to fix this :)

Cheers,
agentzh


Re: S02 questions and comments

2008-03-30 Thread Agent Zhang
On 30 Mar 2008 16:35:56 -, John M. Dlugosz <[EMAIL PROTECTED]> wrote:
> I'm reading S02.pod with version information:
>   Last Modified: 17 Mar 2008
>   Number: 2
>   Version: 130
>
>  Meta-question 1: what is the succinct way to report this?  Is the "Version 
> 130" enough?

The SVN revision number is sufficient. By default we're just
pretending that we're referring to "the svn head".

>  3: I copied the file from  
> which I'm told is the up-to-date home.  When I ran pod2html, I got a warning 
> that 'encoding' is an unknown directive, and also see that the HTML title is 
> simply "TITLE".  Do I need a special version of pod2html, or how do I run it 
> properly?
>

IMHO pod2html is old and broken in various ways. I think you should
use the tools provided by Pod::Simple instead. For the Synopses on
feather, we're using the podhtml.pl script (based on
Pod::Simple::HTML):

http://svn.pugscode.org/pugs/util/podhtm.pl

Hopefully you may find it useful :)

Cheers,
-agentzh


[perl #52280] [PATCH] HLLCompiler: fix overriding default prompt using $commandline_prompt

2008-03-30 Thread via RT
# New Ticket Created by  mmcleric2 
# Please include the string:  [perl #52280]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=52280 >


HLLCompiler allows to set commandline_parser to any value, but prints default 
'> ' prompt always.

This patch fixes that behavior.



--

Vyacheslav Matjukhin

hllcompiler-commandline_prompt-fix.patch
Description: Binary data


RE: [perl #52264] Bug: duplicate directory names in SVN

2008-03-30 Thread ajr
>> This should be fixed in r26641.
>>
>> Could you confirm?
>> --

Checkout on Windows XP now works.



--

Email and shopping with the feelgood factor!
55% of income to good causes. http://www.ippimail.com



[perl #48008] build broken on windows.

2008-03-30 Thread Will Coleda via RT
On Mon Mar 10 20:06:36 2008, [EMAIL PROTECTED] wrote:
> On Sat Dec 01 10:49:24 2007, coke wrote:
> > I don't normally build on windows, but tried today to verify some code
> for 
> > kid51; started by doing a basic build against trunk: 
> > 
> > winxp, visual studio 2005, r23314 
> > 
> > Build ends with: 
> > 
> > ..\..\parrot.exe ..\..\compilers\tge\tgc.pir --output=POST\Grammar_gen.p
> > ir POST\Grammar.tg
> > Parrot VM: PANIC: Null vtable used!
> > C file src\pmc.c, line 199d
> > Parrot file (not available), line (not available) 
> > 
> 
> 
> Coke:  Are you still experiencing this build failure on Windows?

Finally had time to do a build... this is no longer an issue, closing the 
ticket.




[perl #43048] [BUG] imcc constant folding div by zero

2008-03-30 Thread Will Coleda via RT
On Thu May 24 14:45:02 2007, coke wrote:
> ... or so I think:
> 
> This works:
> 
> .sub zero_check
> 
>push_eh one
>  $N0 = 0.0
>  $N1 = 3 / $N0
>clear_eh
> 
> one:
>print "ok\n"
> .end
> 
> 
> This doesn't:
> 
> .sub zero_check
> 
>push_eh one
>  $N1 = 3 / 0.0
>clear_eh
> 
> one:
>print "ok\n"
> .end
> 
> Guessing that imcc is doing constant folding without the guards that  
> the ops use.
> 
> mj41++ for prompting the test.
> 
> --
> Will "Coke" Coleda
> [EMAIL PROTECTED]
> 
> 

Ok. What was really happening is that IMCC actually invoking the
appropriate opcode (at compile time) and then immediately (during
compile!) throwing the error from the opcode; this generated an
appropriate exception, but during the compile phase, so it circumvented
the exception handlers we tried to set in the PIR.

I applied a patch that if during this particular type of constant
folding, if an exception occurs when running the opcode, abort the
optimization. This allows the runtime to catch the error as we expected.

This in turn exposed one invalid test each in t/op/{number,integer}.t
that tested opcodes that don't exist: because we invoked the constant
folding, the invalid opcode was never actually seen... removed those tests.

Also added a (now passing) test in t/compilers/syn/imcc/regression.t.

See r26657.