lse matches way down
in any culture that conventionally puts spaces on both sides of an =
when used for assignment. (And if there isn't a space after, there
isn't likely to be a space before that would get wrapped.)
Larry
all they
have to do is just make sure the opening #{ isn't first thing on a line.
And then it's even symmetrical in a sense, going from mid-line to mid-line.
Larry
t;uninitialized", that would be either:
$x //= 42; # init if undefined
or
state $x = 42; # init first time through
Both of which are getting borrowed back into Perl 5, as it happens.
Larry
the reasoning for choosing antecedent, rather
: than successor?
I think having to pick either one or the other is likely a design smell.
Maybe it would be better to have predeclared extractors than to have a
search strategy baked half-heartedly into A<>.
Larry
Binary) { '0b' <[0..1]>+ }
multi token numrange:<0o> (--> StrOctal) { '0o' <[0..7]>+ }
multi token numrange:<0d> (--> StrDec){ '0d' <[0..9]>+ }
multi token numrange:<0x> (--> StrHex){ '0x' <[0..9a..fA..F]>+ }
multi token numrange:roman (--> StrRoman) { <[ Ⅰ .. ↂ ]> }
etc.
Maybe these are all just mixins of various Incremental roles.
That's probably more than enough speculation for now...
Larry
On Sat, Aug 04, 2007 at 12:56:06PM -0700, Larry Wall wrote:
: multi token numrange:<0x> (--> StrHex){ '0x' <[0..9a..fA..F]>+ }
Though sanity would probably force us to use numerics internally anyway
as the canonical comparison form, or we'd have trouble gett
fooba
In either case, the clear intent is to match foobar over fooba.
Therefore I think the DFA matcher just strips ? and does its ordinary
character by character match, relying on that extra info to match
the real extent of the quantifier.
Larry
behave
: exactly like 'orelse' does?
How 'bout, it's convenient to have the simpler defaulting semantics
when you don't care what kind of undefined value is on the left.
Larry
On Thu, Sep 06, 2007 at 03:49:42PM -0700, Larry Wall wrote:
: On Thu, Sep 06, 2007 at 04:02:19PM -0500, Patrick R. Michaud wrote:
: : I agree. One thought I had was that perhaps non-greedy matching
: : could also terminate the token prefix.
:
: Well, that's more or less arguing it the othe
orelse itself fail if the binding doesn't work too.
Larry
'b' x 1. That would definitely run
faster if you cut off the DFA after the longest known token, or as
soon as the DFA reduces to one possibility, presuming you can know
such a thing.
Any way we work it, there will be a way to use it wrong.
Larry
fhand I'd say that would be bad huffmanization, but I need to look
at STD some more. It also depends on any post-binding syntax
resembling:
-> $foo {...}
and whether that is deemed preferable to or $foo= or
whatever. (One nice thing about the post syntax is that we could know
for sure that we're creating a new var, not binding an existing one,
so [] -> $x; might in fact declare $x as a "my" variable that happens
to scope properly under backtracking. But I digress.)
Other available chars:
<`ws>
<^ws>
<&ws>
<*ws>
<-ws>
<|ws>
<:ws>
<;ws>
Larry
fact it is. <~ws> is hard
to type, and <\ws> can be confused with \w. The problem with <=foo>
I already mentioned. The only strangeness about <.foo> I see is that
arguments would presumably continue to parse like like ordinary
assertions: <.foo bar> and <.foo: bar> might be misread.
I dunno, maybe <\ws> isn't so bad...
Larry
On Sat, Sep 08, 2007 at 12:12:10AM +0100, Nicholas Clark wrote:
: On Fri, Sep 07, 2007 at 03:50:09PM -0700, Larry Wall wrote:
: > I dunno, maybe <\ws> isn't so bad...
:
: But as soon as I saw it I thought the same as you say in the paragraph above -
: in the context of a reg
sis 3.
Is no such operator. We have ~&, ~|, and ~^ though.
Larry
On Tue, Sep 18, 2007 at 07:41:54PM -0700, Paul Hodges wrote:
: while length($ruler) < $len; # till there's enough
There is no length function anymore.
Larry
e of the
declared variable. (One could argue that C's current semantics
are wrong, and that maybe it should also initialize only at START time,
if not earlier. And perhaps disallow multiple initializers.)
Larry
ing trapped in the current fad, however
popular it might be. In Perl 6 you have to declare explicitly that
you want to be trapped by the current fad. :-)
Larry
am a switch statement,
and here are my cases" is drawing attention to the language, not to the
solution of the problem.
Since you're in Japan, you should know the importance of topicalizers.
I actually considered (very briefly) some postfix notation like:
$operator wa {
'' no baai ni { ... }
}
before settling on the English topicalizer "given" and pronoun "when".
>>> And hashes require '=>' but it could be nice to switch to ':'
>>> because then :(or perhaps we can use whatever separator we want?)
>From Apocalypse 1:
Larry's 1st Law of Language Redesign: Everyone wants the colon.
And its corollary:
Larry's 2nd Law of Language Redesign: Larry gets the colon. :-)
> our work is the portrait of ourselves
Indeed. And people find me confusing at times. :-)
Perl 6 は、頑張って、よ! ^_^
Larry
somehow it got past that, it'd attempt to bind to an optional
parameter named 255, which you can't declare, so it fails. Anyway,
it's gonna blow up one way or another. I guarantee it. :)
Larry
n you get to the end of the regex
you mentally have to backtrack and reparse. Though numeric literals
are rarely that long, so the end-weight argument doesn't carry a lot
of weight when you take in the construct as a single visual unit.
I think the killer is that the two ends are visually ambiguous: 10`8
would be misread as 8 in base 10 half the time. 2.54`cm doesn't have
that problem so much. And in any case, I like the current prefix form
more better.
Larry
On Tue, Dec 04, 2007 at 08:28:48AM -0800, brian d foy wrote:
: In article <[EMAIL PROTECTED]>, Larry Wall
: <[EMAIL PROTECTED]> wrote:
:
: > : Later in the "Literals" section of S02, there's a chart of the
: > : corresponding forms for fat arrow, pair, and paren n
gged
about how they were the largest state in the union, and had the biggest
everything, including ten-gallon hats. That was before we added Alaska.
Now if they pull that stunt we offer to carve Alaska up into 4 states,
in which case Texas would be the 5th largest.
But Texans still like to think big, and we love 'em all to pieces for it.
Especially Patrick these days... :)
Larry
design, it
already has. Much of S11 (http://perlcabal.org/syn/S11.html#Versioning)
is about that.
Larry
ong federal government it's possible to invent too weak a federal
government. There's a balance in there somewhere that we're still
trying to figure out...
Larry
as one of its formal parameters (either explicit or implicit)
is automatically broken out of."
So it merely returns normally from the method, which is what you'd
generally expect. If you have more questions about switches, S04
probably already discusses it.
Larry
prefer the
> Paris, Texas explanation :)
Everything is bigger in Texas *except* Paris.
Larry
On Thu, Dec 06, 2007 at 04:36:26PM -0800, Jonathan Lang wrote:
: Larry Wall wrote:
: > On Tue, Dec 04, 2007 at 08:40:10AM -0800, Jonathan Lang wrote:
: > : or (I think):
: > :
: > : method test ($value) {
: > : setup();
: > : when $value { doit() } #[smart-match
On Thu, Dec 06, 2007 at 12:12:36PM -0700, Thom Boyer wrote:
> Larry Wall wrote:
>> Good guess, but no. It comes from the fact that Texas always bragged
>> about how they were the largest state in the union, and had the biggest
>> everything, including ten-gallon hats. Tha
; one of the parameters '$_':
: > Huh. I guess I need to review current standards for method
: > declaration; last I'd checked, the invocant did not need to be
: > explicitly named.
:
: It does if you want to access it by a name other than a lone sigil.
Well, or by "self".
Larry
t; Adriano answered #1 I think: $yaml = Q:!c"{ $key: 42 }";
: >
: > For the second one, if you're really just worried about how prevalent {}
: > appear in double-quotish strings, perhaps @Larry could be persuaded to
: > make them non-interpolative by default. (i.e., the a
teral text and go on from there.
I don't feel compelled to analyze the string in depth unless I need to.
For someone who is somewhere on the autistic spectrum, I'm pretty good
at ignoring details. I understand others may not be so lucky. :)
Larry
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-
ax changes from
macros are always lexically scoped. That includes imports of macros,
so if you made a module that contained:
my macro quote:<" "> is export(:DEFAULT) { 'qq:!c' }
then you could use it like this:
{
use Schwernlich;
say "... { ... } ...";
say "... { ... } ...";
say "... { ... } ...";
}
and it would be a lexically scoped language hack. With a slight
generalization it's the "use qq" pragma above. Welcome to Perl 6. :)
Larry
ses right now is probably perlcabal.org/syn
because it has the test suite interspersed, so you can easily click
to see test examples if you don't understand a particular passage.
Larry
On Thu, Jan 03, 2008 at 08:55:24PM +0200, Gabor Szabo wrote:
: On Jan 3, 2008 6:36 PM, Larry Wall <[EMAIL PROTECTED]> wrote:
: > On Wed, Jan 02, 2008 at 11:28:54AM -0800, Jonathan Lang wrote:
: > : Paul Hodges wrote:
: > : > http://perl6.org/doc/design/syn/S02.html still says:
:
sdesign a computer language by
overemphasizing one particular design dimension to the detriment
of others. With Perl 6 we're trying to make the opposite mistake.
Larry
that is
why grammars must do completely fair longest-token matching across
all base and derived grammars (maybe even in parallel :). It is
a mistake to privilege either the old over the new or the new over
the old, to the extent that they can coexist. In ecological terms,
I hope Perl 6 will have a very wide gene pool.
Larry
t place, $*OS could change more than once.
All $? variables should be considered compile-time constants, in fact.
That's why "self" is no longer spelled $?SELF, for instance, because
it varies.
Larry
On Mon, Jan 07, 2008 at 02:05:18PM -0500, Trey Harris wrote:
> And mix the role in to $*OS. Then call $*OS.trytolink() to get the proper
> behavior at the proper time.
Imagine a Beowulf cluster of those, and now $*OS might even point to
thread-specific data.
Larry
@array.minmax also seems vaporized.
We currently have a minmax infix list operator. We haven't defined
a method yet.
($min, $max) = [minmax] @array
might do what you want, if minmax treats a scalar as both a min and a
Larry
max.
s comparable.
But we can presumably hash anything that supports an identity via .WHICH.
This minimal requirement does not imply an orderable type.
Larry
rather than the rule,
and certainly as you say it would need to be well typed as to its
encoding and normalization. The same considerations apply
between grapheme and codepoint views of the same string, except
there only the normalization is needed, since codepoints are
above the encoding abstraction level.
Larry
be in that brainspace. Arbitrary restrictions
will likely be needed until all the implementations can agree on
what's possible and practical in the base language or in extensions.
Larry
On Fri, Jan 11, 2008 at 03:59:00PM -0800, Dave Whipp wrote:
> Larry Wall wrote:
>
>> As for assignment-op forms, in the current "STD" grammar, feeds are
>> not currently even considered operators, but statement separators, so
>> there is no possibility of using
so glaube ich.
Larry
On Fri, Jan 18, 2008 at 09:16:39AM -0800, Larry Wall wrote:
: Though it's not quite the same, since the prefix presumably forces
: a multiple dispatch to Perl's idea of notiness, while a direct .not
: method would rely on the the object's notion of notiness. This is
: probably a g
orces
a multiple dispatch to Perl's idea of notiness, while a direct .not
method would rely on the the object's notion of notiness. This is
probably a good distinction for cross-language programming.
So I think Object should define a default .not that is defined in
terms of .true. If a Perl class wants to override that, it's
probably because it has a more efficient .not test, and wants to
define .true in terms of .not instead.
Larry
if you are "disbelieving" S29. Which maybe you are, but I
doubt it. Anyway, it's one of those spots where cognates can lead
you astray because of semantic shifts. Similarly, "demand" means
something different to English and French speakers. (When the Norman
conquerors came over and "asked" for something, not giving it to them
was not considered an option. :)
Larry
asses...
(run time starts)
INIT
(main starts running)
ENTER (every block entry)
START (first time through only)
LEAVE (every block exit)
(main finishes running)
END
See S04 for when the other more specialized closure blocks get called.
Larry
On Tue, Jan 22, 2008 at 05:55:35PM -0800, Larry Wall wrote:
: http://perlcabal.org/syn/S04.html#Closure_traits
Or since that's kind of hard to follow the text, you may prefer to
read the original POD without the interpolated test results at:
https://svn.perl.org/perl6/doc/trunk/d
patching to something like
pluralize($X,'foo') or pluralize($X,'foo','bar'). (Arguably we
could make pluralize interpolate the $X as well, but that only
works for noun agreement, not verb agreement.)
I think that probably handles most of the Indo-European cases, and
anything more complicated can revert to explicit code. (Or go though
a localization dictionary...)
Any other cute ideas?
Larry
Wow, that really confused svn's diff...
Larry
stead of C< $self >?
Then we're back to confusing people over the difference between the
object and the topic, and the topic-as-self breaks as soon as you
topicalize some other way. And you can always throw in a "$_ := self"
or a "given self" if you really want it. Plus $.foo is still only
one character longer than .foo so it doesn't really get you much most
of the time.
Larry
On Tue, Feb 05, 2008 at 11:57:37AM -0800, Jonathan Lang wrote:
: Larry Wall wrote:
: > : Is it forbidden to use placeholder parameters in conjunction with
: > : "my"? Or would it simply not do anything useful? I ask because "Do
: > : what I mean" would seem to im
t assignment, as the
> container assignments themselves are now uncoupled.
Of course, @containers »=« @values would have the same effect more
explicitly...
Larry
rn an lvalue, it seems...
Oh wait, I lied. You can get pugs to do it with:
my $a = 0; my @b; (lazy { VAR($a) }, lazy { VAR(@b[$a]) }) = 1,2; say
@b.join(':')
Now just put that in a macro...
Larry
which was written by a person of minimal clue. :)
That's part of what S02 means right at the top where it's talking
about a one-pass parser. There's no lookahead to find the end of a
construct. You just come to it when you come to it, and the parser
has to be smart enough to know which terminators mean what in each
context.
Larry
ey }";
There it is optional, because } does not cause interpolation.
(Though if the delimiters were curlies, the opener and closer would
have to be backslashed the same, to avoid throwing off the bracket
counter.) In any case, double quoting removes the backslash from
any non-alphanumeric character. Single quoting tends to preserve them.
Larry
down,
the rule for the standard conditional operator is just:
token { '??' '!!' }
and the allowed precedence in the middle is both evident and succinct.
Normal parens are parsed as:
token { '(' ')' }
I see virtually no need for Another Way To Do It in this case. It would
only contribute to the befuddlement of the masses.
Larry
or Perl6::Junctions.
But even in Perl 6, "&&" or "and" is not going to autothread the
junction for you, which is why you need "&" or all() to distribute the
"~~" if you don't do it the explicit way by distributing $_ yourself:
when %hash.:exists{$_} and @array.any ~~ $_ {...}
Larry
any money on girls and booze because of it... :)
Larry
ave to be aware of who is importing
from it, which is pretty bogus when you think about it.
Presumably the HTML::Tiny protoobject can then be queried for its
singleton object if you really need to have $h for some reason.
Larry
ranslation/ASTTranslate.hs and
thereabouts.)
At some point we'll probably rewrite most of these tools in Perl 6,
except for the parts that are too MAD to reimplement without rewriting
Perl 5 itself in place, which would break it by fixing it...
Larry
one of those operators may not be a disservice to the writer of
the code, it may well be a disservice to the reader.
Perl is about linguistics, and hence is more concerned with successful
communication than with pure mathematical platonics.
Larry
: > > The P in Perl stands for Practical, not Pedantic.
: >
: > I consider well designed interfaces as practical not pedantic ;)
:
: Of course, good design is extremely practical. Just not necessarily
: objectively measurable. :)
If no one objects, it's objectively good. :)
Larry
ecedence somehow.
> But you can't mix the two concepts!
Indeed, to the first approximation, the parser pays no attention to
the types, and multiple dispatch pays no attention to the syntax.
Larry
y the same thing for postfixes in the other order.
So here's another question in the same vein. How would mathematicians
read these (assuming Perl has a factorial postfix operator):
1 + a(x)**2!
1 + a(x)²!
Larry
e useful.
Probably even a discussion of the current state of the art in Perl 5
would be useful there.
[Note, this is intentionally cross-posted, so please be careful with
your followups if they would be of interest to only one list or
the other.]
Larry
On Wed, Mar 26, 2008 at 06:06:29PM +0100, TSa wrote:
> HaloO,
>
> Larry Wall wrote:
>> That interpretation doesn't help me solve my generic parsing problems,
>> which is about the relationship of op1 to op2 and op3 in
>>
>> op1 a() op2 b() op3 c()
&
uot;a(x) to the two-factorial power": all unary operators, be
: they prefix or postfix, should be evaluated before any binary operator
: is.
Could we please get all the mathematicians in the world together to
vote on this? :)
I also wouldn't mind a straw vote from all the future mathematicians...
Larry
right...
Larry
On Wed, Mar 26, 2008 at 07:43:16PM +0100, TSa wrote:
> HaloO,
>
> Larry Wall wrote:
>> That's what I thought. Now note that ! can't easily be rewritten
>> as a simple binary operator (unless you do something recursive, and
>> then it's not simple).
&
filters in Perl 5 and end up with viable offspring. Biology
has more or less solved this by making point mutations *point* mutations.
Source filters are more like a blast of gamma rays to the entire genome.
Larry
hat
>
> $x.foo
>
> is a method call, even if there's a postfix: declaration in scope. And
> that's a problem, because, no matter what precedence postfix: was
> given,
>
> 1,2,3.foo
>
> is still going to mean
>
> 1, 2, (3.foo)
>
> in
On Thu, Mar 27, 2008 at 01:01:27PM +0100, TSa wrote:
> HaloO,
>
> Larry Wall wrote:
>> I deem that to be an unlikely failure mode, however. So maybe .++
>> is just gone now, and you have to write \++ instead. Any objections?
>
> Please keep .++ as outlined below. Does
>($b) might do concatenation if $a
is a foreign object from a language that (mis)treats + that way.
Larry
would only simplify
things for us, not for the user (which is the usual failure mode of
Big Simplifying Ideas).
: On the one hand, I'm worried that Perl6 is going to turn into the
: computer equivalent of Quenya, which was never completed because its
: creator couldn't stop tinkering.
On Thu, Mar 27, 2008 at 09:02:37AM -0600, Thom Boyer wrote:
> Larry Wall wrote:
>> The .++ form is still not a method (single) dispatch, just an alternate
>> form of the postfix, which is a multi dispatch.
>
> But the postfix is a unary operator, right? So that'd b
an arbitrarily sized list.
It's not making any attempt to deal with anonymous first-class
functions though. Call a real function for that. :)
Larry
h bits I've responded to and which I haven't yet.
I admit that I also like to sit back and let other people pick the
low fruit so I don't have to spend time doing it. Over the short
term, sometimes what I do looks an awful lot like doing nothing... :)
Larry
On Wed, Apr 02, 2008 at 11:02:37PM +0800, Audrey Tang wrote:
: Sanity-check before I check it in?
I'm probably not the best person to ask about *sanity*, but it looks
pretty darn good to me. :)
Larry
m-up from the end of its @@ bound list instead
of from the beginning. As such, there can really only be one such
reversal, so we limit ourselves to a single ** argument representing
an arbitrary number of dimensions to skip over, assuming the rest
of the dimensions are end-anchored, as it were.
Larry
Yes, unless we decide we need something like that for list
comprehensions. Maybe looping modifiers allow placeholders in what
would otherwise be an error...
Larry
t form allows
you to add space. I think this wording is leftover from the "long dot"
explanation, but now is out of place. I suggest dropping the "However," from
the sentence.
Fixed by unpacking what I really meant by the "however". :)
Larry
On Thu, Apr 03, 2008 at 12:43:58AM +0800, Audrey Tang wrote:
> Larry Wall 提到:
>> Yes, unless we decide we need something like that for list
>> comprehensions. Maybe looping modifiers allow placeholders in what
>> would otherwise be an error...
>
> Sure. How a
, so I welcome any
balance on that score. And please don't be discouraged by any of my
traditional morning grumpiness. I don't need a jet to get jet lagged. :)
Larry
7;s Amendment to Lampson's Law
But yes, it might be about time for hypertexting it. All but S03 have
never really undergone a major reorg, and most of them could use it.
Maybe it's time to set up Twiki on my home machine...
Larry
On Fri, Apr 04, 2008 at 06:51:20PM +0200, TSa wrote:
> HaloO,
>
> why is (1,2,3) X () defined to be the empty list
> and not (1,2,3) as is the case with the cartesian
> product of sets which X basically is with preserved
> order.
(@a X @b X @c).elems == @a.elems * @b.elems * @c.elems
Larry
used this way:
>>
>> class MyDerivedClass is MyClass {};
>> YourClass.foo(MyDerivedClass.new(attr => 1)); # Not sure if this works.
> "the spec doesn't say" hence my confusion. So will Larry rule on that, or
> should we discuss it in detail, or should I
On Wed, Apr 02, 2008 at 06:08:55PM -0700, Jon Lang wrote:
: In "Question on your last change to S02", Larry Wall wrote:
: > (By the way, you'll note the utility of being able to talk about a
: > postfix by saying .[], which is one of the reasons we allow the optional
: >
On Wed, Apr 02, 2008 at 11:56:37PM -0500, Jonathan Scott Duff wrote:
: Or you could setup pmwiki as a nod to our perl6 compiler pumpking :-)
:
: In any case, pmwiki is simpler to setup than twiki.
Yes, but I also know the author of twiki, and it's written in Perl
rather than PHP...
Larry
eads "obj" as a , then checks for a ".", but
doesn't have similar logic for "!".
You probably need to svn up. I only just added dotty: yesterday.
The dotty rule is called from expect_term via the post rule.
Larry
On Sat, Apr 05, 2008 at 01:41:02PM -0500, John M. Dlugosz wrote:
> Larry Wall larry-at-wall.org |Perl 6| wrote:
>> On Wed, Apr 02, 2008 at 06:08:55PM -0700, Jon Lang wrote:
>> : In "Question on your last change to S02", Larry Wall wrote:
>> : > (By the way, you
or a proto that represents all multis in
its scope. Maybe a proto exported from within a class automatically
conveys trust to all normal multis (of the same name) declared the
import scope.
> Also, since classes can be re-opened, anyone can grab trust from any class
> anyway, just by declaring a new method inside that class.
Well, sure. But whenever the programmer does that, the Perl 6 compiler
will automatically send email to the programmer's supervisor. :)
Larry
27;if' and 'for'.
: semantically speaking, i don't have a clever or unique name for them,
: other than what larry has already come up with.
It's a really good question, particularly because it's so exposed to the
user, so it needs to be something not too unwieldy. Sem
lock" seems to imply that "BEGIN" et al are events, which might be ok
: or might cause confusion with more thoroughly event-driven programming
: models.
Hmm, maybe "control event blocks" and "control events", then...
Larry
her
it needs fixing now or can be simply renegotiated via wiki.
Larry
On Thu, Apr 10, 2008 at 12:11:05PM -0700, jerry gay wrote:
: On Thu, Apr 10, 2008 at 11:23 AM, Larry Wall <[EMAIL PROTECTED]> wrote:
: > On a larger question, I'm wondering if it's time to slush/freeze
: > the Synopses as historical documents and put all spec effort
1401 - 1500 of 3168 matches
Mail list logo