Re: Roles and IO?

2008-12-12 Thread Dmitry Karasik
Hi Leon! Leon> Perl 5's solution is to use a fat interface, and raise an error if Leon> an unsupported action is tried. Wouldn't the proposed solution raise an error if an unsupported role method is tried? It's not that the proposed solution is inappropriate, but the problem that I thi

Re: [perl #61224] .eof returns false if last read call read the last byte of the file, but not beyond

2008-12-12 Thread Joshua Juran
On Dec 11, 2008, at 5:07 PM, Allison Randal via RT wrote: The way to check if the byte after the last requested byte is the end of the file is to read ahead. Perl (at least 5.10) does this by actually reading the next character and then putting it back with 'ungetc'. Not the best solution. Any

Re: Perl as a better web language ?

2008-12-12 Thread Timothy S. Nelson
On Fri, 12 Dec 2008, Henk van Oers wrote: On Thu, 11 Dec 2008, Brandon S. Allbery KF8NH wrote: On 2008 Dec 11, at 23:55, howard chen wrote: Hello, I love perl for its rich set of modules but PHP is a better template language for web developments. Wouldn't it be great to see if Perl6 support

Re: Perl as a better web language ?

2008-12-12 Thread Carl Mäsak
Howard (>): > Hello, I love perl for its rich set of modules but PHP is a better > template language for > web developments. Wouldn't it be great to see if Perl6 support it? Just as a heads-up, many of us in the November developer group are thinking quite a bit about web and templating issues. We

Re: Perl as a better web language ?

2008-12-12 Thread Guy Hulbert
On Fri, 2008-12-12 at 12:55 +0800, howard chen wrote: > Wouldn't it be great to see if Perl6 support it? Not necessarily. PHP does a lot more than provide a template language. I wouldn't touch perl6 if it went in that direction. Perl6 lets you define your own grammar, perhaps that would do what

Re: Roles and IO?

2008-12-12 Thread Leon Timmermans
On Fri, Dec 12, 2008 at 3:04 AM, Jon Lang wrote: > One of the things about roles is that once you have composed a bunch > of them into another role, they're considered to be composed into > whatever that role is composed into. So "does File" would be > equivalent to "does Mappable does Pollable d

Re: Roles and IO?

2008-12-12 Thread TSa
HaloO, Leon Timmermans wrote: I assumed a new role makes a new interface. In other words, that a type that happens to do Pollable, Mappable, Statable and Ownable wouldn't automatically do File in that case. I also think that a new role File that does also the four others is a new type on its o

Re: Perl as a better web language ?

2008-12-12 Thread howard chen
Hello, On Fri, Dec 12, 2008 at 1:23 PM, Henk van Oers wrote: >> >> It can be done as a library, take a look at Perl6 grammars. > > It has been done for perl5. See PLP on CPAN. Sure there are many way to do this in Perl already. But better have a single, standard, and out-of-the-box solution.

[perl #61316] [BUG] loadlib dynpmc crashes with .HLL

2008-12-12 Thread via RT
# New Ticket Created by François PERRAD # Please include the string: [perl #61316] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61316 > The following code works well $ cat digest.pir .sub 'main' $P0 = loadlib

Re: Perl as a better web language ?

2008-12-12 Thread Guy Hulbert
On Sat, 2008-13-12 at 01:01 +0800, howard chen wrote: > But better have a single, standard, and out-of-the-box solution. That's python, not perl. -- --gh

[perl #61308] rule's capture ws

2008-12-12 Thread via RT
# New Ticket Created by Martin Kjeldsen # Please include the string: [perl #61308] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61308 > When using rules at least with overwritten, the rule also captures whitespace. Plea

Re: Perl as a better web language ?

2008-12-12 Thread Daniel Ruoso
Em Sex, 2008-12-12 às 12:15 +0100, Carl Mäsak escreveu: > Just as a heads-up, many of us in the November developer group are > thinking quite a bit about web and templating issues. We already have > a (fairly basic) working port of HTML::Template. Some of us have plans > to create a web framework f

List.end - last item and last index mixing

2008-12-12 Thread Moritz Lenz
>From S29: : =item end : : our Any method end (@array: ) is export : : Returns the final subscript of the first dimension; for a one-dimensional : array this simply the index of the final element. For fixed dimensions : this is the declared maximum subscript. For non-fixed dimensions (undeclare

[perl #61300] list assignment: arrays on LHS aren't filled properly

2008-12-12 Thread via RT
# New Ticket Created by Moritz Lenz # Please include the string: [perl #61300] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61300 > 23:27 < moritz_> rakudo: my ($x, @y) = ; say @y.perl 23:27 < p6eval> rakudo 33813: OUTPUT

[perl #61312] The wrong error is thrown when calling a rule in a grammar that does not exist in Rakudo

2008-12-12 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #61312] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61312 > rakudo: grammar A { token ws { 'a' }; rule b {x y}; }; say 'xab' ~~ m/ ^ $ / rakudo 3

r24318 - docs/Perl6/Spec

2008-12-12 Thread pugs-commits
Author: particle Date: 2008-12-12 22:30:59 +0100 (Fri, 12 Dec 2008) New Revision: 24318 Added: docs/Perl6/Spec/S19-commandline.pod Log: [spec] first incomplete draft of S19. needs fleshing out in many places, but it's at the point where more eyes are sorely needed and very welcome. Added: doc

Re: List.end - last item and last index mixing

2008-12-12 Thread Jon Lang
Moritz Lenz wrote: > From S29: > > : =item end > : > : our Any method end (@array: ) is export > : > : Returns the final subscript of the first dimension; for a one-dimensional > : array this simply the index of the final element. For fixed dimensions > : this is the declared maximum subscript.

Where does Foo::Bar.EXPORTALL comes from?

2008-12-12 Thread Daniel Ruoso
Hi, I've been thinking about how I would implement module loading in SMOP and reached some points that I think need some clarification. The most important of them being about the EXPORTALL routine. While all the default exportation is done by the population of the EXPORT inner package, that doesn

Re: List.end - last item and last index mixing

2008-12-12 Thread Mark J. Reed
I'd say look at prior art, but "end" in this role isn't very common. It shows up in AppleScript, where it does double duty: "end" serves as an index in ranges ("items 3 through end of someList"), but by itself it returns the last item, not the last index ("end of someList"), and as a lone index it

Re: Where does Foo::Bar.EXPORTALL comes from?

2008-12-12 Thread Patrick R. Michaud
On Fri, Dec 12, 2008 at 08:42:05PM -0300, Daniel Ruoso wrote: > [...] > While all the default exportation is done by the population of the > EXPORT inner package, that doesn't happen from the outside, S11 implies > that it happens by the calling of the EXPORTALL routine, it doesn't > really make it

Re: Roles and IO?

2008-12-12 Thread Jon Lang
Leon Timmermans wrote: > I assumed a new role makes a new interface. In other words, that a > type that happens to do Pollable, Mappable, Statable and Ownable > wouldn't automatically do File in that case. If I was wrong my abuse > of subset wouldn't be necessary. Otherwise, maybe there should be a

Re: Perl as a better web language ?

2008-12-12 Thread Timothy S. Nelson
On Sat, 13 Dec 2008, howard chen wrote: Hello, On Fri, Dec 12, 2008 at 1:23 PM, Henk van Oers wrote: It can be done as a library, take a look at Perl6 grammars. It has been done for perl5. See PLP on CPAN. Sure there are many way to do this in Perl already. But better have a single, st

Better "sort" spec?

2008-12-12 Thread Timothy S. Nelson
Hi all. I saw the new "sort" idea on the Rakudo blog: http://www.rakudo.org/2008/12/its-sort-of-like.html ...and wondered if we can get it in the spec, as I haven't seen any discussion on it or anything. :) --

Re: Better "sort" spec?

2008-12-12 Thread Uri Guttman
> "TSN" == Timothy S Nelson writes: TSN> Hi all. I saw the new "sort" idea on the Rakudo blog: TSN> http://www.rakudo.org/2008/12/its-sort-of-like.html TSN> ...and wondered if we can get it in the spec, as I haven't TSN> seen any discussion on it or anythi