[32045] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3309 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 6 14:09:25 2011

Date: Sun, 6 Mar 2011 11:09:08 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 6 Mar 2011     Volume: 11 Number: 3309

Today's topics:
        =?windows-1252?Q?Christian_Louboutin_shoesVictoria_Beck <zhangqi88686@yahoo.cn>
    Re: contexts <brian.d.foy@gmail.com>
    Re: contexts <k4monk@gmail.com>
    Re: contexts <uri@StemSystems.com>
    Re: contexts <hjp-usenet2@hjp.at>
    Re: contexts <mvdwege@mail.com>
    Re: contexts <rvtol+usenet@xs4all.nl>
    Re: contexts <kkeller-usenet@wombat.san-francisco.ca.us>
    Re: going from CPAN to RPM <agw@dsm.fordham.edu>
    Re: going from CPAN to RPM <m@rtij.nl.invlalid>
    Re: hash key <hjp-usenet2@hjp.at>
    Re: hash key <xhoster@gmail.com>
    Re: hash key <hjp-usenet2@hjp.at>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sat, 5 Mar 2011 18:26:02 -0800 (PST)
From: shoesbuy <zhangqi88686@yahoo.cn>
Subject: =?windows-1252?Q?Christian_Louboutin_shoesVictoria_Beckham=2C_Nicole_Ri?= =?windows-1252?Q?chie_=85_=85_almost_all_woman_are?=
Message-Id: <43042296-4c76-491c-a664-bc305c7e7165@j9g2000prj.googlegroups.com>

<p><a href=3D"http://www.heelshoes08.com" title=3D"Christian Louboutin
shoes">Christian Louboutin shoes</a>Victoria Beckham, Nicole Richie =85
=85 almost all woman are crazy to wear the louboutin shoes, but no one
are same as Danielle who are crazy to buy so many shoes, not to
mention she was a writer. You can only be understood: Danielle has a
special preference to red. Last year, Sony introduced Danielle limited
edition e-book, on the use of a red design.<br /> ?<a href=3D"http://
www.heelshoes08.com" title=3D"2011 discount Christian Louboutin">2011
discount Christian Louboutin</a></p> <p>Aston Martin made rolled out
brand-new DB7 1993 it was a revolutionary. It offers the market offer
something new and fresh, but ultimately it is very expensive.
Therefore, the development XK8 jaguar modeling principle, close
cooperation, had been set out in the aston Martin. =94 The company is
now booming changed new master from tata motors, has been <a
href=3D"http://www.heelshoes08.com/">shoes louboutin</a> prestige to
jaguar collection and their series product, if the new XF is anything
to go by then future jaguar look very bright.</p>


------------------------------

Date: Sat, 05 Mar 2011 13:33:21 -0600
From: brian d foy <brian.d.foy@gmail.com>
Subject: Re: contexts
Message-Id: <050320111333218049%brian.d.foy@gmail.com>

In article <slrnin35oj.9uc.tadmc@tadbox.sbcglobal.net>, Tad McClellan
<tadmc@seesig.invalid> wrote:

> K4 Monk <k4monk@gmail.com> wrote:
> 
> > In Perl, every
> > operator, every function, every operation in the language behaves
> > randomly in one of six different ways, 
> 
> 
> There are two, not six, different ways (list context and scalar context).

Well, for calling, there is list, scalar, and void.

For operations with scalars, there is number and string, and maybe the 
last one he's thinking about is boolean.


------------------------------

Date: Sat, 5 Mar 2011 12:52:53 -0800 (PST)
From: K4 Monk <k4monk@gmail.com>
Subject: Re: contexts
Message-Id: <e14a15f6-902c-4a6c-ad7b-42a73cb60383@r19g2000prm.googlegroups.com>

On Mar 5, 8:54=A0pm, Sherm Pendley <sherm.pend...@gmail.com> wrote:
> K4 Monk <k4m...@gmail.com> writes:
> > I was reading a funny (and quite informative) article on computer
> > languages
>
> I wouldn't call it "informative." Given the name of the blog (Stevey's
> drunken blog rants) and the ridiculous nature of much of the criticism,
> I suspect he might be trying to poke fun at language fanbois. I hope
> that's his goal, because if he really meant this seriously, he needs
> to sober up and hit the books.
>
> sherm--
>
> --
> Sherm Pendley
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0<h=
ttp://camelbones.sourceforge.net>
> Cocoa Developer

It was informative to me, i'm just a ducttape programmer who fixes
problems in companies with the smallest subset of each tool. After
seeing all your responses I should chime in as well.  My pet peeve
with him is when he brings up Emacs

 They all used Emacs, of course. Hell, Eric Benson was one of the
authors of XEmacs1. All of the greatest engineers in the world use
Emacs. The world-changer types. Not the great gal in the cube next to
you. Not Fred, the amazing guy down the hall. I'm talking about the
greatest software developers of our profession, the ones who changed
the face of the industry. The James Goslings, the Donald Knuths, the
Paul Grahams2, the Jamie Zawinskis, the Eric Bensons. Real engineers
use Emacs. You have to be way smart to use it well, and it makes you
incredibly powerful if you can master it. Go look over Paul
Nordstrom's shoulder while he works sometime, if you don't believe me.
It's a real eye-opener for someone who's used Visual Blub .NET-like
IDEs their whole career.



------------------------------

Date: Sat, 05 Mar 2011 17:07:22 -0500
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: contexts
Message-Id: <87fwr11asl.fsf@quad.sysarch.com>

>>>>> "bdf" == brian d foy <brian.d.foy@gmail.com> writes:

  bdf> In article <slrnin35oj.9uc.tadmc@tadbox.sbcglobal.net>, Tad McClellan
  bdf> <tadmc@seesig.invalid> wrote:

  >> K4 Monk <k4monk@gmail.com> wrote:
  >> 
  >> > In Perl, every
  >> > operator, every function, every operation in the language behaves
  >> > randomly in one of six different ways, 
  >> 
  >> 
  >> There are two, not six, different ways (list context and scalar context).

  bdf> Well, for calling, there is list, scalar, and void.

  bdf> For operations with scalars, there is number and string, and maybe the 
  bdf> last one he's thinking about is boolean.

there is also integer (funcs that force a value to int like indexing
arrays, splice/substr, etc).

and the Want.pm module can tell you that and more. regardless, the
author doesn't know what he is talking about. most of those contexts are
subsets of the primary ones (e.g. number and string are both scalar).

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


------------------------------

Date: Sun, 6 Mar 2011 15:07:10 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: contexts
Message-Id: <slrnin758e.g6s.hjp-usenet2@hrunkner.hjp.at>

On 2011-03-05 20:52, K4 Monk <k4monk@gmail.com> wrote:
> On Mar 5, 8:54 pm, Sherm Pendley <sherm.pend...@gmail.com> wrote:
>> K4 Monk <k4m...@gmail.com> writes:
>> > I was reading a funny (and quite informative) article on computer
>> > languages
>>
>> I wouldn't call it "informative." Given the name of the blog (Stevey's
>> drunken blog rants) and the ridiculous nature of much of the criticism,
>> I suspect he might be trying to poke fun at language fanbois. I hope
>> that's his goal, because if he really meant this seriously, he needs
>> to sober up and hit the books.
>
> It was informative to me,

Would you call an article which claims the USA were founded in 1492
"informative"? Sure it tells you something which you've never heard
before, but ...

For me something is only informative if it's actually true. I've only
read the first few paragraphs (the parts about C and Lisp and von
Neumann machines and Lisp machines) and skimmed over the rest, but I
found so many errors that I'm quite confident that at least 50% of the
article are somewhere between "misleading" and "complete bullshit".


> i'm just a ducttape programmer

So you probably don't know much about what he writes and cannot decide
what's true and what's false. Now if you take the time to research each
of his claims, you'll really learn something[1]. But if you don't,
it doesn't help you: You can either believe all of it (then you've just
"learned" a lot of bullshit) or none of it (then you've wasted your time
reading it).

The article may be valuable as a humorous rant for those who already
know these languages (I have long ago become bored by all those "what if
programming languages were cars" jokes, so I can't really judge its
merit in this regard), but "informative" it isn't.

	hp

[1] Greg Bear wrote in the foreword to one of his short stories:
    "... the situation described therein ... is not possible ... But
    finding out why it's impossible could involve the reader in a solid
    undergraduate course in quantum mechanics." Be warned that
    researching the background of that tour-de-babel article might be
    equivalent to a semester or two of a CS course.



------------------------------

Date: Sun, 06 Mar 2011 16:33:17 +0100
From: Mart van de Wege <mvdwege@mail.com>
Subject: Re: contexts
Message-Id: <86fwr0fema.fsf@gareth.avalon.lan>

Sherm Pendley <sherm.pendley@gmail.com> writes:

> K4 Monk <k4monk@gmail.com> writes:
>
>> I was reading a funny (and quite informative) article on computer
>> languages
>
> I wouldn't call it "informative." Given the name of the blog (Stevey's
> drunken blog rants) and the ridiculous nature of much of the criticism,
> I suspect he might be trying to poke fun at language fanbois. 

No need to suspect. That's exactly what Steve likes to do. Read his Java
rant 'Execution in the Kingdom of Nouns' for a very clear example:

http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html

Mart

-- 
"We will need a longer wall when the revolution comes."
    --- AJS, quoting an uncertain source.


------------------------------

Date: Sun, 06 Mar 2011 18:04:38 +0100
From: "Dr.Ruud" <rvtol+usenet@xs4all.nl>
Subject: Re: contexts
Message-Id: <4d73bea6$0$81481$e4fe514c@news.xs4all.nl>

On 2011-03-06 15:07, Peter J. Holzer wrote:

> The article may be valuable as a humorous rant for those who already
> know these languages

Or just as fun to read.

-- 
Ruud


------------------------------

Date: Sun, 6 Mar 2011 10:10:55 -0800
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: contexts
Message-Id: <gavc48xp14.ln2@goaway.wombat.san-francisco.ca.us>

On 2011-03-06, Peter J. Holzer <hjp-usenet2@hjp.at> wrote:
>
> I have long ago become bored by all those "what if
> programming languages were cars" jokes

I can't wait for the "what if programming languages were cars" idea
subtitled over _The Downfall_.

--keith


-- 
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information



------------------------------

Date: Sun, 06 Mar 2011 11:01:54 -0500
From: Art Werschulz <agw@dsm.fordham.edu>
Subject: Re: going from CPAN to RPM
Message-Id: <2mr5ak2q6l.fsf@sobolev.dsm.fordham.edu>

Hi.

"Peter J. Holzer" <hjp-usenet2@hjp.at> writes:

> On Redhat, packages installed via RPM generally reside in vendor_perl,
> while packages installed via CPAN reside in site_perl.

I'm not finding a vendor_perl subdirectory in /usr/lib/perl5.

-- 
Art Werschulz (8-{)}   "Metaphors be with you."  -- bumper sticker
GCS/M (GAT): d? -p+ c++ l++ u+ P++ e--- m* s n+ h f g+ w+ t+ r- 
Net: agw@dsm.fordham.edu http://www.dsm.fordham.edu/~agw
Phone:   Fordham U. (212) 636-6325, Columbia U. (646) 775-6035


------------------------------

Date: Sun, 6 Mar 2011 17:39:18 +0100
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: going from CPAN to RPM
Message-Id: <mupc48-53b.ln1@news.rtij.nl>

On Sun, 06 Mar 2011 11:01:54 -0500, Art Werschulz wrote:

> Hi.
> 
> "Peter J. Holzer" <hjp-usenet2@hjp.at> writes:
> 
>> On Redhat, packages installed via RPM generally reside in vendor_perl,
>> while packages installed via CPAN reside in site_perl.
> 
> I'm not finding a vendor_perl subdirectory in /usr/lib/perl5.

I do, both on CentOS (RHEL) and Fedora. Are you sure you're on (a) RedHat 
(derivative)?

M4


------------------------------

Date: Sat, 5 Mar 2011 20:39:39 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: hash key
Message-Id: <slrnin54bs.6j7.hjp-usenet2@hrunkner.hjp.at>

On 2011-03-02 10:07, George Mpouras <nospam.gravitalsun@hotmail.com.nospam> wrote:
> Can anyone explain why 'my' is slower than 'our' ?
>
> # Fast key rettieve
> our %hash;
> for (1 .. 5_000_000) {$hash{$_}=1}
> print "filled\n";
> print $hash{153};
>
> # Slow key rettieve
> my %hash;
> for (1 .. 5_000_000) {$hash{$_}=1}
> print "filled\n";
> print $hash{153}; 

This script doesn't contain any code to measure time. How do you know
that the first part is faster? (I also see only to "retrievals" in this
code ($hash{153}), and any attempt to measure the time of a single hash
access is almost certainly futile)

	hp


------------------------------

Date: Sat, 05 Mar 2011 17:21:57 -0800
From: Xho Jingleheimerschmidt <xhoster@gmail.com>
Subject: Re: hash key
Message-Id: <4d72e280$0$6392$ed362ca5@nr5-q3a.newsreader.com>

Peter J. Holzer wrote:
> On 2011-03-02 10:07, George Mpouras <nospam.gravitalsun@hotmail.com.nospam> wrote:
>> Can anyone explain why 'my' is slower than 'our' ?
>>
>> # Fast key rettieve
>> our %hash;
>> for (1 .. 5_000_000) {$hash{$_}=1}
>> print "filled\n";
>> print $hash{153};
>>
>> # Slow key rettieve
>> my %hash;
>> for (1 .. 5_000_000) {$hash{$_}=1}
>> print "filled\n";
>> print $hash{153}; 
> 
> This script doesn't contain any code to measure time. How do you know
> that the first part is faster?

I would suppose because he measured it using some method that doesn't 
depend on the programming language, but rather on the operating system.


> (I also see only to "retrievals" in this
> code ($hash{153}), and any attempt to measure the time of a single hash
> access is almost certainly futile)

Unless, of course, that isn't what was  being measured.  The OP didn't 
say that one retrieval was shorter than another, but rather that our was 
faster than my.

Which, by the way, matches my experiences.  There is something 
pathological about the garbage collection of very large "my" hashes.

Xho


------------------------------

Date: Sun, 6 Mar 2011 13:53:23 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: hash key
Message-Id: <slrnin70u5.g6s.hjp-usenet2@hrunkner.hjp.at>

On 2011-03-06 01:21, Xho Jingleheimerschmidt <xhoster@gmail.com> wrote:
> Peter J. Holzer wrote:
>> On 2011-03-02 10:07, George Mpouras <nospam.gravitalsun@hotmail.com.nospam> wrote:
>>> Can anyone explain why 'my' is slower than 'our' ?
>>>
>>> # Fast key rettieve
>>> our %hash;
>>> for (1 .. 5_000_000) {$hash{$_}=1}
>>> print "filled\n";
>>> print $hash{153};
>>>
>>> # Slow key rettieve
>>> my %hash;
>>> for (1 .. 5_000_000) {$hash{$_}=1}
>>> print "filled\n";
>>> print $hash{153}; 
>> 
>> This script doesn't contain any code to measure time. How do you know
>> that the first part is faster?
>
> I would suppose because he measured it using some method that doesn't 
> depend on the programming language, but rather on the operating system.

You mean that this isn't one script but two and he measured the complete
run-time of each? Possible, but we can't know, so I asked. It is
important to know *what* he measured - otherwise we cannot know what is
slow and cannot answer the question.


>> (I also see only to "retrievals" in this code ($hash{153}), and any
>> attempt to measure the time of a single hash access is almost
>> certainly futile)
>
> Unless, of course, that isn't what was  being measured.  The OP didn't 
> say that one retrieval was shorter than another, but rather that our was 
> faster than my.

Actually, he labelled his two snippets "Fast key rettieve" and "Slow key
rettieve", and I assume that "rettieve" was supposed to read "retrieve".


> Which, by the way, matches my experiences.  There is something 
> pathological about the garbage collection of very large "my" hashes.

I don't think it's particularly pathological: If a lexical variable goes
out of scope, it needs to be destroyed, which means freeing each of its
elements. For a few million elements, that takes some time.
A global variable never goes out of scope, so you don't have to do that
(but you still have to examine each element to check if it has a DESTROY
method).

And note that

>>> print $hash{153}; 

doesn't print a newline. So it won't get flushed until the program ends
which will be after garbage collection. So to the casual observer it
looks as if retrieving $hash{153} takes two seconds while it really
takes probably a microsecond or so.

	hp



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 3309
***************************************


home help back first fref pref prev next nref lref last post