[31603] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2862 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 10 11:09:38 2010

Date: Wed, 10 Mar 2010 08:09:10 -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           Wed, 10 Mar 2010     Volume: 11 Number: 2862

Today's topics:
    Re: Help on String to array ! <jismagic@gmail.com>
    Re: Help on String to array ! <uri@StemSystems.com>
    Re: how to deliver a GUI app to an end user <email@invalid.net>
    Re: how to deliver a GUI app to an end user <ben@morrow.me.uk>
        recursive perl <neiderer@arl.army.mil>
    Re: recursive perl <RedGrittyBrick@spamweary.invalid>
    Re: Simple regex question <peter@makholm.net>
        Still looking for a function-type MySQL interface <usenet@larseighner.com>
    Re: Still looking for a function-type MySQL interface <vilain@NOspamcop.net>
    Re: Still looking for a function-type MySQL interface <usenet@larseighner.com>
    Re: Still looking for a function-type MySQL interface <RedGrittyBrick@spamweary.invalid>
    Re: Still looking for a function-type MySQL interface <usenet@larseighner.com>
    Re: Still looking for a function-type MySQL interface <RedGrittyBrick@spamweary.invalid>
        to RG - Lisp lunacy and Perl psychosis <cartercc@gmail.com>
    Re: to RG - Lisp lunacy and Perl psychosis <tkpapp@gmail.com>
    Re: to RG - Lisp lunacy and Perl psychosis <cartercc@gmail.com>
    Re: to RG - Lisp lunacy and Perl psychosis <tkpapp@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 9 Mar 2010 21:09:14 -0800 (PST)
From: jis <jismagic@gmail.com>
Subject: Re: Help on String to array !
Message-Id: <8450638b-679b-4dbc-902f-98fde1edcc37@15g2000yqi.googlegroups.com>

On Mar 9, 10:59=A0pm, s...@netherlands.com wrote:
> On Tue, 09 Mar 2010 09:57:23 -0800, s...@netherlands.com wrote:
> >=3D=3D=3D=3D=3D=3D=3D
>
> use strict;
> use warnings;
> use Benchmark ':hireswallclock';
>
>
>
> >for my $multiplier (40, 400, 4_000, 40_000, 400_000)- Hide quoted text -
>
> - Show quoted text -

Thanks for the replies.

As said regex and unpack took longer time than substr.
I use Windows. The following are the time taken.

1. Regex : @arr =3D $hex =3D~ /[[:xdigit:]]{2}/g;  - To read  4Mb file
into an array it took  1min 7 seconds.
2. Unpack : @arr =3D unpack("(C2)*",$hex);    - To read  4Mb file into
an array it took  3min 26seconds.
3. Substr: while ($val=3Dsubstr( $hex, $offs, 2))
    {
        push @arr, $val;
        $offs+=3D2;
    } -  To read  4Mb file into an array it took  11 seconds.


thanks,
jis



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

Date: Wed, 10 Mar 2010 02:51:42 -0500
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: Help on String to array !
Message-Id: <87tyso7gxd.fsf@quad.sysarch.com>

>>>>> "j" == jis  <jismagic@gmail.com> writes:

  j> As said regex and unpack took longer time than substr.
  j> I use Windows. The following are the time taken.

  j> 1. Regex : @arr = $hex =~ /[[:xdigit:]]{2}/g;  - To read  4Mb file
  j> into an array it took  1min 7 seconds.
  j> 2. Unpack : @arr = unpack("(C2)*",$hex);    - To read  4Mb file into
  j> an array it took  3min 26seconds.
  j> 3. Substr: while ($val=substr( $hex, $offs, 2))
  j>     {
  j>         push @arr, $val;
  j>         $offs+=2;
  j>     } -  To read  4Mb file into an array it took  11 seconds.


i am sorry, i can't believe it took on the order of minutes to read in a
file and convert from hex to binary. this is not possible on anything
but an abacus. given you haven't shown the complete script for each
version i have to assume your code is broken in some way. also there is
no way a substr loop would be faster than unpack or a regex. both of
those would spend all their time in perl's guts while the substr version
spends most of its time doing slow perl ops in a loop. i say this from
plenty of experience benchmarking perl code. you can easily write an
incorrect test of this so i must ask you to post complete working
programs that exhibit the slowness you claim. i will wager large amounts
of quatloos i can fix them so the substr will be outed as the slowest
one.

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: Wed, 10 Mar 2010 14:44:07 GMT
From: QoS <email@invalid.net>
Subject: Re: how to deliver a GUI app to an end user
Message-Id: <XeOln.9510$QL4.8874@newsfe24.iad>


ccc31807 <cartercc@gmail.com> wrote in message-id:  <ba34f9b8-52ac-485c-a707-96399047ee9b@j27g2000yqn.googlegroups.com>

> 
> This has a bit of history behind it, which I won't relate at the cost
> of possibly misleading you. The process is a large, critical process,
> consisting of the preparation and delivery of several thousand vendor
> contracts five times a year. My previous involvement has been on the
> back end, furnishing the data files for the 'end user' to use for
> preparation of the contracts.
> 
> Due to a number of changes, including personnel changes, major new
> requirements, hiring freezes, software obsolescence, purchase order
> holds, and license restrictions, we (read 'I') have a problem and it
> seems beyond my ability to solve.
> 
> I had written (several years ago) three Perl scripts running on the
> CLI, the first querying the database and munging the data, the second
> preparing the individual contracts as PDFs, and the third delivering
> the contracts to the vendors. Only the first script was used, since
> the people responsible used a point and click application to prepare
> and email the contracts. (Alpha 5 was the software used.)
> 
> As a result of the changes mentioned, I dusted off the scripts I had
> written, revised them to meet the new requirements, and they work
> flawlessly, meeting the new requirements to perfection, and (being
> automated) do the job in a fraction of a second without error
> (previously took a couple of days and was error prone.) It's ready to
> roll.
> 
> Here's the problem: the employee charged with the contracting process
> is not capable of running scripts from the CLI, but can only point and
> click, and besides, cannot (due to IA policy) install Perl on her
> machine. Due to policy, I'm not allowed to run end user processes,
> such as the preparation of the contracts.
> 
> I've toyed with the idea of rewriting the app in Java, or perhaps
> using .NET to build a graphical interface to the Perl scripts, but
> this isn't my area and I really don't want to do this. I also toyed
> with the idea of putting the whole thing on a web server and giving
> her access through a browser, but that's probably a violation of IA
> policy as well (never mind the fact that it will be on the intranet.)
> 
> Ideas?
> 
> Thanks, CC.

This works:  http://www.activestate.com/perl_dev_kit/

J



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

Date: Wed, 10 Mar 2010 15:32:48 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: how to deliver a GUI app to an end user
Message-Id: <0mqk67-9651.ln1@osiris.mauzo.dyndns.org>


Quoth ccc31807 <cartercc@gmail.com>:
> 
> Actually, I was only venting. 

> <rant>I'm allowed to squeal when required to perform some needless
> piece of insanity when someone else is not competent to perform their
> assigned duties.</rant>

> I'm not being mean or selfish or derogatory, just exercising
> my (earned) right to voice my feelings in a place where I can get away
> with it.

I think you're making an unwarranted assumption. alt.flame is -> thataway.

Ben



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

Date: Wed, 10 Mar 2010 06:33:32 -0800 (PST)
From: "neiderer@arl.army.mil" <neiderer@arl.army.mil>
Subject: recursive perl
Message-Id: <68291f25-a189-40db-83c5-cd603ae895d7@g11g2000yqe.googlegroups.com>

If possible I'd like a recursive solution (Perl or C code would be
great
:-), or an algorithm) for the following input representing a network
of
nodes and links.

I know recursion in general is not the fastest solution but I'd like
to see
a solution using this approach to help me start thinking that way.  If
not
appropriate a serial/procedural (maybe C) would work as well.

In this example the first node has "1" link to node "37".  The 37th
node has
"4" links to nodes 2, 21, 13, 31. etc ...

I'd like to print out the entire path for each node.  In this example
something like
# node 1 paths
  37
    37 2 ...
    37 21 ...
    37 13 ...
    37 31 ...
 .
 .
 .

It seems that this could be done using recursion.
If someone knows what I am after and could get me started I would be
indebted.

Thank you.

------------ sample input (excluding comments which begin with #
-------------------------------
# node 1
1,
  37,
# node 2
1,
  13,
# node 3
6,
  30, 1, 34, 47, 48, 24,
3,
  41, 47, 45
5,
  48, 47, 16, 22, 10,
3,
  18,  29,  9,
1,
  15,
1,
  24,
5,
  32,  5,  12,  42,  19
2,
  44, 15,
7,
  6,  42,  45,  25,  20,  23,  53,
4,
  45, 9, 23, 8,
1,
  45,
4,
  44,  34,  19,  29,
3,
  22,  32,  35,
1,
  4,
6,
  28,  44,  34, 4, 33, 27,
3,
  50,  49,  47,
7,
  12, 45, 29, 40, 26, 44, 49,
5,
  4, 5, 9, 47, 34,
7,
  44, 39, 1, 47, 36, 19, 41,
4,
  16, 37, 15,  41,
3,
  37,  52,  50
1,
  14,
2,
  28,  44,
3,
  16, 4, 40,
2,
  46, 35,
6,
  24, 33, 5, 51, 17, 8,
1,
  51,
2,
  44, 32,
6,
  29, 7, 43, 3, 22, 37,
2,
  12,  32,
3,
  4, 34, 25,
2,
  32,  8,
2,
  13, 30,
4,
  33, 51, 29, 47,
# node 37
  2, 21, 13, 31,
4,
  16, 21, 30, 48,
5,
  30, 27, 39, 46, 11,
1,
  34,
5,
  51, 24, 32, 47, 41,
6,
  4, 30, 24, 46, 21, 45
3,
  11, 7, 40,
3,
  5, 45, 8,
3,
  6, 51, 52,
4,
  11, 30, 29, 31,
6,
  17, 7, 15, 48, 45, 47,
1,
  5,
4,
  45, 52, 49, 29,
4,
  43, 31, 50, 40,
3,
  1, 52, 31,
7,
  24, 46, 15, 14, 34, 9, 8,
4,
  10, 46, 8, 24


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

Date: Wed, 10 Mar 2010 14:43:51 +0000
From: RedGrittyBrick <RedGrittyBrick@spamweary.invalid>
Subject: Re: recursive perl
Message-Id: <4b97b028$0$2526$da0feed9@news.zen.co.uk>

On 10/03/2010 14:33, neiderer@arl.army.mil wrote:
> If possible I'd like a recursive solution (Perl or C code would be
> great :-), or an algorithm) for the following input representing a

                    ^^^^^^^^^

> network of nodes and links.
>
> I know recursion in general is not the fastest solution but I'd like
> to see a solution using this approach to help me start thinking that
> way.  If not appropriate a serial/procedural (maybe C) would work as
> well.
>
> In this example the first node has "1" link to node "37".  The 37th
> node has "4" links to nodes 2, 21, 13, 31. etc ...
>
> I'd like to print out the entire path for each node.
 ...
>
> It seems that this could be done using recursion. If someone knows
> what I am after and could get me started I would be indebted.
 ...

http://en.wikipedia.org/wiki/Tree_traversal covers recursion and gives 
example implementations.

-- 
RGB


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

Date: Wed, 10 Mar 2010 08:20:23 +0100
From: Peter Makholm <peter@makholm.net>
Subject: Re: Simple regex question
Message-Id: <871vfs63t4.fsf@vps1.hacking.dk>

Don Pich <dpich@polartel.com> writes:

> I was wondering if there is a way to have perl check for a whole number?
>
> In an equation, if I have 16/4, it will come up with 4 and will set the 
> "check" to true.  If I have 16/5, it will come up with 3.2 and set the 
> condition false.
>
> Is there a method to get this into an if/else condition?

It is not simple, if at all possible, to do with an regexp. What you
need is the modulo operator which gives you the remainder from a
integer division. if 'x % y' is zero then x/y is an integer.

//Makholm


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

Date: Wed, 10 Mar 2010 06:57:35 +0000 (UTC)
From: Lars Eighner <usenet@larseighner.com>
Subject: Still looking for a function-type MySQL interface
Message-Id: <slrnhpeglp.ko8.usenet@debranded.larseighner.com>

I'm still looking for a function-type database interface.  CPAN returns more
than 1100 hits for mysql, but if there is a function interface, I haven't
found it.

-- 
  Lars Eighner <http://larseighner.com/>      Warbama's Afghaninam day: 98
            2357.9 hours since Warbama declared Viet Nam II.
     Warbama: An LBJ for the Twenty-First century.  No hope.  No change.


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

Date: Wed, 10 Mar 2010 01:44:09 -0800
From: Michael Vilain <vilain@NOspamcop.net>
Subject: Re: Still looking for a function-type MySQL interface
Message-Id: <vilain-A30EAB.01440910032010@news.individual.net>

In article <slrnhpeglp.ko8.usenet@debranded.larseighner.com>,
 Lars Eighner <usenet@larseighner.com> wrote:

> I'm still looking for a function-type database interface.  CPAN returns more
> than 1100 hits for mysql, but if there is a function interface, I haven't
> found it.

There are lots of CPAN entries for database stuff.  What have you found?

-- 
DeeDee, don't press that button!  DeeDee!  NO!  Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]




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

Date: Wed, 10 Mar 2010 11:58:52 +0000 (UTC)
From: Lars Eighner <usenet@larseighner.com>
Subject: Re: Still looking for a function-type MySQL interface
Message-Id: <slrnhpf2am.lrt.usenet@debranded.larseighner.com>

In our last episode, 
<vilain-A30EAB.01440910032010@news.individual.net>, 
the lovely and talented Michael Vilain 
broadcast on comp.lang.perl.misc:

> In article <slrnhpeglp.ko8.usenet@debranded.larseighner.com>,
>  Lars Eighner <usenet@larseighner.com> wrote:

>> I'm still looking for a function-type database interface.  CPAN returns more
>> than 1100 hits for mysql, but if there is a function interface, I haven't
>> found it.

> There are lots of CPAN entries for database stuff.  What have you found?

More than 1100 entries, but a many of the as I have inspected seem to
involve minus greater-than notation.  As I said, I am looking for a
function-type database interface.

-- 
  Lars Eighner <http://larseighner.com/>      Warbama's Afghaninam day: 98
            2362.9 hours since Warbama declared Viet Nam II.
     Warbama: An LBJ for the Twenty-First century.  No hope.  No change.


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

Date: Wed, 10 Mar 2010 12:55:57 +0000
From: RedGrittyBrick <RedGrittyBrick@spamweary.invalid>
Subject: Re: Still looking for a function-type MySQL interface
Message-Id: <4b9796dd$0$2538$da0feed9@news.zen.co.uk>

Lars Eighner wrote:
> Michael Vilain  wrote:
>>  Lars Eighner wrote:
>
>>> I'm still looking for a function-type database interface.  CPAN returns more
>>> than 1100 hits for mysql, but if there is a function interface, I haven't
>>> found it.
>
>> There are lots of CPAN entries for database stuff.  What have you found?
>
> More than 1100 entries, but a many of the as I have inspected seem to
> involve minus greater-than notation.  As I said, I am looking for a
> function-type database interface.
>

Ah, you want a *procedural* API rather than an *object-oriented* API.

AFAIK DBI is object oriented and most (all?) Perl DBMS interfaces use DBI.

What difficulties is the OO API causing you?

-- 
RGB


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

Date: Wed, 10 Mar 2010 13:15:06 +0000 (UTC)
From: Lars Eighner <usenet@larseighner.com>
Subject: Re: Still looking for a function-type MySQL interface
Message-Id: <slrnhpf6pj.lrt.usenet@debranded.larseighner.com>

In our last episode, <4b9796dd$0$2538$da0feed9@news.zen.co.uk>, the lovely
and talented RedGrittyBrick broadcast on comp.lang.perl.misc:

> Lars Eighner wrote:
>> Michael Vilain  wrote:
>>>  Lars Eighner wrote:
>>
>>>> I'm still looking for a function-type database interface.  CPAN returns more
>>>> than 1100 hits for mysql, but if there is a function interface, I haven't
>>>> found it.
>>
>>> There are lots of CPAN entries for database stuff.  What have you found?
>>
>> More than 1100 entries, but a many of the as I have inspected seem to
>> involve minus greater-than notation.  As I said, I am looking for a
>> function-type database interface.
>>

> Ah, you want a *procedural* API rather than an *object-oriented* API.

> AFAIK DBI is object oriented and most (all?) Perl DBMS interfaces use DBI.

> What difficulties is the OO API causing you?

I can't read the notation as for example I can with the PHP mysql functions.

Sure, I can copy an example with minus greater-than notation from a tutorial
--- but in an hour, tomorrow, a week later, it's all greek to me.  It isn't
remotely perlish, which would be something like:

opendb(MYDBHANDLE," gory details of db connection here");

 and so forth.

-- 
  Lars Eighner <http://larseighner.com/>      Warbama's Afghaninam day: 98
            2364.1 hours since Warbama declared Viet Nam II.
     Warbama: An LBJ for the Twenty-First century.  No hope.  No change.


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

Date: Wed, 10 Mar 2010 14:33:01 +0000
From: RedGrittyBrick <RedGrittyBrick@spamweary.invalid>
Subject: Re: Still looking for a function-type MySQL interface
Message-Id: <4b97ad9e$0$2491$db0fefd9@news.zen.co.uk>

On 10/03/2010 13:15, Lars Eighner wrote:
> In our last episode,<4b9796dd$0$2538$da0feed9@news.zen.co.uk>, the
> lovely and talented RedGrittyBrick broadcast on comp.lang.perl.misc:
>
>> Lars Eighner wrote:
>>> Michael Vilain  wrote:
>>>> Lars Eighner wrote:
>>>
>>>>> I'm still looking for a function-type database interface.
>>>>> CPAN returns more than 1100 hits for mysql, but if there is a
>>>>> function interface, I haven't found it.
>>>
>>>> There are lots of CPAN entries for database stuff.  What have
>>>> you found?
>>>
>>> More than 1100 entries, but a many of the as I have inspected
>>> seem to involve minus greater-than notation.  As I said, I am
>>> looking for a function-type database interface.
>>>
>
>> Ah, you want a *procedural* API rather than an *object-oriented*
>> API.
>
>> AFAIK DBI is object oriented and most (all?) Perl DBMS interfaces
>> use DBI.
>
>> What difficulties is the OO API causing you?
>
> I can't read the notation as for example I can with the PHP mysql
> functions.

Interestingly, when I Googled this subject, I encountered a note saying
that the latest PHP API for MySQL is OO not procedural. I didn't read it 
carefully, but I got the impression that if you upgrade MySQL you'd have 
to switch to the OO API.

I'm afraid the world is moving from procedural to OO. I may be wrong but 
I suspect module writers nowadays prefer to write OO APIs.


> Sure, I can copy an example with minus greater-than notation from a
> tutorial ---

I recommend you try to think of a->b as an *arrow* notation. The object 
has a pointer to a subroutine, you use that pointer to call the 
subroutine (sloppy terminology for simplicity).


> but in an hour, tomorrow, a week later, it's all greek
> to me.

I recommend you write yourself a few simple Perl OO toy programs. I 
found it a good way to get familiar with Perl OO paradigms. There are 
some good tutorials around and it only needs an hour or so if you have 
any prior exposure to OO concepts.

perldoc perlboot; # http://perldoc.perl.org/perlboot.html
perldoc perltoot; # http://perldoc.perl.org/perltoot.html


> It isn't remotely perlish,

It isn't Perl4ish but it is Perl5ish IMHO.


> which would be something like:
>
> opendb(MYDBHANDLE," gory details of db connection here");
>
> and so forth.

Maybe you could write a procedural wrapper for the OO API. Fill the
wrapper with copious comments to yourself. You could centralise this 
into a procedural module. I've no idea how feasible this is for you (or 
anyone indeed), but it's an idea† you could consider.


Sorry not to be of more help.

-- 
RGB
† Probably a bad one :-)


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

Date: Wed, 10 Mar 2010 07:01:14 -0800 (PST)
From: ccc31807 <cartercc@gmail.com>
Subject: to RG - Lisp lunacy and Perl psychosis
Message-Id: <19c5b00d-c1e0-4016-9f72-37229cbf42b9@g19g2000yqe.googlegroups.com>

On February 27, in a thread on c.l.l, RG had this to say about Perl:
<quote>
>> But Perl is just an
>> abomination through-and-through.  I do not deny that many people find it
>> a productive tool, and about ten years ago having developed a certain
>> level of respect for some of those people I determined to learn Perl
>> just to see what those people got out of it.  So I picked up a Perl
>> book, but I could not get past the first few chapters without recoiling
>> in revulsion.  It was just horrible.
</quote>
I wanted to reply but also wanted to take some time to think about my
reply.

Yesterday, I wrote a typical data munging script using Perl. I was
using two hashes, %sec and %fac, and needed to populate the 'location'
value in %fac with the value in %sec depending on the state of the
'xlist' key in %sec. The code looks horrible, but I think any
journeyman programmer can follow the logic even if he doesn't
understand Perl or the data structures. This is the code, and I might
add that it's working code:

<code>
if ($sec{$k}{'xlist'} !~ /\d/)
  { $fac{$sec{$k}{'id1'}}{'location'} = $sec{$k}{'site'}; }
elsif ($sec{$k}{'xlist'} eq $sec{$k}{'crs_id'})
  { $fac{$sec{$k}{'id1'}}{'location'} = $sec{$k}{'site'}; }
else
  { $fac{$sec{$k}{'id1'}}{'location'} = $sec{$sec{$k}{'xlist'}}
{'site'}; }
</code>

In David Lamkins' book 'Successful Common Lisp' in chapter 4, we find
the following. This also looks horrible, and I don't think a
journeyman programmer can follow this logic unless he knew something
about Lisp.

<quote>
The following piece of code illustrates how you can use the same name
for different purposes. Take a minute to read this, and see how many
separate uses you can count for the name FUNNY.

(defun funny (funny)
  "funny..."
  (if (zerop funny)
    :funny
    (list
     (cons funny
           (let ((funny funny))
             (setq funny (1- funny))
             (funny funny)))
     funny)))

Here are the five roles played by this one name:

   1. function name
   2. function argument
   3. a word in the documentation string
   4. a constant in the keyword package
   5. a new lexical variable
</quote>

Perl uses sigils ($, !, %, &) to signify a token's usage. Lisp uses
positional notation for the same thing. It's not that one's bad and
one's not -- it's just cosmetic. It's as if one language is wearing a
pinstripe suit with wing tips and the other is wearing a blue blazer
with penny loafers. Underneath, the logic is the same in both
languages, and once you get past the peculiarities of the language you
use the same logic. (I'm not arguing that the power of the languages
is the same, in several respects Lisp is more powerful than Perl, but
that the process of thinking through a problem is the same.)

Here's the point: to call one language horrible and an abomination
because you don't understand it, and ignoring the horribleness and the
abominable in another language because you do understand it, doesn't
make any sense. The cover doesn't make the book the clothes don't make
the man, and the appearance doesn't make the language. Instead, a
language should be judged on the work that it permits, and in this
respect (based on surveys like TIOBE and advertised positions) Perl
seems to be a lot more useful (and perhaps a lot less horrible) than
CL.

One language isn't better or worse that the other, they are just
different, and the expression of RG's opinion is simply a value
judgment, which others may or may not share.

CC.


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

Date: 10 Mar 2010 15:46:48 GMT
From: Tamas K Papp <tkpapp@gmail.com>
Subject: Re: to RG - Lisp lunacy and Perl psychosis
Message-Id: <7vpt78Ft70U1@mid.individual.net>

On Wed, 10 Mar 2010 07:01:14 -0800, ccc31807 wrote:

> (defun funny (funny)
>   "funny..."
>   (if (zerop funny)
>     :funny
>     (list
>      (cons funny
>            (let ((funny funny))
>              (setq funny (1- funny))
>              (funny funny)))
>      funny)))
> 
> Here are the five roles played by this one name:
> 
>    1. function name
>    2. function argument
>    3. a word in the documentation string 4. a constant in the keyword
>    package
>    5. a new lexical variable

You mean that you can use something as a variable name, and then use
the same letters as part of a string?  Gosh, Common Lisp must be Pure
Madness!

But more seriously, you completely misunderstand Common Lisp when you
write "roles played by this ONE NAME" (my emphasis).  It is _not_ one
name.

Your post actually highlights some similarities between Perl and CL:
both have various namespaces, once you see through the thin layer of
syntax for accessing these.  So your feeble attempt at starting a
flamewar is pretty... funny.

Tamas


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

Date: Wed, 10 Mar 2010 07:53:28 -0800 (PST)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: to RG - Lisp lunacy and Perl psychosis
Message-Id: <254b48af-6829-45b1-8164-8f7140103c92@u9g2000yqb.googlegroups.com>

On Mar 10, 10:46=A0am, Tamas K Papp <tkp...@gmail.com> wrote:
> So your feeble attempt at starting a flamewar is pretty... funny.

Not my intent to start a flame war. Please reread my post.

> Here's the point: to call one language horrible and an abomination
> because you don't understand it, and ignoring the horribleness and the
> abominable in another language because you do understand it, doesn't
> make any sense.

CC


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

Date: 10 Mar 2010 16:03:36 GMT
From: Tamas K Papp <tkpapp@gmail.com>
Subject: Re: to RG - Lisp lunacy and Perl psychosis
Message-Id: <7vpu6oF1jfU1@mid.individual.net>

On Wed, 10 Mar 2010 07:53:28 -0800, ccc31807 wrote:

> On Mar 10, 10:46 am, Tamas K Papp <tkp...@gmail.com> wrote:
>> So your feeble attempt at starting a flamewar is pretty... funny.
> 
> Not my intent to start a flame war. Please reread my post.

Yeah, sure.  Cross-posting something like this usually promotes peace
and happiness.

>> Here's the point: to call one language horrible and an abomination
>> because you don't understand it, and ignoring the horribleness and the
>> abominable in another language because you do understand it, doesn't
>> make any sense.

You failed to show anything horrible or abominable in CL.  All you
demonstrated was your confusion (but that was done pretty well,
congrats).

Cheers,

Tamas


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

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 2862
***************************************


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