I see that there's work being done on a perl6 implementation under
languages in parrot. How is this effort related to the pugs
project? Is the aim of this to provide an alternative implementation
of perl6 to pugs? Is one of them the destined to be the canonical
implementation, or is the
FAR outweigh any
additional complexity. Ruby could benefit from this, too. (While
first-class blocks rock my world, the weird subroutine signature stuff
most certainly doesn't.)
Rob
what I named above and the *~ backup files that emacs
creates.
Still no luck. I type make, I get pm_to_blib and blib/* skeleton but my
files don't get copied into blib.
Since I don't think I'm stupid, but I'm willing to admit ignorance:
WTF??? What did I miss here??
TIA!
L8r,
Rob
; );
>
> Try that...
Well... I don't know if your conjecture is true, but your suggestion
worked like a charm. Thanks! (and now I'm on my way to reorganize my
other distribution...)
L8r,
Rob
here immediately springs into being
> a Dog role empty of everything but the expectation that whatever does
> that role provides everything publicly accessible that an instance of
> the Dog class does.
In other words, a role is just a closed class and a class is just an
open role? Larry stipulated this about a month ago.
Rob
> But if we have a mandatory type inferencer underneath that is merely
> ignored when it's inconvenient, then we could probably automatically
> delay evaluation of the code. . . .
I'm not so certain that ignoring the mandatory type inferencer is a
good idea, even when it's inconvenient. I don'
angeable).
And, if you pass (1..Inf) to map/grep/sort, it would HAVE to return an
iterator back, otherwise you'll hang at that instruction.
Of course, if you said "while (my $n = 1..Inf) { }", it's on your head
to provide a "last" in there somewhere.
Rob
hat for all b in N, b != 1, there is a unique
predecessor. If we have that, then we get the laws of arithmetic. Is
it possible to put that into the type inferencer if the types are
defined as iterators? Kind of like Church numbers, but in P6 notation.
I think that by defining our types as iterators, we can satisfy the
succ/pred requirements of Peano's, meaning we have the arithmetic
rules.
Rob
of a string modify
the original?
Rob
}
>
> # for restored, as the modified for went out of scope:
> for -> $item { say $item }
> # "a\nb\nc\n"
Is there a list of the statement control items that are implemented as
such vs. implemented in another way?
Thanks,
Rob
" and ".".
The key would be that the $actions arrayref would get push'ed/pop'ed
as you enter/leave a given lexical scope.
Obviously, this could be optimized to an extremely large degree, but
it -should- work.
Rob
d be -1 (under 2's complement) and ^1 would
be -2. I'm not sure where this would be useful, but that's what comes
to mind when discussing a unary ^.
Thanks,
Rob
On 11/23/05, Luke Palmer <[EMAIL PROTECTED]> wrote:
> On 11/23/05, Rob Kinyon <[EMAIL PROTECTED]> wrote:
> > On 11/22/05, Larry Wall <[EMAIL PROTECTED]> wrote:
> > >
> > > for ^5 { say } # 0, 1, 2, 3, 4
> >
> > I read this and I
>
> Flattened lists would still loop forever (or fail):
>
> say **(1..Inf);
>
> $s = substr( ~( **(1..Inf) ), 0, 10 );
This would work, I think, if ranges were convertable to iterators,
stringification was lazy, and substr() informed the stringification of
how much it needed to do. I'm not sure how feasible that last one is
...
Rob
could potentially do different things, including possibly run out of
memory in some cases. Plus, what if the @list isn't lazy?
Better, I think, would be:
say substr( ~(1..Inf) is lazy, 0, 10 );
Or, have substr()'s signature be:
sub substr( Str $str is rw is lazy, Int $start, Int $?end, Int $?replacement );
Rob
On 11/23/05, Larry Wall <[EMAIL PROTECTED]> wrote:
> : I'm also puzzled that you feel the need to write 0..$n-1 so often; there
> : are so many alternatives to fenceposting in P5 that I almost never write
> : an expression like that, so why is it cropping up that much in P6?
>
> Couple reasons occu
grant ( Sub, Var, [Var, ... ] )
revoke( Sub, Var, [Var, ... ] )
It is an error to:
* attempt to grant/revoke access to a variable you don't have access to
* attempt to grant/revoke access to a variable that isn't in scope for
the grantee
Thanks,
Rob
was amenable to parsing by Perl 6 rules (with a little help from a
> bottom-up operator-precedence expression parser.)
Once Patrick is done with PGE, will it be able to parse Perl5? If so,
why aren't we focusing on that?
Rob
On 12/8/05, Larry Wall <[EMAIL PROTECTED]> wrote:
> [snip] Certainly, as you speculate, if different authors want
> to share an API, they can give it an "API" author that knows how to
> delegate to one of the authors.
Would you mind elaborating on this some more?
Thanks,
Rob
ring thoughts. Bonus points to whomever
can help me bridge the gap between what I just blathered and an
elegant solution to Sudoku.
Rob
On 12/16/05, Ovid <[EMAIL PROTECTED]> wrote:
> --- Rob Kinyon <[EMAIL PROTECTED]> wrote:
>
> > As for the syntactic sugar, I'm not quite sure what should be
> > done here. And, with macros, it's not clear that there needs
> > to be an authoritative ans
ason than
> to cast a string to your new data type. Otherwise, your data types
> would only be constants because you would have no way of assigning a
> value.
Fair enough. One would need to be able to convert back and forth
between the base type (Int, String, etc) and the type.
Rob
as for people that like to turn
> strictures or warnings off, I suggest that there can be an optional
> feature, perhaps a pragma or better a core module, where a developer
> can say that they want undefs to automatically become zero in numeric
> contexts or an empty string in string contexts, or false in boolean
> contexts, etc. But they should have to explicitly activate that
> feature, like saying "treat undef as 0 in all my code", and this
> treating would not happen by default.
No - a stricture. :-)
Rob
quot;This should print out." }
I'm not sure that works with the Principle of Least Surprise. While I
cannot say what it is, you're saying that I can now say what it isn't.
While that follows from typing, that doesn't follow from the common
understanding of undef.
Rob
Of course, this doesn't work for arbitrary complex structures, but I
don't think anything would work for those.
Rob
rray can be useful. How about
my @s := @a[0,2,4] is alias;
@a[2] = 3; # @s[1] == 3
@s[1] = 4; # @a[2] == 4
The default slicing behavior would default to "is copy", to preserve
the current semantics. Does that sound reasonable?
Rob
On 12/27/05, Larry Wall <[EMAIL PROTECTED]> wrote:
> On Tue, Dec 27, 2005 at 12:10:45AM -0500, Rob Kinyon wrote:
> : Creating an array whose positions are aliases for positions in another
> : array can be useful. How about
> :
> : my @s := @a[0,2,4] is alias;
> :
&
py list of arrays' or 'the rest
> of the arguments, without flattening'. If I *really* want aggressive
> flattening then I can call, say, @slurpy_param.flatten
Does this imply that [EMAIL PROTECTED] === @slurpy.flatten ?
Or, put another way, can't we just say that prefixed * is symbolic
notation for flatten() in the same way that postfixed [] is symbolic
notation for slice()?
Rob
ted given the possibility of tying
variables (or is this a Perl5ism that is being discarded in Perl6?)
Rob
true, then $x > $y is false. Otherwise,
the definitions of <= and > have been violated.
And, if I can't put them in a <=, then Perl should complain very
loudly, just as if I put something else that shouldn't be put into <=,
like a Person object. If I call min() or min2() with a Person object
and an array, I should expect loud complaints from the runtime. If a
junction cannot behave itself in a numeric comparison, then similar
complaints should be made.
Rob
And it just DWIM for numbers like 1.2 ( -> 2.2). If Real is what 1.2
is implicitly coerced into, what do I do now?
Remeber a few truisms:
* The most common usage of Perl after bad CGIs is systems administration.
* The most powerful feature of Perl for sysadmins is the scalar
Rob
@_[0] + 1 } and a prev of { @_[0] - 1 } (boundschecking against the
limits of the type, of course) ... ?
That sounds reasonable and dwimmish to me.
Rob
al" issues where it might or might not reference $x. I'm okay
> with requiring lexical scopes to have some existing relationship
> with dynamic scopes, especially when we know some initialization is
> required.
What other forms would be useful other than "our sub g {...}"? If
they're useful, shouldn't they have keywords?
Rob
int of boxing to provide a hardware-independent dependable
solution at the cost of additional cycles?
Rob
-intuitive.
I think that class methods should be explicitly defined as class
methods and you cannot call a class method upon an instance, just as
you cannot call an instance method upon a class. Plus, this should be
determinable (for the most part) at compile time, which is a bonus,
imho.
Thanks,
Rob
On 1/18/06, Larry Wall <[EMAIL PROTECTED]> wrote:
> On Wed, Jan 18, 2006 at 01:56:53PM -0500, Rob Kinyon wrote:
> : Today on #perl6, Audrey, Stevan and I were talking about $repr. A
> : tangent arose where Audrey said that the difference between class
> : methods and instance
TOLOAD (or method_missing
or whatever) to check .blessed_into and try that package, if one is
set.
Also, given that the semantics of a number of items is changing (
"".split(':') anyone?), how closely will P6 really mirror P5 behavior
given identical code?
Rob
On 1/18/06, chromatic <[EMAIL PROTECTED]> wrote:
> On Wednesday 18 January 2006 17:57, Rob Kinyon wrote:
>
> > Well, for one thing, you can't write OO code in P5.
>
> I'll play your semantic game if you play my what-if game.
>
> I have a fair bit of Perl 5 c
On 1/18/06, chromatic <[EMAIL PROTECTED]> wrote:
> On Wednesday 18 January 2006 19:11, Rob Kinyon wrote:
>
> > As for how that will be handled, I would think that it would be as follows:
> > - in Perl6, objects created in another language will be treated as
> &g
Perl5 and Python. Worrying about it in userland is just going
to cause you headaches.
Rob
On 1/18/06, chromatic <[EMAIL PROTECTED]> wrote:
> On Wednesday 18 January 2006 19:39, Rob Kinyon wrote:
>
> > No, you want to specify the $repr in CREATE(). But, p6hash will still
> > not be the same as a ref to an HV. Frankly, I think you're better off
> > let
rue NEXT semantics, and the ability to
completely rewrite the method dispatcher (if you really feel like it).
I think we've gone well beyond &bless.
Rob
On 1/19/06, Juerd <[EMAIL PROTECTED]> wrote:
> Rob Kinyon skribis 2006-01-18 20:57 (-0500):
> > Well, for one thing, you can't write OO code in P5.
>
> Nonsense. OO isn't a set of features, and OO isn't syntax.
>
> Granted, syntax can really help to unde
ull form everywhere). However, the underlying type
system will only consider the structure of the type when doing its
job."
What's wrong with Perl doing things that way? duck-typing with names
... sounds like a plan to me ...
Rob
&bless was a brilliant idea for Perl5. It's wrong for Perl6.
Rob
On 1/19/06, Juerd <[EMAIL PROTECTED]> wrote:
> Rob Kinyon skribis 2006-01-19 16:10 (-0500):
> > There are no references in Perl6.
> I have to admit, though, that I've never seen this statement, or
> anything implying it. It's entirely new to me.
>
> Is your Per
On 1/19/06, chromatic <[EMAIL PROTECTED]> wrote:
> On Wednesday 18 January 2006 20:02, Rob Kinyon wrote:
>
> > On 1/18/06, chromatic <[EMAIL PROTECTED]> wrote:
>
> > > Answer me this then -- under your scheme, can I subclass a Perl 5 class
> > > with P
oned in this thread, like overlapping
> methods.
Yeah it does because all $repr's are p6opaque with direct access being
converted into attribute access. No method overlap.
Rob
On 1/19/06, chromatic <[EMAIL PROTECTED]> wrote:
> On Thursday 19 January 2006 19:50, Rob Kinyon wrote:
>
> > Nothing. Just like it's not a problem if Perl6 uses one of the
> > Ruby-specific PMCs for storage. In fact, the alternate $repr idea is
> > specifica
unity to provide a translator
for each of those. Then, use #2 for the others.
Pros: The WMoT can punt in about half the cases.
Cons: The WMoT cannot punt in about half the cases.
Rob
On 1/20/06, Nicholas Clark <[EMAIL PROTECTED]> wrote:
> On Fri, Jan 20, 2006 at 04:20:54PM -0500, Rob Kinyon wrote:
> > Pros: Larry doesn't have to do anything more on the WMoT.
> > Cons: The community, for some reason, really wants this
> > auto-translat
On 1/25/06, Juerd <[EMAIL PROTECTED]> wrote:
> Patrick R. Michaud skribis 2006-01-25 13:47 (-0600):
> > On Wed, Jan 25, 2006 at 11:37:42AM -0800, Larry Wall wrote:
> > > I've changed the flipflop operator/macro to "ff", short for "flipflop".
> > > This has several benefits. ...
> > ...another of w
dd Hash-like behavior to something that already has a
postcircumfix<{}> because it probably has that behavior already.
Rob
;
> }
> }
How about just inheriting from Hash?
class Gollum extends Hash;
method postcircumfix:<{}> (Golum $self, Any $key, Any $value) {
die "Nasssty Hobbitses" if $value.does(Hobbit);
$self.NEXT.{}( $key, $value );
}
Rob
od a(::CLASS $self) from each role being
excluded or are all the multimethod a(...)'s being excluded?
Rob
do it natively in P6? As in,
supported within the interpreter vs. through some sort of overloading.
Rob
On 5/15/06, Audrey Tang <[EMAIL PROTECTED]> wrote:
Rob Kinyon wrote:
> I'm pretty sure it wouldn't be very feasible to do this natively in
> P5. But, would it be possible to do it natively in P6? As in,
> supported within the interpreter vs. through some sort of overloa
t
a good idea to be able to read/write in an INT length worth of data when INT
size could vary from machine to machine? Or am I missing the reason for
those?
Thanks.
Rob
dule and have them
be aliases for the standard Directory and IO modules when it's not
Cygwin. If it is Cygwin, then wrap every function call with a call to
cygpath if the directory or file name begins with '/'.
Is this possible? Desirable?
Rob
I have a "working" pugscc and cannot run the test suite. Should I
check in my pugscc changes or post them to the list so that Gaal can
run them against a Pugs that has a working test suite?
Rob
On 5/10/05, Gaal Yahas <[EMAIL PROTECTED]> wrote:
> On Tue, May 10, 2005 at 10
ally like them only
being in scope within the scope of a match, especially under any
strictures.
Second - is it possible or desirable for @/ to be assignable? I can
think of some nice uses for that, primarily in testing ...
Rob
On 5/11/05, Juerd <[EMAIL PROTECTED]> wrote:
> Jonathan Scott Duff skribis 2005-05-11 11:45 (-0500):
> > 1. specialise ()[] to parse as (,)[]
> > 2. scalars are singleton lists, so ()[] naturally
> > 3. make (1)[0] die horribly.
> > #2 implies that (1)[0][0][0][0] == 1
> > #1 means that (1)[0] == 1
be an Int
and anything matching (.+) is going to be a String, and so forth.
There is sufficient information in the regex for P6 to know that $0
should smart-convert into a String and $1 should smart-convert into a
Int. Can't we just do that?
Rob
ation? The @ already indicates you have an array vs.
the % which indicates hash. Is there a reason to have the subscripting
notation also be different?
I understand why it was different in P5, given that you needed to
differentiate $x->[2] and $x->{2} and allow the reader to know whether
$x was an arrayref or hashref. But, that need is gone from P6. (Isn't
it?)
Rob
would likely need a 7-bit option as well)
>
> ..
What's wrong with just defaulting to $self? That's standard P5 OO,
expected everywhere, and you can rename it if you want in the method
definition (which is a nice place). None of this package-global "use
self ^;" stuff that's both magic-at-a-distance and lexically scoped.
("no self ^;" anyone?)
You can't huffman-code everything to 0 everywhere. $self is 5
characters, well-known, very similar to other languages (like JS,
Java, and C++) and only one of the characters is shifted.
Rob
ut instead a standard way to write the current
> > > invocant?
> > I think what Rob suggested is that:
> > method ($foo)
> > means
> > method ($self: $foo)
>
> Then I hereby apologise to Rob for my own poor choice of words.
>
> I don't like th
like "..".
How would
print "Foo" while $self../method;
parse? What does the parser do when it sees "../"? I know what it will
do when it sees that ../method terminates the condition. But, will it
backtrack?
Rob
> Maybe s/Num/NumLike/ or something? Anyway, that's how I think of it
> at least: not that a Str is converted into a Num, but rather that
> certain Strs are Nums.
If that's the case, then if I change a variable that isa Str (that isa
Num), does it change what it inherits from?
Rob
depending on whether or not people think (2) is actually a good idea.
I would think that the Principle of Least Surprise points to (1),
given that the standard explanation of the [EMAIL PROTECTED] is eval join( '+',
@x
) ...
Rob
eds a hostname. Please help me think of a cute
> name! I prefer a short hostname with less than 9 letters.
dev.pugscode.org seems indicated ...
Rob
On 5/23/05, Juerd <[EMAIL PROTECTED]> wrote:
> Rob Kinyon skribis 2005-05-23 11:22 (-0400):
> > I'd like one.
>
> Sure - just think of a nice catchy username! :)
robkinyon please - it's catchy enough.
> > Maybe we should divvy these tasks out. It would
Icelandic offence? :-)
"daughter of an onion" ??
I can't be translating that right ...
Rob
oposed the following:
# Fifteens
$score += 2 * all( 15 == [EMAIL PROTECTED] any( 0 .. 4 ) } );
* Is this syntax legal?
* Does it do what I want it to do?
* Is there another way?
Thanks,
Rob
> Is giving "=" a higher precedence than "," still considered A Good Thing?
>
> I'm not familiar with the reasoning behind the current situation, but
> I'm struggling to come up with any good reasons for keeping it.
>
> Consider the alternative:
>
> my $a, $b = 1, 2; # $b should contain 2, not 1
intainability - I wanna see what the new ops can do!
Thanks,
Rob
default.
Rob
first time most of us will be using these operators, it'd be nice
if P6 provided a nice cheatsheet for them.
Thanks,
Rob
nt to have. There has also been mention of the fact
that module installation needs to tag the author, as well as other
features.
Would someone please mind listing all the functionality desired for
module installation as seen from "use"?
Thanks,
Rob
On 5/28/05, Rob Kinyon <[EMAIL PROTECTED]> wrote:
> (This thread is referencing http://www.perlmonks.org/?node_id=461105)
>
> I'd like to start writing the Module::Build/ExtUtils::MakeMaker for
> Pugs. One of the first things that was mentioned was that the syntax
>
mplemented in pugs):
What's wrong with porting DateTime?
Rob
DateTime to P6? Why can't
installing a module provide new keywords?
Rob
ent agreement here. I don't think this
is something that needs to be built into the language. This is
something that should be strongly-recommended for downloading. Kinda
like you always expect DBI to be around when you go to a new major
client, but it's not core.
Well, I always expect DBI to be around ... :-)
Rob
xOn 5/31/05, Sam Vilain <[EMAIL PROTECTED]> wrote:
> Rob Kinyon wrote:
> > I would love to see a document (one per editor) that describes the
> > Unicode characters in use and how to make them. The Set implementation
> > in Pugs uses (at last count) 20 different Unicode
> > $ordered = [<] @array;
This is asking "Is @array ordered?" In the case of a 0-element or
1-element array, the answer is "It is not disordered", which means
$ordered is true.
$ordered = ! [!<] @array;
Rob
ction returns a simple scalar containing
seconds since the Unix epoch. If, however, it returned a DateTime
object that numified to said value, but provided both localtime() and
gmtime() methods (and a whole lot more) ... wouldn't that be better?
Rob
better to provide a
reduce-noident and reduce-ident and let people consciously choose
which one they want to use ...
Rob
have 0 be the innermost scope,
1 be the enclosing scope, etc.
Rob
able when targeting GHC, but not when
targeting Parrot?
Rob
for finalization.
Alternately, maybe you have a pragma that says "Finalize all classes
unless I specify that it should remain open." Maybe, we need a
negation for close? keep_open?
Rob
rning thrown if it accessed class state.
Rob
> I think this is an opportune time for me to express that I think the
> ability to close-source a module is important. I love open source,
> and I couldn't imagine writing anything by myself that I wouldn't
> share. But in order for Perl to be taken seriously as a commercial
> client-side langua
On 10/13/05, John Macdonald <[EMAIL PROTECTED]> wrote:
> Just because you can't make locking perfect does not mean it
> has no value.
Acme::Bleach it is!
ct
that instances created by Bar's new() function will have access to all
the behaviors and state that instances created by Foo's new() function
will have.
This is why I also feel that class methods shouldn't have the same MRO
as instance methods, but that's a moot discussion.
Rob
thing, just with a little sugar added. It definitely improves
maintainability to have separate keywords for separate ideas, even if
they're implemented identically.
Thanks,
Rob
ges. Granted, it's an unmaintainable
pile of dreck, but it's MY unmaintainable pile of dreck. And, Perl
shouldn't get in the way of my ability to create piles of dreck. I
think inheritable class methods are horrid, but I do agree that Perl
should give you as much rope as you want.
Rob
n before. For example,
for @x -> $x { ... }
for @x -> $x, $y { ... }
That reads like a math proof. "For all X, do such-and-such".
Rob
lexically mark certain function signatures as
checking against said arbitary metadata and you can provide
taint-checking to an arbitrary complexity.
Yeah, that's cool. :-)
Rob
tirely, including all its subclasses/-roles/-.*?
>
> Something like
>
> use DBI as RealDBI;
> use MyDBI as DBI;
Since a Package or a Module can be a scalar, there shouldn't be a
reason why this isn't possible.
Rob
On 10/18/05, Uri Guttman <[EMAIL PROTECTED]> wrote:
> >>>>> "SL" == Stevan Little <[EMAIL PROTECTED]> writes:
>
> SL> On Oct 18, 2005, at 1:45 PM, Luke Palmer wrote:
>
> >> On 10/18/05, Rob Kinyon <[EMAIL PROTECTED]> wrote:
&
icient
disambiguation for the parser. (How maintainable that is, I'll leave
as an exercise for the reader.)
Rob
1 - 100 of 184 matches
Mail list logo