"Wizard" <[EMAIL PROTECTED]> writes:
> This came up on perl6-internals, and Dan liked the "try" suggestion and
> suggested That I post it here for comments. I'm not subscribed to
> p6-language, so you'll need to include me in any replies where you want a
> response from me.
> =
Larry Wall <[EMAIL PROTECTED]> writes:
> Charles Bunders writes:
> : I came across Simon Cozens email
> : (http:[EMAIL PROTECTED]/msg08641.html) again
> : tonight and it got me thinking...
> :
> : In Perl 6 are modules compiled down to pbc (Perl byte code) going to also
> : create metadata simil
Wouldn't it be nice if you could do:
class Foo {
...
&{intern('{}')} := method ($self: $key) is lvalue {
...
}
}
So, later, you could do:
$obj = Foo.new;
$obj{something} = $something_else;
ie, overriding hash lookups, array lookups, whatever. (I'm using a
Lispish 'intern
Simon Cozens <[EMAIL PROTECTED]> writes:
> Piers Cawley:
>> ie, overriding hash lookups, array lookups, whatever.
>
> Ah, you want C#/Python indexers, you do. So do I.
Um... is that what you call 'em. Actually, you can already do
'use overload q|%{}|', to s
Over on use.perl, someone spotted what looks like a bug in the example
program which (if it *is* a bug) is fixed by using unary '*', but
that's not what I'm writing about here.
In the discussion of the yadda yadda yadda operator, Damian says that
... in this example, Err::BadData is *never*
Damian Conway <[EMAIL PROTECTED]> writes:
> Piers wrote:
>
>> Over on use.perl, someone spotted what looks like a bug in the example
>> program which (if it *is* a bug) is fixed by using unary '*', but
>> that's not what I'm writing about here.
>
> I'll admit I'm not sure whether it is a bug or n
So, I've been looking at the stuff in the Apocalypses and Exegeses so
far and I think I've reached the point where I can have a crack at
using perl 6 to implement another programming language. Coming
(possibly) to a mailing list near you, Perl6::Scheme...
--
Piers
"It is a truth universally
Damian Conway <[EMAIL PROTECTED]> writes:
>> Good oh. BTW, (and apologies for repeating the question I asked
>> elsewhere) are we going to see an updated Apocalypse 4 incorporating
>> all the changes made to get E4 to work?
>
> Probably not any time soon. Previous Apocalypses haven't been
> updat
Just a thought, I assume that something like the following will be legal:
given $msg {
when Message::ACK {
$msg_store.fetch( $msg.acknowledged_msg ).set_state($msg);
}
when Message::SMS {
when .is_incoming { ... }
when .is_outgoin
Damian Conway <[EMAIL PROTECTED]> writes:
>> > Eventually, of course, we'll have to go back and make eveything
>> > copacetic, but at the moment I think most folks would rather have us
>> > working on writing unwritten A's and E's, rather than rewriting
>> > written ones. ;-)
>>
>> Point. Maybe
Jonathan Scott Duff <[EMAIL PROTECTED]> writes:
> On Wed, Apr 03, 2002 at 11:27:10AM -0800, Larry Wall wrote:
>> They are assumed to be declared in alphabetical order. Whoa! you say,
>> that could get confusing. It surely can. But if you're doing
>> something complicated enough that alphabetic
Damian Conway <[EMAIL PROTECTED]> writes:
> Larry explained:
>
>> : Umm. didn't you say bare blocks were going away?
>>
>> Rule #2 was invoked.
>>
>> The current thinking is that any bare block will never be interpreted
>> as returning a closure. You have to use explicit C or C
>> to retur
Larry Wall <[EMAIL PROTECTED]> writes:
> Dan Sugalski writes:
> : >Strict, but doesn't really matter. Nobody sane will use anything other
> : >than $^a and $^b.
> :
> : Well Are we allowing non-latin characters in identifiers? There
> : may be potential interesting ramifications with those
Larry Wall <[EMAIL PROTECTED]> writes:
> Piers Cawley writes:
> : Larry Wall <[EMAIL PROTECTED]> writes:
> :
> : > Dan Sugalski writes:
> : > : >Strict, but doesn't really matter. Nobody sane will use anything other
> : > : >than $^a and $^b.
&
So, here I am working on a Scheme interpreter in Perl 6, and I'm
trying to write it in a (for want of a better description)
'Scheme-like' fashion with lots of recursion.
The trouble is, unless Perl6 is going to be guaranteed to do
optimization of tail calls, this is going to lead to horribly slo
Damian Conway <[EMAIL PROTECTED]> writes:
> Joe Gottman wrote:
>> For instance, what would happen in the
>> following code?
>>
>> sub func1() {
>> our $varname is private \\= 1;
>> return $varname;
>> }
>>
>> sub func2() {
>> our $varname is private \\= 2;
>
> Fatal error: "Private v
"Jonathan E. Paton" <[EMAIL PROTECTED]> writes:
>> : Piers Cawley writes:
>> :
>> : So, here I am working on a Scheme interpreter in Perl 6, and I'm
>> : trying to write it in a (for want of a better description)
>> : 'Scheme-like
Dan Sugalski <[EMAIL PROTECTED]> writes:
> At 11:45 PM +0100 4/5/02, Piers Cawley wrote:
>>So, here I am working on a Scheme interpreter in Perl 6, and I'm
>>trying to write it in a (for want of a better description)
>>'Scheme-like' fashion with lots
Larry Wall <[EMAIL PROTECTED]> writes:
> Rafael Garcia-Suarez writes:
> : Larry Wall wrote in perl.perl6.language :
> : >
> : > Such a grammar switching routine could operate either over a lexical
> : > scope or over the rest of the file. The only restriction is that
> : > one module not clobbe
Larry Wall <[EMAIL PROTECTED]> writes:
> Piers Cawley writes:
> : In a use.perl post not far away I sketched out something like the following:
> :
> : module foo is Mixin {
> :
> : sub category($category, &block) {
> : &block.abst
Whilst I've been hacking the perl 6 scheme interpreter I've found
myself using code like the following
method get_token( $self: ) {
given $self.get_char {
when !defined { fail IOException: msg=> "EOF" }
when /\s/ { $self.get_token }
when '(' { $the_left_paren }
"Jonathan E. Paton" <[EMAIL PROTECTED]> writes:
> but wait, there's more... what does:
>
> @multi_dim[$a][$b][$c]
>
> give?
Who cares? So long as the intermediate results in
@multi_dim.[$a].[$b].[$c] respond to [].
--
Piers
"It is a truth universally acknowledged that a language in
poss
Damian Conway <[EMAIL PROTECTED]> writes:
> Piers asked:
>
>> So, is there any chance that we'll be able to do:
>>
>> class ical {
>> use object_name '$self';
>>
>> method ical {
>> given $self.ology {
>> ... { $self.ish }
>> }
>> }
>> }
>
> Of course, if you
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 b
Dan Sugalski <[EMAIL PROTECTED]> writes:
> At 2:33 PM +0100 4/7/02, Piers Cawley wrote:
>>"Jonathan E. Paton" <[EMAIL PROTECTED]> writes:
>>> but wait, there's more... what does:
>>>
>>> @multi_dim[$a][$b][$c]
>>>
>&g
Aaron Sherman <[EMAIL PROTECTED]> writes:
> On Mon, 2002-04-08 at 13:01, Jonathan E. Paton wrote:
>
>> I'm I beating this point to death, or do I have to write
>> the RPC:
>>
>> "Keep the {} and [] notation for hashes and arrays"
>>
>> or
>>
>> "Save our array!"
>
> Let's boil this RFC down to
"Mark J. Reed" <[EMAIL PROTECTED]> writes:
> On Mon, Apr 08, 2002 at 07:56:11PM +0100, Piers Cawley wrote:
>> > Also, just wondering:
>> >
>> >$_[_][EMAIL PROTECTED] _=_0_-_
>> >
>> > does that work the way I expect it to?
&
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) { ...
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
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 C with
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 un
201 - 232 of 232 matches
Mail list logo