[28815] in Perl-Users-Digest
Perl-Users Digest, Issue: 59 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 22 03:05:56 2007
Date: Mon, 22 Jan 2007 00:05:05 -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 Mon, 22 Jan 2007 Volume: 11 Number: 59
Today's topics:
Re: Copy all <bik.mido@tiscalinet.it>
Re: FAQ 3.18 How can I free an array or hash so my prog <hjp-usenet2@hjp.at>
new CPAN modules on Mon Jan 22 2007 (Randal Schwartz)
Re: problem GD and my package Random->Random::new <mark.clementsREMOVETHIS@wanadoo.fr>
Re: problem GD and my package Random->Random::new <stan@invalid.blz/hmrprint/com.com>
Re: problem GD and my package Random->Random::new <1usa@llenroc.ude.invalid>
Re: problem GD and my package Random->Random::new <john.swilting@wanadoo.fr>
Re: problem GD and my package Random->Random::new <john.swilting@wanadoo.fr>
Re: problem GD and my package Random->Random::new <john.swilting@wanadoo.fr>
Re: Search pattern not terminated at (Spreadsheet::Read <awkster@yahoo.com>
sed/grep out lines in file <privy@private.com>
Re: the => operator <louisREMOVE@REMOVEh4h.com>
Re: Undefined subroutine &main krakle@visto.com
Re: Whas is the difference between forked process vs ex xhoster@gmail.com
Re: Xah's Edu Corner: Introduction to 3D Graphics Progr <xah@xahlee.org>
~~~~~~~~ Amazing Real Booby Downloads ~~~~~~~` <Shellby@mindspring.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 21 Jan 2007 21:52:57 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Copy all
Message-Id: <o7k7r2d0rn1rdu89kjqrvki8jkftbj80oe@4ax.com>
On 21 Jan 2007 11:00:36 -0800, "Régine" <admin@crayos.com> wrote:
>My OS is Windows like 2000 but why not XP or another..
Well, that shouldn't be much of a difference. I suppose you have AS's
Activeperl installed. Then you can fire up ppm like thus:
ppm install File-Copy-Recursive
Then you will be able to read its documentation by
perldoc File::Copy::Recursive
>Tanks for your compliment
>It's so dificult to write English
It's just important to take care of being as clear as possible, and it
seems to me that you're doing the effort. That is respectful in our
regards, and I appreciate it, and I bet most other regulars do as
well. I'm not a native English speaker either, my mother tongue being
Italian, so that my English is far from being perfect as well.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Sun, 21 Jan 2007 21:42:57 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: FAQ 3.18 How can I free an array or hash so my program shrinks?
Message-Id: <slrner7k2h.4sk.hjp-usenet2@yoyo.hjp.at>
On 2007-01-21 20:03, PerlFAQ Server <brian@stonehenge.com> wrote:
> --------------------------------------------------------------------
>
> 3.18: How can I free an array or hash so my program shrinks?
>
> (contributed by Michael Carman)
>
> You usually can't. Memory allocated to lexicals (i.e. my() variables)
> cannot be reclaimed or reused even if they go out of scope.
As far as I know they are reclaimed when the function they are in
returns. So if you temporarily need lots of memory to compute something
it is better do it in a function.
> It is reserved in case the variables come back into scope. Memory
> allocated to global variables can be reused (within your program)
> by using undef()ing and/or delete().
>
> On most operating systems, memory allocated to a program can never be
^^^^^^^^^^^^^^^^^^^^^^^^^
> returned to the system.
I'm not sure if this is still true, at least if you take market shares
into account.
I believe Windows doesn't have an brk-based allocation system, so
returning memory to the system should be possible (but I freely admit
that I haven't done any Windows programming and my OS/2 days were long
ago).
Linux is one of the systems using mmap, so it can return chunks of
memory to the system if they are large enough (which is a big if for
perl which tends to allocate lots of little objects).
MacOS seems to use a similar technique as Linux according to
http://developer.apple.com/documentation/Performance/Conceptual/ManagingMemory/Articles/MemoryAlloc.html
(although that only describes what happens with malloc, not free).
That leaves the "classic" Unixes and other "big iron" OSs (VMS, zOS,
...). HP-UX still uses the classic brk algorithm, I don't know about
Solaris and AIX (any other which is still relevant?). VMS and zOS I know
nothing about.
hp
--
_ | Peter J. Holzer | Es ist ganz einfach ihn zu verstehen, wenn
|_|_) | Sysadmin WSR | man nur alle wichtigen Worte im Satz durch
| | | hjp@hjp.at | andere ersetzt.
__/ | http://www.hjp.at/ | -- Nils Ketelsen in danr
------------------------------
Date: Mon, 22 Jan 2007 05:42:09 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Mon Jan 22 2007
Message-Id: <JC9969.1yru@zorch.sf-bay.org>
The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN). You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.
Egg-Release-0.32
http://search.cpan.org/~lushe/Egg-Release-0.32/
WEB application framework release.
----
Egg-Release-0.33
http://search.cpan.org/~lushe/Egg-Release-0.33/
WEB application framework release.
----
File-Temp-0.18
http://search.cpan.org/~tjenness/File-Temp-0.18/
return name and handle of a temporary file safely
----
GPS-PRN-0.05
http://search.cpan.org/~mrdvt/GPS-PRN-0.05/
Package for PRN - Object ID conversions.
----
GPS-SpaceTrack-0.07
http://search.cpan.org/~mrdvt/GPS-SpaceTrack-0.07/
Package for calculating the position of GPS satellites
----
Games-Bowling-Scorecard-0.001
http://search.cpan.org/~rjbs/Games-Bowling-Scorecard-0.001/
score your bowling game easily
----
Games-Bowling-Scorecard-0.011
http://search.cpan.org/~rjbs/Games-Bowling-Scorecard-0.011/
score your bowling game easily
----
Geo-Ellipsoids-0.13
http://search.cpan.org/~mrdvt/Geo-Ellipsoids-0.13/
Package for standard Geo:: ellipsoid a, b, f and 1/f values.
----
Getopt-Mixed-Help-0.18
http://search.cpan.org/~dorner/Getopt-Mixed-Help-0.18/
combine Getopt::Mixed with usage and help
----
Gtk2-1.142
http://search.cpan.org/~tsch/Gtk2-1.142/
Perl interface to the 2.x series of the Gimp Toolkit library
----
JSAN-Client-0.15
http://search.cpan.org/~adamk/JSAN-Client-0.15/
The JavaScript Archive Network Client Library
----
JSAN-Client-0.16
http://search.cpan.org/~adamk/JSAN-Client-0.16/
The JavaScript Archive Network Client Library
----
JSAN-Shell-2.00_05
http://search.cpan.org/~adamk/JSAN-Shell-2.00_05/
JavaScript Archive Network Client Shell
----
Makefile-Parallel-0.01
http://search.cpan.org/~root/Makefile-Parallel-0.01/
A distributed parallel makefile
----
Math-Complex-1.37
http://search.cpan.org/~jhi/Math-Complex-1.37/
complex numbers and associated mathematical functions
----
Math-GammaFunction-0.01
http://search.cpan.org/~smueller/Math-GammaFunction-0.01/
The Gamma and its related functions
----
Math-GammaFunction-0.02
http://search.cpan.org/~smueller/Math-GammaFunction-0.02/
The Gamma and its related functions
----
Module-Build-Convert-0.46
http://search.cpan.org/~schubiger/Module-Build-Convert-0.46/
Makefile.PL to Build.PL converter
----
Module-Build-Convert-0.47
http://search.cpan.org/~schubiger/Module-Build-Convert-0.47/
Makefile.PL to Build.PL converter
----
Net-Lorcon-0.01
http://search.cpan.org/~dgl/Net-Lorcon-0.01/
Raw wireless packet injection using the Lorcon library
----
SCALP-0.0.3
http://search.cpan.org/~xsawyerx/SCALP-0.0.3/
Simple CMS Assistant for Lazy Programmers
----
Time-Local-1.14
http://search.cpan.org/~drolsky/Time-Local-1.14/
efficiently compute time from local and GMT time
----
WWW-Baidu-0.06
http://search.cpan.org/~agent/WWW-Baidu-0.06/
Perl interface for the www.baidu.com search engine
----
XML-FeedPP-0.21
http://search.cpan.org/~kawasaki/XML-FeedPP-0.21/
Parse/write/merge/edit RSS/RDF/Atom syndication feeds
If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.
This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
http://www.stonehenge.com/merlyn/LinuxMag/col82.html
print "Just another Perl hacker," # the original
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Sun, 21 Jan 2007 20:07:56 +0100
From: Mark Clements <mark.clementsREMOVETHIS@wanadoo.fr>
Subject: Re: problem GD and my package Random->Random::new
Message-Id: <45b3ba0c$0$27388$ba4acef3@news.orange.fr>
john.swilting wrote:
> john.swilting wrote:
>
>> my code not work
>> its obvious for me
>>
<snip lots of code>
>
> I am going to eat then to go to sleep me
> I return tomorrow
>
> my package compil nice
> its $text = Random->Random::new
> not works
"doesn't work" isn't a very helpful error description. Do you receive an
error message? If so, what is it?
By the way, the constructor would normally be something like:
my $random_obj = Random->new();
Although your syntax appears to work, I've never seen it done like that
before.
You need to work on explaining your problems better: dumping a load of
code on the newsgroup and saying "it doesn't work" isn't likely to get
you very far. Take a look at the posting guidelines and then repost:
they are there to help you.
Mark
------------------------------
Date: Sun, 21 Jan 2007 12:10:55 -0800
From: "Stan R." <stan@invalid.blz/hmrprint/com.com>
Subject: Re: problem GD and my package Random->Random::new
Message-Id: <ep0hcj0hp1@news2.newsguy.com>
Mark Clements wrote:
> john.swilting wrote:
>> john.swilting wrote:
>>
>>> my code not work
>>> its obvious for me
>>>
> <snip lots of code>
>>
>> I am going to eat then to go to sleep me
>> I return tomorrow
>>
>> my package compil nice
>> its $text = Random->Random::new
>> not works
>
> "doesn't work" isn't a very helpful error description. Do you receive
> an error message? If so, what is it?
>
> By the way, the constructor would normally be something like:
>
> my $random_obj = Random->new();
>
> Although your syntax appears to work, I've never seen it done like
> that before.
or
my $random_obj = new Random;
which can be more confortable for people who are used to C/C++/Java
grammar.
--
Stan R.
------------------------------
Date: Sun, 21 Jan 2007 20:34:27 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: problem GD and my package Random->Random::new
Message-Id: <Xns98BF9E6CDC122asu1cornelledu@127.0.0.1>
"Stan R." <stan@invalid.blz/hmrprint/com.com> wrote in news:ep0hcj0hp1
@news2.newsguy.com:
>> john.swilting wrote:
...
>>> I am going to eat then to go to sleep me
>>> I return tomorrow
Good thing I plonked you today then.
>
> my $random_obj = new Random;
>
> which can be more confortable for people who are used to C/C++/Java
> grammar.
Please read the section "Indirect Object Syntax" in perldoc perlobj before
making such recommendations.
Sinan
------------------------------
Date: Mon, 22 Jan 2007 04:57:21 +0100
From: "john.swilting" <john.swilting@wanadoo.fr>
Subject: Re: problem GD and my package Random->Random::new
Message-Id: <45b4361b$0$25926$ba4acef3@news.orange.fr>
Stan R. wrote:
> Mark Clements wrote:
>> john.swilting wrote:
>>> john.swilting wrote:
>>>
>>>> my code not work
>>>> its obvious for me
>>>>
>> <snip lots of code>
>>>
>>> I am going to eat then to go to sleep me
>>> I return tomorrow
>>>
>>> my package compil nice
>>> its $text = Random->Random::new
>>> not works
>>
>> "doesn't work" isn't a very helpful error description. Do you receive
>> an error message? If so, what is it?
>>
>> By the way, the constructor would normally be something like:
>>
>> my $random_obj = Random->new();
>>
>> Although your syntax appears to work, I've never seen it done like
>> that before.
>
> or
>
> my $random_obj = new Random;
>
> which can be more confortable for people who are used to C/C++/Java
> grammar.
>
Why not to make one module Random.pm
whit Makefile.pl
and more
------------------------------
Date: Mon, 22 Jan 2007 05:48:18 +0100
From: "john.swilting" <john.swilting@wanadoo.fr>
Subject: Re: problem GD and my package Random->Random::new
Message-Id: <45b4420d$0$27393$ba4acef3@news.orange.fr>
A. Sinan Unur wrote:
> "Stan R." <stan@invalid.blz/hmrprint/com.com> wrote in news:ep0hcj0hp1
> @news2.newsguy.com:
>
>>> john.swilting wrote:
> ...
>
>>>> I am going to eat then to go to sleep me
>>>> I return tomorrow
>
> Good thing I plonked you today then.
>
>>
>> my $random_obj = new Random;
>>
>> which can be more confortable for people who are used to C/C++/Java
>> grammar.
>
> Please read the section "Indirect Object Syntax" in perldoc perlobj before
> making such recommendations.
>
> Sinan
I made one package
uses now $random = new Random
code ok
compil nice
cgi its ok
thank you
I am going to change my customs
I am going to make package for the variables which owe exchanges to the run
my code
#!/use/bin/perl -w
package Random;
use strict;
require Exporter;
use vars qw( @ISA);
##$VERSION = O.O1;
@ISA = qw(Exporter);
sub new {
my $class=shift;
my $self={};
bless $self,$class;
my@liste=('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15',
'16','17','18','19','20','21','22','23','24','25','26','27','28',
'29','30','31','32','33','34','35','36','37','38','39','40','41',
'42','43','44','45','46','47','48','49','50','51','52','53','54',
'55','56','57','58','59','60','61','62','63','64','65','66','67',
'68','69','70','71','72','73','74','75','76','77','78','79','78',
'79','80','81','82','83','84','85','86','87','88','89','90','91',
'92','93','94','95','96','97','98','99','100','101','102','103',
'104','105','106','107','108','109','110');
$self="";
my$self1="";
my$self2="";
my$self3="";
my$self4="";
$self1.=$liste[int rand@liste];
$self .= $self1;
$self2.=$liste[int rand@liste];
$self .=$self2;
$self3.=$liste[int rand@liste];
$self .=$self3;
$self4.=$liste[int rand@liste];
return $self;
}
END {}
1;
------------------------------
Date: Mon, 22 Jan 2007 06:19:28 +0100
From: "john.swilting" <john.swilting@wanadoo.fr>
Subject: Re: problem GD and my package Random->Random::new
Message-Id: <45b4495a$0$27399$ba4acef3@news.orange.fr>
john.swilting wrote:
> A. Sinan Unur wrote:
>
>> "Stan R." <stan@invalid.blz/hmrprint/com.com> wrote in news:ep0hcj0hp1
>> @news2.newsguy.com:
>>
>>>> john.swilting wrote:
>> ...
>>
>>>>> I am going to eat then to go to sleep me
>>>>> I return tomorrow
>>
>> Good thing I plonked you today then.
>>
>>>
>>> my $random_obj = new Random;
>>>
>>> which can be more confortable for people who are used to C/C++/Java
>>> grammar.
>>
>> Please read the section "Indirect Object Syntax" in perldoc perlobj
>> before making such recommendations.
>>
>> Sinan
> I made one package
> uses now $random = new Random
>
> code ok
> compil nice
> cgi its ok
> thank you
> I am going to change my customs
> I am going to make package for the variables which owe exchanges to the
> run my code
> #!/use/bin/perl -w
>
> package Random;
>
> use strict;
> require Exporter;
>
> use vars qw( @ISA);
>
> ##$VERSION = O.O1;
>
> @ISA = qw(Exporter);
>
> sub new {
> my $class=shift;
> my $self={};
> bless $self,$class;
>
>
my@liste=('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15',
> '16','17','18','19','20','21','22','23','24','25','26','27','28',
> '29','30','31','32','33','34','35','36','37','38','39','40','41',
> '42','43','44','45','46','47','48','49','50','51','52','53','54',
> '55','56','57','58','59','60','61','62','63','64','65','66','67',
> '68','69','70','71','72','73','74','75','76','77','78','79','78',
> '79','80','81','82','83','84','85','86','87','88','89','90','91',
> '92','93','94','95','96','97','98','99','100','101','102','103',
> '104','105','106','107','108','109','110');
> $self="";
> my$self1="";
> my$self2="";
> my$self3="";
> my$self4="";
> $self1.=$liste[int rand@liste];
> $self .= $self1;
> $self2.=$liste[int rand@liste];
> $self .=$self2;
> $self3.=$liste[int rand@liste];
> $self .=$self3;
> $self4.=$liste[int rand@liste];
> return $self;
> }
>
>
> END {}
> 1;
The positions of the text
Have to change and colours also
I go it package is I believe better
------------------------------
Date: 21 Jan 2007 15:25:33 -0800
From: "Jorge" <awkster@yahoo.com>
Subject: Re: Search pattern not terminated at (Spreadsheet::Read example)
Message-Id: <1169421933.756898.97500@38g2000cwa.googlegroups.com>
anno4000@radom.zrz.tu-berlin.de wrote:
> Jorge <awkster@yahoo.com> wrote in comp.lang.perl.misc:
> > Paul wrote:
> > > The syntax is wrong. I'm not sure what // is supposed to be doing, but
> > > whatever it is, it's wrong :)
> >
> > You are correct. Since my posting, I have tracked down that the // is
> > the Perl 6 construct for defined-or, not a set of pattern delimiters as
> > I had presumed. Now, I have to re-write that portion of code so it
> > plays in Perl 5.8.8 or look for a patch to Perl 5.8.8.
>
> Replace (untested)
>
> map {$sheet->{cell}[$_][$row] // "-"} 1 .. $sheet->{maxcol};
>
> with
>
> map defined ? $_ : '-', map $sheet->{cell}[$_][$row], 1 .. $sheet->{maxcol}
>
> Btw, in the original code, the first slash is parsed as a division
> operator. The second one seems to introduce an unterminated regex.
>
> Anno
I agree the 2 slashes are being parsed incorectly.
This is the correction which works.
print join "\t" => map
{
my $val = $sheet->{cell}[$_][$row];
defined $val ? $val : "-";
} 1 .. $sheet->{maxcol};
Thanks very much for all the responses.
------------------------------
Date: Sun, 21 Jan 2007 20:56:35 -0600
From: Cranky <privy@private.com>
Subject: sed/grep out lines in file
Message-Id: <4l98r21maabhg3239gerkqgkue3fo6a7jr@4ax.com>
Hello all, I am looking for a way to sed / grep out information from a
file. Example contents of test.txt:
Crap junk <span id="descTXT">Just some
text for test and other stuff
here </span> More junk
I would like to grep out everything between the <span> open and close
tags. I use the following in a linux shell:
sed -n '/\"descTXT\">,/<\/span>/p' test.txt
but I would like to convert that to a single line perl command if
possible, e.g.:
perl -w ''/\"descTXT\">,/<\/span>/p' test.txt'
or will writing a small perl script be the only way?
TIA,
Cranky
------------------------------
Date: Sun, 21 Jan 2007 12:01:15 -0800
From: "Wayne M. Poe" <louisREMOVE@REMOVEh4h.com>
Subject: Re: the => operator
Message-Id: <51hv4fF1kpbanU1@mid.individual.net>
Abigail wrote:
> Wayne Poe (louis@h4h.com) wrote on MMMMDCCCLXXXVIII September
> MCMXCIII in <URL:news:51841dF1j35s4U1@mid.individual.net>:
> == Abigail wrote:
> == > Wayne M. Poe (louisREMOVE@REMOVEh4h.com) wrote on MMMMDCCCLXXXVI
> == > September MCMXCIII in
> <URL:news:515003F1ho4vuU1@mid.individual.net>: == > `` In some
> places thats exactly what was there (any plank lien that == > was ``
> quoted ends up being "-- \n") == >
> == > No.
> ==
> == Actually at the begining there is one occurance:
> ==
> == ------------------------------------------------
> == fatwallet961@yahoo.com (fatwallet961@yahoo.com) wrote on
> MMMMDCCCLXXXV == September MCMXCIII in
> == <URL:news:l7unq2h7kj8flbbk01juqhcegnpaubmcg1@4ax.com>:
> == -- in the following code
> == --
> == -- what's => means?
> == ------------------------------------------------
>
> Second to last line.
>
>
> No. Go to the original message and count carefully again. All you need
> to do is count to 2.
------------------------------------------------------
1 fatwallet961@yahoo.com (fatwallet961@yahoo.com) wrote on MMMMDCCCLXXXV
2 September MCMXCIII in
<URL:news:l7unq2h7kj8flbbk01juqhcegnpaubmcg1@4ax.com>:3
3 --,,in the following code
4 --,,
5 --,,what's => means?
6
7 It's a comma which quotes a bareword on its left hand side.
------------------------------------------------------
Line 4 was the one I was talking about. Ok, you actually have two spaces
at the end rather than one (prior to the newline), so it's not the same,
I'll give you that
However, it appears to be close enough to interfere with some quote/sig
formatters. I've seen this break 2 that I have tested. One being
Quote-Fix for OE on win32, a news reader on my linux test box (whose
name escapes right now, but does nice color formatting of quote levels
sort of like OE-QF.) The both color from like 4, on, as if that was the
beginning of your sig.
This is in addition to the fact most quote processors like those I
listed don't recognize most of the quote characters you use. I also
remember problems on the old version of Google Groups when reading your
posts.
Please just answer the question (which you always seem to avoid), why
can't you just use standard, or at least more normal quoting, if for
nothing else than for the sake of sanity? I believe this is a perfectly
valid question.
------------------------------
Date: 21 Jan 2007 20:27:28 -0800
From: krakle@visto.com
Subject: Re: Undefined subroutine &main
Message-Id: <1169440048.370155.184210@11g2000cwr.googlegroups.com>
On Jan 19, 5:52 pm, Pet <p...@modulus.org> wrote:
>
> Here is the example I used:
>
> #!/usr/local/bin/perl
>
> $localhost = 'mydot.com';
>
> use mypg;
> use Cyrus::IMAP::Admin;
I noticed you didn't bother to "use strict;". Therefor the rest of your
post was ignored by me.
Next time...
use strict;
use warnings;
use Common::Sense::Before::You::Post;
:)
------------------------------
Date: 22 Jan 2007 00:54:05 GMT
From: xhoster@gmail.com
Subject: Re: Whas is the difference between forked process vs external command in this case.
Message-Id: <20070121195417.729$Ci@newsreader.com>
"grocery_stocker" <cdalten@gmail.com> wrote:
> Taken from Open3
> " Note if you specify "-" as the command, in an analogous
> fashion to "open(FOO, "-=E2=94=82")" the child process will just
> be the forked Perl process rather than an external com=C2=AD
> mand. This feature isn't yet supported on Win32 plat=C2=AD
> forms."
>
> Okay, what is the big deal if the this is a forked process vs an
> external command?
Well, they do very different things.
> I really can't think
> of situtation and/or program off the top of my head where this would
> matter.
You can't? Let's say the other program is "ls". If you do the plain fork
instead of starting the external "ls" command (which is probably
implemented as the combination of fork followed by an exec) , then the
other program is not "ls", it is perl. That seems like a big difference to
me. I rarely confuse perl with ls. On the other hand, let is say the
other program is perl. If you use the forking method, then the new process
has a copy (COW) of all the old process's data, and all the old process's
modules are already loaded (which is often a good thing, and sometimes a
bad thing, for example if you have objects holding connections to servers
that clean up on exit, it may clean up when the child exits while the
parent is still expecting to use them), and the code is already compiled.
And (I suspect) it is a lot faster to fork than to start up a whole new
interpreter from scratch by forking and then execing (and compiling...)
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: 21 Jan 2007 21:34:13 -0800
From: "Xah Lee" <xah@xahlee.org>
Subject: Re: Xah's Edu Corner: Introduction to 3D Graphics Programing
Message-Id: <1169444053.559779.233100@s34g2000cwa.googlegroups.com>
Xah Lee wrote in 2006-12-22:
> Of Interest:
>
> Introduction to 3D Graphics Programing
> http://xahlee.org/3d/index.html
Folks, i have expanded my tutorial to several pages in the past nearly
two months, and thank you very much for those who have given
encouragement.
I had plans to write pages that actually contained Python or Perl and
elisp code to demonstrate the mingled use of common languages with
POV-RAY and other tools for doing algorithmic mathematical art...
However, i'm posting now for one in-credible discovery that amazed me,
and believe it is a revolutionary both with respect to technology, as
well as its social impact.
Following is my brief introduction. The web version is at:
Introduction to Second Life
http://xahlee.org/sl/sl.html
-------
Introduction to Second Life
Xah Lee, 2007-01-09
above: A screenshot of a location in Second Life.
This place is called =E2=80=9CThe Future=E2=80=9D, it is a place built by H=
enry
Segerman =E2=86=97 built.
Second Life is a online virtual world with 2 million accounts as of
2006-12, and reportedly 10 thousand users logged in at any moment.
Basically, you operate a software that is a 3D world much like 3D
games, but everything in the =E2=80=9Cgame=E2=80=9D is built by users, and =
you can
interact with other users, including buying and selling virtual land
with real money. What people do inside Second Life is entirely up to
them (as in real life). And, as it happens, what people do mostly in
Second Life are pretty much what people do in real life. The major
activities are: sex, shopping, socializing, dancing.
My mathematician friend Henry Segerman introduced me to 2nd life. (also
because it appeared in Time Mag in 2006-12.) Henry has a 2nd life page
that contains many math objects made in Second Life:
http://www.stanford.edu/~segerman/2ndlife.html.
Part of my interest in Second Life is to build geometric models. (See
Introduction to 3D Graphics Programing) I have for the past couple
years sought for a software platform/system where i can build 3D
objects, with abilities to do interactive adjustment (such as moving a
slide to change a surface's parameter), dynamic rotation (viewing from
different angles), animations (such as morphing that shows geometric
processes), and most of all, walk-thru in it as if it is a building.
As far as my experiences goes, no software platform for 3D graphics are
close to the ideal of what i need to do. They lack one feature or the
other, or otherwise requires the programer to be a specialist with
years of dedication in learning the tool. For example, Mathematica=E2=86=97
has great collection of math functions but no dynamic graphics.
POV-RAY=E2=86=97 and 3D-modelers like AutoCAD=E2=86=97 can do great in buil=
ding 3D
objects but they are not designed for interactivity, animations, or
walk-thru. Java the programming language=E2=86=97 allows one to write apple=
ts
that does rotation and interactive manipulation but programing in Java
is extremely unnecessarily complex and yet it is still not possible to
do walk-thrus. The one class of platform that does all these, is 3D
game engines. But alas, they take a dedicated game programing
specialist to be able to use it. Second Life changed all this.
(Note: Just for completness, my requirement for a 3D-graphics
programing software system is this: =E2=80=A2 easy to use for average
programers or scientists. =E2=80=A2 Easy to build geometry models, such as
basic shapes like spheres and blocks, as well as surfaces or meshes of
triangles. =E2=80=A2 designed for interactivity. That is, the programer can
easily build buttons and sliders that changes parameters and have the
object reflect these changes visually right away. =E2=80=A2 the user can
easily change viewing angles or rotate the object. =E2=80=A2 The programer
can easily do animations. For example, morph a sphere into a cube, or a
bunch of spheres flying in space as a swarm of flies. =E2=80=A2 The ability
to do walk-thru (or fly-thru). For example, if i build a fancy 3D-maze
or architecture, i should be able to =E2=80=94 say =E2=80=94 become a ant, =
and walk
inside the object, so as to view the object from inside and as well as
getting the real experience of perceiving such a building. (Before my
discover of Second Life, the platform that i was considering nearly
ideal and preparing to learn, are VPython=E2=86=97 and Macromedia Flash=E2=
=86=97 (i
do still plan to learn these technologies) ))
Second Life is not just the answer to my mathematical fantasies, but
because of its Real-World nature, being run and build by real people,
and with scarily real money market of the virtual dollars it uses, is
nothing but a technological revolution with great social impact. It is
essentially the virtual-3D-world-wide-web dream of VRML=E2=86=97 envisioned
around 1995.
Anshe Chung=E2=86=97 is famouly known for being the first to become a (real
world) millionaire by selling entirely virtual items and virtual
services inside Second Life.
For a encyclopedic introduction, see: Second Life=E2=86=97
Here are some articles about Second Life. (note that there are a lot
linked at the bottom of the Wikipedia article.)
* Time Mag: =E2=80=9CMy So-Called Second Life=E2=80=9D, By Joel Stein,
20061216.=E2=86=97
* businessWeek online: INSIDE INNOVATION =E2=80=94 IN SIDE. Second Life
Lessons. By Reena Jana and Aili McConnon. 2006-11-27.=E2=86=97
2007-01-21, Addendum
Recently i heard of Entropia Universe=E2=86=97. I haven't taken a closer lo=
ok
but i think it is a competitor to Second Life.
Note that Second Life may not be and is probably not the first virtual
world. And, when virtual world like Second Life becomes household
activity as the internet is today, it will probably not be known as
Second Life or run by one single company, but diverse companies with
servers all over the world, where there is a unified virtual world all
the world's people can be in. (This situation may be likened to the
internet circa 1995. Or, perhaps also similar when telephone was in its
pioneering days.)
----
Xah
xah@xahlee.org
=E2=88=91 http://xahlee.org/
------------------------------
Date: Sun, 21 Jan 2007 23:19:05 GMT
From: Sarah<Shellby@mindspring.com>
Subject: ~~~~~~~~ Amazing Real Booby Downloads ~~~~~~~`
Message-Id: <JxSsh.754624$5R2.448458@pd7urf3no>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft DHTML Editing Control">
<TITLE></TITLE>
</HEAD>
<BODY>
<P> <A
href="http://zamzupport.blogspot.com/">http://zamzupport.blogspot.com/</A> - Horny
Chicks</P>
</BODY>
</HTML>
------------------------------
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 V11 Issue 59
*************************************