Use {...}. as the string returned is reinterpreted as a regex, if it consists
of the single quoted string then it's a literal, but you must include the
single quotes in the result returned. E.g.,
{ my $x = funct($a, $b, $c); '$x';}
Mark Biggar
--
m...@biggar.org
mark.a.big...@comcast.net
mbig
can be reasonably
argued to be any of 5 different days. This is why bank contracts are always to
be written to say 30, 60 or 90 days not 1, 2 or 3 months from now.
--
Mark
Biggar%0D%0Amark%40biggar.org%0D%0Amark.a.biggar%40comcast.net%0D%0Ambiggar%40paypal.com
as far as possible if used as non-pair.
This makes sense to me, but I'd like to see any use cases to the
contrary, if anyone can think of one.
The only use case I can think of is sorting a list of pairs;
should it default to sort by key or value?
--
Mark Biggar
m...@biggar.org
mark.a.big
oops make that
last if !someCondition();
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-- Original message --
From: [EMAIL PROTECTED]
loop {
doSomething();
next if someCondition();
doSomethingElse();
}
--
Mark Biggar
The literals for Bit are just 0 and 1.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-- Original message --
From: Carl Mäsak [EMAIL PROTECTED]
Darren ():
Bit
Blob
Set
Bag
Mapping
How does one write anonymous value
Perl 6 out the door. Let's just make sure we're handling
inf and -inf right and leave all that other stuff until later.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Let's worry about getting principal values, branch cuts and handling signed
zeros correct before dealing with the interaction of junctions and multi-valued
complex functions.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Most financial institutions don't use float, rational or fixed point, they just
keep integer pennies.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-- Original message --
From: Larry Wall [EMAIL PROTECTED]
Would any financial institution
Carl Mäsak wrote:
John ():
I'm still in the dark... I find an positions for manhattan distance but no
definition of what that is. I did find the alternative pod page earlier.
I don't have a whole answer for you, but a part that may help. What is
generally meant by Manhattan distance is
presence of a role,
then falls back to a declared class inheritance and then falls
back to a declared emulation. What else should be in this check
sequence?
Do we need to consider boxed vs un-boxed, E.G. Int vs int?
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
been cut.
And sometime you can't even do it syntactically:
Time flies like an arrow.
Fruit flies like a banana.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Perl doesn't
quite meet that because of inferred method dispatch on .new(). you need to
change
my Dog $spot = .new();
to
my $Spot = Dog.new();
when you remove the declaration.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-- Original message
Miller, Hugh wrote:
From: Moritz Lenz [mailto:[EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Technically the Cartesian cross operator doesn't have an
identity value.
It has.
The set which contains only the emty set, or in perl terms ([]);
Or am I missing something?
Should be a (any) 1 point set
Technically the Cartesian cross operator doesn't have an identity value. There
is no set X such that
A x X = A. Now any singleton set gives a result that is naturally isomorphic
to the original set, I.e, there is a obvious bijection between the two sets,
but they are not equal sets.
--
Mark
Cartesain product with the empty set is empty. A x B is the set of all pairs
(a,b) where a is in A and b is in B. If either is empty then there are no such
pairs and the result is also empty.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-- Original message
Mark J. Reed wrote:
I'm a believer in generalizing where possible, modulo the principles
of KISS and YAGNI. The latter essentially means at least make it
general enough that you can extend it later without major retooling if
it turns out YNIAA.. It's pretty surprising what can turn out to be
I think nearest makes more sense. People will be really surprised when
/1 turns into 0.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-- Original message --
From: TSa [EMAIL PROTECTED]
HaloO,
just re-reading S03 I saw
Besides ?? !! with out an else part is just .
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-- Original message --
From: Damian Conway [EMAIL PROTECTED]
Mark J. Reed concluded:
So I prefer keeping a single construct, but perhaps
Thomas Wittek wrote:
Damian Conway schrieb:
If the very much more readable 'zip' and 'minmax' are
to be replaced with 'ZZ' and 'MM', then I think that's a serious step
backwards in usability.
Fully agree here and I think that there are still even more places,
where the usability could be
And you may be forced to deal with NaN and Inf values if you are storing raw
binary float values as they are built into the bit patterns.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-- Original message --
From: Mark J. Reed [EMAIL
compared using
the Complex version of = gives the same result as using the Num version of
=. Note that you need this to work that way if you want Num to be a
subtype of Complex.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-- Original message --
From: Jonathan Lang [EMAIL PROTECTED]
Mark Biggar wrote:
Jonathan Lang wrote:
They can be:
$A $B if $A.x $B.x | $A.y $B.y;
$A $B if $A.x $B.x | $A.y $B.y;
That dosn't work.
Agreed. The above was written
the diamond inheritence problem.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-- Original message --
From: TSa [EMAIL PROTECTED]
HaloO,
with my idea of deriving a type lattice from all role definitions
the problem of subtyping signatures arises
second type may want to be treated as reserved, or at least mention that
redefining them may break things in surprising ways.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-- Original message --
From: Patrick R. Michaud [EMAIL PROTECTED
Carl Mäsak wrote:
Yobert Hey do you know what would be cool in perl 6
Yobert A special variable for when you do a for (@array) style loop
Yobert it would always have the index of the array
Discussed on #perl6: it's already quite easy in Perl 6 to loop with an
explicit index:
my @array = moose
or -1.
Mark Biggar
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Darren Duncan wrote:
Now, I didn't see them yet anywhere in Synopsis 3, but I strongly
recommend having negated versions of all these various types of equality
tests. Eg, !== for ===, nev for eqv, etc. They would be used very
frequently, I believe (and I have even tried to do so), and of
:
filter (list [] @array) @array ==
first monotonically increasing run in @array
filter (list [=] @array) @array ==
first monotonically non-decreasing run in @array
That was 5 minutes of thinking.
Mark Biggar
--
[EMAIL
Markus Laire wrote:
ps. Should first element of scan be 0-argument or 1-argument case.
i.e. should list([+] 1) return (0, 1) or (1)
APL defines it as the later (1).
--
[EMAIL PROTECTED]
[EMAIL PROTECTED]
:
filter (list [] @array) @array ==
first monotonically increasing run in @array
filter (list [=] @array) @array ==
first monotonically non-decreasing run in @array
That was 5 minutes of thinking.
Mark Biggar
--
[EMAIL PROTECTED
How about Bag, a set container? Alternately what we really want is
just a Hash where the type of the value is defined as 1, so it need
not be stored at all. Then most of the syntax for it just falls out
of Hash syntax, unless you like writing $x ∈ $bag instead of $bag{$x}.
Presumably we
Isn't this what POD is for?
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-- Original message --
From: Ruud H.G. van Tol [EMAIL PROTECTED]
Perl6 could introduce (lexical, nestable) comment scope.
Has that been discussed before
of signed zero correct then to worry about trying to return multiple
values in these cases. For a through discussion see either the Ada or
Common Lisp reference manuals.
Mark Biggar
--
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Damian Conway wrote:
Rather than addition Yet Another Feature, what's wrong with just using:
for @list ¥ @list[1...] - $curr, $next {
...
}
???
Damian
Shouldn't that be:
for [EMAIL PROTECTED], undef] ¥ @list[1...] - $curr, $next {
...
}
As I remember it zip hrows
Mark A. Biggar wrote:
Damian Conway wrote:
Rather than addition Yet Another Feature, what's wrong with just using:
for @list ¥ @list[1...] - $curr, $next {
...
}
???
Damian
Shouldn't that be:
for [EMAIL PROTECTED], undef] ¥ @list[1...] - $curr, $next
In a private conversation with Larry this afternoon, he said that by
default $foo and ~$foo and $foo.as(Str) all give the same result
(assuming scalar context, etc.). And that @foo[] and [EMAIL PROTECTED] and
@foo.as(Str) are the same as join(' ', @foo) where join is effectively:
sub
Eric wrote:
Hey,
Since you wouldn't expect an object to stringify or numify why expect pairs
to? I'm not sure i see any value in thatm, $pair.perl.say would be the best
way to output one anyway.
my $pair1 = (a = 2);
my $pari2 = (b = 3);
say $pair1 + $par2; # Error: illegal stringification of
meaning.
besides if you really want it just define a macro.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Today on #perl6 I complained about the fact that this is always
inelegant:
if ($condition) { pre }
unconditional midsection;
if ($condition
I think this deserves at least a compile time warning and also a strict pragma
to make it an error as it is most likely not what the programmer wanted.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Ingo Blechschmidt skribis 2005-08-31 13:22 (+):
@array
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED] On Wed, Aug 17, 2005 at 08:47:18AM -0700, Larry Wall wrote:
: That could be made to work by defining constant to mean you can assign
: to it if it's undefined. But then it gets a little harder to reason
: about it if $pi
Nicholas Clark wrote:
On Tue, Jul 05, 2005 at 06:47:41PM -0600, zowie wrote:
There is also a certain joy that comes from noticing that a tool was
designed by pedants:
it's great that cal(1) handles the Gregorian reformation correctly
(or at least, in one
of several arguably correct ways)
Luke Palmer wrote:
On 8/10/05, Dave Rolsky [EMAIL PROTECTED] wrote:
[changing the subject line for the benefit of the summarizer ...]
On Wed, 10 Aug 2005, Larry Wall wrote:
And now some people will begin to wonder how ugly set values will look.
We should also tell them that lists (and
Mark A. Biggar wrote:
Luke Palmer wrote:
On 8/10/05, Dave Rolsky [EMAIL PROTECTED] wrote:
[changing the subject line for the benefit of the summarizer ...]
On Wed, 10 Aug 2005, Larry Wall wrote:
And now some people will begin to wonder how ugly set values will look.
We should also tell
Larry Wall wrote:
On Wed, Jul 27, 2005 at 06:28:22PM +0200, TSa (Thomas Sandlaß) wrote:
: Since we are in type hierachies these days, here's my from ::Any
: towards ::All version.
That's pretty, but if you don't move Junction upward, you haven't
really addressed the question Autrijus is asking.
Luke Palmer wrote:
On 14 Jun 2005 06:07:10 -, David Formosa (aka ? the Platypus)
[EMAIL PROTECTED] wrote:
multi sub infix_circumfix_meta_operator:{'',''} (Hash %a,Hash %b,Code $op) {
my Hash %return;
for intersection(keys %a,keys %b) - $key {
%return{$key} =
, unless we can come up with
cases that really need anything more complicated.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-- Original message --
On Sat, May 28, 2005 at 12:58:01AM -0400, Jeff 'japhy' Pinyan wrote:
[ set notation for character
Jonathan Scott Duff wrote:
On Tue, May 24, 2005 at 11:24:50PM -0400, Jeff 'japhy' Pinyan wrote:
I wish !prop X was allowed. I don't see why !... has to be confined
to zero-width assertions.
I don't either actually. One thing that occurred to me while responding
to your original email was
Jeff 'japhy' Pinyan wrote:
On May 25, Mark A. Biggar said:
Jonathan Scott Duff wrote:
On Tue, May 24, 2005 at 11:24:50PM -0400, Jeff 'japhy' Pinyan wrote:
I wish !prop X was allowed. I don't see why !... has to be
confined to zero-width assertions.
I don't either actually. One thing
wolverian wrote:
On Tue, May 24, 2005 at 03:44:43PM +0200, Juerd wrote:
But I like the newly suggested feather better, as it can relate to
pugs AND parrot.
Feather is best one thus far, I think. I like carrot too; it's more
playful. I equate Pugs with fun a lot.
How about budgie. a small
)*B + (A rem B)
where (A rem B) has the sign of A and an absolute value less than the
absolute value of B. Signed integer division satisfies the identity:
(-A)/B = -(A/B) = A/(-B)
It does have a right side identity of +INF.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED
John Macdonald wrote:
Is there a built-in operator that doesn't have a meaningful
identity value? I first thought of exponentiation, but it has
an identity value of 1 - you just have to realize that since
it is a right associative operator, the identity has to be
applied from the right.
Well the
Mark A. Biggar wrote:
Well the identity of % is +inf (also right side only).
I read $n % any( $n..Inf ) == $n. The point is there's no
unique right identity and thus (Num,%) disqualifies for a
Monoid. BTW, the above is a nice example where a junction
needn't be preserved :)
If as usual
Matt Fowles wrote:
All~
What does the reduce metaoperator do with an empty list?
my @a;
[+] @a; # 0? exception?
[*] @a; # 1? exception?
[] @a; # false?
[||] @a; # false?
[] @a; # true?
Also if it magically supplies some correct like the above, how does it
know what that value is?
The usual
Stuart Cook wrote:
To summarise what I think everyone is saying, []-reducing an empty
list yields either:
1) undef (which may or may not contain an exception), or
2) some unit/identity value that is a trait of the operator,
depending on whether or not people think (2) is actually a good idea.
The
empty string and there won;t be a empty string in the list before it,
I.e,
split /(..)/, 12345 returns (''. '12', '', '34', '5');
This is another of those cases where the computer did exactly what you ask it
to.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Autrijus Tang
peren counting semantics.
I wonder how much call there will be for a rule option that uses P6
syntax but P5 paren binding with push semantics.
Just add a :flat
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
On Mon, May 09, 2005 at 02:08:31PM -0500, Patrick R. Michaud wrote:
: Hmmm, then would $x.$j.2 then be equivalent to $x[$j-1][1] ?
Ouch.
Larry
Juerd wrote:
Juerd skribis 2005-05-06 18:24 (+0200):
|AVAILABLE any()
We can use this for labels:
|foo| for ... {
while ... {
...;
next foo if ...;
}
}
It'll confuse the heck out of Ruby coders, but I do like this syntax. It
makes
Matt wrote:
On Sat, 23 Apr 2005 07:25:10 -0400, Juerd [EMAIL PROTECTED] wrote:
Matt skribis 2005-04-22 21:55 (-0400):
What about . for each level up you want to go?
instead of 1.say, 2.say, 3.say
you use .say, ..say, ...say
(Ok, I'm just kidding.. really!)
I read your message after I suggested
Larry Wall wrote:
I should point out that we're still contemplating breaking .foo() so it
no longer means $_.foo(). I wish there were more keys on my keyboard...
I know it's a bit counter-cultural, but at the moment I'm wondering
if we can make this work instead:
given open 'mailto:[EMAIL
Rod Adams wrote:
Ashley Winters wrote:
For documentary purposes, can we make that $radians?
multi sub cos (Num +$degrees) returns Num {
return cos :radians($degrees * PI / 180);
}
my Num $x = cos :degrees(270);
I have changed the trig functions it to have an optional base
argument. (I'm
stuff grab :-)
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-- Original message --
On Mon, Dec 06, 2004 at 10:45:22AM -0500, Austin Hastings wrote:
: But I'd be willing to rename them to get/put.
If I went with get, the opposite would
Jonadab the Unsightly One wrote:
Jonathan Lang [EMAIL PROTECTED] writes:
ISAM?
From the RDBMS world, a kind of index I think, or something along
those lines. MySQL for example has a type of table called MyISAM.
Index Sequential Access Method
Invented by IBM in the '60s, provides fast random
be easily a
dded to POD. Something like:
=(1.2.1) begin ...
just default any unspecified values to incrementing the last one.
A simple POD processor could just ignore them and a fancy one could
use them to reorder the section accordingly.
--
Mark Biggar
[EMAIL PROTECTED]
Rafael Garcia-Suarez wrote:
Michele Dondi wrote:
I must say I've still not read all apocalypses, and OTOH I suspect that
this could be done more or less easily with a custom function (provided
that variables will have a method to keep track of their history, or, more
reasonably, will be *allowed*
Sorry I did mean temp.
--
Mark Biggar
[EMAIL PROTECTED]
-- Original message --
Mark A. Biggar skribis 2004-06-29 9:07 (-0700):
Besides we already have MTOWTDI with local() and hypotheticals.
I thought temp replaced local. If not, how do they differ? (is temp
. If I'm in the perl debugger, I'd want that to be a breakpoint
and give me the option to type in a evaluable string to replace it. So it should
throw a properly marked exception that an outer context can do something
with.
--
Mark Biggar
[EMAIL PROTECTED]
Brent 'Dax' Royal-Gordon wrote:
chromatic wrote:
Perl.com has just made A12 available:
I started reading it last night, and ended up going to bed before I was
finished. But I just wanted to say that this:
With this dispatcher you can continue by saying next METHOD.
is the sort of
Brent 'Dax' Royal-Gordon wrote:
chromatic wrote:
Perl.com has just made A12 available:
I started reading it last night, and ended up going to bed before I was
finished. But I just wanted to say that this:
With this dispatcher you can continue by saying next METHOD.
is the sort of
for that to
work. As Dan said this really need a separation between encoding and character set.
--
Mark Biggar
[EMAIL PROTECTED]
At 12:28 AM +0100 3/16/04, Karl Brodowsky wrote:
Anyway, it will be necessary to specify the encoding of unicode in
some way, which could possibly allow even to specify even
Damian Conway wrote:
Mark A. Biggar wrote:
What if I want to interpolate an empty string and let the fill
characters work?
Then you interpolate a single fill character instead of the empty string.
But that means I have to pre-process data lists that just happen to
contain empty strings so
Larry Wall wrote:
On Sat, Feb 28, 2004 at 11:59:15AM -0800, Gregor N. Purdy wrote:
: Smylers --
:
: So, what I'm looking for is more explicit phrasing around immediately
: above. In the example, the column range for the overflow field is
: exactly the same as that of the $method field in the
Luke Palmer wrote:
Mark A. Biggar writes:
Larry Wall wrote:
On Sat, Feb 28, 2004 at 11:59:15AM -0800, Gregor N. Purdy wrote:
: Smylers --
:
: So, what I'm looking for is more explicit phrasing around immediately
: above. In the example, the column range for the overflow field is
: exactly
Damian Conway wrote:
Mark A. Biggar wrote:
Expect wouldn't that produce a extra blank line if $text is short?
Nope. Formats only generate text lines if at least one of their fields
interpolates at least one character.
Damian
What if I want to interpolate an empty string and let the fill
OOPS, totally miss-read your code, ignore my first part of my last
message.
--
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Luke Palmer wrote:
I was reading the most recent article on perl.com, and a code segment
reminded me of something I see rather often in code that I don't like.
Here's the code, Perl6ized:
... ;
my $is_ok = 1;
for 0..6 - $t {
if abs(@new[$t] - @new[$t+1]) 3 {
Austin Hastings wrote:
-Original Message-
From: Luke Palmer [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 02, 2003 10:23 PM
To: Jeff Clites
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: The Block Returns
Jeff Clites writes:
Speaking to the practical side, I have written code
Jonathan Scott Duff wrote:
On Thu, Oct 02, 2003 at 11:39:20AM +0100, Dave Mitchell wrote:
On Thu, Oct 02, 2003 at 04:15:06AM -0600, Luke Palmer wrote:
So the question is: What happens when indexof isn't on the call chain,
but that inner closure is?
But how can the inner closure be called if not
Alex Burr wrote:
[EMAIL PROTECTED] (Luke Palmer) writes:
I would hope the former. However, what about this compile-time
integral power macro[1]?
macro power ($x, $p) {
if $p 0 {
{ $x * power($x, $p-1) }
}
else {
{ 1 }
}
}
That would
On Mon, Jun 09, 2003 at 01:26:22PM +0100, Piers Cawley wrote:
Multimethod dispatch?
Assuming I'm not misunderstanding what Adam is after, this has come up
before (I think I asked about value based dispatch a few months back)
and I can't remember if the decision was that MMD didn't
80 matches
Mail list logo