Dave Storrs [EMAIL PROTECTED] writes:
On Mon, Dec 16, 2002 at 06:47:39PM +, Piers Cawley wrote:
Michael Lazzaro [EMAIL PROTECTED] writes:
Mind you (purely devil's advocate), I'm not entirely sure the R-to-L
syntax truly _needs_ to be in Perl6. It's true I use it all the time,
but I
Dave Whipp [EMAIL PROTECTED] writes:
Piers Cawley [EMAIL PROTECTED] wrote :
I found myself mulling over:
$obj.is($other_obj);
Which seems to work reasonably well, and I'd be rather surprised if
it clashed with anything with different semantics...
My only problem with it is the lack
Dave Storrs [EMAIL PROTECTED] writes:
On Mon, Dec 16, 2002 at 08:26:25PM +, Piers Cawley wrote:
Dave Storrs [EMAIL PROTECTED] writes:
On Mon, Dec 16, 2002 at 06:47:39PM +, Piers Cawley wrote:
Michael Lazzaro [EMAIL PROTECTED] writes:
I haven't been arguing against his syntax
Michael Lazzaro [EMAIL PROTECTED] writes:
On Wednesday, December 11, 2002, at 06:56 PM, Simon Cozens wrote:
[EMAIL PROTECTED] (Michael Lazzaro) writes:
Wel... yes and no. You can make the same argument for operators
upon scalars, for example, since 'scalar' is arguably no more
13, 2002, at 03:07 AM, Piers Cawley wrote:
What's wrong with:
class Array {
method grep ( block ) {
snip
}
sub grep (Object $obj, @*ary) { @ary.grep($obj); }
AFAICT, (modulo getting the laziness done right, this should allow
you to write)
grep
Simon Cozens [EMAIL PROTECTED] writes:
[EMAIL PROTECTED] (Deborah Ariel Pickett) writes:
About this point was when my brain when a ha!. But I'm not yet
convinced that generating all possible parses is (a) of sane time
complexity, and (b) a little *too* DWIM for its own good.
As I said, I
Michael Lazzaro [EMAIL PROTECTED] writes:
On Wednesday, December 11, 2002, at 10:36 AM, John Siracusa wrote:
Maybe AS_STRING and AS_STRING_DEBUG? Too long? DEBUG_STRING?
Are we married to the AS_* thing?
Not really -- whatever works. We also had .debug, .identity, and .id
proposed, for
Simon Cozens [EMAIL PROTECTED] writes:
[EMAIL PROTECTED] (Dave Whipp) writes:
There is a difference between verbs and noun. Sometimes you don't want
to associate a verb with an object: you want to associate it with the
subject:
Verbs are almost always associated with their subject in OO
Luke Palmer [EMAIL PROTECTED] writes:
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Date: Wed, 11 Dec 2002 19:21:35 -0500
From: John Siracusa [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
X-SMTPD: qpsmtpd/0.20, http://develooper.com/code/qpsmtpd/
On 12/11/02 6:16 PM, Damian Conway
Ken Fox [EMAIL PROTECTED] writes:
Damian Conway wrote:
For that reason, even if we can solve this puzzle, it might be far kinder
just to enforce parens.
I might be weird, but when I use parens to clarify code in Perl, I
like to use the Lisp convention:
(method $object args)
Hopefully
Michael Lazzaro [EMAIL PROTECTED] writes:
On Friday, December 6, 2002, at 01:28 AM, Joseph F. Ryan wrote:
Array(0x1245AB)
Personally, I like this format. It's succinct, informative, and tells
you enough to do identity testing.
I like it too, but I thought everyone else hated it :)
I
http://makeashorterlink.com/?C2E8115A2 -- Larry's vision
http://makeashorterlink.com/?E2F8325A2 -- Michael's vision
http://makeashorterlink.com/?H409355A2 -- Bryan's vision
http://makeashorterlink.com/?W219315A2 - Garrett's vision
Just wondering...
Piers Cawley pointed out
Bryan C. Warnock [EMAIL PROTECTED] writes:
Be kind to Piers.
Ah... Yes do. I need all the kindness I can get.
--
Piers
It is a truth universally acknowledged that a language in
possession of a rich syntax must be in need of a rewrite.
-- Jane Austen?
/?Q1E712592
http://makeashorterlink.com/?W2F714592
http://makeashorterlink.com/?A50832592
http://makeashorterlink.com/?Q11862592 -- semantics of ...
Superpositions and Laziness
Piers Cawley failed to change the subject line as he asked about runtime
class creation. He
It's coming up on six months since the last Apocalypse, and 3 months
since the Perl 6 Mini conference. Do we have any indication as to when
we can expect the next one?
--
Piers
It is a truth universally acknowledged that a language in
possession of a rich syntax must be in need of a
Damian Conway [EMAIL PROTECTED] writes:
Piers Cawley wrote:
Cis is compile-time.
So, how would one create a class which inherits from some other
class
when you don't know what said other class is until runtime?
Use Perl5-ish classes, or an Ceval.
Perl5-ish classes? You mean 'bless
not entirely sure why a thread titled `Superpositions and Laziness'
should contain discussion of whether one should have a `pure' property
or a `cached' one. Or both.
Meanwhile, in the `laziness' side of the thread, Piers Cawley saw fit to
post a huge chunk of uncommented code which
Damian Conway [EMAIL PROTECTED] writes:
Piers Cawley wrote:
[Speculations elided]
Which is somewhat dependent on being able to do Cclass is $class.
Which you can't do, since Cis is compile-time.
So, how would one create a class which inherits from some other class
when you don't know what
Austin Hastings [EMAIL PROTECTED] writes:
--- Piers Cawley [EMAIL PROTECTED] wrote:
Austin Hastings [EMAIL PROTECTED] writes:
--- Piers Cawley [EMAIL PROTECTED] wrote:
I wonder what would happen if you had a junction of
continuations. Producing something practical is left
Damian Conway [EMAIL PROTECTED] writes:
Luke Palmer asked:
When junctions collapse,
Sigh, not another one of those dreadful reality TV shows:
When animals attack
When drivers collide
When junctions collapse
Next we'll get:
When mailing lists explode
I wonder what would happen if you had a junction of
continuations. Producing something practical is left as an exercise
for the interested reader.
--
Piers
It is a truth universally acknowledged that a language in
possession of a rich syntax must be in need of a rewrite.
-- Jane
Junctions are what we're calling superpositions this week. Piers Cawley
had another crack (the operative word I think, on rereading) at his non
deterministic search algorithm using junctions and a subclass of
Function. Damian, of course, came up with a better possible syntax for
lazy
Damian Conway [EMAIL PROTECTED] writes:
Luke Palmer wrote:
sub a_pure_func(Num $n) returns Num {
class is Num {
method FETCH { $n * $n } }.new }
Yes? No?
Not quite.
sub a_pure_func(Num $n) returns Num {
class is Num {
has
Michael Lazzaro [EMAIL PROTECTED] writes:
On Friday, November 8, 2002, at 07:03 AM, Adam D. Lopresto wrote:
I still prefer cached, which sounds less lingo-ish than memoized
but reads
better than same (Same as what?).
Insert obligatory reference to Eiffel here, which IIR uses the word
Paul Johnson [EMAIL PROTECTED] writes:
[ I notice that Piers has just said about the same as me in one
sentence. ]
Ah, but I get lots of practice boiling stuff down when I'm writing the
summaries. Though the current one is still giving me headaches -- I'm
about halfway through perl6-language
Paul Johnson [EMAIL PROTECTED] writes:
On Fri, Nov 08, 2002 at 12:12:53PM -0700, Luke Palmer wrote:
What's wrong with Ccached?
Cpure ain't bad either, but it won't appeal to
non-mathematicians---even certain kinds of mathematicians.
Mathematica thinks a pure function is what we think of
Markus Laire [EMAIL PROTECTED] writes:
On 8 Nov 2002 at 9:12, Michael Lazzaro wrote:
On Thursday, November 7, 2002, at 10:45 PM, Piers Cawley wrote:
Those of us with subs to perl6-all will get this anyway, right?
I posted an initial message about five minutes ago, so if you received
Robert Spier [EMAIL PROTECTED] writes:
Ah... that would explain why I haven't seen it then. Looks like
someone broke perl6-all.
No, it was just not configured.
Future messages to perl6-documentation should end up on perl6-all.
Good oh.
--
Piers
It is a truth universally acknowledged
Allison Randal [EMAIL PROTECTED] writes:
Ask was fast:
Subscribe by sending mail to [EMAIL PROTECTED]
NNTP access and archives at nntp.perl.org will be available a few
hours after the first posting to the list.
Let the games begin...
Those of us with subs to perl6-all will get this
and Larry had thought long and hard about whether or not to interleave
sources and iterators before deciding on the current syntax.
http://makeashorterlink.com/?W23612C52
http://makeashorterlink.com/?Y54632C52
Nondeterministic algorithms, flexops, and stuff
Piers Cawley made heads
So, I was, thinking about the way Common Lisp handles keyword
arguments. It's possible to declare a Lisp function as follows:
(defun make-para ( content key alignment font size color ) ...)
The point here is that the first argument is dealt with positionally,
and subsequent, optional args
It occurred to me that being able to set up 'pure' functions in such a
way that they are lazily evaluated when passed a superposition might
be a win.
And then I got to thinking about what would be required from the
language to allow me to implement this functionality in a module. I am
assuming
Paul Johnson [EMAIL PROTECTED] writes:
Austin Hastings said:
sub callmysub
{
mysub(Testing .. 1, 2, 3!; key = 1024, align = Module::RIGHT);
}
Which, upon reflection, apparently introduces an implicit hashparsing
context for autoquoting hashkeys.
Those are pairs, aren't they?
Yup.
Jonathan Scott Duff [EMAIL PROTECTED] writes:
Will there be some shorter-hand way to say these?
@a = @grades[grep $_ = 90, @grades];
@b = @grades[grep 80 = $_ 90, @grades];
@c = @grades[grep 70 = $_ 80, @grades];
Granted, it's fairly compact as it is but I'm wondering
Adam D. Lopresto [EMAIL PROTECTED] writes:
I don't see why I'd want to do it with arrays, but...
%a_students = %grades{grep /^a/i, keys %grades};
Looks like that's just the same as
%a_students = grep {.key ~~ :i/^a/}, %grades.kv;
I think you could probably get away without the .kv there
Luke Palmer [EMAIL PROTECTED] writes:
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Date: Wed, 6 Nov 2002 14:53:37 -0800
From: Michael Lazzaro [EMAIL PROTECTED]
X-SMTPD: qpsmtpd/0.12, http://develooper.com/code/qpsmtpd/
If anyone knows the answer to these two questions, I'd
Smylers [EMAIL PROTECTED] writes:
Phew! I'm slightly concerned at this list making Piers's job too easy,
but have tried to minimize that effect by posting on a Monday (meaning
that this mail is ineligible for inclusion in the next summary and is
likely to be out of date by the time of the
Damian Conway [EMAIL PROTECTED] writes:
Piers Cawley wrote:
So, on the train this morning, I had a moment of Satori. What's wrong
with doing what we think of as bitwise operations using the flexops
and adding a 'bitwise' context? So, a bitwise op becomes:
bitwise ( $a | $b | $c $d
The Perl 6 Summary for the week ending 20021027
You may have noticed that this summary is late. Um... [looks sheepish,
shuffles feet], the dog ate my homework. I did a tiny bit of
procrastination at the beginning of the week and then got totally
overtaken by events involving failed
Jonathan Scott Duff [EMAIL PROTECTED] writes:
On Wed, Oct 30, 2002 at 04:03:55PM +, Piers Cawley wrote:
Jonathan Scott Duff [EMAIL PROTECTED] writes:
Hey, that's neat. Although it looks like it returns the $src when there
isn't a path. You probably want it to return undef or something
Dave Storrs [EMAIL PROTECTED] writes:
In the Re: Wh[ie]ther Infix Superposition ops thread
On Wed, 30 Oct 2002, Piers Cawley wrote:
But given a decent Collection hierarchy:
my $seen = Set.new($start,$finish);
for - $next {
print $next unless $next =~ $seen
Piers Cawley [EMAIL PROTECTED] writes:
Personally, I'd love to see something like the whole Smalltalk
Collection hierarchy available complete with Bags, Sets,
Dictionaries, OrderedCollections and the whole deal. I note, for
instance that Christian Lemburg has implemented Set::Object
Markus Laire [EMAIL PROTECTED] writes:
On 29 Oct 2002 at 5:45, Piers Cawley wrote:
Whilst I don't wish to get Medieval on your collective donkey I must
say that I'm really not sure of the utility of the proposed infix
superposition ops. I'm a big fan of any/all/one/none, I just think
Luke Palmer [EMAIL PROTECTED] writes:
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
From: Piers Cawley [EMAIL PROTECTED]
Date: Tue, 29 Oct 2002 05:45:01 +
X-SMTPD: qpsmtpd/0.12, http://develooper.com/code/qpsmtpd/
Whilst I don't wish to get Medieval on your collective donkey I
Simon Cozens [EMAIL PROTECTED] writes:
[EMAIL PROTECTED] (Jonathan Scott Duff) writes:
Statements like this bother me. Not because I don't think it might be
true, but because it's in future tense. If someone (named Damian :-)
wrote a superposition synopsis that showed the many and varied
Larry Wall [EMAIL PROTECTED] writes:
We could make return a method as well as a built-in sub. That gives us
Loop.return($x)
Sub.return($x)
Topic.return($x)
Thread.return($x)
Block.return($x)
There.return($x)
or
return Loop: $x
return Sub: $x
Whilst I don't wish to get Medieval on your collective donkey I must
say that I'm really not sure of the utility of the proposed infix
superposition ops. I'm a big fan of any/all/one/none, I just think
that
one(any($a, $b, $c), all($d, $e, $f))
Is a good deal more intention revealing than
Michael Lazzaro [EMAIL PROTECTED] writes:
John Siracusa wrote:
Larry's just thinking out loud, right?
Yes, and so is everyone else. Most posts here, including Larry's,
are stream-of-conciousness. Heck, in one of the last ones I swear
there were, what, 6 or 7 possible ways to say the same
Simon Cozens [EMAIL PROTECTED] writes:
[EMAIL PROTECTED] (Michael Lazzaro) writes:
But our version of understandable still means a steep, steep learning
curve.
It's worse than that; for practitioners of many languages, the learning
curve has a 180 degree turn.
Quick: what are the bitwise
Angel Faus [EMAIL PROTECTED] writes:
Speaking about macros, I renember reading somewhere something about
Scheme hygenic macros, but i didn't really understood it.
Do they solve the maintenance problems of Lisp macros? Would they be
applicable to perl?
Scheme hygenic macros do a lot of the
Luke Palmer [EMAIL PROTECTED] writes:
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Tue, 15 Oct 2002 14:33:28 -0400
I like the idea of this. The finer details, like returning what to
do, could be more elegant. But the extensibility idea is golden.
To change how certain exceptions
The Perl 6 Summary for the week ending 20021020
I'm sorry to have to inform you that I've returned from my holiday (no,
base jumping and paragliding were *not* involved) and that this week's
summary will not be written by the estimable Leon Brocard. Sorry about
that. Leon is
Austin Hastings [EMAIL PROTECTED] writes:
--- Larry Wall [EMAIL PROTECTED] wrote:
If every Object happens to implement the Class interface, merely
declaring the invocant as a Class would presumably have this effect,
whether or not MD was in effect. I don't know whether that's a good
idea or
Larry Wall [EMAIL PROTECTED] writes:
On Sat, 12 Oct 2002, Me wrote:
: We also need a signifier for class methods (assuming
: a distinction is made).
:
: Perhaps one could use an initial cap to indicate a class
: attribute/method:
:
: class foo {
: my $bar;# my is not used
Leopold Toetsch [EMAIL PROTECTED] writes:
Piers Cawley wrote:
Happy birthday to me!
Congratulations.
... by my turning 35 on the 15th
44 on 16th - yes Sept.
Congrats to you too. So, should I start maintaining a birthday
database for the summaries? Probably not.
--
Piers
Implementation Details
Jürgen Bömmels and Piers Cawley continued their discussion of how to go
about implementing a scheme interpreter, and lambda in particular.
Piers made noises about a proof of concept implementation of Scheme that
he'd made using Perl objects, but didn't show
Aaron Sherman [EMAIL PROTECTED] writes:
On Wed, 2002-09-18 at 11:42, Piers Cawley wrote:
The Perl 6 Summary for the Week Ending 20020915
Happy birthday to me!
Indeed!
And thank you so much for this. You have a way of taking a tangled mess
of discussion that's even confusing
So, the new rule for blocks and when the need semicolons seems to be
You don't need a semicolon if the block is the last argument of a
subroutine which expects a block as its last argument, which is all
very well and all, but where does that leave:
sub foo ( block ) {...}
...
$wibble
Luke Palmer [EMAIL PROTECTED] writes:
This is for everyone: EOA4
In Perl, this problem comes up most often when people say Why do I
have to put a semicolon after do {} or eval {} when it looks like a
complete statement?
Well, in Perl 6, you don't, if the final curly
, lexicals, functions, macros, continuations... Piers Cawley
outlined an OO way forward using (initially) hashes, and proposed a
'SchemeObject' PMC, which would hide a lot of the common structural code
needed for dispatching methods implemented in any of C/Parrot/Scheme.
John Porter
Nicholas Clark [EMAIL PROTECTED] writes:
On Wed, Sep 04, 2002 at 10:46:24PM -0400, Ken Fox wrote:
What is really needed is something that converts the date syntax
to normal Perl code:
rule iso_date { (Perl.term) -
(Perl.term) -
(Perl.term)
Nicholas Clark [EMAIL PROTECTED] writes:
On Fri, Sep 06, 2002 at 02:20:10PM +0100, Piers Cawley wrote:
Nicholas Clark [EMAIL PROTECTED] writes:
On Wed, Sep 04, 2002 at 10:46:24PM -0400, Ken Fox wrote:
What is really needed is something that converts the date syntax
to normal Perl code
Uri Guttman [EMAIL PROTECTED] writes:
SC == Simon Cozens [EMAIL PROTECTED] writes:
SC [EMAIL PROTECTED] (Damian Conway) writes:
hashes can now take objects as keys and won't just stringify them.
Correct. But I believe that's only if the hash has a property that marks
its
David Whipp [EMAIL PROTECTED] writes:
Piers Cawley wrote:
Maybe we should just say 'sod it' and implement the entire Smalltalk
Collection hierarchy and have done with it? Sets, bags, hashes
(dictionaries for the Smalltalker), whatever, all have their uses...
I'm not sure if you were being
This came up in a discussion on London.pm about Damian's Perl 6 talk,
which led us to wonder about control exceptions and how they're
handled. At the moment, control exceptions fall into the 'vaguely
handwavy' category, and what follows is my attempt to work out how I
think they should behave...
Damian Conway [EMAIL PROTECTED] writes:
Uri Guttman wrote:
but what simon was saying (and i agree) is the the pair IS a single
item. it becomes the key and its value is 'scalars'.
No. If it's a PAIR, then its key is the key and its value is the value.
hashes can now take objects as keys
.' and that, no matter how many editions it
goes through, Friedl's book is always going to be called *Mastering
Regular Expressions*. So, Larry is `encouraging use of the technical
term regex as a way to not precisely mean regular expression.'
Piers Cawley raised a question about
Andy Wardley [EMAIL PROTECTED] writes:
On Sat, Jun 08, 2002 at 06:51:19AM +1000, Damian Conway wrote:
I have no doubt that, once Perl 6 is available, we'll see a rash of
modules released in the Grammar:: namespace. Including
Grammar::HTML and Grammar::XML.
I have no doubt that, once Perl 6
Allison Randal [EMAIL PROTECTED] writes:
On Thu, Jun 06, 2002 at 10:38:39AM -0400, John Siracusa wrote:
On 6/6/02 2:43 AM, Damian Conway wrote:
rule wordlist { (\w+) [ , (\w+) ]* }
No semicolon at the end of that line? I've already forgotten the new
rules for that type of thing... :)
Damian Conway [EMAIL PROTECTED] writes:
Aaron Sherman wrote:
What if I want my methods to be called C.get_bar() and C.set_bar(),
since a certain Perl OO specialist suggests this approach is best for
avoiding ambiguity in one's API?
Then you can declare them as such:
sub
Miko O'Sullivan [EMAIL PROTECTED] writes:
From: Damian Conway [EMAIL PROTECTED]
while (my $res = $search-getnext) { ...}
has a valid meaning in Perl 6. In fact, it's meaning in Perl 6 is far more
reasonable than in Perl 5.
I don't think the new meaning makes sense at all. Essentially it's
Larry Wall [EMAIL PROTECTED] writes:
Piers Cawley writes:
: Consider the following.
:
:sub foo {...}
:
:foo *@ary;
:foo * @ary;
:
: Is this another place where whitespace will have meaning? Or should I
: add parentheses to disambiguate? Enquiring minds want to know.
I
Luke Palmer [EMAIL PROTECTED] writes:
On Tue, 30 Apr 2002, Miko O'Sullivan wrote:
Damian, now having terrible visions of someone suggesting Celswhen ;-)
Then may I also give you nightmares on: elsdo, elsdont, elsgrep, elstry ...
Ooh! Why don't we have a dont command! With several
Larry Wall [EMAIL PROTECTED] writes:
/^pat$/m /^^pat$$/
$$ is no longer the current PID? Or will we have to call that '${$}'
in a regex?
--
Piers
It is a truth universally acknowledged that a language in
possession of a rich syntax must be in need of a rewrite.
Andy Wardley [EMAIL PROTECTED] writes:
On Mon, Apr 15, 2002 at 07:24:13PM -0700, Larry Wall wrote:
So the main reason that objects can function as hashes is so that the
user can poke an object into an interface expecting a hash and have it
make sense, to the extent that the object is willing
Also known as constructs you wish you hadn't discovered.
So, I'm reading through Finkel and I came across the following, which
computes the greatest common divisor of a and b (recast into perl6ish
syntax)
while {
when $a $b { $b -= $a }
when $b $a { $a -= $b }
}
The idea is that
David Wheeler [EMAIL PROTECTED] writes:
On 4/16/02 11:57 AM, Piers Cawley [EMAIL PROTECTED] claimed:
Personally I'd like the default hash to return some immutable, unique
and probably opaque object id (something the like
'Foo=HASH(0x81e2a3c)' you get from unoverloaded objects in Perl5
Damian Conway [EMAIL PROTECTED] writes:
Yes, subroutine variables *are* like underwear.
But parameter names *aren't* like underwear.
Because they're not (primarily) subroutine variables.
So they're like the labels on the knobs, dials, and buttons of your
favourite elctronic device. They're
Trey Harris [EMAIL PROTECTED] writes:
I think I've missed something, even after poring over the archives for
some hours looking for the answer. How does one write defaulting
subroutines a la builtins like print() and chomp()? Assume the code:
for {
printRec;
}
printRec
[EMAIL PROTECTED] writes:
On Fri, Apr 12, 2002 at 04:00:37PM +0100, Piers Cawley wrote:
X-posting to perl6-language
[EMAIL PROTECTED] writes:
As for cleanness, this is my interpretation of how perl6 is going
to work:
%foo = ();
if %foo {key} {print Hello 1
[EMAIL PROTECTED] writes:
On Fri, Apr 12, 2002 at 04:42:07PM +0100, Piers Cawley wrote:
[EMAIL PROTECTED] writes:
Why isn't
if %foo {key} {print Hello 1}
equivalent with the perl5 syntax:
if (%foo) {key} {print Hello 1}
Which keyword is it expecting?
Keyword /els
Aaron Sherman [EMAIL PROTECTED] writes:
On Thu, 2002-04-11 at 00:47, Damian Conway wrote:
sub load_data ($filename) { load_data($filename, 1) }
sub load_data ($filename, $version) {...}
Interesting. This brings goto to mind. Above, I could just assume
that inlining will
Okay, this is the beginnings of Scheme in Perl6. I'm sure there's
stuff I'm getting wrong. I've not written the parser yet for instance
and I'm toying with waiting for A5 before I do. Also, I've not yet
implemented such important stuff as proper closures/lambda or the
environment chain, but the
In message [EMAIL PROTECTED], I wrote:
[ A huge wodge of possible perl 6 code ]
I'm getting that Warnock's Dilemma feeling here... Did I stun you all
into silence?
--
Piers
It is a truth universally acknowledged that a language in
possession of a rich syntax must be in need of a
Melvin Smith [EMAIL PROTECTED] writes:
At 09:23 AM 4/10/2002 +0100, Piers Cawley wrote:
Okay, this is the beginnings of Scheme in Perl6. I'm sure there's
stuff I'm getting wrong. I've not written the parser yet for instance
Very nice! Quite a sample, maybe Larry/Damian can use this
in one
Melvin Smith [EMAIL PROTECTED] writes:
At 10:50 AM 4/10/2002 -0700, Glenn Linderman wrote:
Mark J. Reed wrote:
On Wed, Apr 10, 2002 at 10:30:25AM -0700, Glenn Linderman wrote:
method m1
{
m2; # calls method m2 in the same class
Yes, but does it call it as an instance method
Graham Barr [EMAIL PROTECTED] writes:
On Wed, Apr 10, 2002 at 01:35:22PM -0400, Mark J. Reed wrote:
On Wed, Apr 10, 2002 at 10:30:25AM -0700, Glenn Linderman wrote:
method m1
{
m2; # calls method m2 in the same class
Yes, but does it call it as an instance method on the current
Glenn Linderman [EMAIL PROTECTED] writes:
Graham Barr wrote:
On Wed, Apr 10, 2002 at 01:35:22PM -0400, Mark J. Reed wrote:
On Wed, Apr 10, 2002 at 10:30:25AM -0700, Glenn Linderman wrote:
method m1
{
m2; # calls method m2 in the same class
Yes, but does it call it as an
Ashley Winters [EMAIL PROTECTED] writes:
grin Patches welcome.
Excellent...
Forgive any formatting errors, I have mail issues.
Thanks, applying. With a few caveats.
@@ -62,6 +62,7 @@
class SchemePair is SchemeExpr {
my $nil //= class is SchemeExpr {
method is_nil {1}
+
Mark J. Reed [EMAIL PROTECTED] writes:
On Wed, Apr 10, 2002 at 07:57:01PM +0100, Piers Cawley wrote:
::m2; # calls global subroutine main::m2
main::m2; # calls global subroutine main::m2
This is looking more and more horrible Glenn.
I think we need to back off of unmarked subroutines
David Whipp [EMAIL PROTECTED] writes:
Piers Cawley
This may be a case of keep up at the back, but if that is a
method call,
how do I call a subroutine from within a method ?
[...]
Yes, I know there's several different ways I could do it, but this
approach feels right.
I think
Damian Conway [EMAIL PROTECTED] writes:
[...]
Reflecting on this, it seems that it would be useful if methods
implicitly did their default topicalization-of-invocant like so:
- $self
rather than just:
- $_
That is, that as well as aliasing the invocant to $_, they also
Luke Palmer [EMAIL PROTECTED] writes:
$.foo
It's already defined as an instance variable.
I don't think I like that. Instance variables are far more common that
class variables, so why not just $foo, and you could use a compile-time
property for class variables. Like Cis
Miko O'Sullivan [EMAIL PROTECTED] writes:
The current plans indicate that a subroutine's params should be defaulted
like this:
sub load_data ($filename ; $version / /= 1) {...}
(The space between / and / is on purpose, my emailer has problems if
they are together.) If that's the
Damian Conway [EMAIL PROTECTED] writes:
Piers wrote:
one could always handle the first case
more explicitly by doing:
sub load_data ($filename; $version) {
$version = 1 if @_.length 2;
...
}
Err...no. If you specify named parameters, you don't get @_.
It could be
Me [EMAIL PROTECTED] writes:
But suppose you want all .foo to refer to self and not
to the current topic.
What about
given (self) { }
Also, what about
use invocant;
resulting in all method bodies in scope getting an implied
surrounding given (self) { }.
And what
Jonathan Scott Duff [EMAIL PROTECTED] writes:
On Tue, Apr 09, 2002 at 04:17:38PM +0100, Simon Cozens wrote:
Aaron Sherman:
nice du -a | sort -n | tail -300 | tac | perl -nle '
die Require non-zero disk size!\n unless $ENV{DF};
if ($. == 1) {
Simon Cozens [EMAIL PROTECTED] writes:
Piers Cawley:
Well, no. Because Perl 6 is specified as behaving like perl 5 until
told different. Which means that the first translation you give would
be a syntax error.
Ouch. Guess I need to go reread A1. Anyway, that makes it easier
Larry Wall [EMAIL PROTECTED] writes:
Me writes:
: But suppose you want all .foo to refer to self and not
: to the current topic.
:
: What about
:
: given (self) { }
That wouldn't have the same effect as what we're talking about--it'd be
overruled by any Cgiven within.
Damian Conway [EMAIL PROTECTED] writes:
Incidentally, the table of C=~ comparisons (Table 1) at:
http://dev.perl.org/perl6/apocalypse/4
suggests that hash/hash matching is equivalent to:
match if grep exists $a{$_}, $b.keys
I hope to convince Larry that it would be better if
201 - 300 of 470 matches
Mail list logo