Re: Synopsis 9 draft 1

2004-09-04 Thread Sean O'Rourke
At Fri, 3 Sep 2004 17:08:00 -0700, [EMAIL PROTECTED] (Larry Wall) wrote: On Fri, Sep 03, 2004 at 05:45:12PM -0600, John Williams wrote: : If not, does @ints[-1] mean the element with index -1 or the last element? The element with index -1. Arrays with explicit ranges don't use the minus

Re: Pipeline Performance

2004-09-01 Thread Sean O'Rourke
At Tue, 31 Aug 2004 13:23:04 -0400, [EMAIL PROTECTED] (Aaron Sherman) wrote: I would think you actually want to be able to define grep, map, et al. in terms of the mechanism for unraveling, and just let the optimizer collapse the entire pipeline down to a single map. Even for map and grep this

Re: Pipeline Performance

2004-08-31 Thread Sean O'Rourke
At Tue, 31 Aug 2004 13:23:04 -0400, [EMAIL PROTECTED] (Aaron Sherman) wrote: I would think you actually want to be able to define grep, map, et al. in terms of the mechanism for unraveling, and just let the optimizer collapse the entire pipeline down to a single map. Even for map and grep this

Re: Progressively Overhauling Documentation

2004-08-23 Thread Sean O'Rourke
At Mon, 23 Aug 2004 19:46:34 +0200, [EMAIL PROTECTED] (Juerd) wrote: I also think POD should be overhauled completely. I've been thinking about proposing something like: sub foo ( Foo::Bar$bar, Quux::Xyzzy $xyzzy, +$verbose, +$foo ) description

Re: Instantiation

2004-08-23 Thread Sean O'Rourke
At Mon, 23 Aug 2004 15:51:00 -0400, [EMAIL PROTECTED] (Aaron Sherman) wrote: On Mon, 2004-08-23 at 15:19, Paul Seamons wrote: So, I was wondering about a synonym, like: uses Some::Module::That::Defines::A::Class $foo; Well if the long name is the problem: use

Re: simple grammar example

2004-06-09 Thread Sean O'Rourke
[EMAIL PROTECTED] (Aldo Calpini) writes: I'm preparing a talk about Perl6 for the Italian Perl Workshop, and I would like to have a slide comparing a BNF (yacc/bison) grammar to a Perl6 one, to show how powerful in parsing/lexing Perl6 regexen are. ... am I missing something obvious here?

Re: simple grammar example

2004-06-09 Thread Sean O'Rourke
[EMAIL PROTECTED] (Rafael Garcia-Suarez) writes: Sean O'Rourke wrote: * To really show where P6 rocks, you need to show dynamic features. A simple example might be using a language with keywords kept in variables, allowing you change between e.g. for, while, if, pour, tandis-que, si

Re: backticks (or slash, maybe)

2004-04-19 Thread Sean O'Rourke
[EMAIL PROTECTED] (Juerd) writes: Angel Faus skribis 2004-04-19 22:43 (+0200): If we really need a ultra-huffman encoding for hash subscriptors, I have always dreamt of being able to do: %hash/key $hashref/foo/bar/baz/quux ... I'd hate to give up dividing slash. It's one of the few

Re: backticks (or slash, maybe)

2004-04-19 Thread Sean O'Rourke
[EMAIL PROTECTED] (Juerd) writes: Sean O'Rourke skribis 2004-04-19 15:11 (-0700): I'd hate to give up dividing slash. It's one of the few operators that I sometimes type without whitespace. Simple because 1/10 is good enough and 1 / 10 is very wide. You can have both, though

Re: backticks

2004-04-16 Thread Sean O'Rourke
[EMAIL PROTECTED] (Juerd) writes: I think it has to go because `pwd`, `hostname`, `wget -O - $url` should not be easier than the purer Perl equivalents and because ``'s interpolation does more harm than good. I have to disagree with you here. The Perl way is not always the Perl way -- the

Synopsis 3: quick junction question

2004-03-18 Thread Sean O'Rourke
S3 says: 1|2 + 34; # (4|5) (5|6) but shouldn't that equal (1 + (34)) | (2 + (34)) = (45) | (56) = (4|6) 5 # ??? For one thing, OR's of AND's (DNF) is just nicer than AND's of OR's (CNF). For another, I read that as

Re: Control flow variables

2003-11-19 Thread Sean O'Rourke
[EMAIL PROTECTED] (Austin Hastings) writes: What does Cscatter do? That's the operator that's used to assign values to C$^x and friends in closures. In all its glory, you give it a set of values, and it assigns them to a block's undefined variables, quieting those annoying warnings: @x =

Re: Protocols

2003-07-19 Thread Sean O'Rourke
On 19 Jul 2003, Luke Palmer wrote: [1] It would be totally cool to use a Haskell- or ML-style type inference system, but those things just don't work in procedural languages. Could you clarify what you mean by don't work here? ML has both assignment and type inference, so it seems like it's

Re: This week's summary

2003-06-24 Thread Sean O'Rourke
On Tue, 24 Jun 2003, Leopold Toetsch wrote: Piers Cawley [EMAIL PROTECTED] wrote: He's worried that the P6C tests break, ... albeit this is still an issue. Nobody answered, if we need another Sub class implementing the old invoke/ret scheme ... I'd say no. P6C is now compiling to

Re: This week's summary

2003-06-09 Thread Sean O'Rourke
On Mon, 9 Jun 2003, Adam Turoff wrote: - roll-your-own inheritance mechanisms (see NEXT.pm) On a related note, you might also want to take a look at CLOS (the Common Lisp Object System) where it talks about method selection. They've got a pretty clear and general model that describes every

Re: Rules and hypotheticals: continuations versus callbacks

2003-03-19 Thread Sean O'Rourke
On Wed, 19 Mar 2003, Jonathan Scott Duff wrote: Are you implying that $fred = rx/fred/; $string ~~ m:w/ $fred { $fred = rx/barney/; } rubble / won't match barney rubble? Or, worse, that $fred = rx/fred/; $string ~~ m:w/ { $fred = rx/barney/; } $fred rubble /

Re: Rules and hypotheticals: continuations versus callbacks

2003-03-19 Thread Sean O'Rourke
On Tue, 18 Mar 2003, Matthijs van Duin wrote: and maybe also: What is the current plan? although I got the impression earlier that there isn't any yet for invoking subrules :-) See line 1014, languages/perl6/P6C/rule.pm. The hack I used was to call rules like ordinary subs, and have them

Re: Shortcut: ?=

2003-02-03 Thread Sean O'Rourke
On Mon, 3 Feb 2003, Dave Mitchell wrote: $var ??= 'succeeded' :: 'failed'; Aha! $var 'succeeded' || 'failed'; Thank you, precedence. /s

Re: Shortcut: ?=

2003-02-03 Thread Sean O'Rourke
Argh. Please disregard that last message as the ramblings of a pre-caffeinated mind. /s On Mon, 3 Feb 2003, Sean O'Rourke wrote: On Mon, 3 Feb 2003, Dave Mitchell wrote: $var ??= 'succeeded' :: 'failed'; Aha! $var 'succeeded' || 'failed'; Thank you, precedence. /s

Re: Arc: An Unfinished Dialect of Lisp

2003-01-22 Thread Sean O'Rourke
On Wed, 22 Jan 2003, Austin Hastings wrote: I'm done with 'P'. That's it. Putative planners of programming paradigms must proffer some prefix preferable to the pathetic palimpsest that is 'P'! As with operators, so with programming languages -- Unicode comes not a moment too soon. /s

Re: L2R/R2L syntax

2003-01-19 Thread Sean O'Rourke
On Sat, 18 Jan 2003, Michael Lazzaro wrote: So 'if' and friends are just (native) subroutines with prototypes like: sub if (bool $c, Code $if_block) {...}; IIRC it's not that pretty, unfortunately, if you want to support this: if $test1 { # blah } elsunless $test2 {

Re: purge: opposite of grep

2002-12-06 Thread Sean O'Rourke
On 5 Dec 2002, Rafael Garcia-Suarez wrote: John Williams wrote in perl.perl6.language : If you want good'ol Unix flavor, call it vrep. Compare the ed(1) / ex(1) / vi(1) commands (where 're' stands for regular expression, of course) : :g/re/p :v/re/p Or, to follow the spirit rather

Re: purge: opposite of grep

2002-12-06 Thread Sean O'Rourke
On Thu, 5 Dec 2002, Sean O'Rourke wrote: On 5 Dec 2002, Rafael Garcia-Suarez wrote: John Williams wrote in perl.perl6.language : If you want good'ol Unix flavor, call it vrep. Compare the ed(1) / ex(1) / vi(1) commands (where 're' stands for regular expression, of course) : :g/re/p

Re: eq Vs == Vs ~~ ( was Re: Primitive Boolean type?)

2002-11-01 Thread Sean O'Rourke
See http://archive.develooper.com/perl6-internals;perl.org/msg11308.html for a closely-related discussion. /s On Fri, 1 Nov 2002, David Whipp wrote: In Perl6, everything is an object. So almost everything is neither a number nor a string. It probably doesn't make sense to cast things to

Re: perl6 operator precedence table

2002-09-26 Thread Sean O'Rourke
Thanks for taking the time to write this out. On Thu, 26 Sep 2002, John Williams wrote: perl6 operator precedence leftterms and list operators (leftward) [] {} () quotes left. and unary . nonassoc++ -- leftis but This

Re: hotplug regexes, other misc regex questions

2002-09-20 Thread Sean O'Rourke
On Fri, 20 Sep 2002, Larry Wall wrote: But if a fast implementation needs to keep pointers into a string rather than offsets from the beginning, we're asking for core dumps if the string is modified out from under the pointers, or we have to adjust all known pointers any time the string may

RE: Passing arguments

2002-09-20 Thread Sean O'Rourke
On Fri, 20 Sep 2002, Larry Wall wrote: The current thinking as of Zurich is that the given passes in separate from the ordinary parameters: sub ($a,$b,$c) is given($x) {...} That binds the dynamically surrounding $_ to $x as an out-of-band parameter. Can also bind to $_ to make it the

Re: Second try: Builtins

2002-09-07 Thread Sean O'Rourke
On Sat, 7 Sep 2002, Chuck Kulchar wrote: Also, how do these perl6 builtins in perl6 work with the current P6C/Builtins.pm? (also, why are some that are already defined in pure pasm/part of the parrot core redefined as perl6 code?) For the moment, they don't. Eventually, I expect there will

Re: Perl 6 parser, built in rules, etc.

2002-09-04 Thread Sean O'Rourke
On Wed, 4 Sep 2002, Erik Steven Harrison wrote: How are we planning on dealing with this, or do the implementers consider it a non issue? Well, to me this is a non-Yet issue, but a very real issue. I'm hoping that when Perl 6 goes 1.0, the grammar will have seen a lot of testing, and will be

RE: atomicness and \n

2002-09-03 Thread Sean O'Rourke
On Tue, 3 Sep 2002, Luke Palmer wrote: On Tue, 3 Sep 2002, Brent Dax wrote: Damian Conway: # Neither. You need: # # $roundor7 = rx /roundascii+[17]/ # # That is: the union of the two character classes. How can you be sure that roundascii is implemented as a character

Re: Does ::: constrain the pattern engine implementation?

2002-08-28 Thread Sean O'Rourke
On Wed, 28 Aug 2002, Deven T. Corzine wrote: Would it be better for the matching of (Jun|June) to be undefined and implementation-dependent? Or is it best to require leftmost semantics? For an alternation spelled out explicitly in the pattern, it seems like undefined matching would be

Re: Hypothetical synonyms

2002-08-28 Thread Sean O'Rourke
On Thu, 29 Aug 2002, Markus Laire wrote: (only 32bit numbers, modulo not fully working, no capturing regexps, ) Where does modulo break? /s

Re: rule, rx and sub

2002-08-28 Thread Sean O'Rourke
On Wed, 28 Aug 2002, Damian Conway wrote: Any subroutine/function like Cif that has a signature (parameter list) that ends in a Csub argument can be parsed without the trailing semicolon. So Cif's signature is: sub if (bool $condition, block); So the trailing semicolon isn't

Re: rule, rx and sub

2002-08-28 Thread Sean O'Rourke
On Wed, 28 Aug 2002, Luke Palmer wrote: Second, is there a prototype-way to specify the arguments to for (specifically, the first un-parentesized multidimensional array argument)? In other words, is that kind of signature expected to be used often enough to justify not forcing people to

Re: rule, rx and sub

2002-08-27 Thread Sean O'Rourke
On Tue, 27 Aug 2002, Luke Palmer wrote: On 27 Aug 2002, Piers Cawley wrote: Damian Conway [EMAIL PROTECTED] writes: Debbie Pickett asked: (Offtopic: can I say: $c = - $xyz { mumble } Yes. Though you need a semicolon at the end unless its the last statement in a block.

Re: rule, rx and sub

2002-08-26 Thread Sean O'Rourke
On Mon, 26 Aug 2002, Glenn Linderman wrote: because the rules and patterns are no longer regular, but if rx isn't a short form of regex, what is it a short form of? It's a short form of r$x for some value of $x ;). /s

Re: Perl 6 regexes... (fwd)

2002-08-12 Thread Sean O'Rourke
send you the duct tape I'm using to hold it together now. /s -- Forwarded message -- Date: Mon, 12 Aug 2002 03:00:27 -0400 From: Dan Sugalski [EMAIL PROTECTED] To: Sean O'Rourke [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Perl 6 regexes... At 10:01 PM -0700 8/11/02, Sean

Re: 'while {' in Perl 6

2002-08-11 Thread Sean O'Rourke
On Fri, 9 Aug 2002, Larry Wall wrote: (Had an interesting typo there. I put = insteaqd of -. I wonder how much trouble that sort of thing is gonna cause. Maybe pairs can be disallowed or warned about where a pointy sub might be expected.) To add to the list of helpful warnings, I ran

Re: of Mops, jit and perl6

2002-07-29 Thread Sean O'Rourke
On Mon, 29 Jul 2002, Dan Sugalski wrote: Just out of curiosity, I presume the (rather abysmal) perl 6 numbers include time to generate the assembly and assemble it--have you tried running the generated code by itself as a test? (At the moment, the assembler's rather slow) It's mostly the

RE: Perl6 grammar (take V)

2002-07-15 Thread Sean O'Rourke
On Sun, 14 Jul 2002, Brent Dax wrote: Deborah Ariel Pickett: # My perl5 sensibilities tell me that that's likely to cause a # problem when I want to do something like this: # # $hashref = { function_returning_hash() }; # # because I won't get the function's return values put into a #

Re: Perl6 grammar (take V)

2002-07-12 Thread Sean O'Rourke
It's time for my weekly post to this old thread. The grammar has grown enough to deserve more than one file, and is starting to change in new directions. For example, it's now Turing-complete, if you have a Parrot engine and a bit of spare time. Call it a primitive demo version of some of Perl

Re: Reflection...

2002-07-08 Thread Sean O'Rourke
On 8 Jul 2002 [EMAIL PROTECTED] wrote: caller with no args is the same as Ccaller(1) (for certain values of 'the same as'), caller(0) already returns the current execution context. You're right. I stand corrected. If you can set a block's continuation at runtime, I think you should be

Re: Perl6 grammar (take IV)

2002-07-06 Thread Sean O'Rourke
I keep expecting Damian or Larry or someone to step in with The True Grammar and make this obsolete -- does such a thing exist? Changes in this version: - A bit more speed (though nowhere near enough). It comes from a combination of improving rule ordering, inlining some rules, moving most

Re: Reflection...

2002-07-05 Thread Sean O'Rourke
On 5 Jul 2002 [EMAIL PROTECTED] wrote: dan [EMAIL PROTECTED] writes: At 8:29 AM -0700 7/4/02, Sean O'Rourke wrote: Sick. Anyways, I think it seems like a more natural way to do things than traditional call/cc. $block.continuation reads as where do I go after $block

Re: Reflection...

2002-07-04 Thread Sean O'Rourke
On 4 Jul 2002 [EMAIL PROTECTED] wrote: Dan Sugalski [EMAIL PROTECTED] writes: At 8:32 AM +0100 7/3/02, [EMAIL PROTECTED] wrote: For true scariness, consider: $sub.current_continuation($new_continuation); Some days you really, really scare me Piers... Heh. Scary can be

Re: Perl6 grammar (take III)

2002-07-03 Thread Sean O'Rourke
Here's a later, greater version of the parser. It hopefully addresses all the limitations listed for the previous parser. New limits: - While I haven't specified argument contexts for the builtin functions, it should be possible to do so in the same way as for control structures). - Error

Re: Perl 6 grammar progress?

2002-06-30 Thread Sean O'Rourke
On Sun, 30 Jun 2002, Ashley Winters wrote: I don't know how the grammars are going, and I'm not fit to write one myself, Hey, neither am I, but that hasn't stopped me from taking a stab or two, figuring that through pain comes fitness. The attempt has certainly given me a much better