On Thu, Jun 16, 2005 at 10:28:26PM +, Luke Palmer wrote:
: You know, before I read this part of the message, I was thinking
: precisely that. Nullary splat should do it, so that @foo[*] will
: work. Unary splat would of course get our favor if it can be
: interpreted that way, but in cases
On Fri, Jun 17, 2005 at 04:41:53AM +0100, Piers Cawley wrote:
: Suppose I have a simple, single argument recursive function:
:
: sub factorial (Int $n) {
: return 1 if $n == 0;
: return $n * factorial $n;
: }
:
: Can I write that as:
:
: sub factorial (Int $n:) {
: return 1
On Fri, Jun 17, 2005 at 09:03:57AM -0500, Patrick R. Michaud wrote:
: Is '::' acting as a sigil here?
Yes.
: rule variable { sigil name [ \( siglet \) ]? }
: rule sigil { [EMAIL PROTECTED]] [*.:?^=]? }
rule sigil { [ [EMAIL PROTECTED]] | '::' ] [*.:?^=]? }
which
On Thu, Jun 16, 2005 at 05:18:51PM -0400, John Siracusa wrote:
: Now in Perl 6 I'll want to use fancy named parameters and so on, but I don't
: want to lose the abilities described above. How would those examples look
: in native Perl 6 code? (i.e., Without forcing all methods to have a
: single
On Fri, Jun 17, 2005 at 03:56:50AM +0800, Autrijus Tang wrote:
:
: my $x = 3;
: my $y = \$x;
: say $y + 10;
: $y++;
: say $y;
: say $x;
:
: Currently in Pugs they print:
:
: 13
: 4
: 3
:
: Is this sane? What is the scalar reference's semantics in face of a
On Fri, Jun 17, 2005 at 02:29:08PM -0500, Rod Adams wrote:
: Don't you mean:
:
:13
:4
:4
:
: ?
Er, yes. Sorry I've been spouting vaguely incoherent spoutings this
week, but I've been up several times every night trying to deal with a
masked bandit that likes to sneak in the cat
On Thu, Jun 16, 2005 at 05:40:31PM +0800, Autrijus Tang wrote:
: Currently in Pugs *zip has no signature -- it simply rewrites its
: arguments into the listfix (i.e. Y) function.
:
: That is bad because it can't be introspected, and you can't define
: something like that yourself. It also makes
was aiming at
with the Pipe declaration.
: On Thu, Jun 16, 2005 at 08:53:41AM -0700, Larry Wall wrote:
: The semicolon operator no longer builds a list of lists, but a list
: of pipes, which are specially marked Lazies that know they came from
: pipe operators (including semicolons as a kind of pipe
On Thu, Jun 16, 2005 at 01:05:22PM -0700, Dave Whipp wrote:
: Larry Wall wrote:
: You must
: specify @foo[[;[EMAIL PROTECTED] or @foo[()] == @bar to get the special
mark.
:
: I'm uncomfortable with the specific syntax of @a[()] because generated
: code might sometimes want to generate
Y'all are getting hung up on the correspondence of words with word
characters, but you're ignoring the fact that most of the time people
want to do awk's version of splitting, matching \S+ words rather than \w+
words (*neither* of which actually matches what people usually mean
by words, in any
On Tue, Jun 14, 2005 at 04:13:08PM +0200, Chip Salzenberg wrote:
: It therefore would a Bad Thing if ?CALLER::BLOCK worked generally.
: If the caller _is_ a block that was already marked at compile time as
: requiring full sub properties then, of course, it's no problem to use
: the syntax
On Tue, Jun 14, 2005 at 02:06:37PM +0200, BÁRTHÁZI András wrote:
: Hi,
:
: As I know, for binding, you can use the := operator, and just this:
:
: $a := $b;
:
: I would like to make a proposal, based on Ruby[1]:
:
: alias $a, $b;
You can always write a macro that does that.
: It's a fun:
On Tue, Jun 14, 2005 at 12:33:34PM +, Ingo Blechschmidt wrote:
: Hi,
:
: sub proxy () is rw {
: return new Proxy:
: FETCH = { 42 },
: STORE = - $new { 23 };
: }
:
: say proxy();# 42
: say proxy() = 40; # 40, 23, or 42?
:
: Currently I think the
On Tue, Jun 14, 2005 at 09:38:43AM -0400, Joshua Gatcomb wrote:
: On 6/13/05, Patrick R. Michaud [EMAIL PROTECTED] wrote:
:
: Since it might not have been clear from my earlier post -- I've
: now committed the S17 framework draft into the repository. Thanks.
:
: I am now questioning using
On Tue, Jun 14, 2005 at 04:25:17PM +0200, Chip Salzenberg wrote:
: On Tue, Jun 14, 2005 at 03:43:42PM +0200, TSa (Thomas Sandlaß) wrote:
: The syntax might just be:
:
: is_equal:(Integer $a, Integer where { $_ == $a } :)
:
:
: It's a new type object every time, so every time you run that
On Tue, Jun 14, 2005 at 10:31:58PM +0200, Ingo Blechschmidt wrote:
: You can use
: say [~] @array; # abcd or
: say @array.join();# abcd or
: say join , @array;# abcd
: if you want to supress the spaces.
I think a bare @array.join should also work.
Larry
On Tue, Jun 14, 2005 at 11:33:21PM +0200, Juerd wrote:
: You suggested cat as a join assuming '' in an old thread. I still like
: that idea.
:
: [ 'a' .. 'e' ].join # a b c d e
: [ 'a' .. 'e' ].cat# abcde
I had forgotten that. Yes, there is a little something to be
said for
On Mon, Jun 13, 2005 at 05:25:59PM +0200, Ingo Blechschmidt wrote:
: just checking: Are anonymous macros allowed?
I have no problem with macros being first-class objects during
the compile. Though the macro itself may have a problem with your
passing it '3' when it is likely expecting an AST.
You shouldn't be able to reopen/clobber an existing class/module unless
you specify
class Object is augmented {...}
class Object is replaced {...}
or some such (the trait names are still negotiable). In general,
private classes should start with my or our, though I don't know
if Pugs
On Sat, Jun 11, 2005 at 03:38:28AM -, David Formosa (aka ? the Platypus)
wrote:
: From my exprence
: with perl5 and from playing around with pugs I've noticed that when
: eval(Str $evalstring) is used I mostly use it like this (in perl5)
:
: eval ...; Or
:
: eval __EVALEND__;
: ...
:
On Sat, Jun 11, 2005 at 02:23:10PM -0700, Chip Salzenberg wrote:
: STM is Software Transactional Memory. It's wicked cool. Really.
: Google it. You'll be glad you did.
I'm particularly interested by the scalability of
http://www.cambridge.intel-research.net/~rennals/faststm.html
(There's
On Wed, Jun 08, 2005 at 12:37:22PM +0200, TSa (Thomas Sandlaß) wrote:
: BTW, is - on the 'symbolic unary' precedence level
: as its read-only companion \ ?.
No, - introduces a term that happens to consist of a formal signature
and a block. There are no ordinary expressions involved until you
get
On Wed, Jun 08, 2005 at 11:40:49AM +0200, TSa (Thomas Sandlaß) wrote:
: Damian Conway wrote:
: So, to clarify again, if $var is undefined, then the assignment:
:
: $var op= $value;
:
: is equivalent to:
:
: $var = (op.does(identval) ?? op.identval() :: undef) op $value;
:
: Correct?
:
On Tue, Jun 07, 2005 at 10:52:55PM +, Luke Palmer wrote:
: Okay, I was referring more to the implementation. How do we tell apart:
:
: 3 4 = 5 == 5
:
: From
:
: 3 lt 4 = 5 != 5
:
: ?
As long as the actual arguments aren't allowed to be lazy/thunky/iteratey,
they can just be
On Sun, Jun 05, 2005 at 10:22:16PM +0200, Ingo Blechschmidt wrote:
: Hi,
:
: two quick questions:
:
:
: Are multi submethods allowed?
Presumably.
: my $x = undef;
: my $y = $x.some_method;
: # $y now contains an unthrown exception object, saying that undef
: # doesn't
On Wed, Jun 08, 2005 at 09:21:38PM +0300, Gaal Yahas wrote:
: A06 and S06 are in disagreement about the caller builtin, and I need
: help understanding either one.
:
: A06 [plus updates] stipulates this signature for caller:
:
: multi *caller (?$where = ?CALLER::SUB, Int +$skip = 0, Str +$label)
On Wed, Jun 08, 2005 at 03:57:14PM +1000, Adam Kennedy wrote:
: What I'd like to see for Perl 6 (and I'm not sure if this exists
: already), is some sort of minimal event manager.
There will certainly be an event manager for all sorts of events floating
around in Perl 6. The main trick will be
On Wed, Jun 08, 2005 at 10:51:34PM +, Luke Palmer wrote:
: Yeah, that's pretty. But that will bite people who don't understand
: continuations; it will bite people who don't understand return; it
: will even bite people who understand continuations, because they can
: be made in such an
On Wed, Jun 08, 2005 at 11:04:30PM +0300, Gaal Yahas wrote:
: On Wed, Jun 08, 2005 at 12:29:33PM -0700, Larry Wall wrote:
: There will certainly be an event manager for all sorts of events floating
: around in Perl 6. The main trick will be to hide this from the people
: who aren't interested
Okay, I've made up my mind. The err option is not tenable because
it can cloak real exceptions, and having multiple versions of reduce is
simply multiplying entities without adding much power. So let's allow
an optional identvalue trait on operators. If it's there, reduce
can use it. If it's
On Tue, Jun 07, 2005 at 09:41:49PM +, Luke Palmer wrote:
: and still don't make sense as reduce operators.
Yeah, I keep confusing them with min and max.
: That reminds me, how are , , etc. defined anyway? How can we tell
: them to be list-associative with each other?
Because they're all
On Mon, May 23, 2005 at 08:54:19PM +, [EMAIL PROTECTED] wrote:
:
: There are actuall two usefull definition for %. The first which Ada calls
'mod' always returns a value 0=XN and yes it has no working value that is an
identity. The other which Ada calls 'rem' defined as follows:
:
:
On Thu, May 26, 2005 at 11:19:42AM -0500, Patrick R. Michaud wrote:
: Do we still have the rule syntax, or was that abandoned in
: favor of ?rule ? (I know there are still some remnants of ...
: in S05 and A05, but I'm not sure they're intentional.)
It's gone, though we're reserving it for
On Mon, May 30, 2005 at 08:39:57AM +, Luke Palmer wrote:
: Okay, I'd like to set myself straight. Sanity check:
:
: bar($foo, $baz); # looks for subs (lexical then package), and
: falls back to MMD
Er, no.
: $foo.bar($baz);# looks in ref($foo), then falls back to MMD
:
: If
On Wed, May 25, 2005 at 07:07:02PM -0400, Uri Guttman wrote:
: the only advantage in the above case is the different prececences of =
: and == which allows dropping of parens with the latter. i don't
: consider that so important a win as to be used often. and they are at
: equal huffman levels as
On Tue, May 31, 2005 at 03:42:42PM -0700, Larry Wall wrote:
: On Wed, May 25, 2005 at 07:07:02PM -0400, Uri Guttman wrote:
: : the only advantage in the above case is the different prececences of =
: : and == which allows dropping of parens with the latter. i don't
: : consider that so important
On Fri, May 27, 2005 at 10:59:25PM +0200, Ingo Blechschmidt wrote:
: Hi,
:
: what is the default invocant of methods?
:
: method blarb ($normal_param) {...}
: # Same as
: method blarb (Class | ::?CLASS $invocant: $normal_param) {...}
: # or
: method blarb (::?CLASS $invocant:
On Mon, May 30, 2005 at 05:00:26PM +0100, Carl Franks wrote:
: I have a class that normally takes a list of named arguments.
: I also want to be able to handle a single argument.
:
: class Foo {
: multi method new (Class $class: Str $date) {
: return $class.bless(date = $date);
: }
:
:
On Tue, May 17, 2005 at 02:42:43PM +0800, Autrijus Tang wrote:
: On Mon, May 16, 2005 at 04:06:15PM -0700, Larry Wall wrote:
: That's
:
: sub not (*args is context(Scalar))
:
: or whatever we end up calling the Any/Scalar type.
:
: How about is context(Item) versus is context(Slurpy
On Tue, May 17, 2005 at 01:50:48PM +, Luke Palmer wrote:
: Hey grep { !/Luke/ } @Larry,
:
: luquimulti foo(Foo, Bar: Baz); # manhattan on Foo and Bar
: luquimulti foo(Foo: Bar: Baz); # leftmost on Foo and Bar
: autrijus wtf?
: autrijus multiple colons?
:
: Is that
On Tue, May 17, 2005 at 10:10:22PM +0800, Autrijus Tang wrote:
: On Tue, May 17, 2005 at 07:00:23AM -0700, Larry Wall wrote:
: On Tue, May 17, 2005 at 01:50:48PM +, Luke Palmer wrote:
: : Is that still the case? I don't recall us getting rid of it, but it
: : doesn't seem to be documented
On Tue, May 17, 2005 at 09:04:19PM +0800, Autrijus Tang wrote:
: Imagine:
:
: pugs '1.28' * '2.56'
: 3.2768
:
: What is (or should be) going on here here?
:
: [1] role NumRole {
: method infix:* returns Num (NumRole $x, NumRole $y: ) { ... }
: }
: Str.does(NumRole);
:
:
On Wed, May 18, 2005 at 04:02:16AM +0800, Autrijus Tang wrote:
: Hmm. How does this play with Larry's suggestion:
:
: I suppose one could even install a colon on the end of the return
: type to request that explicitly.
:
: Does it mean that:
:
: multi sub foo(Foo: Bar: Baz:)
On Tue, May 17, 2005 at 01:01:48PM -0500, Rod Adams wrote:
: Aaron Sherman wrote:
:
: Ok, so log and log10:
:
: multi sub Math::Basic::log (: Num ?$x = $CALLER::_, Num +$base);
: log10 := log.assuming:base(10);
:
: What does log get in this case:
:
: for @x {
:
On Mon, May 16, 2005 at 10:18:47AM +0300, Markus Laire wrote:
: As S09 says that:
:
: At the statement level, a semicolon terminates the current
: expression. Within any kind of bracketing construct, semicolon
: notionally produces a list of lists, the interpretation of which
:
On Mon, May 16, 2005 at 03:10:10PM +, Ingo Blechschmidt wrote:
: my MyBot $bot .= new;
: # Are IRC::Bot::JoinOnInvite::BUILD and
: # IRC::Bot::SayHelloOnJoin::BUILD called?
Yes, role BUILD submethods are magically composed into the class's
BUILD method somehow (or at least called at
On Tue, May 17, 2005 at 01:48:20AM +0800, Autrijus Tang wrote:
: This evaluates to 1 in Perl 5:
:
: not 4,3,2,1,0;
:
: Namely, the not listOp is taking the last of a variadic, non-slurpy
: argument list, boolify it, and return its negation.
:
: What is the Perl 6 signature that correspond
On Tue, May 17, 2005 at 05:32:27AM +0800, Autrijus Tang wrote:
: Ok, but I'm still not too sure about what signature will Perl 6's not
: have, that can impose singular context on each of its argument (so that
: not(@foo) won't flatten), but still accept an unlimited number of
: arguments. It's
On Sun, May 15, 2005 at 01:44:44PM +0200, Juerd wrote:
: A few days ago, when typing ./pugs,... You can guess the rest :)
:
: I suggest
:
: ./method
:
: to mean $?SELF.method, and
:
: ../method
:
: to mean $?SELF.SUPER::method, or however that's normally written.
That's almost
On Sun, May 15, 2005 at 12:22:07PM -0400, Matt Diephouse wrote:
: Does this mean private methods will be called like this?
:
: ./:method()
No, I think that's still just
.:method()
Larry
On Sun, May 15, 2005 at 08:30:06PM -0400, Rob Kinyon wrote:
: On 5/15/05, Juerd [EMAIL PROTECTED] wrote:
: Brad Bowman skribis 2005-05-16 9:56 (+1000):
: Would it conflict with range + pattern? Or has that changed anyway?
:
: No, ./ and ../ are prefix only, so they cannot clash with an
On Sun, May 15, 2005 at 06:34:47PM +0200, Juerd wrote:
: .:method # $_.:method
It is almost certainly the case that you can't call a private method
of $_ unless it just happens to have trusted you, and since it's
such an unusual thing, calling into another class's private method
should have
On Sun, May 15, 2005 at 08:54:52PM -0400, Matt Diephouse wrote:
: Damian Conway [EMAIL PROTECTED] wrote:
: Larry Wall wrote:
:
: On Sun, May 15, 2005 at 12:22:07PM -0400, Matt Diephouse wrote:
: : Does this mean private methods will be called like this?
: :
: : ./:method
On Mon, May 16, 2005 at 10:37:13AM +1000, Damian Conway wrote:
: Luke wrote:
:
: Hmm. I'll just [mention] that if != is implemented like this:
:
: multi sub infix:!= (Any|Junction $a, Any|Junction $b) {
: !($a == $b);
: }
:
: Then it Just Works.
:
: I'd be fine with the dwimmy
On Sat, May 14, 2005 at 10:53:38PM +0800, Autrijus Tang wrote:
: On Sat, May 14, 2005 at 10:56:29PM +1000, Damian Conway wrote:
: 8. To verify the monotonicity of a sequence:
:
: $is_monotonic = [] @numbers;
:
: Hey. Does this mean that the [] metaoperator folds with the
:
On Sat, May 14, 2005 at 02:57:53PM +0200, Leopold Toetsch wrote:
: If we want some interoperbility with Python dicts, hashing will not be
: done on ids but on the hash function of the type.
Which Perl could default to id.
Larry
On Sat, May 14, 2005 at 02:17:38PM +0200, Juerd wrote:
: Firstly, thanks for writing the message out so clearly that it cannot be
: misunderstood.
:
: Damian Conway skribis 2005-05-14 22:06 (+1000):
: .{width} //= 80;
: .{height}//= 24;
: .{gutter}
On Sat, May 14, 2005 at 04:22:44PM +1000, Adam Kennedy wrote:
: The obvious way to do it is to declare the invocant.
:
: Wasn't one of the original headline features for Perl 6 not having to do
: that any more for basic normal code? Or at least from a couple of damian
: talks it was one of the
On Sat, May 14, 2005 at 10:55:43AM -0500, Jonathan Scott Duff wrote:
: But perhaps the reduce operator is some of that sufficiently advanced
: technology that knows how the operator it wraps is slotted and does
: something appropriate.
Possibly. Or we just define infix .{}. and .[]. variants,
We have a bit of a problem with negative operators applied to junctions,
as illustrated recently on PerlMonks. To wit, when a native English
speaker writes
if $a != 1 | 2 | 3 {...}
they really mean one of:
if not $a == 1 | 2 | 3 {...}
if $a == none(1, 2, 3) {...}
or, expressed in
On Fri, May 13, 2005 at 04:21:25PM +0200, TSa (Thomas Sandlaß) wrote:
: And I hope that it is not possible to accidentially
: mess up the internals of the compiler because code
: in a BEGIN hits compiler data.
Whereas I hope that it *is* possible to intentionally
mess up the internals of the
On Sat, May 14, 2005 at 06:41:35PM +0200, Juerd wrote:
: Larry Wall skribis 2005-05-14 9:20 (-0700):
: Possibly. Or we just define infix .{}. and .[]. variants, or some such.
:
: The problem is that we already have @foo[] meaning the same as @foo, and
: an always allowed . that also allows you
On Sat, May 14, 2005 at 12:51:32PM -0500, Rod Adams wrote:
: Larry Wall wrote:
:
: On Sat, May 14, 2005 at 06:41:35PM +0200, Juerd wrote:
: : Larry Wall skribis 2005-05-14 9:20 (-0700):
: : Possibly. Or we just define infix .{}. and .[]. variants, or some
: such.
: :
: : The problem
On Sat, May 14, 2005 at 01:36:22PM -0500, Rod Adams wrote:
: Larry Wall wrote:
:
: On Sat, May 14, 2005 at 12:51:32PM -0500, Rod Adams wrote:
:
: : Unless, of course, there is some subtle difference between a 3-d hash
: : and a hash of hashes of hashes that invalidates this.
:
: No difference
On Fri, May 13, 2005 at 11:43:42AM +0300, Markus Laire wrote:
: Perhaps spec should be changed so that :p means :p(bool::true) or :p(?1)
: and not :p(1)
I'm still not sure I believe in booleans to that extent. I suppose
we could go as far as to make it :p(0 but true). Actually, it's more
like
On Fri, May 13, 2005 at 12:26:22PM -0700, Brent 'Dax' Royal-Gordon wrote:
: Well, the value's pretty easy--just pass in a variable:
:
: my $b = $a is foo($bar);
As we currently have it, that is not legal syntax. is may only
be applied to declarations. You must use does or but to mixin
On Fri, May 13, 2005 at 12:56:19PM -0700, Brent 'Dax' Royal-Gordon wrote:
: Should I construe the fact that you didn't comment on the ::() to mean
: that the symref syntax works here?
Offhand I don't see any reason for it not to.
Larry
On Fri, May 13, 2005 at 09:40:51PM +0200, Stéphane Payrard wrote:
: And what about the getter part of my question? :)
A12 discusses the relationship of traits and properties in great
detail. Any trait's metadata can be stored as properties at compile
time, and such metadata can be retrieved as
On Thu, May 12, 2005 at 11:52:38PM +0200, James Mastros wrote:
: Larry Wall wrote:
: : If yes, then (1)[0] means the same as 1.[0] and 1.[0][0][0]. If no,
: : (1)[0] is a runtime error just like 1.[0] -- i.e. unable to find the
: : matching .[] multisub under Int or its superclasses
On Sat, May 14, 2005 at 01:15:36AM +, Luke Palmer wrote:
: I think the misunderstanding is rather simple. You keep talking like
: you prepend a .*? to the rule we're matching. I think that's wrong
: (and this is where I'm making a design call, so we can dispute on this
: once we're clear
On Fri, May 13, 2005 at 09:47:52PM -0400, Stevan Little wrote:
: Hello all.
:
: In the processing of working with mugwump's shiny new perl6 OO Set.pm.
: I realized that we do not currently have a way to uniquely identify
: objects in Pugs like the way we have in perl5 (object stringification).
On Sat, May 14, 2005 at 11:41:23AM +0800, Autrijus Tang wrote:
: Juerd informed me today that .method should still means $_.method.
:
: However, for the OO modules we're writing, there still needs to be a way
: to invoke methods on the current invocant, when the invocant name has
: been omitted
On Sat, May 14, 2005 at 10:54:34AM +0800, Autrijus Tang wrote:
: On Fri, May 13, 2005 at 07:28:03PM -0700, Larry Wall wrote:
: That's what .id is supposed to do, without the bogus numorstringification
: semantics. It should return something opaque that matches with ~~.
:
: Okay, implemented
On Sat, May 14, 2005 at 04:33:44AM +, Luke Palmer wrote:
: On 5/14/05, Luke Palmer [EMAIL PROTECTED] wrote:
: On 5/14/05, Larry Wall [EMAIL PROTECTED] wrote:
: At the moment $?SELF is the only canonical form, though the invocant
: is also in $_ at least until it's rebound. Any other
On Thu, May 12, 2005 at 12:03:55PM -0500, Jonathan Scott Duff wrote:
: I think that the above split should generate a list like this:
:
: ('', [ '12','34','56','78','90'])
Yes, though I would think of it more generally as
('', $0, '', $0, '', $0, ...)
where in this case it just
On Thu, May 12, 2005 at 02:55:36PM -0500, Patrick R. Michaud wrote:
: On Fri, May 13, 2005 at 03:23:20AM +0800, Autrijus Tang wrote:
: Is it really intended that we get into habit of writing this?
:
: if 'localhost:80' ~~ /^(.+)\:(\d+)$/ {
: my $socket = connect(~$0, +$1);
: }
:
On Thu, May 12, 2005 at 02:52:01PM -0400, Joshua Gatcomb wrote:
: While E02 states that is chomped sets the chomped property of
: afilehandle, I didn't find any detailed specifications in any of the
: As or Ss.
:
: So - is is chomped always the equivalent of:
:
: while ( FH ) {
: chomp;
: }
On Fri, May 13, 2005 at 02:00:10PM +1000, Damian Conway wrote:
: Actually, it's not clear to me offhand why @1 shouldn't mean $1[]
: and %1 shouldn't mean $1{}.
:
: It *does*. According to the recent capture semantics document:
:
: Note that, outside a rule, C@1 is simply a shorthand for
On Thu, May 12, 2005 at 09:33:37AM -0500, Patrick R. Michaud wrote:
: Also, A05 proposes incorrect alternatives to the above
:
: /[:w[]foo bar]/# null pattern illegal, use null
: /[:w()foo bar]/# null capture illegal, and probably undesirable
: /[:w\bfoo bar]/# not
On Wed, May 11, 2005 at 08:00:20PM -0500, Patrick R. Michaud wrote:
: Somehow I'd like to get rid of those inner angles, so
: that we always use +alpha, +digit, -sp, -punct to
: indicate named character classes, and specify combinations
: with constructions like +alpha+punct-[aeiou] and
On Wed, May 11, 2005 at 05:48:59PM +1000, Damian Conway wrote:
: But that's only the opinion of one(@Larry), not of $Larry.
Let's go 0-based and make $0 =:= $/[0] so that $/[] is all the parens.
Our old $0 (P5's $) could be $ instead, short for $MATCH or some
such.
It's already the case that
On Wed, May 11, 2005 at 06:35:36PM +0200, Juerd wrote:
: Larry Wall skribis 2005-05-11 8:30 (-0700):
: It's already the case that p5-to-p6 is going to have a *wonderful*
: time translating $7 to $1[2][0]...
:
: If I remember correctly, ** recursively flattens, and so (**$/)[7-1]
: should work
On Wed, May 11, 2005 at 11:45:12AM -0500, Jonathan Scott Duff wrote:
:
: We're discussing the proper semantics of (1)[0] on #perl6. Here's
: where we're at so far:
:
: 1. specialise ()[] to parse as (,)[]
: 2. scalars are singleton lists, so ()[] naturally
: 3. make (1)[0] die horribly.
:
: We
On Thu, May 12, 2005 at 04:19:02AM +0800, Autrijus Tang wrote:
: Hm? Under #2, no matter whether @foo is (1) or (1,2), the construct
: (@foo)[0] would always means @foo.[0]. Not sure how the length of @foo
: matters here.
Tell you what, let's require P5's (...)[] to be translated to [...][],
so
On Thu, May 12, 2005 at 05:19:11AM +0800, Autrijus Tang wrote:
: Sure (and done). Now that #1 is eliminated, the question is now
: whether a simple scalar can be treated as a small (one-element) array
: reference, much like a simple pair can be treated as a small
: (one-element) hash reference.
:
On Thu, May 12, 2005 at 07:04:48AM +0800, Autrijus Tang wrote:
: Please sanity-check. :-)
Looks good to me. Though that should perhaps not be confused with sanity.
Larry
On Wed, May 11, 2005 at 06:24:38PM -0400, Aaron Sherman wrote:
: I'm confused as well. How does that play with Larry's comment:
:
:
http://groups-beta.google.com/group/perl.perl6.language/browse_frm/thread/54a1135c012b97bf/d17b4bc5ae7db058?q=list+commarnum=5hl=en#d17b4bc5ae7db058
Well, that
On Tue, May 10, 2005 at 05:24:30PM -0400, Rick Delaney wrote:
: On Tue, May 10, 2005 at 06:20:44AM -0600, Luke Palmer wrote:
: Yeah, they're lexical, just like in Perl 5.
:
: Not just like Perl 5, I hope. If it was then the above would print
: d.
Yes, Perl 5 actually uses an autolocalizing
On Mon, May 09, 2005 at 09:47:14AM -0600, Paul Seamons wrote:
: =item *
:
: Quantifiers (except C? and C??) cause a matched subrule or subpattern to
: return an array of CMatch objects, instead of just a single object.
:
: What is the effect of the quantifiers C**{0,1} and C**{0,1}? ?
That
On Mon, May 09, 2005 at 10:33:33AM -0500, Patrick R. Michaud wrote:
: =head2 Subpattern numbering
: [...]
: Of course, the leading Cundefs that Perl 5 would produce do convey
: (albeit awkwardly) which alternative actually matched. If that
: information is important, Perl 6 has several far
On Mon, May 09, 2005 at 10:33:33AM -0500, Patrick R. Michaud wrote:
: After thinking on this a bit, I'm hoping we don't do this -- at least not
: initially. I'm not sure there's a lot of advantage of C $1.1 over
: C $1[0] , and one starts to wonder about things like $1.$j.2 and
: $1[$j].2 and
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
On Mon, May 09, 2005 at 12:14:35PM -0700, Larry Wall wrote:
: 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.
Maybe that's a good reason to switch from 1-based to 0-based
$digit vars. Not sure what
On Sun, May 08, 2005 at 02:39:03PM +1000, Andrew Savige wrote:
: A crude hack sometimes used by gung ho p5 testers is to redefine
: perl built-in functions. For example:
:
: BEGIN {
: *CORE::GLOBAL::read = sub (*\$$;$) { return undef };
: }
:
: to test read failures (and so boost your
On Sat, May 07, 2005 at 05:11:19PM +1000, Stuart Cook wrote:
: On 5/7/05, Patrick R. Michaud [EMAIL PROTECTED] wrote:
: It might not be a problem -- I'm thinking we may end up tokenizing
: most or all of the meta operators, so that [+] would be considered
: its own token, and then the longest
On Sat, May 07, 2005 at 01:00:08PM -0700, Larry Wall wrote:
: On the other hand, since we've distinguished hyperops on infixes from
: hyperops on unaries, maybe an infix hyperop in unary position just
: does the thing to itself:
:
: @squares = »*« @list;
:
: which gives us a sum-of-squares
On Sat, May 07, 2005 at 02:23:15PM +0200, Juerd wrote:
: Matt Creenan skribis 2005-05-07 1:47 (-0400):
: I thought about $blockname = { ... }, but = is obviously taken, as is ==
: $blockname =: for 1..5 {
: $blockname := for 1..5 {
: } $blockname;
: } =: $blockname;
: }
On Sat, May 07, 2005 at 01:09:52PM -0400, Stevan Little wrote:
: Hello All,
:
: So I am expanding our .isa() tests for built-in datatypes (in
: particular Array), and I have a few (probably very simple) questions
: (since I cannot seem to find details on this anywhere).
:
: Is there an isa()
On Fri, May 06, 2005 at 06:35:45PM +0200, Juerd wrote:
: Which things can receive?
:
: If I recall things correctly, we already have these:
:
: sub # slurpy list
: arrary
: hash
:
: Would it make sense to add, for example,
:
: filehandle # write
:
: It may not, as it's
On Fri, May 06, 2005 at 06:55:47PM +0200, Juerd wrote:
: Luke Palmer skribis 2005-05-06 10:45 (-0600):
: How do you pipe to an array returned by a sub? == @ foo()?
: Well, you'd have to be piping into a returned array ref, because you
: can't pipe into the list the sub returns. So I think
1001 - 1100 of 2342 matches
Mail list logo