On Wed, Apr 27, 2005 at 06:29:46PM +0200, Thomas Sandlaß wrote:
> Patrick R. Michaud wrote:
> >>my $matches = any( @x_chars ) eq any( @y_chars );
> >>my $match = $matches.pick;
> >
> >Perhaps the easiest way to explain the difficulty here is to note that
On Wed, Apr 27, 2005 at 08:46:53AM -0400, Joshua Gatcomb wrote:
> The problem is that in the regex version I use capturing parens to
> identify the character matched. For the purposes of the problem I
> don't need to rely on the first character matched I just need to know
> 1.
>
> Without doing a
On Wed, Apr 20, 2005 at 08:13:20PM +0200, Steven Philip Schubiger wrote:
> On 20 Apr, Luke Palmer wrote:
> : Steven Philip Schubiger writes:
> :> In
> :> macro circumfix:(*...*) () is parsed(/.*?/ { "" }
> :>
> :> is the second enclosing part of the "parsed" parentheses omitted
> :> by intenti
On Wed, Apr 20, 2005 at 12:00:22PM -0700, Larry Wall wrote:
> : Although admittedly, I only encountered this when playing with a
> : non-readonly undef ;) (This is something I can recommend to anyone:
> : redefining true, false and undef leads to very spectacular code, where
> : anything's possible
On Tue, Apr 12, 2005 at 06:22:13PM +0200, Thomas Sandlaß wrote:
>
> I've edited the above syntax into S06 and A06. The two patches
> are attached but I don't know if you are the right one to sent
> them to. Whom should I sent such patches? I just saw you applying
> other patches as well.
Applied,
On Sun, Apr 17, 2005 at 02:52:27PM +0200, Steven Philip Schubiger wrote:
> A spelling mistake and a word, that supposedly has been forgotten.
>
> Steven
Applied, thanks!
Pm
> --- apo/A06.pod Sun Apr 17 14:34:16 2005
> +++ apo/A06.pod Sun Apr 17 14:42:37 2005
> @@ -
On Sun, Apr 17, 2005 at 07:29:33AM -0700, Larry Wall wrote:
> On Sun, Apr 17, 2005 at 08:56:46PM +1000, Brad Bowman wrote:
> :
> : Hi all,
> :
> : S03 gives infix + a higher precedence than junctive
> : operators in the listed table, but that seems to contradict
> : the examples under "Junctive o
On Fri, Apr 15, 2005 at 09:17:13AM -0700, Larry Wall wrote:
> On Fri, Apr 15, 2005 at 06:04:32PM +0200, Juerd wrote:
> : No, Ucfirst it can't be, I think. And ALLCAPS is ugly. @ is taken (and
> : ugly). Suggestions?
>
> Maybe we could define an "ok" operator that suppresses only the
> *first* warn
On Fri, Apr 15, 2005 at 01:01:58PM -, Rafael Garcia-Suarez wrote:
> Aaron Sherman wrote in perl.perl6.language :
> >
> > A silly question: is there a canonical character set from which we
> > extract these ranges? Are we hard-coding Unicode here, or is there some
> > way for the user to specify
On Fri, Apr 15, 2005 at 02:58:44PM +0200, Juerd wrote:
> Am I the only one who thinks <[a-z]> is ugly and hard to type because of
> the nested brackets? The same goes for <{...}>. The latter can't easily
> be fixed, I think, but the former perhaps can.
Part of the thinking behind this is that the
On Thu, Apr 14, 2005 at 05:21:05PM -0700, Larry Wall wrote:
> Given that we're trying to get rid of special
> exceptions, and - in character classes is weird, and we already
> use .. for ranges everywhere else, and nobody is going to put a
> repeated character into a character class, I'm wondering
On Thu, Apr 07, 2005 at 11:13:42PM +0200, Steven Schubiger wrote:
> Attached is a patch that fixes a minor spelling error
> in apocalypse 5.
Applied, thanks!
Pm
On Wed, Apr 06, 2005, Larry Wall wrote:
> I think it's time to break out
> the colon again and use something like:
>
> &infix:<+>:(Complex, Complex);
>
> or
>
> &foo:(Str,Int)
>
> for ordinary functions. If it gets really popular people might
> even start writing:
>
> sub foo :(S
On Sat, Apr 02, 2005 at 11:41:18AM -0500, Aaron Sherman wrote:
> At the beginning of the section on hyper operators, the following:
>
> The Unicode characters » (\x[BB]) and « (\x[BB])
>
> should be:
>
> The Unicode characters » (\x[BB]) and « (\x[AB])
This is already fixed in t
On Sat, Apr 02, 2005 at 12:05:37PM +0200, Juerd wrote:
> Bitshift, which one is it?
> +<<
> or
> +<
>
> I believe only +< is possible, because +<< has to be +«, but S03 is
> still inconsistent, and +<< comes up everywhere, including Brent's
> perl6op.txt.
>
> Can there please be a definit
On Sun, Mar 13, 2005 at 06:03:20PM -0800, Larry Wall wrote:
> : One thing I've already done is make a list of Perl 5 functions I cannot
> : address until some future Apocalypse/Synopsis is generated on the topic.
> : By far the bulk of this list falls on S16. Partly because IPC is a mess,
> : an
On Sat, Mar 05, 2005 at 11:22:23AM -0500, Garrett Rooney wrote:
> It looks like the current pugs array interpolation doesn't quite match
> the description in S02.
> [...]
This a (hopefully friendly) note regarding cross posting between
perl6-compiler (p6c) and perl6-language (p6l). We're still f
> : Does get handled as )> or as
> : , q)>, in which case it's really qw//?
>
> The former. It's a single string, which you can parse however you like.
> Though I suppose we could extend the colon to a colon modifier:
>
>
>
> That's getting a little weird though, considering that in most
On Tue, Mar 01, 2005 at 09:32:28PM -0800, Larry Wall wrote:
> On Tue, Mar 01, 2005 at 11:06:17PM -0600, Rod Adams wrote:
> : Since the line between rules and subs is already blurring significantly,
> : I want to blur it a little more. I want to write rules which can take
> : parameters.
>
> No p
On Fri, Feb 25, 2005 at 12:54:20AM -0500, Uri Guttman wrote:
> > "RA" == Rod Adams <[EMAIL PROTECTED]> writes:
>
> RA> Uri Guttman wrote:
> >> that fixes Stéphane's problem with my yall proposal. and yall solves the
> >> unary my problem. :)
> >>
> RA> Stop misusing "y'all" before t
On Sun, Feb 20, 2005 at 10:46:15PM +0100, Eirik Berg Hanssen wrote:
> Eirik Berg Hanssen <[EMAIL PROTECTED]> writes:
> > Rod Adams <[EMAIL PROTECTED]> writes:
> >>$re1 = /^ <-[x]>* x <-[x]>* $/; # match a string with exactly one 'x'
> >>$re2 = /^ <-[y]>* y <-[y]>* $/; # ditto 'y'
> >>$
On Sat, Feb 19, 2005 at 01:43:57PM -0800, Ashley Winters wrote:
> Instead of primary sigils, what about secondary sigils on an array to
> mark it as an unordered set?
>
> @|foo = any
> @&foo = all
> @^foo = one # can arrays be curried arguments? hmm
> @!foo = none
>
> After all, why should scal
> However, I also realize that I might have stepped on some toes of the
> course of this long discussion. Which was never my intention, and I'll
> apologize to any who feel I've slighted them in the process.
Personally, I've found the thread to be incredibly useful in
(1) understanding Junction
On Sat, Feb 19, 2005 at 02:40:00PM -0600, Rod Adams wrote:
> I addressed earlier concept of how does perl know when there are side
> effects, particularly with the execution path can weave to parts written
> in pure-parrot. Patrick responded by implying
> that there was no such side effect prote
On Sat, Feb 19, 2005 at 02:40:00PM -0600, Rod Adams wrote:
> Damian Conway wrote:
>
> >Of course, literal junctions *will* autothread in all circumstances:
> >
> >is_prime(any(6,7,8))
> >is_prime(6|7|8)
>
> I had not caught the difference between:
>
>use junctions;
>$x = 6|7|8;
>
On Sat, Feb 19, 2005 at 09:10:05PM +0100, Juerd wrote:
> Is =>'s LHS still automatically quoted? What are the rules?
S02 says that => still autoquotes any bare identifier to its immediate
left, even keywords and macros.
Pm
On Tue, Feb 15, 2005 at 11:03:09PM -0800, Larry Wall wrote:
> On Wed, Feb 16, 2005 at 02:29:36PM +0800, Autrijus Tang wrote:
> : Just a quick question. The prettyprinter of Pugs (the thing that
> : handles the ".perl" method) currently prints out boolean true and
> : false as #t and #f, which is o
On Wed, Feb 16, 2005 at 06:04:37PM +, Nigel Sandever wrote:
> On Wed, 16 Feb 2005 09:18:42 -0600, [EMAIL PROTECTED] (Patrick R. Michaud)
> wrote:
> > And for fun, try writing the equivalent of
> >if $x == one($a, $b, $c, $d) { ... }
> > without a junction. (Ok
On Wed, Feb 16, 2005 at 01:06:22PM +, Nigel Sandever wrote:
>
> Any chance that you could provide one or two simple but realistic examples of
> using Junctions and their operators?
I'll give it a shot, but keep in mind that I'm somewhat new to this
also. :-)
First, junctions are an easy w
On Wed, Feb 16, 2005 at 12:14:10AM -0600, Rod Adams wrote:
> So in terms of frequency of use in the English Language, I'd rank things
> in the following order:
> 1) Scalars
> 2) Sets
> 3) Arrays
> 4) Hashes
Perhaps. However, it's fairly easy to use an Array or Hash to represent
a Set, so perhaps
On Wed, Feb 16, 2005 at 02:53:15PM +1100, Damian Conway wrote:
> Patrick R. Michaud wrote:
>
> >>>none(none($a,$b),none($c,$d)) == none($a,$b,$c,$d)
> >>
> >>True.
> >
> >
> >H...
> >
> > -> none(none($a,$b) == none($
On Wed, Feb 16, 2005 at 01:13:53PM +1100, Damian Conway wrote:
> Larry wrote:
> >0 < $x < 10
> >after all--the problem with rewriting that as
> >0 < $x and $x < 10
> >is that it should only work as long as the two values of $x remain
> >entangled so that the always refer to the same abstrac
On Tue, Feb 15, 2005 at 07:20:53PM -0600, Jonathan Scott Duff wrote:
> > Patrick R. Michaud wrote:
> > >OTOH, what happens with...?
> > >
> > > sub nofun($x is rw) {
> > > $x += 2;
> > > }
> > >
> > > $y = 3 | 4;
&
On Wed, Feb 16, 2005 at 12:17:35PM +1100, Damian Conway wrote:
> Rod Adams wrote:
> >On a slightly different topic, do the following equivalences work:
> >[...]
> >none($a, $a) == undef
> True.
Scott already caught (and Damian acknowledged) this one, it's false
if $a == undef.
> >none($a,$a,$b)
On Tue, Feb 15, 2005 at 05:49:44PM -0600, Rod Adams wrote:
> >As you've written things above, C is autothreaded (your option #3),
> >and we'll see two C output lines if $DEBUG is set.
>
> The case of Damian's response in a prior message:
> [...]
> Could easily be achieved with a single layer of
On Tue, Feb 15, 2005 at 03:07:53PM -0600, Rod Adams wrote:
> I see it this way:
> When perl sees a function call, and one of the arguments is a junction,
> there are three basic options:
> 1) If the junction is wrapped up in some larger container, like a slurpy
> list, pass it on as is.
> 2) If t
On Sat, Feb 12, 2005 at 05:24:04PM -0600, Jonathan Scott Duff wrote:
> > >Because of this, I'd suggest that autothreading of user-defined routines
> > >not be the default, but rather enabled via a pragma of some sort (or, of
> > >course, via an "autothreaded" trait). For the built-in routines this
On Sat, Feb 12, 2005 at 03:54:57PM -0600, Rod Adams wrote:
> >>But, to extract those alternative values from an object, you do
> >>something special to it, like call a method. Whenever you evaluate the
> >>object as a scalar, you get a single value back. Quite probably a
> >>reference to somethi
On Sat, Feb 12, 2005 at 01:18:53PM -0600, Rod Adams wrote:
> >>My issue is less that lists and sets are radically different. It is much
> >>more a matter of Junctions and Scalars are radically different. Getting
> >>me to accept that a Scalar holds several different values at once is a
> >>hard sel
On Sat, Feb 12, 2005 at 03:49:02AM -0600, Jonathan Scott Duff wrote:
> On Sat, Feb 12, 2005 at 01:03:26AM -0600, Rod Adams wrote:
> > I also find the following incredibly disturbing:
> >
> > >perl6 -e "$x = 'cat'|'dog'; say $x;"
> > dog
> > cat
>
> Would that happen though? What's the signature
On Sat, Feb 12, 2005 at 12:41:19AM -0600, Rod Adams wrote:
> >I've given here. For example, a junction can have a value like:
> > $x = ($a & $b) ^ ($c & $d)
> >which is true only if $a and $b are true or $c and $d are true but not
> >both.
>
> That's why I allowed for virtual sets, defined by a
On Sun, Feb 13, 2005 at 01:01:15AM +0800, Autrijus Tang wrote:
> On Sat, Feb 12, 2005 at 10:55:05AM -0600, Patrick R. Michaud wrote:
> > On Sat, Feb 12, 2005 at 12:09:37PM +0800, Autrijus Tang wrote:
> > > [...]
> > > - one() checks its operands for duplica
On Sat, Feb 12, 2005 at 12:09:37PM +0800, Autrijus Tang wrote:
> [...]
> - one() checks its operands for duplicates; if found, it collapses
> itself into an empty one() junction, thus failing all tests.
> Is this somewhat saner? :-)
Depends on when it's checking its operands for duplicat
On Sat, Feb 12, 2005 at 01:02:45PM +0800, Autrijus Tang wrote:
> On Fri, Feb 11, 2005 at 02:12:51PM -0600, Patrick R. Michaud wrote:
> > I briefly grepped through the apocalypses/synopses and couldn't
> > find the answer -- how do I tell a scalar context to expect a
> &g
On Sat, Feb 12, 2005 at 04:44:04PM +1100, Damian Conway wrote:
> Patrick R. Michaud wrote:
>
> >>$x = $Value | 'Default';
> >>instead of :
> >>$x = $Value || 'Default';
> >
> >
> >Hmm, this is an interesting point. I'll
Rod Adams wrote:
> I would argue that this sort of relational comparison is of limited
> usefulness.
Well, except junctions hold more information than the simple comparisons
I've given here. For example, a junction can have a value like:
$x = ($a & $b) ^ ($c & $d)
which is true only if $a
On Sat, Feb 12, 2005 at 03:28:15AM +0800, Autrijus Tang wrote:
> On Fri, Feb 11, 2005 at 09:42:06AM +, Thomas Yandell wrote:
> > Is there another operator that takes the intersection of two
> > junctions, such that any(2,3,4,5) *some op* any(4,5,6,7) would result
> > in any(4,5)?
>
> Yes. In
On Fri, Feb 11, 2005 at 12:54:39AM -0600, Rod Adams wrote:
> Damian writes:
> >Junctions have an associated boolean predicate that's preserved across
> >operations on the junction. Junctions also implicitly distribute
> >across operations, and rejunctify the results.
>
> My brain is having trouble
Woops! I just realized I factored something wrongly...!?
On Fri, Feb 11, 2005 at 01:22:51PM -0600, Patrick R. Michaud wrote:
> # return true if $x is a factor of $y
> sub is_factor (Scalar $x, Scalar $y) { $y % $x == 0 }
> [...]
> # a (somewhat inefficient?) is_prime t
On Thu, Feb 10, 2005 at 12:02:01PM -0600, Rod Adams wrote:
> [...]
> If this is the case, then this entire discussion collapses into how to
> best convert arrays into junctions and junctions into arrays. Perl's
> existing abilities to edit arrays should be more than sufficient for
> editing junc
On Thu, Feb 10, 2005 at 12:02:01PM -0600, Rod Adams wrote:
> Patrick R. Michaud wrote:
>
> >Even if you fixed the =/and precedence with parens, to read
> >
> > my $x = (any(2,3,4,5) and any(4,5,6,7));
> >
> >then I think the result is still that $x contai
On Thu, Feb 10, 2005 at 10:42:34AM +, Thomas Yandell wrote:
> Is the following comment correct?
>
> my $x = any(2,3,4,5) and any(4,5,6,7); # $x now contains any(4,5)
Short answer: I don't think so.
Long answer: I tend to get very lost when dealing with junctions, so
I can be completely wro
On Mon, Feb 07, 2005 at 01:21:00PM +0100, Juerd wrote:
> Nicholas Clark skribis 2005-02-07 12:10 (+):
> > Will the relative precedence of grouping versus anchors for beginning and
> > end of line remain the same in Perl6 rules?
>
> There currently is no such thing as precedence in regexes. Cha
On Wed, Dec 08, 2004 at 08:24:20PM -0800, Ashley Winters wrote:
>
> I was working on the (possibly misguided) assumption that there's a
> cost to capturing, and that perhaps agressive capturing isn't worth
> having "on" in a one-liner. Some deep part of my mind remembers $`
> being bad, I think. I
On Thu, Dec 09, 2004 at 10:52:54AM +, Matthew Walton wrote:
> Of course, it then begs the question about
>
>
>
> if we're thinking of parallels with qw//-like constructs, which I
> certainly am. I'm not quite sure what that would do, as it collides
> slightly with the existing rule m
On Wed, Dec 08, 2004 at 08:19:17AM -0800, Larry Wall wrote:
> And people would have to get used to seeing ? as non-capturing assertions:
>
>
>
>
>
> This has a rather Ruby-esque "I am a boolean" feeling to it. I think
> I like it. It's pretty easy to type, at least on my
I'm reviewing the updated S05 (2 Dec 2004) and ran across this
in the "Hypothetical Variables" section:
# Pairs of repeated captures can be bound to hashes:
/ % := [ () = (\N+) ]* /
Actually, I see three captures there, so should this instead read...?
/ % := [ («ident») = (\
On Fri, Sep 24, 2004 at 11:36:43AM -0500, Rod Adams wrote:
> Output would be a step by step graph of the internal logic used to match
> / not match the string. I'd break the RE up into the same pieces the
> Engine does, then show how that subrule matched char a, then char b, but
> failed to matc
301 - 358 of 358 matches
Mail list logo