ly unralated things...
That's a mixin, not a coercion. The resulting type is anonymous,
not Role::Serializable::XML.
Larry
On Thu, Mar 12, 2009 at 01:38:30PM -0700, Dave Whipp wrote:
> Larry Wall wrote:
>> Note however that coercions require parens these days, since types parse
>> as values, not as routine names.
>>
>> $x = Role::Serializable::XML($resultset);
>> $y = Ro
On Thu, Mar 12, 2009 at 04:03:15PM -0300, Daniel Ruoso wrote:
: Em Qui, 2009-03-12 às 11:49 -0700, Larry Wall escreveu:
: > In addition to what Jonathan said, it is possible that the ability
: > to coerce multiple arguments depends on the type itself, since we
: > probably want to allow
.$n).pick
In fact, given that you usually want to integerize anyway, I could
almost argue myself out of supporting the $n.rand form as well...
Larry
form, so the object's
> class decides how to dispatch methods.
>
>
> Is there an inconsistency here?
Different dot form. I was talking about :foo.(), :bar.[] and such,
which were removed from the spec some time ago, and are now actually
gone from STD.pm and t/spec, thanks to your++ bringing it up. :)
Larry
espond
to .eigenstates, which seems wrongish.
Larry
n, or at
least the road to Brain Pretzels Without End, amen.
In my opinion. :-)
Larry
bably smart enough to work around the presence of a
reserved--well, it's not even a reserved word-- a reserved method name.
If it would make people happier, I suppose we could change it to
something like .EIGENSTATES instead.
Larry
On Mon, Mar 16, 2009 at 09:24:58PM -0700, Jon Lang wrote:
: Darren Duncan wrote:
: > Jon Lang wrote:
: >> Larry Wall wrote:
: >>> This is basically a non-problem. Junctions have one public method,
: >>> .eigenstates, which is vanishingly unlikely to be used by accide
On Wed, Mar 18, 2009 at 06:32:18PM -0700, Jon Lang wrote:
: > + method !eigenstates (Junction $j: --> List)
:
: Shouldn't that be lowercase-j junction?
Maybe, though there might be a Junction role involved for subtype
matches like that one.
Larry
k you in advance for considering this request.
Well, yes, that would be pretty, but the big problem with it is that
it's terribly ambiguous, given that the other-ended form can also
start with a type. (I can think of at least five mechanisms to force
it to work, but they're all pretty ugly when we're trying to maintain
a predictive parser outside of opererator precedence expressions,
which this isn't one of.) It's also getting just a little dicey to
provide a *fourth* way to do something when we already have three.
Larry
http://www.wall.org/~larry/camelia.pdf
On Tue, Mar 24, 2009 at 09:49:42AM -0700, Jon Lang wrote:
: 2009/3/24 Larry Wall :
: > http://www.wall.org/~larry/camelia.pdf
:
: Cute. I do like the hyper-operated smiley-face.
:
: What I'd really like to see, though, is a logo that speaks to Perl's
: linguistic roots. Th
ngineered while metamorphizing and can change
the colors of her wings to match or contrast with her surroundings,
depending on whether she wants to hide or be noticed.
Camelia is terrifically excited to be considered for the Perl 6 mascot. :)
Larry
want versions of Camelia in her "attack"
mode, that's okay too. :)
And in fact, the >>ö<< form looks more like a Hyper Attack Butterfly
that is about to bite your face off... :)
Larry
On Wed, Mar 25, 2009 at 08:54:34AM -0400, Guy Hulbert wrote:
: On Wed, 2009-25-03 at 22:45 +1100, Timothy S. Nelson wrote:
: > Additionally, while you recommended Camelia for Rakudo, my
: > understanding was that Larry was recommending it for Perl 6 rather than
: > Rakudo.
it looks more like a perfect place for a multi-dimensional array of bits.
:)
Larry
On Wed, Mar 25, 2009 at 03:43:47PM -0400, Guy Hulbert wrote:
: On Wed, 2009-25-03 at 09:39 -0700, Larry Wall wrote:
: > On Wed, Mar 25, 2009 at 08:54:34AM -0400, Guy Hulbert wrote:
: > : On Wed, 2009-25-03 at 22:45 +1100, Timothy S. Nelson wrote:
: > : > Additionally, while you
reason not to allow such notation?
Because subsignatures within a signature match a single argument
with that subsignature, on the assumption that the argument is something
resembling a capture.
Larry
On Wed, Apr 01, 2009 at 08:40:12AM -0700, Dave Whipp wrote:
> That said, the semantics of a chained relop really should work correctly
> for this. If you only reference a junction once in an expression, then
> it should behave as such: {a
nterpolate a closure to force late
evaluation of a symbolic representation via any function of one's
choosing. This doesn't seem like something that will occur
frequently enough to need rehuffmanization.
Larry
worried about the performance
at this point.
Larry
ll
certainly need to refine this, and the suggested approach is certainly
a possible outcome, if we decide it's sufficiently unambiguous.
Larry
x27;t require the context declaration, it basically gives
any called routine carte blanche on modifying your variables, which
is probably a bad thing.
So leave it in for now, I guess.
Larry
On Fri, May 15, 2009 at 08:04:49PM -0500, John M. Dlugosz wrote:
> Larry Wall larry-at-wall.org |Perl 6| wrote:
>> On Fri, May 15, 2009 at 07:16:45PM -0500, John M. Dlugosz wrote:
>>
>>> Reading through S02, I see that contextual variables has changed in
>>>
forget on purpose if it's right after the
original checkin that introduced the typo, especially if it's my
own typo. :)
Larry
e former didn't seem to
: enter the spec either.
:
: So what should I do about that test? Simply delete it?
Yes, unless someone can think of a reason not to.
Larry
ng to do with UTF-16. Surrogate pairs are represented by a single
integer in NFG. That is, NFG is always abstract codepoints of some
sort without regard to the underlying representation. In that sense
it's not important that synthetic codepoints are negative, of course.
Larry
performance or policy consequences that would
be contraindicative...)
So as long as we stay inside these fundamental Perl 6 design
principles, feel free to whack on the specs.
Larry
, where you need to do things bytewise anyway; just trying to
: cover all the bases...)
Buf16 should work for raw UTF-16 just fine. That's one of the main
reasons we have buffers in sizes other than 8, after all.
Larry
ll list. (Or do adverbial blocks some magic smart
: matching that I'm not aware of?)
The grep itself does the smart matching:
@dogs = grep Dog, @mammals;
Larry
-when-I-do-this category.
Larry
pretty silly. Anyone with better
examples should feel free to edit the specs.
Larry
>
operator. One could fake it with a postfix:<|> macro that rewrites
the AST produces by the prefix, except no one implements macros yet.
But circumfix openers have to share longest-token space with prefixes.
You could maybe use broken bar instead, circumfix:<¦ ¦>.
Larry
That would be uber-cool.
More likely just use
sub infix:<·> (@a,@b) { ... }
$dot_product = @vector1 · @vector2;
Or some such.
Larry
e can process Unicode,
so it's fine to write */⍳n. :)
Note that that's the APL iota U+2373, not any of the other 30 or so
iotas in Unicode. :/ Well, okay, half of those have precomposed
accents, but still...
Larry
s the short name of the
function when prefixed by the noun marker &. Note that when you say
&func()
you are, in fact, using the noun &func as a verb.
Anyway, I suspect people are generally pretty good at differentiating
such things from the visual context.
Larry
lict with twigils and such, not to mention
alphabetic infixes. What would &xx mean?
Larry
will get used to seeing [+] and thinking "infix",
whereas <+> would always be causing double-takes by its similarity
to <=> and such.
Larry
On Thu, May 28, 2009 at 03:33:34PM -0400, Mark J. Reed wrote:
: On Thu, May 28, 2009 at 3:13 PM, Larry Wall wrote:
: > : I mean, prefix ops can be used in reduce, too, right?
: >
: > I will let you ponder the meaning of "reduce" a bit more, and the
: > relationship of
to download
> the metadata before downloading the source tree. This allows dependency
> resolution, searches, etc.
By the same token, it's smart to keep the metadata close to the thing
it's describing, so if it's easy to extract up front reliably, that's
probably sufficient.
Larry
going to fly.
But we're defining the differences between the behavior of $a and @a in
terms of how it desugars in context, so there's no need for the actual
binding to distinguish any extra levels of indirection. All it needs
to know is where to poke the pointer to the object. And normally @a
contains a list of poke-able pointers, so @a[0] := $x is fair game.
Larry
g as well as one-liners.
Which, of course, is not as solid as you think, since you left out the :
of the adverbial there... :)
So let's not make the mistake of thinking something longer is always
less confusing or more official.
Larry
thing.
(though I often use ^K<< in vim).
Larry
attitude of (much of) the Perl 5
community, but originally Perl succeeded because it *connected* with
everything else it could, not because it was trying to be an island
to itself. Perl was never supposed to be about drawing boundaries.
Larry
ely to scale. Let's all remember the old joke:
Biologist: What could possibly be worse than a velociraptor?
Physicist: Obviously, an acceloraptor.
Long term, acceloraptors tend to beat out velociraptors. Perl 6 is
all about being an acceloraptor. :)
Larry
@x=('a' .. 'z'); @x[3,4]=qw(DeeDee Ramone);
: say @x.splice(2,4).join(',')
: c,DeeDee,Ramone,f
That qw is not a good example of what still works, since it is supposed
to be interpreted as a qw subroutine (rakudo bug). I recommend square
brackets instead.
Larry
Can't help you with PGE, but STD supports a trace facility by
setting the STD5DEBUG environent variable to -1, or a set of bits
defined in src/perl6/Cursor.pmc in the pugs repo.
Note the log uses ANSI color, so you might want to use less -R
or some such.
Larry
.org/83873337> for a large graphic in several fonts.
Or feed it as an argument to this program, whereupon it will tell you
directly which character it is.
Larry
#!/usr/bin/perl -C
binmode STDOUT, ":utf8";
$pat = "@ARGV";
if (ord $pat > 256) {
$pat = sprintf(&q
On Fri, May 29, 2009 at 11:06:46PM -0700, Darren Duncan wrote:
> Larry, did you choose = for assignment and == etc for comparison because
> you thought that looked prettier, or because that was the C/etc
> convention that you decided to copy?
Neither beauty nor convention, really. I
rsuit
of some kind of completist agenda, which you know can never entirely
satisfy the mathematicians. :)
Larry
l the possible operators in non-strict mode, and turn
on the mode where methods can be specified by the first few unique
characters, and maybe turn off mandatory whitespace in a few spots. :)
Larry
tagmemically speaking, it's perfectly fine to *use* a hash
as if it were a set.
Larry
together. It's probably called something else when it drives
us apart. Please aim for the tensegrity, because I don't want to
figure out what to call the other.
Larry
ot sure. Currently a macro for an
infix would be given the AST of the left argument to play with, and
the opportunity to influence the parse of its right argument. This is
overkill for a mere alias. We may need to distingish single-token
substitution macros from macros that govern the ASTs around them in
order to make such operator canonicalization painless, I think.
Larry
*
Maybe they can't tell the diffence between "snowman" and "snow"?
(By the way, if you know any 日本人 named Yuki, they probably
write their name with 雪. Which is a really cool (no pun intended)
character--if you look at the two radicals, it basically means
precipitation you can grasp. :)
Larry
structure is basically what @@/slice context is for.
Larry
he shape of the
container unless explicitly defeated.
That is to say, if you erase the capture shape by putting the value
into list context, it linearizes it, and then the container knows
to reshape. Otherwise the container attempts to use the value slicily.
Larry
efficiency is going to be difficult to predict because
any of these could be poorly implemented and do too much busywork.
Apart from that, it's gonna come down primarily to what you think
is readable.
By the way, infix hypers want to go on both sides, like this:
%hash »=» 'some value';
Larry
h place...
I guess I can only suggest that you use .perl instead, for a minimal
serialization format. Or write your own explicit formatting and
serialization using .fmt calls.
Larry
in any case.
Maybe .push is really sugar for .=append, and unshift is really sugar
for .=prepend.
Larry
ingle element.
There's something slightly pleasing about the equivalence
@a = [1,2,3];
@a[] = 1,2,3;
Larry
ds borrowed from Perl 6, I'm not
inclined to change them that drastically. Much more likely to
define them as sugar for the more general list operators:
.push means .=append
.unshiftmeans .=prepend
.splice means .=impend:-)
or some such.
Larry
r completely to the mercy of GC, build a new one with the
appropriate structure, then copy values in from the assignment's RHS.
The only reason Perl 5 couldn't do it this way is that the idiot who
wrote it prematurely optimized values on the stack so that they didn't
need to be reference counted. :)
Larry
done with normal integers. In
other words, this is too much mechanism for too little payback.
Larry
e,
> but explanation order too.
I agree, and since you've got a pugs commit bit, feel free to fix it if
I don't get to it. I've got about three other fundamental design issues
distracting me at the moment, alas...
Larry
> needed behavior.
>
> This would also be useful to catch the case where you mistype the
> override method, and so have to go debug why you're still using the
> base-class (or role) version of the method.
Note we already have syntax that can be applied here:
supersede method fuse {...}
augment method fuse {...}
It only remains to spec what those mean... :)
Larry
t now reads:
Can't reduce cmp because structural infix operators are diffy and not chaining
In short, "chaining" is a good concept, but "non-chaining" is bad
(and doubly bad when it means two different things).
Larry
re
specifically defined in terms of the prior ones). Yes, I'm ignoring
a bunch of cool type theory when I say that. I'm hoping this will
make Perl 6 usable by non-geniuses without getting them into trouble
too terribly often. :)
But certainly a lot of the get-into-trouble examples involve $x++,
so we'll need to be careful with that particular monad^Wside effect.
Larry
.elems and @a[0].elems should both be 1, I suspect.
I wish we had a way of trapping and testing warnings too so we could
see that 3 elements were discarded by the inner list assignment..
Larry
On Tue, Jul 28, 2009 at 01:22:28PM -0700, Jon Lang wrote:
: Larry Wall wrote:
: > Moritz Lenz wrote:
: > : Either it's parsed as '@a[0] = (W, W)' (list assignment), then @a should
: > : get both elements, and so should @z.
: >
: > Not according to S03, at least
end up with exactly 3 elements, just as if I'd
said:
$a = 42;
$b = [1,2,3];
$c = { foo => 1, bar => 2, baz => 3 };
@a = $a, $b, $c;
Larry
the current definition
of $~MAIN is than it would have to look for $~Regex. But all the ~
twigil variables are working together to define the current lexical
scope's language in an interwoven fashion. Which is why we call
it a "braid" of languages.
Larry
Rakudo Zengi would be the most (in)appropriate, I think.
Larry
0 ... { $_ + 0.01 if $_ < 2.00 };
except that 1.00 .. 0.00 produces (), not 1.00. A more exact
translation might be
() ... -> $x = (1.00-0.01) { $x + 0.01 if $x < 2.00 };
I am currently assuming such loops will default to Rat rather than
Num for numbers that aren't too far off the beaten path, where
"on the beaten track" is defined as rats that fit into a pair of
int64s or so, that is, which can be represented with rat64.
Larry
rate the
range to produce individual values.
Larry
s. However, once you apply an explicit
: :by, I think you've gone past that abstraction, and it's no longer
: reasonable to expect that values that fall between your iterations will
: match.
Yes, I think it's fair to say that either list context OR a :by turns
a Range into a RangeIterator that matches like a list. Hence, this
ought to match:
(1,3,5) ~~ (1..5 :2by)
Larry
args = \($arg1, $arg2, $include_arg3 && $arg3, $arg4);
In this case the result of the && is its own parcel/capture
that waits until binding time to decide how to behave.
But I agree that it's a trap of sorts. My gut feeling is that it
won't happen often enough to become a FAQ, but I could be wrong.
Larry
part,
which is a tighter relationship than the mere juxtaposion of semicolon,
which leaves the reader to work out the relationship.
Larry
;s, and then
look up the remaining number to see if it's a power of 5.
So I'm inclined to make normal stringification also produce an exact decimal
by default and only failover to Num if .perl would produce the 1/3 form.
In the absence of an explicit format, I think exactness should trump
limiting the size of the resulting string arbitrarily.
Larry
t this, such as in a "terminology" section? "When the
> Perl 6 spec uses the word ... it means ..."
You must think I'm writing a *real* spec. :)
Larry
ifficulties:
Unsupported use of bare 'print'; in Perl 6 please use .print if you want
to print $_, or use an explicit argument at (eval) line 1:
--> for @list { print⏏ }
Larry
a
true value.
(Note that a constraint on the parameter of an "only" sub is already
mandatory, not discretionary, at least in the sense that the call
will fail if the binding is unsuccessful. So that probably falls
out naturally, though perhaps loses track of the failure message
currently.)
Larry
On Sat, Jan 09, 2010 at 12:51:42AM +0100, Carl Mäsak wrote:
: pugscommitbot, channeling Larry (>):
: > [...]
: > + $x = "Today" but Tue; # $x.Day is read-only
: > + $x = "Today" but Day; # $x.Day is read-write
: > +
: > +Mixing in a specific
gt; // Carl
: >
:
: $str.comb(/C|G/).join('').chars might do it. It's maybe not quite as
elegant...
Hmm, what might be more elegant? Maybe something like...
[+] $str.comb.Bag;
Probably does too much work building the Bag though, unless it can be
lazy somehow. But the point is that Bags are really just histograms
with a cute name.
Larry
Hard to know where to balance that. But in general, given that
you ought to have used the appropriate definitions in the first
place, I tend to bias in favor of catching typos no later than
CATCH time.
Hope this helps, or I just wasted a lot of time. :-)
Larry
On Mon, Feb 01, 2010 at 10:10:11AM -0800, yary wrote:
: A slight digression on a point of fact-
:
: On Mon, Feb 1, 2010 at 9:32 AM, Larry Wall wrote:
: ...
: > You are correct that the one-pass parsing is non-negotiable; this is
: > how humans think, even when dealing with unknown
in case of references in the traits, even before the block.
The block is too late to say "whoops, didn't mean it really." Pretty
much the same reason we changed "is also" to "augment". We want to
look up the name right now and know whether it should exist without
doing lookahead.
Larry
#x27;s "simple" only from the standpoint of the *user* of the
module. Module creators, on the other hand, should be acquainted
with the concept of vicarious suffering before they begin.
Larry
On Mon, Feb 01, 2010 at 06:12:16PM -0800, Jon Lang wrote:
: Larry Wall wrote:
: > But also note that there are several other ways to predeclare
: > types implicitly. The 'use', 'require', and 'need' declarations
: > all introduce a module name that is
27;ve been doing this for almost ten
years now, you need to be aware that almost anything you might suggest
has a good chance of having been discussed several times before. :-)
Larry
dmits things like
1,1,&[+] ... * # fib
And if we see
1,2,4 ... *
we can assume it means
1,2,4,* ... *
Likewise
1,2,4 ... 256
would really mean
1,2,4,* ... 256
Maybe I like it.
Larry
even that accommodation, since POSIX time is blissfully
unaware of leap seconds...
Sorry, you pushed one of my hot buttons. Grrr! :)
Larry
On Sat, Feb 20, 2010 at 06:20:22PM -0800, Steve Allen wrote:
: On Feb 19, 10:30 pm, la...@wall.org (Larry Wall) wrote:
: > 2000 would have been a lovely epoch if only the astronomers had kept
: > their grubby hands off of civil time.
:
: The astronomers might love to have the power to c
n governments for standing in the way
of progress...
Larry
On Mon, Feb 22, 2010 at 01:38:06PM -0300, Daniel Ruoso wrote:
: Em Dom, 2010-02-21 às 21:09 -0800, Larry Wall escreveu:
: > I now see that the most important determinant of DateTimes is
: > neither the Dates nor the Times themselves, but which TZ you're in.
: > I propose renaming
he whole world, and if you could,
you can't have it now. :)
Larry
' would have found it.
If any of you wants a greppable version of the specs, use svn to checkout
http://svn.pugscode.org/pugs
and then look in docs/Perl6/Spec.
Larry
been much different.
Incidentally, I programmed in Algol W on a Burroughs machine once,
long, long ago in a galaxy far away...
Larry
d also write that as:
$foo + ($bar)i
but that could be construed as clunkier. Or at least more typing.
Larry
1701 - 1800 of 3168 matches
Mail list logo