This is inspired inpart by discussions I had on #perl6.
Basically what is the behavour of the hyperop when applied to two
hashes. The concensus was that the hashes would get unrolled into
lists, and the pairs would get matched up more or less randomly.
I don't feel that this is a
Following a conversation with Chip on IRC, is this
my @y := @foo[0..][1];
legal?
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;
It's a fun:
sub newline {
\n x $_;
}
alias newlines, newline;
So you can write:
print 5.enters;
Currently, you have to
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 last line should output 40, consider:
sub innocent_sub ($var is copy) {
my $foo =
This:
multi sub is_equal(Integer $a, Integer where { $_ == $a } $b: ) { 1 }
hurts. At least as I've been given to understand it[*], is impossible
to implement, because the second parameter's type can't be precalculated
in order to prepare for MMD dispatching.
The type object describing $b
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 Perl6 Timeline By Apocolypse as reference
material. I am rather interested in
On 6/14/05, Piers Cawley [EMAIL PROTECTED] wrote:
Following a conversation with Chip on IRC, is this
my @y := @foo[0..][1];
legal?
Definitely not. But it sure would be nice if this:
my @y := @foo[0...][1];
were.
Luke
Chip Salzenberg wrote:
This:
multi sub is_equal(Integer $a, Integer where { $_ == $a } $b: ) { 1 }
hurts. At least as I've been given to understand it[*], is impossible
to implement, because the second parameter's type can't be precalculated
in order to prepare for MMD dispatching.
Hi,
I would have some general Perl6 programming questions. Where should I ask
them? It's not about language design, not about compiling/compilers and
even not related to the internals.
As more and more people will start hacking Perl6, I think, that it would
be useful to having a list for
I'd like a ruling that ?CALLER::BLOCK is not a general-purpose
block promoter, but only works if the calling block already marked
itself as callable, perhaps by mentioning ?BLOCK in its body.
First, I like the idea that all blocks act as if they were subs WRT
being callable and accepting
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} =
On Tue, Jun 14, 2005 at 03:43:42PM +0200, TSa (Thomas Sandlaß) wrote:
Chip Salzenberg wrote:
This:
multi sub is_equal(Integer $a, Integer where { $_ == $a } $b: ) { 1 }
hurts. At least as I've been given to understand it[*], is impossible
to implement, because the second parameter's type
Hi,
Just wanted to say the same. All my questions starting as How to...
and Is this... are just to trivial to ask here :)
OTOH as there is no global Perl5 list (AFAIK, at least), these things
should go to the regional mail-lists - later on. However, at this
phase of develpment of
On Tue, Jun 14, 2005 at 04:27:20PM +0200, Fagyal Csongor wrote:
Just wanted to say the same. All my questions starting as How to...
and Is this... are just to trivial to ask here :)
- Fagzal
I would have some general Perl6 programming questions. Where should I
ask them? It's not about
On Tue, Jun 14, 2005 at 03:54:45PM +0200, BÁRTHÁZI András wrote:
I would have some general Perl6 programming questions. Where should I ask
them? It's not about language design, not about compiling/compilers and
even not related to the internals.
As more and more people will start hacking
Hi,
So, that leaves either perl6-language or a new list. Personally I
could see it going either way -- even though general Perl6 programming
questions aren't directly about language design, it may still be
useful to language designers to see the types of questions that
people are asking and to
Hi,
Anyway, I understand why you wrote what you wrote, so as there will be no
decision, I'll ask my questions on perl6-compiler.
I mean, perl6-language.
Bye,
Andras
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
Hi,
I'm busy with creating a widget based web templating engine, but I have
some problems, please help me. The engine would allow you to define
widgets, and use those in your templates. I would like it to be an OO
module.
In the template, you can write this:
server:input id=name
Hi,
$wte = new WTE;
$wte.register('input', my_input_widget);
I don't prefer it, to be 20-30 register line in my programs, that does
nothing, just register.
maybe something like this?
class MyWTE is WTE {
method input (...) {...}
method some_other_thing_you_would_have_had_to_register
Hi,
BRTHZI Andrs wrote:
$wte = new WTE;
$wte.register('input', my_input_widget);
I don't prefer it, to be 20-30 register line in my programs, that
does nothing, just register.
maybe something like this?
class MyWTE is WTE {
method input (...) {...}
method
Chip Salzenberg wrote:
Link link.
http://www.cs.washington.edu/research/projects/cecil/www/Papers/gud.html
In case it matters, we're trying to support the Perl 6 semantics of
both ($a:$b:) and ($a,$b:). The former looks like something that
could be implemented with something called
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
Ingo Blechschmidt wrote:
# No problem:
my $data = BEGIN {
my $fh = open some_file err...;
=$fh;
};
# Problem;
my $fh = BEGIN { open some_file err... };
# Compile-time filehandle leaked into runtime!
say =$fh;
[...]
* There's a boolean property
Luke Palmer [EMAIL PROTECTED] writes:
On 6/14/05, Piers Cawley [EMAIL PROTECTED] wrote:
Following a conversation with Chip on IRC, is this
my @y := @foo[0..][1];
legal?
Definitely not. But it sure would be nice if this:
my @y := @foo[0...][1];
were.
I think that's what I
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
David Formosa (aka ? the Platypus) [EMAIL PROTECTED] wrote:
If you consider arrays to be hashes keyed by integers then @a ..
@b does the equiverlent of an inner join. I would suggest that if we
are going to have outer join versions then we have something like this
It does? I thought that
Hi!
While playing around with some japh-obfus (which turned into my first commit
to Pugs, yay!) I spotted this
say a b c ~ 1 2 3;
# prints a1b2c3
my $string=a b c ~ 1 2 3;
say $string;
# prints a1 b2 c3
I suppose this is caused by some context things. Csay imposes list context
(as print in
Hi,
Thomas Klausner wrote:
my $string=a b c ~ 1 2 3;
say $string;
# prints a1 b2 c3
But where do the spaces in the second example come from?
the spaces come from the stringification of lists/arrays:
my @array = a b c d;
say [EMAIL PROTECTED];# a b c d
You can use
say
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
Larry Wall skribis 2005-06-14 14:15 (-0700):
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
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
Larry Wall skribis 2005-06-14 14:54 (-0700):
: [ '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 preserving the (mostly false) symmetry of split and join.
I think I argued for .cat on the basis that
At 12:01 AM +0200 6/15/05, Juerd wrote:
Larry Wall skribis 2005-06-14 14:54 (-0700):
: [ '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 preserving the (mostly false) symmetry of split and join.
Darren Duncan skribis 2005-06-14 15:12 (-0700):
And the space character is really a rather arbitrary looking value
for a default and is equally valid with, say, the line break, so how
can one say it is better?
Array stringification uses it too, by default. The lesser the number of
defaults,
Juerd wrote:
Still, argumentless split probably defaults to something. And ' ' is a
good thing to default to, IMO.
I like /\s+/ as a default for split better.
-- Rod Adams
38 matches
Mail list logo