Re: top 5 list needed

2005-10-18 Thread Rob Kinyon
Some other features: 1) You can write your program in any combination of programming styles and languages, as you see fit. Thus, you can use your OO library written in Ruby, that really fast C routine, and your Perl code, all in one place. 2) There are a large number of operators that support list

Re: Should roles and classes be merged?

2005-10-14 Thread Rob Kinyon
On 10/14/05, Larry Wall <[EMAIL PROTECTED]> wrote: > : I need to stress that I'm not suggesting that the keyword "role" > : be removed. It won't be the first time we have keywords that mean the > : same thing, just with a little sugar added. It definitely improves > : maintainability to have se

Should roles and classes be merged?

2005-10-14 Thread Rob Kinyon
In the discussions I've had with Steve, one thing that always nagged me - what's the difference between a "class" and a "role"? I couldn't fix it in my head why there were two separate concepts. Steve, yesterday, mentioned to me that in the metamodel that he's got so far, Class does Role. This

Re: Custom Metaclass and Inheritance of Class Methods

2005-10-14 Thread Rob Kinyon
> == CONCLUSION / WRAP-UP > > So, now that I have sufficiently bored you all to tears, I will do a > quick re-cap of the main question, and the possible solutions. > > Should metaclasses be "inherited" along normal class lines? > > Meaning that if Foo uses a custom metaclass, and Bar isa Foo, then

Re: Closed Classes Polemic (was Re: What the heck is a submethod (good for))

2005-10-13 Thread Rob Kinyon
On 10/13/05, John Macdonald <[EMAIL PROTECTED]> wrote: > Just because you can't make locking perfect does not mean it > has no value. Acme::Bleach it is!

Re: Closed Classes Polemic (was Re: What the heck is a submethod (good for))

2005-10-13 Thread Rob Kinyon
> I think this is an opportune time for me to express that I think the > ability to close-source a module is important. I love open source, > and I couldn't imagine writing anything by myself that I wouldn't > share. But in order for Perl to be taken seriously as a commercial > client-side langua

Re: Proposal to make class method non-inheritable

2005-10-12 Thread Rob Kinyon
All - I'm partly to blame for this thread because I put the idea into Steve's head that class methods being inheritable may be dogma and not a useful thing. Mea culpa. That said, I want to put forward a possible reason why you would want class methods to be inheritable - to provide pure f

Re: Closed Classes Polemic (was Re: What the heck is a submethod (good for))

2005-10-12 Thread Rob Kinyon
On 10/12/05, chromatic <[EMAIL PROTECTED]> wrote: > On Wed, 2005-10-12 at 21:50 +0200, Yuval Kogman wrote: > > > This has even more implications with closed classes to which you > > don't have source level access, and if this can happen it will > > happen - i'm pretty sure that some commercial data

Re: How much do we close over?

2005-06-12 Thread Rob Kinyon
> Piers Cawley said: > in other words, some way of declaring that a subroutine wants to hang onto > every lexical it can see in its lexical stack, not matter what static analysis > may say. I'm not arguing with the idea, in general. I just want to point out that this implies that you're going to h

Re: reduce metaoperator on an empty list

2005-06-06 Thread Rob Kinyon
On 6/6/05, Sam Vilain <[EMAIL PROTECTED]> wrote: > Roger Hale wrote: > > This is why I would rather the o -> [o] circumfixion left [o] an infix, > > not prefix operator. I would rather be explicit about my identity: > > $product = 1 [*] @array; > > Hmm. Not all operators *have* an identity.

Re: date and time formatting

2005-06-03 Thread Rob Kinyon
> localtime() and gmtime() seem fairly core to me. The array contexts are > simple, and the scalar context is an RFC valid string. Nothing too heavy > there. The time() function is "typically" only moderately useful without > localtime(). This is true if the time() function returns a simple sca

Re: reduce metaoperator on an empty list

2005-06-01 Thread Rob Kinyon
> > $ordered = [<] @array; This is asking "Is @array ordered?" In the case of a 0-element or 1-element array, the answer is "It is not disordered", which means $ordered is true. $ordered = ! [!<] @array; Rob

Re: Unicode Operators cheatsheet, please!

2005-06-01 Thread Rob Kinyon
xOn 5/31/05, Sam Vilain <[EMAIL PROTECTED]> wrote: > Rob Kinyon wrote: > > I would love to see a document (one per editor) that describes the > > Unicode characters in use and how to make them. The Set implementation > > in Pugs uses (at last count) 20 different Unicode

Re: date and time formatting

2005-05-31 Thread Rob Kinyon
> - I didn't say we shouldn't port DateTime. My point was simply that, > based on the amount of date-related code on CPAN, this is an issue > that many people care about quite a bit. We would probably be well > served to consider it carefully and decide on what semantics we > really want. Maybe

Re: date and time formatting

2005-05-31 Thread Rob Kinyon
> > What's wrong with porting DateTime? > > It's back to the old question of "what's in core?" Are dates and > times something that are used in such a large proportion of programs > that they deserve to be shipped in the basic grammar? Or perhaps in > the basic set of packages? > > Perl 5 has a

Re: date and time formatting

2005-05-31 Thread Rob Kinyon
On 5/31/05, Nathan Gray <[EMAIL PROTECTED]> wrote: > As I am interested in human-readable dates and times, and having found > no conclusive discussion on time formatting, I make my recommendation > for a syntax (to start discussion, and allow for date formatting to be > implemented in pugs): What'

Re: Syntax of "use"/"require"

2005-05-28 Thread Rob Kinyon
On 5/28/05, Rob Kinyon <[EMAIL PROTECTED]> wrote: > (This thread is referencing http://www.perlmonks.org/?node_id=461105) > > I'd like to start writing the Module::Build/ExtUtils::MakeMaker for > Pugs. One of the first things that was mentioned was that the syntax >

Syntax of "use"/"require"

2005-05-28 Thread Rob Kinyon
(This thread is referencing http://www.perlmonks.org/?node_id=461105) I'd like to start writing the Module::Build/ExtUtils::MakeMaker for Pugs. One of the first things that was mentioned was that the syntax for use needs to support specifying the exact version or range of versions you want to have

Unicode Operators cheatsheet, please!

2005-05-27 Thread Rob Kinyon
I would love to see a document (one per editor) that describes the Unicode characters in use and how to make them. The Set implementation in Pugs uses (at last count) 20 different Unicode characters as operators. While I'm sure these documents exist on the web somewhere, since P6 is the first time

$*OS and OS::* mixins

2005-05-26 Thread Rob Kinyon
I was thinking on the drive home how to write some of the File::Spec functions in P6. I realized that it would be really neat if $*OS did one of a bunch of mixins (maybe OS::unix, OS::win32, OS::vms, etc). That way, you could multimethod the various functions, using junctions and Any to provide a d

Re: Reductions, junctions, hashslices, and cribbage scoring

2005-05-26 Thread Rob Kinyon
> Assuming you write the subset coroutine above, how about > > $score += > ( subsets(0..4) ==> map { 2 * (15 == [+] @[EMAIL PROTECTED]) } ==> [+] ) Working on it last night and this morning, I ended up with the following, very similar rewrite. sub gen_idx_powerset (Int $size is copy) returns

Re: (1,(2,3),4)[2]

2005-05-26 Thread Rob Kinyon
> Is giving "=" a higher precedence than "," still considered A Good Thing? > > I'm not familiar with the reasoning behind the current situation, but > I'm struggling to come up with any good reasons for keeping it. > > Consider the alternative: > > my $a, $b = 1, 2; # $b should contain 2, not 1

Reductions, junctions, hashslices, and cribbage scoring

2005-05-25 Thread Rob Kinyon
(This post references the discussion at http://www.perlmonks.org/?node_id=458728, particularly dragonchild's response at the bottom.) For those who don't know, cribbage is a game where each player has access to 4 cards, plus a community card. Various card combinations score points. The one in ques

Re: (OT) Re: Perl development server

2005-05-24 Thread Rob Kinyon
On 5/24/05, Michele Dondi <[EMAIL PROTECTED]> wrote: > On Tue, 24 May 2005, Herbert Snorrason wrote: > > > Icelandic: laukur (Incidentally, none of you will ever guess how to > > correctly pronounce that.) > > Incidentally, would 'laukurdottir' be a proper Icelandic offence? :-) "daughter of an

Re: Perl development server

2005-05-23 Thread Rob Kinyon
On 5/23/05, Juerd <[EMAIL PROTECTED]> wrote: > Rob Kinyon skribis 2005-05-23 11:22 (-0400): > > I'd like one. > > Sure - just think of a nice catchy username! :) robkinyon please - it's catchy enough. > > Maybe we should divvy these tasks out. It would

Re: Perl development server

2005-05-23 Thread Rob Kinyon
> If you want access, please let me know. I will send you a temporary > password by e-mail, that I expect you to change the first time you get > the chance. I'd like one. > The box won't have an SVN mirror unless someone puts it there. There > won't be a smoke test unless someone writes the scrip

Re: reduce metaoperator on an empty list

2005-05-18 Thread Rob Kinyon
On 5/18/05, Stuart Cook <[EMAIL PROTECTED]> wrote: > To summarise what I think everyone is saying, []-reducing an empty > list yields either: > > 1) undef (which may or may not contain an exception), or > 2) some unit/identity value that is a trait of the operator, > > depending on whether or not p

Re: Quick question: '1.28' * '2.56'

2005-05-17 Thread Rob Kinyon
> Maybe s/Num/NumLike/ or something? Anyway, that's how I think of it > at least: not that a Str is converted into a Num, but rather that > certain Strs are Nums. If that's the case, then if I change a variable that isa Str (that isa Num), does it change what it inherits from? Rob

Re: ./method

2005-05-15 Thread Rob Kinyon
On 5/15/05, Juerd <[EMAIL PROTECTED]> wrote: > Brad Bowman skribis 2005-05-16 9:56 (+1000): > > Would it conflict with range + pattern? Or has that changed anyway? > > No, "./" and "../" are prefix only, so they cannot clash with an infix > operator like "..". How would print "Foo" while $

Re: ^method ?

2005-05-15 Thread Rob Kinyon
On 5/15/05, Juerd <[EMAIL PROTECTED]> wrote: > Autrijus Tang skribis 2005-05-15 19:28 (+0800): > > On Sun, May 15, 2005 at 01:19:53PM +0200, Juerd wrote: > > > Or was your choice of words poor, and did you not mean to discuss the > > > dot's *default*, but instead a standard way to write the curren

Re: ^method ?

2005-05-14 Thread Rob Kinyon
On 5/14/05, Rod Adams <[EMAIL PROTECTED]> wrote: > Jonathan Worthington wrote: > > > "Brent 'Dax' Royal-Gordon" <[EMAIL PROTECTED]> wrote: > > > >> Like the decision about which side of the road cars should drive on, > >> it really doesn't matter *which* choice is taken, as long as > >> *something

Re: Plethora of operators

2005-05-14 Thread Rob Kinyon
On 5/14/05, Larry Wall <[EMAIL PROTECTED]> wrote: > On Sat, May 14, 2005 at 01:36:22PM -0500, Rod Adams wrote: > : Larry Wall wrote: > : > : >On Sat, May 14, 2005 at 12:51:32PM -0500, Rod Adams wrote: > : > > : >: Unless, of course, there is some subtle difference between a 3-d hash > : >: and a ha

Re: Numification of captured match

2005-05-12 Thread Rob Kinyon
On 5/12/05, Jonathan Scott Duff <[EMAIL PROTECTED]> wrote: > On Thu, May 12, 2005 at 02:55:36PM -0500, Patrick R. Michaud wrote: > > On Fri, May 13, 2005 at 03:23:20AM +0800, Autrijus Tang wrote: > > > Is it really intended that we get into habit of writing this? > > > > > > if 'localhost:80' ~

Re: single element lists

2005-05-11 Thread Rob Kinyon
On 5/11/05, Juerd <[EMAIL PROTECTED]> wrote: > Jonathan Scott Duff skribis 2005-05-11 11:45 (-0500): > > 1. specialise ()[] to parse as (,)[] > > 2. scalars are singleton lists, so ()[] naturally > > 3. make (1)[0] die horribly. > > #2 implies that (1)[0][0][0][0] == 1 > > #1 means that (1)[0] == 1

Re: Nested captures

2005-05-11 Thread Rob Kinyon
> > But it does raise an important point: the discrepancy between $42 and $/[41] > > *is* a great opportunity for off-by-on errors. Previously, however, @Larry > > have tossed back and forth the possibility of using $0 as the first capture > > variable so that the indices of $/[0], $/[1], $/[2] mat

Re: Fwd: Re: Pugs 6.2.0 released.

2005-05-09 Thread Rob Kinyon
What's really odd is that document links to http://en.wikipedia.org/wiki/Exclusive_disjunction which ends up stating that chained xors are associative and commutative, meaning that instead of acting as one(), it counts parity. Rob On 5/9/05, David Landgren <[EMAIL PROTECTED]> wrote: > Jonathan Wo

Re: receivers of pipes (the sharp end again)

2005-05-06 Thread Rob Kinyon
> Or perhaps we should by default restrict short ones to simple > operators, since it's pretty obvious that [+] is doing *some* kind > of addition, while [EMAIL PROTECTED]&$*#«=] is not quite so obvious. In other > words, we apply some kind of Huffman amplification to the metaoperator, > where the

Re: receivers of pipes (the sharp end again)

2005-05-06 Thread Rob Kinyon
On 5/6/05, Larry Wall <[EMAIL PROTECTED]> wrote: > On Fri, May 06, 2005 at 01:26:10PM -0400, Rob Kinyon wrote: > : > : Does this mean that @{foo()} can be written as @ foo()? > : > > : > I would prefer not. Use foo()[] instead. > : > : Does this mean that s

Re: available operator characters

2005-05-06 Thread Rob Kinyon
> I'm sticking to non-words here, as I mentally parse not and true as > single-arg subs, single-arg subs as unary operators, etcetera. I can't > help it, but I have absolutely no idea how to determine the difference. > Is it &prefix: or just ¬? I have no idea. I do know that it's > &infix:, not &x.

Re: receivers of pipes (the sharp end again)

2005-05-06 Thread Rob Kinyon
> : Does this mean that @{foo()} can be written as @ foo()? > > I would prefer not. Use foo()[] instead. Does this mean that some constructs in Perl are parsed immediately (such as foo() ...) and some are deferred (such as the [ in [>>+^<<] ...)? I would think this potentially makes a difference

Semi-related question: reduce metaoperator

2005-05-05 Thread Rob Kinyon
Can I put an operator in a variable and then use it in the [] reduce meta-operator? Something like: $op = '+'; $x = [$op] @x; Rob

Re: Plethora of operators

2005-05-04 Thread Rob Kinyon
> Are there any particular other operators you're worried about? > I think the current design does a pretty good job of factoring out the > metaoperators so that the actual set of underlying basic operators *is* > relatively small. Yes, you can now say something like > > $x = [»+^=«] @foo; >

Re: Open and pipe

2005-05-04 Thread Rob Kinyon
> Rob Kinyon skribis 2005-05-04 11:02 (-0400): > > Would that mean that a filehandle opened readonly would throw an > > exception if you attempted to either print or warn on it? > > I don't know what warning on a filehandle should be or do, but ignoring > that bit, y

Re: Open and pipe

2005-05-04 Thread Rob Kinyon
Would that mean that a filehandle opened readonly would throw an exception if you attempted to either print or warn on it? On 5/4/05, Juerd <[EMAIL PROTECTED]> wrote: > Gaal Yahas skribis 2005-05-04 17:24 (+0300): > > Ah yes, that's another thing I was wondering about: what does opening a > > pipe

Plethora of operators

2005-05-04 Thread Rob Kinyon
I just started following the list again after a few months (though I have been skimming the bi-weekly summaries) and I'm a little alarmed at what seems to be a trend towards operaterizing everything in sight and putting those operators in the core. My understanding of P6 after the reading the AES

Re: Cmmposition binop

2005-05-04 Thread Rob Kinyon
What about the function compose() that would live in the module "keyword", imported by the incantation "use keyword qw( compose );"? (NB: My P6-fu sucks right now) multimethod compose (@*List) { return { $_() for @List; }; } On 5/4/05, Michele Dondi <[EMAIL PROTECTED]> wrote: > I

Re: reduce metaoperator

2005-05-04 Thread Rob Kinyon
eans, because it's documented somewhere. But, don't put it in the core. I thought the core was supposed to be sparse with modules to add the richness. Rob On 5/4/05, Larry Wall <[EMAIL PROTECTED]> wrote: > On Wed, May 04, 2005 at 08:59:04AM -0400, Rob Kinyon wrote: > : Thi

Re: reduce metaoperator

2005-05-04 Thread Rob Kinyon
This may be a naive question, but what's wrong with just having a keyword called reduce()? Why do we need an operator for everything? I'm worried that the list of P6 operators is going to be as long as the list of P5 keywords, with a lot of them looking something like: I propose that if you're t

<    1   2