In a message dated Wed, 14 Apr 2004, David Storrs writes:
> Actually, what I'd like to know is when it was decided that %hash{key}
> meant %hash{key()}?? Was it in one of the Apocalypses?
Perhaps it wasn't spelled out, but the implication was certainly there.
Barewords are gone. Braces create a
On Wed, Apr 14, 2004 at 10:06:23PM +0200, Juerd wrote:
>
> If on your keyboard ` is in a worse place than {}, I'd like to know
> where it is.
>
> Juerd
Very top row, one space right of the F12 key. Extremely awkward.
(This is a US keyboard on a Dell Inspiron 5100 laptop.)
Please put me down a
Brent --
I think I missed your point. I'll refer to your two code chunks as
(a) and (b). Maybe you are getting at a finer point, though...
What you've said in (a) is pretty much what I hinted about Inline::Perl6
in my message. If you pass it to a Perl 6 interpreter, then it will
probably use tha
"Jonathan Scott Duff" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Wed, Apr 14, 2004 at 10:31:23PM -0400, Joe Gottman wrote:
> >And Perl 6 isn't? I use backticks quite a bit in Perl, and I don't
see
> > that changing if I upgrade to Perl 6.
>
> Me too, but I write my backti
On Wed, Apr 14, 2004 at 10:31:23PM -0400, Joe Gottman wrote:
> > [EMAIL PROTECTED] (Aaron Sherman) writes:
> > > $ find . -name \*.pl | wc -l
> > > 330
> > > $ find . -name \*.pl -exec grep -hlE 'qx|`|`|readpipe' {} \; |
> wc -l
> > > 123
> > >
> > > `` gets
- Original Message -
From: "Simon Cozens" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 14, 2004 5:04 PM
Subject: Re: backticks
> [EMAIL PROTECTED] (Aaron Sherman) writes:
> > $ find . -name \*.pl | wc -l
> > 330
> > $ find . -name \*.pl
Gregor N. Purdy wrote:
#!/usr/bin/perl6
... # Perl 6 stuff here
use 5; # or, whatever
# Perl 5 stuff here
no 5; # or, whatever
# More Perl 6 stuff here
use python; # you get the idea
Why conflate the two at all? Perl 5 has two separate syntaxes for
forcing a version and embed
Brent --
Clever points are relatively high here, but I find the idea of
doing the notionally simultaneous parse uncomfortable. I really
don't want my programs subject to a hidden double parse cost.
Regards,
-- Gregor
On Wed, 2004-04-14 at 15:30, Brent 'Dax' Royal-Gordon wrote:
> Aaron Sherman
Lets try that again, since I think you parsed my email in a way I
didn't intend (and its at least 50% my fault)
--
In my opinion, starting a script with "#!/usr/bin/perl6" should force
the interpreter to treat it like Perl 6, and if it does anything else
that's just ugly. Similarly, start
Perhaps this is naive, but couldn't something like this be achieved in a
manner similar to how I just implemented it in Ruby? Surely Perl will have
similar capabilities to handle unknown methods.
class Hash
def method_missing(method_name)
str = method.id2name
if str =~ /^\w+$/ then
Scott Walters writes:
> Juerd,
>
> You'd do well to not remove the conclusion of my post when the conclusion
> is that the I strongly support you. Otherwise, your reply, read out of
> context, sounds like you're fending off an attacker ;)
>
> People would do well to seperate the merits of the ide
Aaron Sherman wrote:
On Wed, 2004-04-14 at 09:29, Gregor N. Purdy wrote:
So, we are moving in a more verbose direction, which is a bummer for
people who like to write one-liners and other tiny programs.
perl6 -i.bak -ple 'rule octet {\d{1,2}|<[01]>\d{2}|2[<[1-4]>\d|5<[1-5]>]} s:g/\b\.\.\
I propose we pretend that $$foo = 'bar' stills work and use that as a benchmark
for hash subscripting ease. If it requires fewer keystrokes or neuron fires to
write Perl 4 code, then Perl 6 might be succeding on the programming in the
small but failing at programming in the large.
${'bar'} =
Juerd,
You'd do well to not remove the conclusion of my post when the conclusion
is that the I strongly support you. Otherwise, your reply, read out of
context, sounds like you're fending off an attacker ;)
People would do well to seperate the merits of the idea from the merits of the
suggested
> hash slices aren't used much at all.
People *always* overgeneralize.
On Wed, Apr 14, 2004 at 01:36:21PM -0600, John Williams wrote:
%hash`$key
oops, you contradicted yourself here. "only be useable for \w+ keys"
I guess you disliked his idea so much you didn't bother to read what exactly
he said, right?
"As with methods, a simple [...] scalar should be usable
[EMAIL PROTECTED] (Aaron Sherman) writes:
> $ find . -name \*.pl | wc -l
> 330
> $ find . -name \*.pl -exec grep -hlE 'qx|`|`|readpipe' {} \; | wc -l
> 123
>
> `` gets used an awful lot
But that's in Perl 5, which is a glue language.
--
"Though a program
Randal L. Schwartz skribis 2004-04-14 13:56 (-0700):
> > "Juerd" == Juerd <[EMAIL PROTECTED]> writes:
> Juerd> readpipe/qx/`` isn't used much. In all my @INC, only a handful of uses
> Juerd> can be found. Most are in Debian's modules.
> That's because they aren't particularly interesting in mo
On Wed, Apr 14, 2004 at 01:56:35PM -0700, Randal L. Schwartz wrote:
That's because they aren't particularly interesting in modules, but
in 10 line scripts, they show up quite frequently.
This undermines the rest of your request.
No, actually, it doesn't. Juerd doesn't seem to like ``, but that poi
> "Juerd" == Juerd <[EMAIL PROTECTED]> writes:
Juerd> readpipe/qx/`` isn't used much. In all my @INC, only a handful of uses
Juerd> can be found. Most are in Debian's modules.
That's because they aren't particularly interesting in modules, but
in 10 line scripts, they show up quite frequentl
Matthew Walton skribis 2004-04-14 21:23 (+0100):
> >%foo<<$bar>> doesn't quite do the same as %foo{$bar}.
> That's one method, really - <<>> being like {' '}, and really just
> carrying on the very familiar idea of different kinds of quotes. Like '
> and ".
The <<>> thing works as if there is an
On Wed, 2004-04-14 at 08:18, Juerd wrote:
> Perl 5 has the qx// operator which does readpipe. I believe the function
> for it was added later. (It doesn't handle a LIST as system does,
> unfortunately.) qx// is also known as ``. Two backticks.
>
> readpipe/qx/`` isn't used much. In all my @INC, on
Scott Walters skribis 2004-04-14 13:12 (-0700):
> Second, autovivication is impossible for the same reason. We can't tell
> from parsing this lone expression whether baz should be converted to numbers
> or strings automatically.
I want ` for hashes in the first place. Having it for arrays too wou
Juerd wrote:
chromatic skribis 2004-04-14 12:32 (-0700):
That's exactly my objection to this idea. I think it goes too far to
make simple things simpler while making complex things impossible.
Absolutely false.
This is an addition to the already existing {}, which should stay.
%foo{ something
When I announced that I fixed a version of Perl6::Variables to do <<>>,
crickets chirped. I dislike having to place a lot of matching quotes,
brackets, parenthesis, and braces in my code. You must stop and
visually inspect code to make sure it balances out and even then is a
common source of bug c
John Williams skribis 2004-04-14 13:36 (-0600):
> On Wed, 14 Apr 2004, Juerd wrote:
> > I propose to use ` as a simple hash subscriptor, as an alternative to {}
> > and <<>>. It would only be useable for \w+ keys or perhaps -?\w+.
> > As with methods, a simple "atomic" (term exists only in perlreft
On Wed, 2004-04-14 at 09:29, Gregor N. Purdy wrote:
> So, we are moving in a more verbose direction, which is a bummer for
> people who like to write one-liners and other tiny programs.
perl6 -i.bak -ple 'rule octet {\d{1,2}|<[01]>\d{2}|2[<[1-4]>\d|5<[1-5]>]}
s:g/\b\.\.\.\b/IP ADDR/;' *
chromatic skribis 2004-04-14 12:32 (-0700):
> That's exactly my objection to this idea. I think it goes too far to
> make simple things simpler while making complex things impossible.
Absolutely false.
This is an addition to the already existing {}, which should stay.
%foo{ something } will stil
On Wed, 14 Apr 2004, Juerd wrote:
> I propose to use ` as a simple hash subscriptor, as an alternative to {}
> and <<>>. It would only be useable for \w+ keys or perhaps -?\w+. As
> with methods, a simple "atomic" (term exists only in perlreftut, afaix,
> but I don't know another word to describe a
On Wed, 2004-04-14 at 12:24, Juerd wrote:
> chromatic skribis 2004-04-14 12:07 (-0700):
> > > I think %hash`key makes sense. But I'd like to find out if more people
> > > like this idea.
> > How do you request a hash slice with backticks?
> You don't. There are %foo<> and %foo{'foo', 'bar'} alrea
Jonathan Scott Duff skribis 2004-04-14 14:21 (-0500):
> On Wed, Apr 14, 2004 at 12:07:18PM -0700, chromatic wrote:
> > On Wed, 2004-04-14 at 05:18, Juerd wrote:
> > > I think %hash`key makes sense. But I'd like to find out if more people
> > > like this idea.
> > How do you request a hash slice wit
chromatic skribis 2004-04-14 12:07 (-0700):
> > I think %hash`key makes sense. But I'd like to find out if more people
> > like this idea.
> How do you request a hash slice with backticks?
You don't. There are %foo<> and %foo{'foo', 'bar'} already and
hash slices aren't used much at all.
The prop
On Wed, Apr 14, 2004 at 12:07:18PM -0700, chromatic wrote:
> On Wed, 2004-04-14 at 05:18, Juerd wrote:
>
> > I think %hash`key makes sense. But I'd like to find out if more people
> > like this idea.
>
> How do you request a hash slice with backticks?
I think you wouldn't. For that the more verb
On Wed, 2004-04-14 at 05:18, Juerd wrote:
> I think %hash`key makes sense. But I'd like to find out if more people
> like this idea.
How do you request a hash slice with backticks?
-- c
On Wed, Apr 14, 2004 at 02:18:48PM +0200, Juerd wrote:
I propose to use ` as a simple hash subscriptor, as an alternative to {}
and <<>>. It would only be useable for \w+ keys or perhaps -?\w+. As
with methods, a simple "atomic" (term exists only in perlreftut, afaix,
but I don't know another word
Perl 5 has the qx// operator which does readpipe. I believe the function
for it was added later. (It doesn't handle a LIST as system does,
unfortunately.) qx// is also known as ``. Two backticks.
readpipe/qx/`` isn't used much. In all my @INC, only a handful of uses
can be found. Most are in Debia
So, we are moving in a more verbose direction, which is a bummer for
people who like to write one-liners and other tiny programs.
Assuming only Perl 6 is installed on your system, if your script
started with:
#!/usr/bin/perl
all the stuff about trying to figure out what version you are using
w
37 matches
Mail list logo