ers. We can't guess
(well, we *could* guess, but can't know) which way the user will want to
use these, so the conservative approach is to make neither of them work,
and let the user take an additive approach, rather than forcing them to
use a subtractive approach if we guessed wrong.
Larry
ut C or C
: or similar within the list on the left of the C<=>.
Er, why would normal assignment want to explain something that isn't normal?
Anyway, normal assignment is also explained in S03, albeit somewhat diffusely.
Larry
On Tue, Jul 24, 2012 at 09:42:10PM +0100, Smylers wrote:
: GitHub writes:
:
: >
https://github.com/perl6/specs/commit/d9d8b35825f7abf07a9314fd90b0b5563253bd15
: > Author: Larry Wall
: >
: > There is no more titlecase function. Instead there is a suite
: > of ma
On Fri, Mar 23, 2012 at 07:14:51PM +1100, Damian Conway wrote:
: For example:
:
: 1, 1.0001, 1.0002 ... *
:
: won't deduce a correct arithmetic sequence either (on most hardware).
Actually, that one works fine in both niecza and rakudo, since those are Rats.
Larry
Given that try can be used with a statement as well as a block, I'm
fine with this. We want to discourage people from using eval anyway,
so forcing people to use 'try eval' to get p5 behavior is okay too.
Larry
reference the appropriate chapters of the
: Unicode standard in the specification of Perl6. This would make
: Unicode test-cases reusable. And an implementation should always
: declare, which features of Unicode are implemented (and which not)
: in which version of Unicode.
We can certainly use a lot more work on the details, but the intent
should be clear that we want Perl 6 to be support world-class Unicode.
Larry
e-4 that complements the 4 that we have now for bases 2,8,16,10.
: >
: >You're joking, right?
:
: No, its a serious idea, just not so conventional. -- Darren Duncan
The lack of base 4 numbers in Real Life seems to me to justify the
convention. Do you have a use case?
Larry
is compatible with different
: version ranges from each authority, then how does the code express
: this?
Search for "emulates" in S11.
Larry
it must be written 3 ~~ (0...4). :-)
Larry
also false because 3 !eqv (0,1,2,3,4). There is no implicit any()
on a smartmatch list pattern as there is in Perl 5. In Perl 6 the
pattern 0..4 may only match a list with the same 5 elements in the
same order.
Larry
x27;s even a way to compare
: snapshots of all the types that were 'but'ed in to the base type,
: but I don't know how feasible that is.
Or going the other direction, perhaps we're missing a primitive that
can produce a data structure with the type information stripped, and
then eqv might be able to determine structural equivalence between
two canonicalized values.
Larry
l the switches with *%args and then do your own key
matching with the <*name> forms, assuming it's implemented, and
plays nice in alternations, LTMishly speaking.
Larry
it belongs, and not
somewhere else. And that is why threading of *any* kind will work
much better in Perl 6.
Larry
Since I don't think BrowserUK subscribes here, I'll paste in the remarks
he attached to your earlier paste, just to help get the discussion going,
and on the assumption this will not be regarded as antisocial. :)
Larry
BrowserUK wrote:
>
> -there are the inter
d, I'd run a ps that dumped as much of the internal state of the
OS as possible (including various fast-changing internal tables),
and then hash that. In strength it was probably somewhere between
/dev/random and /dev/urandom.
Larry
s for any method names that look wrongish. The difference
between Acme-X and Acme_X is no worse than the difference between
Damian and Damien, at least in Levenshtein distance.
Larry
scope can also set up its own lexically
scoped random functions that will override anything in the language,
if you want to do stuff cross-thread. Or just set up a generator
outside your threads that is shared via an outer lexical.
We've got enough rope to hang ourselves differently every day of
the week, with some left over for next week.
Larry
of switching enums to this form for some time,
and this may tip me over the edge. (Presuming of course that I wasn't
tipped over the edge many years ago...)
Larry
On Tue, Apr 06, 2010 at 10:19:15PM -0700, Damian Conway wrote:
: Larry concluded:
:
: > I do freely admit that most Perlfolk are not used to thinking of
: > permissions in terms of set theory. But as I said, we're looking at
: > kind of a strange use case here, and perhaps not
kinda hope we can get a bit further away from the machine code
level of reality one of these decades. Perl 6 should not be
optimized for C semantics.
Larry
set type is
actually a feature. Most of the time you'd be coercing a bunch of
members all at once to a set, and just doing set theory from there.
Or maybe the membership ops such as ∋ can just be smart about such
bitwise members.
Larry
And most of the nitty-gritty design work is actually happening on
IRC these days, in direct response to the implementors woes.
Blue sky notions are fine here, but please realize that that is what
they are, and please don't torment my developers any more than I'm
already tormenting them. :)
Larry
d also write that as:
$foo + ($bar)i
but that could be construed as clunkier. Or at least more typing.
Larry
been much different.
Incidentally, I programmed in Algol W on a Burroughs machine once,
long, long ago in a galaxy far away...
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
he whole world, and if you could,
you can't have it now. :)
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
n governments for standing in the way
of progress...
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
even that accommodation, since POSIX time is blissfully
unaware of leap seconds...
Sorry, you pushed one of my hot buttons. Grrr! :)
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
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
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
#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
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
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
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
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
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
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
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
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
;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
part,
which is a tighter relationship than the mere juxtaposion of semicolon,
which leaves the reader to work out the relationship.
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
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
rate the
range to produce individual values.
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
Rakudo Zengi would be the most (in)appropriate, I think.
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
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
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
.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
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
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
> 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
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
done with normal integers. In
other words, this is too much mechanism for too little payback.
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
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
ingle element.
There's something slightly pleasing about the equivalence
@a = [1,2,3];
@a[] = 1,2,3;
Larry
in any case.
Maybe .push is really sugar for .=append, and unshift is really sugar
for .=prepend.
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
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
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
structure is basically what @@/slice context is for.
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
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
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
tagmemically speaking, it's perfectly fine to *use* a hash
as if it were a set.
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
rsuit
of some kind of completist agenda, which you know can never entirely
satisfy the mathematicians. :)
Larry
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
.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
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
@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
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
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
thing.
(though I often use ^K<< in vim).
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
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
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
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
will get used to seeing [+] and thinking "infix",
whereas <+> would always be causing double-takes by its similarity
to <=> and such.
Larry
lict with twigils and such, not to mention
alphabetic infixes. What would &xx mean?
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
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
That would be uber-cool.
More likely just use
sub infix:<·> (@a,@b) { ... }
$dot_product = @vector1 · @vector2;
Or some such.
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
pretty silly. Anyone with better
examples should feel free to edit the specs.
Larry
-when-I-do-this category.
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
, 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
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
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
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
forget on purpose if it's right after the
original checkin that introduced the typo, especially if it's my
own typo. :)
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
>>>
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
ll
certainly need to refine this, and the suggested approach is certainly
a possible outcome, if we decide it's sufficiently unambiguous.
Larry
1 - 100 of 3168 matches
Mail list logo