Trying to write a oo :method that isn't automatically inserted in a namespace.

2007-12-21 Thread Kevin Tew
I'm working on http://rt.perl.org/rt3/Ticket/Display.html?id=48631 I've added parsing of :namespace to imcc, now I'm trying to figure out what I'm suppose to do differently when :namespace is present in a methods prototype. I thought I was suppose to add the :method to a namespace, but that see

Re: [perl #48735] [DEPRECATED] :: in PIR identifiers

2007-12-21 Thread François Perrad
Klaas-Jan Stol via RT wrote: On Sun Dec 16 21:11:34 2007, coke wrote: From PDD 19: NOTE: The use of C<::> in identifiers is deprecated. what exactly does this mean? In Lua, I started to replace (see r23367) : [ 'Lua::io' ] by [ 'Lua'; 'io' ] François I take it that "::

Re: Concerns about "{...code...}"

2007-12-21 Thread Larry Wall
On Thu, Dec 20, 2007 at 03:24:30PM -0800, Michael G Schwern wrote: : Jonathan Scott Duff wrote: : > On Thu, Dec 20, 2007 at 07:58:51AM -0500, Mark J. Reed wrote: : >> I think the issue is that bare vars don't interpolate anymore, but : >> they still have sigils of their own, so adding to the defaul

Re: Concerns about "{...code...}"

2007-12-21 Thread John Siracusa
On 12/21/07 5:54 AM, Larry Wall wrote: > To you and me, the fact that there are single quotes means there's > something there to hide. But other people think the other way and > see double quotes as indicating there's something to interpolate. > I think PBP comes down on that side, but to me, sing

Re: [perl #48735] [DEPRECATED] :: in PIR identifiers

2007-12-21 Thread Allison Randal
Klaas-Jan Stol via RT wrote: On Sun Dec 16 21:11:34 2007, coke wrote: From PDD 19: NOTE: The use of C<::> in identifiers is deprecated. what exactly does this mean? I take it that "::" can still appear in typenames, as in "PAST::Op" Yes, that's still fine. In fact, any character that can b

Re: Concerns about "{...code...}"

2007-12-21 Thread Mark J. Reed
On Dec 21, 2007 8:53 AM, John Siracusa <[EMAIL PROTECTED]> wrote: > FWIW, my reasoning in this area is based on Laziness: single quotes mean I > don't have to scan the string looking for interpolated stuff when reading > code. Double quotes mean I do, and I'm annoyed at the waste of time when > I

Re: [perl #48735] [DEPRECATED] :: in PIR identifiers

2007-12-21 Thread Allison Randal
François Perrad wrote: In Lua, I started to replace (see r23367) : [ 'Lua::io' ] by [ 'Lua'; 'io' ] Also a good change. This gains you the benefits of true hierarchical namespaces, and means that different languages that use different characters as class name separators can use your

Re: [perl #48631] [RFE] oo - allow :method to also enter sub in namespace

2007-12-21 Thread Allison Randal
Patrick R. Michaud wrote: Optional string parameter to C<:namespace> : Anytime there's a namespace or class parameter, I think we have to consider the possibility of a keyed argument, since the general case is that namespaces are given by keys, not strings. Ah, you're reading :namespace as s

Re: Trying to write a oo :method that isn't automatically inserted in a namespace.

2007-12-21 Thread Patrick R. Michaud
On Fri, Dec 21, 2007 at 01:30:42AM -0700, Kevin Tew wrote: > I'm working on http://rt.perl.org/rt3/Ticket/Display.html?id=48631 > I've added parsing of :namespace to imcc, now I'm trying to figure out > what I'm suppose to do differently when :namespace is present in a > methods prototype. > I th

Re: Concerns about "{...code...}"

2007-12-21 Thread Brandon S. Allbery KF8NH
On Dec 21, 2007, at 5:54 , Larry Wall wrote: On Thu, Dec 20, 2007 at 03:24:30PM -0800, Michael G Schwern wrote: : Jonathan Scott Duff wrote: : [1] Note, I'm the sort of person that uses "" until I have a reason otherwise. Well, me too, but P6 just provides a different set of reasons. :) T

Re: [perl #48631] [RFE] oo - allow :method to also enter sub in namespace

2007-12-21 Thread Patrick R. Michaud
Kevin Tew started investigating this ticket, and he discovered that :method subs are already being placed as entries in the namespace by default, which is the behavior I was looking for. So, the issue turns out to be a non-issue (for me at least), unless we decide to make it one. Apologies fo

Re: Trying to write a oo :method that isn't automatically inserted in a namespace.

2007-12-21 Thread Allison Randal
On Fri, Dec 21, 2007 at 01:30:42AM -0700, Kevin Tew wrote: I've added parsing of :namespace to imcc, now I'm trying to figure out what I'm suppose to do differently when :namespace is present in a methods prototype. I thought I was suppose to add the :method to a namespace, but that seems to al

Re: Trying to write a oo :method that isn't automatically inserted in a namespace.

2007-12-21 Thread Allison Randal
Kevin Tew wrote: :method subs should not be added to the namespace unless they have a :namespace flag. Yes. So we should fix set_pmc_keyed_str to not add :methods unless the :namespace flag is present. Sort of. The thing is, 'set_pmc_keyed_str' isn't just storing subs in the namespace, i

Re: Trying to write a oo :method that isn't automatically inserted in a namespace.

2007-12-21 Thread Kevin Tew
Yeah, I spent an hour trying to figure out how 'set_pmc_keyed_str' vtable function in src/pmc/namespace.pmc precluded :methods from the namespace before I tested it and found out that it didn't. What do we want the final behavior to be? I'm going to take a guess, correct me as needed. :method

Re: [perl #48735] [DEPRECATED] :: in PIR identifiers

2007-12-21 Thread jerry gay
On Dec 21, 2007 8:50 AM, Klaas-Jan Stol <[EMAIL PROTECTED]> wrote: > On Dec 21, 2007 3:53 PM, Allison Randal <[EMAIL PROTECTED]> wrote: > > > Klaas-Jan Stol via RT wrote: > > > On Sun Dec 16 21:11:34 2007, coke wrote: > > >> From PDD 19: > > >> > > >> NOTE: The use of C<::> in identifiers is deprec

Factoring Arguments

2007-12-21 Thread Jonathan Lang
I'm thinking aloud here, so please bear with me. A number of languages have a "with ..." construct that's intended to cut down on repetitive typing, by factoring the invocant out of every method call. Perl 6 also has this, in the form of "given ...": given $foo.bar.baz { .dothis(); .do

Re: [perl #48735] [DEPRECATED] :: in PIR identifiers

2007-12-21 Thread Klaas-Jan Stol
On Dec 21, 2007 3:53 PM, Allison Randal <[EMAIL PROTECTED]> wrote: > Klaas-Jan Stol via RT wrote: > > On Sun Dec 16 21:11:34 2007, coke wrote: > >> From PDD 19: > >> > >> NOTE: The use of C<::> in identifiers is deprecated. > >> > > what exactly does this mean? > > > > I take it that "::" can stil

Re: Factoring Arguments

2007-12-21 Thread Ryan Richter
On Fri, Dec 21, 2007 at 08:41:54AM -0800, Jonathan Lang wrote: > and so on, you might do something like: > > with &qq :(c => false) { I think this can be done with normal currying, something like temp &circumfix:<" "> := "e:.assuming(:!c); -ryan

[perl #49001] [PROPOSAL][DOCS] Change word "compilation_unit" into something else (like "sub")

2007-12-21 Thread via RT
# New Ticket Created by Klaas-Jan Stol # Please include the string: [perl #49001] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=49001 > IMCC's top level non-terminal rule looks something like: program: compilation_unit

writing mod_perl6 in perl 6

2007-12-21 Thread Jeff Horwitz
This just went up in my blog, but I think it's interesting enough to post to the list as well. -jeff One of the goals of the mod_parrot project is to provide the infrastructure for running the Perl 6 version of mod_perl, a.k.a. mod_perl6. I've already demonstrated that mod_perl6 works, so tha

Re: Concerns about "{...code...}"

2007-12-21 Thread Larry Wall
On Fri, Dec 21, 2007 at 08:59:02AM -0500, Mark J. Reed wrote: : The single-quoted string literal has become such a habit that I frequently : make mistakes in other C-like languages that use the two types of quotation : marks to make the character/string distinction. Yeah, it might be my C backgrou

Re: writing mod_perl6 in perl 6

2007-12-21 Thread Andy Lester
On Dec 21, 2007, at 10:50 AM, Jeff Horwitz wrote: This just went up in my blog, but I think it's interesting enough to post to the list as well. URL? I'll post it to Mechanix. -- Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance

Re: Factoring Arguments

2007-12-21 Thread ajr
> > A number of languages have a "with ..." construct that's intended to > cut down on repetitive typing, I hope I will be excused for dragging in the indecency, but it might be worth looking at the concepts COBOL used to mitigate its verbosity, (e.g. types defined in a structure that get inherit

Re: Concerns about "{...code...}"

2007-12-21 Thread Dave Whipp
Larry Wall wrote: As for the Q base form, it's not really there so much for end-use, For an operator not intended for end use, it has a remarkable low Huffman rank...

Re: Concerns about "{...code...}"

2007-12-21 Thread Chas. Owens
On Dec 21, 2007 4:51 PM, Dave Whipp <[EMAIL PROTECTED]> wrote: > Larry Wall wrote: > > > As for the Q base form, it's not really there so much for end-use, > > For an operator not intended for end use, it has a remarkable low > Huffman rank... > But since it will be combined with adverbs like my

Re: Concerns about "{...code...}"

2007-12-21 Thread Dave Whipp
Chas. Owens wrote: On Dec 21, 2007 4:51 PM, Dave Whipp <[EMAIL PROTECTED]> wrote: Larry Wall wrote: As for the Q base form, it's not really there so much for end-use, For an operator not intended for end use, it has a remarkable low Huffman rank... But since it will be combined with adverbs

Re: Concerns about "{...code...}"

2007-12-21 Thread Jonathan Lang
Dave Whipp wrote: > If the construct is used only rarely then it should have a longer name, Actually, Huffman coding implies that if the construct is used regularly then it should have a short name. It does not mandate a long name for rare constructs; it merely says that if a given short name is

Re: Factoring Arguments

2007-12-21 Thread Jonathan Lang
Ryan Richter wrote: > Jonathan Lang wrote: > > and so on, you might do something like: > > > > with &qq :(c => false) { > > I think this can be done with normal currying, something like > > temp &circumfix:<" "> := "e:.assuming(:!c); That handles the specific example that I had in mind, but does

Re: Concerns about "{...code...}"

2007-12-21 Thread Larry Wall
On Fri, Dec 21, 2007 at 01:51:19PM -0800, Dave Whipp wrote: > Larry Wall wrote: > >> As for the Q base form, it's not really there so much for end-use, > > For an operator not intended for end use, it has a remarkable low Huffman > rank... That's because some end-users will want to use Q anyway.

Re: Factoring Arguments

2007-12-21 Thread Juerd Waalboer
Ryan Richter skribis 2007-12-21 11:52 (-0500): > On Fri, Dec 21, 2007 at 08:41:54AM -0800, Jonathan Lang wrote: > > and so on, you might do something like: > > with &qq :(c => false) { > I think this can be done with normal currying, something like > temp &circumfix:<" "> := "e:.assuming(:!c); H

Re: Factoring Arguments

2007-12-21 Thread Larry Wall
On Fri, Dec 21, 2007 at 08:41:54AM -0800, Jonathan Lang wrote: : I'm wondering if something similar could be done for optional : arguments - something along the lines of "within the following block, : assign value V to argument X of routine R by default." This would : allow for a similar "factorin

Re: Status of docs/embed.pod and Parrot::Embed?

2007-12-21 Thread Tim Bunce
On Mon, Dec 10, 2007 at 04:37:31PM +0200, Allison Randal wrote: > Tim Bunce wrote: > > >> I meant docs/pdds/draft/pdd10_embedding.pod > >> > >> I could trying hacking on it to at least mention all the functions in > >> embed.h > >> with a few words on each. I'd be fumbling in the dark mostly but i

Re: Concerns about "{...code...}"

2007-12-21 Thread Michael G Schwern
John Siracusa wrote: > On 12/21/07 5:54 AM, Larry Wall wrote: >> To you and me, the fact that there are single quotes means there's >> something there to hide. But other people think the other way and >> see double quotes as indicating there's something to interpolate. >> I think PBP comes down on

[perl #48971] Parrot build failure "no such instruction: `trap'"

2007-12-21 Thread James Keenan via RT
On Thu Dec 20 21:34:41 2007, [EMAIL PROTECTED] wrote: > On a PPC with OSX 10.5.1 I didn't know you could run 10.5.1 on PPC; I thought it only worked on x86. Could you attach the output from 'perl -V'? It may help us diagnose this problem better. Thank you very much.

Re: Concerns about "{...code...}"

2007-12-21 Thread Juerd Waalboer
Michael G Schwern skribis 2007-12-21 19:21 (-0800): > Normally I'd go on the side of the reader and say yes, when writing code you > should be picky about what quotes you use. But in this case I find that, on > the writing side, I find it a common annoyance when I chuck a variable into a > string

Re: Concerns about "{...code...}"

2007-12-21 Thread Michael G Schwern
Larry Wall wrote: > But I will make one general remark at the start, which is that we > want Perl 6 programmer to look at curlies differently than Perl 5 > programmers do. In Perl 5, curlies were overloaded many different > ways, and rarely did they mean a closure by themselves. In Perl 6, > it's