; %foo {'bar'} >> DTRT, but I can't
> remember it", which certianly happens to me fairly often.
Well, I'd obviously quite like that ;-)
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
On Thu, May 04, 2006 at 01:56:44PM +0300, Markus Laire wrote:
> On 5/1/06, Paul Johnson <[EMAIL PROTECTED]> wrote:
>
> >But then again, as I said, I really don't see the problem that is being
> >solved.
>
> This "long-dot" can be used for many thin
_.foo for @things_to_foo;
or something.
I like lining up my code as much as the next programmer, and probably a
lot more, but I just don't see the need for this syntax which seems
ugly, confusing and unnecessary.
But then again, as I said, I really don't see the problem that i
ble to do that, and maybe
to declare which hash keys or array elements are valid.
Do we have that already?
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
d only be for the
benefit of people and modules that mess with the op tree. Again, I
submit that an optimisation that changes normal behaviour is broken and
that, in general, programmers shouldn't need to worry about what
optimisations are going on under the covers.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
t since then it would seem that for
some strange reason more people have been exposed to functional
programming.
http://www.mail-archive.com/perl6-language@perl.org/msg11967.html
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
ogram Perl
as if it had sequence points and undefined behaviour. This often
results in explaining what they are, but maybe that's not such a great
problem.
See http://www.eskimo.com/~scs/C-faq/faq.html, especially sections 3.8
and 11.33 for details.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
tters."
>
> I'd like to be able to s/Python/Perl 6/ above, but after many discussions on
> this topic, I'm still not sure if I can.
http://www.nntp.perl.org/group/perl.perl6.language/9576
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
Austin Hastings said:
> Let's look at boolean xor:
>
> if ($a xor $b xor $c) {...}
>
> should succeed only when exactly one of ($a, $b, $c) is true.
I think it is generally accepted that xor is true iff an odd nnumber of
its argumnets are true.
--
Paul Johnson - [E
rust this will be addressed (if it hasn't been already):
perl5 -le 'print "gah!" if exists $a{b}{c}; print "phooey!" if exists $a{b}'
perlfunc says:
This surprising autovivification in what does not at first--or even
second--glance appear to be an lvalue c
look at the recent p6i archives for the gory details.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
'
It's alright. It works just fine as a module. I think Parrot even has
an appropriate opcode.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
rge together. If it's Wednesday it must be Zurich. We
enjoyed you being here even if you can't remember it ;-)
Oh well, it was only two letters. There wasn't anything about
approximate matching in A5, was there?
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
e of the left to right ordering.
For example,
select((select(OUTPUT_HANDLE), $| = 1)[0]);
which is (was?) a fairly common idiom, is documented, used in core
modules and tested. I suspect that a lot would break if the order of
evaluation changed. And I think it would be sensible for Perl 6 to
define such an order.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
ays to be undef. Both
approaches can also be extended to hashes.
I think the question of what to do with int arrays is somewhat separate.
Might I suggest that storing undef in an int array is not appropriate,
and thus having a (user defined) default value in an int array is also
not appropriate. If you
27;sub e { print exists $a[shift] ? 1 : 0 } e 2; $a[4]++; e 2; e 4; delete
$a[4]; e 2; e 4'
0
0
1
0
0
No, I don't know which side I'm arguing anymore :-)
Actually, I do. I don't like exists on arrays.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
03-01-28 at 14:47, Paul Johnson wrote:
> > Michael Lazzaro said:
>
> > > 2a) When a cell is explicitly re-undefined, does the default value take
> > > effect?
> > >
> > > my @a is Array( default => 'foo' ) = (1,2,3);
&g
; my @a is Array( default => { $_ ** 2 });
>
> STRAWMAN ANSWER: Yes, because it's cool.
No, because it's unnecessary. You can always do
my $value = @a[$x] //= $x ** 2;
or skip the = depending on how you are trading memory / speed.
Yes, I know that just about every
On Sat, Jan 18, 2003 at 02:11:37AM +, Simon Cozens wrote:
> [EMAIL PROTECTED] (Paul Johnson) writes:
> > That may well be true, but it seems to me that if people's jobs depend
> > on those projects then there is (or could be or should be) a source of
> > funding
the companies who are
(hopefully) making a profit on the backs of those projects. Yes, I know
it's not that easy.
No one's job depends on Perl 6 or Parrot (yet). Well, hardly anyone's :)
Still, I suppose I am preaching to the choir in the wrong chapel.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
h
> funding Dan was in fact supporting the much broader benefits of Parrot
> development and funding me probably benefitted Perl 5 even more than Perl
> 6).
Well, I'll be pretty interested to discover what cause is deemed more
deserving than Larry, Perl 6 or Parrot. The P still
n change for its own sake.
> I have to wonder how many people actually like this syntax, and how many
> only say they do because it's Damian Conway who proposed it.
I trust that we are all sufficiently grown up and devoid of marketing hype
that we can judge suggestions on their own merit.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
On Fri, Jan 10, 2003 at 03:55:30PM -0500, Andrew Rodland wrote:
> On Friday 10 January 2003 11:42 am, Paul Johnson wrote:
> > Damian Conway said:
> > > Andy Wardley wrote:
> > >> The arrow is a special case. I don't read that first character
> > >> a
ood.
When I later saw it using mutt in an xterm, the tilde was at the top of
the character, where I was more used to seeing it and it didn't look like
an arrow any more, nor did it look very good to me.
This is the way it looks on my browser ~>
When I get home I'll mail a messa
On Mon, Dec 09, 2002 at 02:20:01PM -0800, Austin Hastings wrote:
>
> --- Paul Johnson <[EMAIL PROTECTED]> wrote:
> > On Mon, Dec 09, 2002 at 01:58:11PM -0800, Austin Hastings wrote:
> > > Ahh. This is better. How does one implement a more sophisticated
>
> Or what?
How about the same way as one would do it now? Presumably we won't all
forget how to program when Perl 6 comes out.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
Japan (excuse the jet lag which takes this approach.
Lisp is Japanese?
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
print <<\"a" "b" "c">>;
> print «\"a" "b" "c"»;
Presumably without the backslash here too.
> print qw/"a" "b" "c"/;
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
le what "pure" means, which would be much harder than
> teaching them what "cached" means.
A "pure" function may be run zero, one or more times every time you call
it. And every time you don't. ;-)
[ I notice that Piers has just said about the same as me in one sentence. ]
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
at a higher level. Maybe the end result is the same, or maybe
there are other optimisations which can be made with "pure" functions.
It's a way of nailing down the contract on the function rather than
specifying implementation details.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
my copy of ispell
> doesn't recognise it. But at least all English speakers can agree how to
> spell words that don't end in i[zs]e (or end ou?r or [cs]e :-)
Quite.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
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, ar
be sorted out before we
can start writing Perl 6 in earnest. In one way I hope that is true.
In another I hope it isn't ;-)
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
rying to fathom or explain the
incantations required to program on various platforms with a backdrop of
unfamiliar, buggy or non-existent Unicode support.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
chromatic said:
> On Tue, 29 Oct 2002 14:19:59 -0800, Paul Johnson wrote:
>
>> So I would like to see able to tag arbitrary information onto just
>> about everything, including files, packages, classes, subroutines,
>> blocks, control structures, statements, lines, expre
support for saying that, that seems to be a
problem for the applications that want the data, although I'd be glad to
be shown that I am wrong and that the language can support that in a
clean and concise way. Instead, I just want somewhere to hang arbitrary
data.
Thoughts?
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
On Mon, Oct 28, 2002 at 11:55:24AM -0800, Larry Wall wrote:
> Well, I don't believe in "none" since it's really easy to say !any()
Does that have any implications for "unless"?
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
ven remember the English for $_? Or how to spell
"The string following whatever was matched by the last successful
pattern match"?
Anyway, you can draw your own conclusions from the experiment.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
On Sat, Oct 26, 2002 at 11:24:23AM +0100, Nicholas Clark wrote:
> On Sat, Oct 26, 2002 at 01:59:46AM +0200, Paul Johnson wrote:
> > On Fri, Oct 25, 2002 at 06:28:28PM -0400, Miko O'Sullivan wrote:
> > > From: "Larry Wall" <[EMAIL PROTECTED]>
>
ot; function that takes a context
> name as the first argument.
The negate operators we have already:
perl -e '$x = "0"; print !$x'
perl -e '$x = "10.000"; print -$x'
The others save use doing:
perl -e '$x = "2"; print !!$x'
pe
erties
and overloading.
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-11/msg00124.html
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
t_ typically implemented in the same
> manner. Treating the two as interchangeable might imply runtime
> overhead.
Bah! I bet the internals list will laugh at you :-)
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
On Thu, Oct 03, 2002 at 02:29:57PM -0700, Michael Lazzaro wrote:
> (As a lame aside, are we going to have a concept of "private" vs.
> "protected" vs. "public", or just private/public?
No protected. Even Stroustrup admits it was a mistake in D&E.
-
In the
> equivalent Perl 6 syntax, insider the inner loop C<$_> will be an alias
> of C<$fruit> and there wouldn't be any way of getting the current line.
Well, there's always $OUTER::_ and $OUTER::OUTER::_ etc if you _really_
need them.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
er, from Larry or Damian, was
that it might return undef or maybe it would keep returning its last
value.
Is that sufficiently vague?
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
to explicitly name it
anyway, and maybe put some of the loop in a sub too.
> So I'm unconvinced that having an explicitly named topic always also
> clobbering C<$_> is a good idea. But if it is, then we need a simple
> syntax for reading file input lines into an explicitly named topic.
Allison Randall gave a really good talk on this at YAPC::Europe. I
think she gave it at YAPC::NA too.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
I've always found the word "like" to be very wishy-washy in a computer
langauge. In what way is newbaz like baz? And just how alike are they?
There must be a better way to describe this.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
eed to weigh in with opinions. Had I designed Perl
there would have been an elsunless and I would have used it. Now I'm
glad there isn't an elsunless and I never had the chance to use it :-)
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
they are calling a method or accessing an instance variable, and
when I change my implementation from one to the other they shouldn't
have to change their code.
See http://www.elj.com/elj/v1/n1/bm/urp/ for more details.
Languages like C++ don't support this and you end up writing lo
Larry to say, "We have decided to use $me, $myself and $i.
And then we also get the Perl 6 theme tune thrown in for free.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
On Wed, Aug 22, 2001 at 10:34:49AM +0100, Dave Mitchell wrote:
> Paul Johnson <[EMAIL PROTECTED]> wrote:
> > Actually, foo() is not a closure. A closure is an anonymous subroutine
> > and foo() clearly has a name.
>
> Damain's definition of a closure inclu
w, if you were proposing that named subroutines should behave like
closures in this regard, which is what Piers and probably most others
were expecting, I suspect that you would probably get broad agreement.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
;
> > uri
>
> We must demand that the feature come with a way to seal the current
> context from manipulation, even possibly a way to block accesses.
Doesn't sound very Perlish to me.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
On Mon, Jul 09, 2001 at 11:46:30PM -0500, Jarkko Hietaniemi wrote:
>
>
> XML
> is
> much
> too
> verbose
And it should be neither written nor read by people ;-)
> .
>
>
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
pretty good track record with these sorts of
things.
Anyway, what do you think this is? Some kind of democracy?
:)
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
sation and embellishment is allowed, but don't get too far off
the beaten track or people won't be sure which message they should post
next and then the thread will die.
[ :-) for those who like such things ]
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
's recent patch changes this for "do" at least.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
gards to the
> concept of "nosideeffects".
By using a correct term, although it may be unknown to the average
programmer, the programmer is presented with an oportunity to learn, and
may even be exposed to a completely new programming paradigm.
And, by the way, it is already possible
On Mon, Mar 26, 2001 at 10:02:40AM -0600, David M. Lloyd wrote:
> $obj->method; # Clearly void context.
Unless it's not. For example as the last statement in a subroutine.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
On Thu, Feb 15, 2001 at 02:47:55PM -0500, Steve Simmons wrote:
> Paul Johnson wrote:
>
> > Has anyone considered the problems associated with XS code, or whatever
> > its replacement is?
>
> Pardon my ignorance, but what's XS code?
perldoc perlxs
perldoc perlxstu
On Thu, Feb 15, 2001 at 10:43:38AM -0300, Branden wrote:
> Paul Johnson wrote:
> >
> > Has anyone considered the problems associated with XS code, or whatever
> > its replacement is?
> >
>
> The big problem about having more than one version of a module
y. Just because you write Foo::bar in your module doesn't mean
> > that Perl can't know which version of Foo:: you mean.
Has anyone considered the problems associated with XS code, or whatever
its replacement is?
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
62 matches
Mail list logo