[27929] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 9293 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 13 14:05:54 2006

Date: Tue, 13 Jun 2006 11:05:05 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 13 Jun 2006     Volume: 10 Number: 9293

Today's topics:
        5.8.8 lib/warnings hangs on NetBSD  3.1-stable? <grg2@comcast.net>
    Re: Daemon perl script xhoster@gmail.com
    Re: Earthquake and Tornado Forecasting Programs   June  <invalid@invalid.net>
        how to call a function using variable <Amaninder.Saini@gmail.com>
    Re: how to call a function using variable <simon.chao@fmr.com>
    Re: how to call a function using variable <nobull67@gmail.com>
    Re: how to call a function using variable <uri@stemsystems.com>
    Re: I received eBay Star Developer Award caroball@aol.com
    Re: Looking for a VERY EFFICIENT module for XML xhoster@gmail.com
    Re: Looking for a VERY EFFICIENT module for XML <ignoramus24559@NOSPAM.24559.invalid>
    Re: Looking for a VERY EFFICIENT module for XML xhoster@gmail.com
    Re: OT: Anybody using Xemacs to edit Perl Code? <uri@stemsystems.com>
        Permutations/combinations from multiple arrays <pensch@ti.com>
    Re: Permutations/combinations from multiple arrays xhoster@gmail.com
    Re: Permutations/combinations from multiple arrays <nobull67@gmail.com>
    Re: Symbol Table and References <nobull67@gmail.com>
    Re: The Nature of the "Unix Philosophy" (long) <hawk007@flight.us>
    Re: The Nature of the "Unix Philosophy" (long) <stephen@sprunk.org>
    Re: threads on XP-- system() works, backtic & popen dos <kdd21@hotmail.com>
    Re: UTF-8 subject in an email <ynleder@nspark.org>
    Re: UTF-8 subject in an email <ynleder@nspark.org>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 13 Jun 2006 09:32:21 -0700
From: "Ancient_Hacker" <grg2@comcast.net>
Subject: 5.8.8 lib/warnings hangs on NetBSD  3.1-stable?
Message-Id: <1150216341.803255.148350@h76g2000cwa.googlegroups.com>

I'm trying to compile from scratch Perl 5.8.8 BUT on "make test" it
hangs on:

lib/warnings.  I get the lib/warnings.....................    but then
it pauses there for over 10 minutes and I hit ^C when I get tired of
waiting.

On NetBSD  3.1-stable.





Any suggestions?


Thanks,

George



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

Date: 13 Jun 2006 16:05:29 GMT
From: xhoster@gmail.com
Subject: Re: Daemon perl script
Message-Id: <20060613120542.845$nK@newsreader.com>

"janicehwang1325@yahoo.com" <janicehwang1325@yahoo.com> wrote:
> hi expert,
>
> I have a client program which is running as daemon and send data to the
> server program on the remote site. I m in the testing phase. however,
> after running the program for 3 days, suddenly the client program is
> killed and no longer active in the client site. wat can be the reason
> for this?

There are many.  Out of memory, machine reboot, untrapped signal, seg
fault, a perl "die" or "exit" statement was executed, etc.  Does your
daemon keep a log file?  Does it use it?  Have you looked at it?

> Is setting scheduling priority using 'renice' can solve the
> problem?

If the problem is that someone said "What the heck is the program doing
taking all my CPU time?" and then went and killed it (Either because they
are the same user as is running the daemon, or because they have access to
root), then renicing it might solve the problem.  Otherwise, it probably
won't.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: Tue, 13 Jun 2006 13:05:26 -0400
From: Frank Silvermann <invalid@invalid.net>
Subject: Re: Earthquake and Tornado Forecasting Programs   June 13, 2006
Message-Id: <448eef76$0$30713$ec3e2dad@news.usenetmonster.com>

[snip]
I look forward to a day when meteorology has more to do with precise 
models than models, although I'm all for Russian-style delivery of such 
data.  I forecast that a lot of people will be surprised by the weather 
today, as they are categorical idiots, as is the OP.  frank


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

Date: 13 Jun 2006 09:23:42 -0700
From: "Amaninder" <Amaninder.Saini@gmail.com>
Subject: how to call a function using variable
Message-Id: <1150215822.869389.264080@f6g2000cwb.googlegroups.com>

Hi everyone

There is  a class called Message.pm which has a function
sub INTEGER()                  { 0x02 }

and i have a variable called $function which has value 'INTEGER'
$function = 'INTEGER'

I want to get the 0x02 doing something like this
$a = Net::SNMP::Message::$function();
But its not working. Can someone suggest me how to use the function
INTEGER() of someClass if i have 'INTEGER' as string in $function .

I tried this and it works
$a = Net::SNMP::Message::INTEGER();

Thanks in advance.

Regards
Amaninder Saini



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

Date: 13 Jun 2006 09:47:13 -0700
From: "it_says_BALLS_on_your forehead" <simon.chao@fmr.com>
Subject: Re: how to call a function using variable
Message-Id: <1150217233.318715.326520@i40g2000cwc.googlegroups.com>


Amaninder wrote:
> Hi everyone
>
> There is  a class called Message.pm which has a function
> sub INTEGER()                  { 0x02 }
>
> and i have a variable called $function which has value 'INTEGER'
> $function = 'INTEGER'
>
> I want to get the 0x02 doing something like this
> $a = Net::SNMP::Message::$function();
> But its not working. Can someone suggest me how to use the function
> INTEGER() of someClass if i have 'INTEGER' as string in $function .
>
> I tried this and it works
> $a = Net::SNMP::Message::INTEGER();

use strict;
use warnings;

# print foo();

my $ref = \&foo;

print $ref->();

sub foo {
  return "hi\n";
}



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

Date: 13 Jun 2006 10:29:42 -0700
From: "Brian McCauley" <nobull67@gmail.com>
Subject: Re: how to call a function using variable
Message-Id: <1150219782.718261.122780@p79g2000cwp.googlegroups.com>


Amaninder wrote:
> Hi everyone
>
> There is  a class called Message.pm which has a function

Are you sure?  Are you sure it's not the class Net::SNMP::Message in
the file Net/SNMP/Message.pm.  (Being precise can be important in
programming).

> sub INTEGER()                  { 0x02 }
>
> and i have a variable called $function which has value 'INTEGER'
> $function = 'INTEGER'
>
> I want to get the 0x02 doing something like this
> $a = Net::SNMP::Message::$function();
> But its not working. Can someone suggest me how to use the function
> INTEGER() of someClass if i have 'INTEGER' as string in $function .

Perhaps the simplest is to use a symbolic method reference...

  $a = Net::SNMP::Message->$function();

Note that because this is a class method call the first argument passed
Net::SNMP::Message::INTEGER will be the string 'Net::SNMP::Message'.
This probably doesn't matter here.

Note more importantly that $function could be an arbitrary qualified
function name and this might be exploitable to break into your system
if $function comes from an untrusted source.

I prefer...
  {
     no strict 'refs';
     $a ="Net::SNMP::Message::$function"->();
  }

This is better because

  1) It has a big red flag saying "I'm using symrefs"

  2) It does not pass any unwanted arguments

  3) It cannot be abused to call functions except in namespaces
starting Net::SNMP::Message:

Note: other people will probably tell you not to use a symbol table as
dispatch table but to write your own. There are often (usually) good
reasons to follow that advice, but this is possbily not one of those
occasions.



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

Date: Tue, 13 Jun 2006 13:53:09 -0400
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: how to call a function using variable
Message-Id: <x78xo16iyi.fsf@mail.sysarch.com>

>>>>> "BM" == Brian McCauley <nobull67@gmail.com> writes:

  BM> I prefer...
  BM>   {
  BM>      no strict 'refs';
  BM>      $a ="Net::SNMP::Message::$function"->();
  BM>   }

  BM> This is better because

  BM>   1) It has a big red flag saying "I'm using symrefs"

  BM>   2) It does not pass any unwanted arguments

  BM>   3) It cannot be abused to call functions except in namespaces
  BM> starting Net::SNMP::Message:

i think a dispatch table is even better. no symrefs at all. you can use
it with method or regular calls too. they are safer too as you can limit
what functions/methods can be called. who knows where the function name
has come from?

OP: search this group on google for many threads on how to create and
use dispatch tables.

  BM> Note: other people will probably tell you not to use a symbol table as
  BM> dispatch table but to write your own. There are often (usually) good
  BM> reasons to follow that advice, but this is possbily not one of those
  BM> occasions.

i would disagree. when you can avoid the symbol table it is always a
good thing IMO. symrefs are always more dangerous and trickier (the no
strict refs being needed) than hard code refs.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: 13 Jun 2006 09:02:59 -0700
From: caroball@aol.com
Subject: Re: I received eBay Star Developer Award
Message-Id: <1150214579.882081.218090@f14g2000cwb.googlegroups.com>


robic0 wrote:
> On 12 Jun 2006 15:55:18 -0700, caroball@aol.com wrote:
>
> >
> >redleg wrote:
> >> Chris Barts wrote:
> >> > On Sun, 11 Jun 2006 10:30:00 -0700, caroball wrote:
> >> >
> >> > >
> >> > > Chris Barts wrote:
> >> > >> On Sat, 10 Jun 2006 17:09:21 -0700, caroball wrote:
> >> > >>
> >> > >> >
> >> > >> > Congrats from a long long ago COBAL programmer
> >> > >>
> >> > >> That must have been frustrating: Hacking away at COBAL code while the
> >> > >> COBOL programmers got all the glory. ;)
> >> > >>
> >> > >> --
> >> > > MAYBE that's why my stuff always got kicked out with 9000 error
> >> > > messages - I did some FORTRAIN & AUTOMOBILECODDER too
> >> >
> >> > Ha! Those are some good ones. :)
> >> >
> >> > --
> >> > My address happens to be com (dot) gmail (at) usenet (plus) chbarts,
> >> > wardsback and translated.
> >> > It's in my header if you need a spoiler.
> >>
> >> COBOL, PASCAL, and FORTRAN.   There's a Fortran street in Silicon
> >> Valley, I think its in Santa Clara or Sunnyvale, north of Hwy 237.
> >
> >GREAT  Now all they need is streets or alleys named SPS - AUTOCODER  -
> >In honor of us old farts ( maybe 30 or 40 ) who thought we knew it all
> >- then along came the young kids just out of High School who left us in
> >the dust  -  ASIDE - A couple of my old friends who kinda stayed in the
> >business made a ton of $$$$$ on the Y2K scare - the scare was there
> >because of dates but not that hard to correct - core storage back then
> >was so precious that not using the whole date was practical - like most
> >programmers, even those today, we never looked past next week
> >
> >For you geeks - in 20 or 30 years you too will be the old dumb fogies
>
> I don't think so old fart. I think you were an old fart and loser when you
> first started. You are repugnant and the asshole type that are there 2
> weeks at the fortune 200 companies. You put a bad name on older folks with
> your mother fuckin piss poor defeatists because of age attitude.
>
> I spit, puke and piss on your type's.
>
> Robic0
> (god of porn && > 50 age)

I COMMEND YOU robic0 on your excellent command of the English language
and your ability to express yourself in good old Junior High Language
--  I think to find the person you described you might look in the
mirror

Age attitude ???  Just glad I got here



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

Date: 13 Jun 2006 15:36:28 GMT
From: xhoster@gmail.com
Subject: Re: Looking for a VERY EFFICIENT module for XML
Message-Id: <20060613113642.303$4P@newsreader.com>

Ignoramus17503 <ignoramus17503@NOSPAM.17503.invalid> wrote:
> On 12 Jun 2006 22:07:06 GMT, xhoster@gmail.com <xhoster@gmail.com> wrote:
> > Ignoramus17503 <ignoramus17503@NOSPAM.17503.invalid> wrote:
> >> Right now I use XML::Simple. As it turns out, this module is
> >> relatively slow to parse big XML texts.
> >
> > XML::Simple just uses some other module to do the actual parsing.
> > What part is slow, the actual parsing, or the XML::Simple part of
> > the code?  Have you profiled it to see?  You might be using
> > XML::SAX::PurePerl behind the scenes, which is going to be slow.
>
> Well, what I want is to convert XML into perl structures, out of which
> I would then get data.
>
> Yes, I profiled it, XML::Simple takes most of the time.
>
> I am looking for some simple alternatives, it is killing me.

Could you post the dprofpp output, or something that generates realistic
XML for us to benchmark ourselves?


Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: Tue, 13 Jun 2006 15:39:33 GMT
From: Ignoramus24559 <ignoramus24559@NOSPAM.24559.invalid>
Subject: Re: Looking for a VERY EFFICIENT module for XML
Message-Id: <V_Ajg.37612$Z44.10746@fe34.usenetserver.com>

On 13 Jun 2006 15:36:28 GMT, xhoster@gmail.com <xhoster@gmail.com> wrote:
> Ignoramus17503 <ignoramus17503@NOSPAM.17503.invalid> wrote:
>> On 12 Jun 2006 22:07:06 GMT, xhoster@gmail.com <xhoster@gmail.com> wrote:
>> > Ignoramus17503 <ignoramus17503@NOSPAM.17503.invalid> wrote:
>> >> Right now I use XML::Simple. As it turns out, this module is
>> >> relatively slow to parse big XML texts.
>> >
>> > XML::Simple just uses some other module to do the actual parsing.
>> > What part is slow, the actual parsing, or the XML::Simple part of
>> > the code?  Have you profiled it to see?  You might be using
>> > XML::SAX::PurePerl behind the scenes, which is going to be slow.
>>
>> Well, what I want is to convert XML into perl structures, out of which
>> I would then get data.
>>
>> Yes, I profiled it, XML::Simple takes most of the time.
>>
>> I am looking for some simple alternatives, it is killing me.
>
> Could you post the dprofpp output, or something that generates realistic
> XML for us to benchmark ourselves?

Good question, but I already switched to XML::Twig, and everything is
just fine after that.

i



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

Date: 13 Jun 2006 16:50:49 GMT
From: xhoster@gmail.com
Subject: Re: Looking for a VERY EFFICIENT module for XML
Message-Id: <20060613125103.032$b6@newsreader.com>

Ignoramus24559 <ignoramus24559@NOSPAM.24559.invalid> wrote:
> On 13 Jun 2006 15:36:28 GMT, xhoster@gmail.com <xhoster@gmail.com> wrote:
> > Ignoramus17503 <ignoramus17503@NOSPAM.17503.invalid> wrote:
> >> On 12 Jun 2006 22:07:06 GMT, xhoster@gmail.com <xhoster@gmail.com>
> >> wrote:
> >> > Ignoramus17503 <ignoramus17503@NOSPAM.17503.invalid> wrote:
> >> >> Right now I use XML::Simple. As it turns out, this module is
> >> >> relatively slow to parse big XML texts.
> >> >
> >> > XML::Simple just uses some other module to do the actual parsing.
> >> > What part is slow, the actual parsing, or the XML::Simple part of
> >> > the code?  Have you profiled it to see?  You might be using
> >> > XML::SAX::PurePerl behind the scenes, which is going to be slow.
> >>
> >> Well, what I want is to convert XML into perl structures, out of which
> >> I would then get data.
> >>
> >> Yes, I profiled it, XML::Simple takes most of the time.
> >>
> >> I am looking for some simple alternatives, it is killing me.
> >
> > Could you post the dprofpp output, or something that generates
> > realistic XML for us to benchmark ourselves?
>
> Good question, but I already switched to XML::Twig, and everything is
> just fine after that.

I'm glad you found a solution, but it is hard to believe that XML::Twig is
faster than XML::Simple *if* you are using Twig to load the entire document.
I generally find XML::Simple faster than XML::Twig for that, and easier to
use to boot.

(Unless, of course, XML::Simple is falling back on XML::SAX::PurePerl).


time perl -le 'use XML::Simple; $XML::Simple::PREFERRED_PARSER=""; \
    use Data::Dumper; XMLin("test.xml") foreach 1..300' > /dev/null
8.445u 0.084s 0:08.59 99.1%     0+0k 0+0io 0pf+0w

time perl -le 'use XML::Simple;\
   $XML::Simple::PREFERRED_PARSER="XML::Parser";\
   use Data::Dumper; XMLin("test.xml") foreach 1..300' > /dev/null
6.443u 0.055s 0:06.60 98.3%     0+0k 0+0io 0pf+0w

subspace/perl_misc> time perl -le 'use XML::Simple; \
    $XML::Simple::PREFERRED_PARSER="XML::SAX::PurePerl"; use Data::Dumper;\
    XMLin("test.xml") foreach 1..300' > /dev/null
61.260u 0.100s 1:01.49 99.7%    0+0k 0+0io 0pf+0w

subspace/perl_misc> time perl -le 'use XML::Twig; use Data::Dumper; \
  do {my $x = XML::Twig->new(); $x->parsefile("test3.xml")} \
  foreach 1..300' > /dev/null
8.942u 0.046s 0:09.08 98.8%     0+0k 0+0io 0pf+0w




Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: Tue, 13 Jun 2006 12:12:01 -0400
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: OT: Anybody using Xemacs to edit Perl Code?
Message-Id: <x7fyi96nn2.fsf@mail.sysarch.com>

>>>>> "SF" == Salvador Fandino <sfandino@yahoo.com> writes:

  SF> Ronny wrote:
  >> I'm using Xemacs "right out of the box" to edit Perl code. Xemacs
  >> correctly switches on CPerl mode automatically. However, it seems to
  >> have
  >> a very particular idea, how a Perl program should be laid out: Suppose
  >> I write
  >> a function definition like this:
  >> sub myfunc($)
  >> {
  >> As soon as I type the {, Xemacs positions it exactly under the "$"
  >> sign:
  >> sub myfunc($)
  >> {
  >> (i.e. it places the brace under the $ sign, which is silly IMO).
  >> 

  SF> If I recall correctly this is a bug already solved in latest versions
  SF> of CPerl. It was caused by the prototype not being correctly parsed,
  SF> and "$)" got interpreted as a scalar variable.

  SF> A work around is to add an space between the "$" and the ")", for
  SF> instance:

  SF> sub my func ($ )
  SF>    {
  SF> ...

beyond that, i would ask why the OP is using prototypes? he sounds like
a perl newbie and prototypes are not what most newbies think they
are. they are not needed nor useful in most programs so just drop them
and cperl will be nice to you as well. :)

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Tue, 13 Jun 2006 11:26:23 -0500
From: Peter Ensch <pensch@ti.com>
Subject: Permutations/combinations from multiple arrays
Message-Id: <e6movf$p80$1@home.itg.ti.com>

Not sure if the correct word is permutation or combination (or neither), but
this is what I want to do. Given an array of arrays, such as:

my @v = (
  [qw/ a /],
  [qw/ b c d /],
  [qw/ e f g /],
);

I want to output all the permutations/combinations from taking one item
from each array, like this:

a b e
a b f
a b g
a c e
a c f
a c g
a d e
a d f
a d g

The function should be able to handle any number of arrays with any 
number of elements in each array.

This sounds easy but I'm stuck. Help!
Peter

-- 

^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
Peter Ensch,
pensch@ti.com           A-1140   (214) 480 2333
^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^


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

Date: 13 Jun 2006 16:56:55 GMT
From: xhoster@gmail.com
Subject: Re: Permutations/combinations from multiple arrays
Message-Id: <20060613125708.788$IH@newsreader.com>

Peter Ensch <pensch@ti.com> wrote:
> Not sure if the correct word is permutation or combination (or neither),
> but this is what I want to do. Given an array of arrays, such as:
>
> my @v = (
>   [qw/ a /],
>   [qw/ b c d /],
>   [qw/ e f g /],
> );
>
> I want to output all the permutations/combinations from taking one item
> from each array, like this:
>
 ...
> The function should be able to handle any number of arrays with any
> number of elements in each array.
>
> This sounds easy but I'm stuck. Help!

google this group for "__Comb.pm__".  It was about 2 years ago.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: 13 Jun 2006 10:14:12 -0700
From: "Brian McCauley" <nobull67@gmail.com>
Subject: Re: Permutations/combinations from multiple arrays
Message-Id: <1150218852.337429.101080@h76g2000cwa.googlegroups.com>


Peter Ensch wrote:
> Not sure if the correct word is permutation or combination (or neither), but
> this is what I want to do. Given an array of arrays, such as:
>
> my @v = (
>   [qw/ a /],
>   [qw/ b c d /],
>   [qw/ e f g /],
> );
>
> I want to output all the permutations/combinations from taking one item
> from each array, like this:
>
> a b e
> a b f
> a b g
> a c e
> a c f
> a c g
> a d e
> a d f
> a d g
>
> The function should be able to handle any number of arrays with any
> number of elements in each array.
>
> This sounds easy but I'm stuck.

It is easy. Could you be more precise about where you are stuck?

Basically you need a recursive fuction that literates over one list and
then calls itselft with fewer lists.

For example...

sub perm {
    my ($first_list,@remaining_lists) = @{shift()};
    # Remainder of @_ is the prefix
    return [ [ @_ ] ] unless $first_list;
    [ map { @{ perm( \@remaining_lists, @_, $_) } } @$first_list ];
}



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

Date: 13 Jun 2006 10:49:56 -0700
From: "Brian McCauley" <nobull67@gmail.com>
Subject: Re: Symbol Table and References
Message-Id: <1150220996.153324.239910@p79g2000cwp.googlegroups.com>


Brad Baxter wrote:
> dh wrote:
> > Hello,
> > I am trying to understand symbol tables and references. Maybe someone
> > can give me a hint.
> > Assume we are loking at symbol table st.
> > 0) What is the internal format of a symbol table?
> > 1)  What is actually stored at e.g. @st? The data of @a or a pointer to
> > this data?
> > 2) What is returned by (1,2,3), the data itself or a pointer to this data?
> > 3) Is it correct, that a reference is simply a pointer?
> > 4) What is *st exactly, a pointer to the start of the symbol table?
> > 5) What is the difference between *st and /*st?
> > 6) What exactly is a file handle?
> >
> > Thank you, Daniel
>
> Have you read
>
>     perldoc perlreftut
>     perldoc perlref
>     perldoc perldata

Not to mention

perldoc perlguts

and the perl source code.

> -- 
> Brad



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

Date: 13 Jun 2006 09:39:26 -0700
From: "Andrew" <hawk007@flight.us>
Subject: Re: The Nature of the "Unix Philosophy" (long)
Message-Id: <1150216766.239909.127740@p79g2000cwp.googlegroups.com>

Xah Lee wrote:
> The Nature of the "Unix Philosophy"
>
> Xah Lee, 2006-05
>
> In the computing industry, especially among unix community, we often
> hear that there's a "Unix Philosophy". In this essay, i dissect the
> nature and characterization of such "unix philosophy", as have been
> described by Brian Kernighan, Rob Pike, Dennis Ritchie, Ken Thompson,
> and Richard P Gabriel et al, and in recent years by Eric Raymond.
>
> There is no one definite set of priciples that is the so-called "unix
> philosophy", but rather, it consistest of various slogans developed
> over the decades by unix programers that purport to describe the way
> unix is supposed to have been designed. The characteristics include:
> "keep it simple", "make it fast", "keep it small", "make
> it work on 99% of cases, but generality and correctness are less
> important", "diversity rules", "User interface is not
> important, raw power is good", "everything should be a file",
> "architecture is less important than immediate workability". Often,
> these are expressed by chantible slogans that exhibits juvenile humor,
> such as "small is beautiful", "KISS (Keep It Simple, Stupid)".
>
> Suppose, we take a team of student programers

Can all "student programmers" be lumped into one homogeneous category?
With one particular level of skill and talent, applicable to your
example?  What would that skill level be, roughly speaking?

> to produce a large software system.

 ...such as an OS? (just longing for specifics here) What is "large"?
(longing for more exact quantifiers)

> When the software is done, give it to software critics

But it's never really "done", is it?  A part of the unix philosophy (or
unix practice, at least) is an ongoing perfecting/enhancing process
that involves a whole community of developers and users, isn't it?  Or
do you mean "when the project reaches its [alpha/beta/rc1/etc.] stage"?
(again, wanting specifics - these development markers exist and are
well entrenched in the unix world -- why not use them here?)

> to analyze and come up with some principles that characterize its
> design decisions, without disclosing the nature of the programers. The
> characterization of such software, will more or less fit the
> descriptions of the "Unix Philosophy" as described in different
> ways by various unix celebrities.

Just to be sure, are you referring to the names you listed at the
beginning of your article? ("Brian Kernighan, Rob Pike, Dennis Ritchie,
 ...") If so, I'd make a more explicit tie,  by means of such word as
"such as those mentioned above". If not, listing a couple of celebrity
names here would help the reader connect more dots.

> For example, it would focus on implementation simplicity as opposed to
> interface simplicity. It will not be consistent in user interface,

inconsistent across versions (over time), or inconsistent from platform
to platform (OS to OS), or, say, among various linux distributions?  Or
among window managers and various API's?

and I don't understand what "implementation simplicity" is exactly.
(I'm not trying to be subversive here; just trying to understand.)

> but
> exhibits rawness. It would be correct only for most cases,

how is software "correct"?  Do you mean "the software would work"?
(without errors, as expected)

what is a "case"?  Do you mean, it would work under most *conditions*,
in most *environments*?  I don't understand

 as opposed
> to mathematically correct or generic. It would employee simplistic data
> structures and formats such as text-files, as opposed to a structured
> system or binary format that requires a spec. It would be speedy, but

a text data structure can require a spec.

And are you talking about quick-and-dirty, slapped-together, makeshift,
 short-term-fix tasks?  If yes, why not say that!

> less on scalability. It would consists of many small programs, as
> opposed to one large system with inter-dependent components.

How would such software rate on the "modular is good" scale?

"many small programs" seems to suggest modularity. If so, what makes
this "student software" undesirable, in spite of its (perhaps pseudo-)
modularity?

> It would
> be easy to patch and port, but difficult to upgrade its structure or
> adapt entirely new assumptions.

why?

> The essence of this theory is that when a software is produced for real
> world use,

By "real world", do you, by chance, mean the commercial/business world?
(Since it is /that/ world that seems to operate more on rigid deadlines
and bottom-line $$ constraints)

> it is necessary that it works in some acceptable way,

"some acceptable way"?  Please quantify/define "acceptability" here
(the "some" doesn't help with the quantifying either)

> otherwise the software will be continuously debugged and refined. A
> software system written by a bunch of student or otherwise
> under-educated programers, but refined long enough for acceptably

another dangerously undefined term -- "under-educated". Some of your
readers may perceive this to be a reference to "accreditation"
(diplomas), which -- i believe most would agree -- would make your
assertion a gross error.

I personally know a highschool dropout programmer who, although
self-taught, exerts such diligence, thoroughness and ingenuity in his
work, that his products are state-of-the-art, to the extent that huge,
global, tycoon software corporations, fearing the undisputed
superiority of his product to theirs, have EXTENSIVELY attempted to buy
him out (with carrots, threats and all other means possible). Yes, a
guy with barely any official accreditation, whom an indiscriminant,
carelessly generalizing observer might pidgeon-hole into the
"under-educated" category.

> practical, real world use, will necessarily develop characteristics
> that is known as the Unix Philosophy.

Overall, when I read the article i wish for more specifics and for more
exact and understandable quantities, particularly when the very measure
of a quantity is used to make some argument (the chosen words create
only a *semblance* of measurement, and, in the end, leave the reader
with only a vague idea about the quantities entailed)

As is the point of your article to bemoan the shortcomings of student
programmers? This group is at first presented as an example, but then
seems to become the focus.

If so, should we not give any consideration to the stringency
*inherent* in student life, resulting from things like: shortage of
time (to do things methodically, with long-term planning), a variety of
insecurities, high competition pressure, lack of real-world practice?

andrew



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

Date: Tue, 13 Jun 2006 12:27:29 -0500
From: "Stephen Sprunk" <stephen@sprunk.org>
Subject: Re: The Nature of the "Unix Philosophy" (long)
Message-Id: <448ee828$0$3572$88260bb3@free.teranews.com>

"Andrew" <hawk007@flight.us> wrote in message 
news:1150216766.239909.127740@p79g2000cwp.googlegroups.com...
> Xah Lee wrote:
>> less on scalability. It would consists of many small programs, as
>> opposed to one large system with inter-dependent components.
>
> How would such software rate on the "modular is good" scale?
>
> "many small programs" seems to suggest modularity. If so, what makes
> this "student software" undesirable, in spite of its (perhaps pseudo-)
> modularity?

I agree with all your other comments, but I'd like to add a bit here...

OSS (and the base Unix OS) tends towards lots of little tools that the user 
can combine to solve any problem, provided he can figure out how to use each 
of them individually (or even which tools to use).

Commercial software tends towards one huge tool that can be used to 
accomplish pre-planned tasks with virtually no training, but which is 
difficult to use for (if not completely incapable of) solving new tasks.

Of course, there's plenty of exceptions, but those are definite trends.

S

-- 
Stephen Sprunk        "Stupid people surround themselves with smart
CCIE #3723           people.  Smart people surround themselves with
K5SSS         smart people who disagree with them."  --Aaron Sorkin 


-- 
Posted via a free Usenet account from http://www.teranews.com



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

Date: 13 Jun 2006 09:53:01 -0700
From: "kdd21@hotmail.com" <kdd21@hotmail.com>
Subject: Re: threads on XP-- system() works, backtic & popen dosen't...
Message-Id: <1150217581.576698.94370@f6g2000cwb.googlegroups.com>


robic0 wrote:

> Jesus H Christ, go back to PORN where you came from.........



Well, that one went completely over *my* head...


--

Sync



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

Date: Tue, 13 Jun 2006 17:33:51 +0200
From: Yohan N. Leder <ynleder@nspark.org>
Subject: Re: UTF-8 subject in an email
Message-Id: <MPG.1ef8f94a66b11f7d989894@news.tiscali.fr>

In article <1150208007.607533.317210@u72g2000cwu.googlegroups.com>, 
bart@nijlen.com says...
> I think this is not a direct UTF-8 issue. If you encode the subject
> line correctly to 7-bit ascii, it's then up to the email client how it
> will decode the subject. I think there's not much more you can do.

I effectively declare header with "Content-Transfer-Encoding: 7bit".

> Maybe Eudora doesn't like RFC2047 or UTF-8, or has only limited support
> for it.

Hum, after you sentence above, I has a doubt and searched quickly using 
"eudora utf-8" in Google... And, I've found this page 
<http://eudorabb.qualcomm.com/printthread.php?t=3227> where we can read 
: "The e-mail standard says that all e-mail programs modified 1999 or 
later must (read "must"!) understand UTF-8 encoded e-mails. The people 
at Qualcomm didn't manage to make Eudara UTF-8 compliant, though. So e-
mails you receive that are in UTF-8 may contain funny characters. Change 
to a different client? No, Eudora is fine. It is among the best e-mail 
clients I have ever seen. Except for this bug, that is..."

I don't know if it's always the case (I'm using the last one : Eudora 
7.0), but it sounds strange for a pionneer like Eudora... 

Well, I've trie the eudora plugin they talk about (called utf8iso) and :

- it works partially for the body : well take care of the "Content-Type: 
text/plain; charset=utf-8" statement, but "Content-Transfer-Encoding: 
8bit" appear in body as if it was simple text rather than a statement.

- it doesn't do anything for the encoded subject line.

What do the Qualcomm guys do ? Move to Unicode is required since 1999 
according to <http://www.imc.org/mail-i18n.html>. It's time now !

> Does it work in Eudora when you have a line like:
>   Subject: =?utf-8?Q?bo=C3=AEte?=
> or
>   Subject: =?utf-8?B?Ym/DrnRl?=

I got the same : not any UTF-8 interpretation... But, now, it's obvious 
it's the Eudora's fault :( It's a pity !

> I would suggest to test your subject lines in as much emailclients as
> possible.

Thus, effectively, I'll have to check in several email clients, but - 
and this but is heavy - it's really a pity due to the Eudora 
popularity...


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

Date: Tue, 13 Jun 2006 17:47:15 +0200
From: Yohan N. Leder <ynleder@nspark.org>
Subject: Re: UTF-8 subject in an email
Message-Id: <MPG.1ef8fc6bf200c975989895@news.tiscali.fr>

In article <e6mp38.17c.1@news.isolution.nl>, rvtol+news@isolution.nl 
says...
> Yohan N. Leder schreef:
> 
> > use utf8;
> 
> This means that (you state that) your source code is in UTF-8 encoding.

Yes ! Edited under Komodo only.

> > my $subject = encode('MIME-B', "boîte");
> 
> That "boîte" is probably not in UTF-8 but in Latin1?

No, because of the reply above : all literals are automatically in UTF-
8.

> Try "bo\x{EE}te", 

Not any change, I got "boîte" as subject line in Eudora (even, 
including the utf8iso plugin).

> or just remove the "use utf8;" line.

Always the same, whatever be the way : without "use utf8;", going 
through "=?utf-8?B?..." or "=?utf-8?Q?..."

> Have you read the new perlunitut already?
> (I have no URL, use Google)

Found here <http://users.tkk.fi/~jhi/perlunitut.pod>. Sounds like the 
same as perluniintro (from memory).


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

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:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#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 V10 Issue 9293
***************************************


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