[32996] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4272 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 18 16:09:19 2014

Date: Mon, 18 Aug 2014 13:09: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           Mon, 18 Aug 2014     Volume: 11 Number: 4272

Today's topics:
        Cannot install Perl modules on Windows <benswitala@gmail.com>
    Re: Cannot install Perl modules on Windows <rweikusat@mobileactivedefense.com>
    Re: New topic: time flow simulation <hjp-usenet3@hjp.at>
    Re: New topic: time flow simulation <rweikusat@mobileactivedefense.com>
    Re: New topic: time flow simulation <gamo@telecable.es>
    Re: New topic: time flow simulation <gamo@telecable.es>
    Re: New topic: time flow simulation <gravitalsun@hotmail.foo>
    Re: New topic: time flow simulation <gamo@telecable.es>
    Re: New topic: time flow simulation <gravitalsun@hotmail.foo>
    Re: New topic: time flow simulation <rweikusat@mobileactivedefense.com>
    Re: New topic: time flow simulation <gamo@telecable.es>
    Re: New topic: time flow simulation <hjp-usenet3@hjp.at>
    Re: New topic: time flow simulation <gamo@telecable.es>
    Re: Perl bug ; (Tim McDaniel)
    Re: Perl bug ; <kkeller-usenet@wombat.san-francisco.ca.us>
    Re: Perl bug ; <hjp-usenet3@hjp.at>
    Re: perl6 too much pointless functionality <bauhaus@futureapps.invalid>
    Re: perl6 too much pointless functionality <rweikusat@mobileactivedefense.com>
    Re: perl6 too much pointless functionality <rweikusat@mobileactivedefense.com>
    Re: perl6 too much pointless functionality <hjp-usenet3@hjp.at>
    Re: Sorting Keys in Tie::IxHash::Easy <gravitalsun@hotmail.foo>
    Re: Sorting Keys in Tie::IxHash::Easy <gravitalsun@hotmail.foo>
    Re: Sorting Keys in Tie::IxHash::Easy <rweikusat@mobileactivedefense.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 18 Aug 2014 11:30:29 -0700 (PDT)
From: Ben Switala <benswitala@gmail.com>
Subject: Cannot install Perl modules on Windows
Message-Id: <baffd368-2647-417d-a053-9fe1cf72f7d5@googlegroups.com>

Hi,

I'm trying to install a Perl module on my Windows computer, and it's now wo=
rking.  What am I missing?

Also, how do I get rid of the strange strings like "=E2=86=90[32m" and "=E2=
=86=90[0m" from printing all over the place?

Thanks,
Ben

cpan> install Tie::IxHash
=E2=86=90[32mFetching with LWP:
http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz=E2=86=90[0m
=E2=86=90[32mLWP failed with code[500] message[Can't connect to ppm.actives=
tate.com:80 (
10060)]=E2=86=90[0m
=E2=86=90[31mWarning: no success downloading 'C:\Perl\cpan\sources\authors\=
01mailrc.txt.
gz.tmp2360'. Giving up on it.=E2=86=90[0m
=E2=86=90[32mFetching with LWP:
http://cpan.perl.org/authors/01mailrc.txt.gz=E2=86=90[0m
=E2=86=90[32mLWP failed with code[500] message[Can't connect to cpan.perl.o=
rg:80 (10060)
]=E2=86=90[0m
=E2=86=90[31mWarning: no success downloading 'C:\Perl\cpan\sources\authors\=
01mailrc.txt.
gz.tmp2360'. Giving up on it.=E2=86=90[0m
=E2=86=90[31mWarning: no success downloading 'C:\Perl\cpan\sources\authors\=
01mailrc.txt.
gz.tmp2360'. Giving up on it.=E2=86=90[0m
=E2=86=90[32mNo external ftp command available=E2=86=90[0m

=E2=86=90[32mFetching with LWP:
http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz=E2=86=90[0m
=E2=86=90[32mLWP failed with code[500] message[Can't connect to ppm.actives=
tate.com:80 (
10060)]=E2=86=90[0m
=E2=86=90[31mWarning: no success downloading 'C:\Perl\cpan\sources\authors\=
01mailrc.txt.
gz.tmp2360'. Giving up on it.=E2=86=90[0m
=E2=86=90[32mFetching with LWP:
http://cpan.perl.org/authors/01mailrc.txt.gz=E2=86=90[0m
=E2=86=90[32mLWP failed with code[500] message[Can't connect to cpan.perl.o=
rg:80 (10060)
]=E2=86=90[0m
=E2=86=90[31mWarning: no success downloading 'C:\Perl\cpan\sources\authors\=
01mailrc.txt.
gz.tmp2360'. Giving up on it.=E2=86=90[0m
=E2=86=90[31mWarning: no success downloading 'C:\Perl\cpan\sources\authors\=
01mailrc.txt.
gz.tmp2360'. Giving up on it.=E2=86=90[0m
=E2=86=90[32mNo external ftp command available=E2=86=90[0m

=E2=86=90[31mPlease check, if the URLs I found in your configuration file
(http://ppm.activestate.com/CPAN, http://cpan.perl.org) are valid. The
urllist can be edited. E.g. with 'o conf urllist push ftp://myurl/'=E2=86=
=90[0m

=E2=86=90[31mCould not fetch authors/01mailrc.txt.gz=E2=86=90[0m
=E2=86=90[32mFetching with LWP:
http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz=E2=86=90[0m
=E2=86=90[32mLWP failed with code[500] message[Can't connect to ppm.actives=
tate.com:80 (
10060)]=E2=86=90[0m
=E2=86=90[31mWarning: no success downloading 'C:\Perl\cpan\sources\authors\=
01mailrc.txt.
gz.tmp2360'. Giving up on it.=E2=86=90[0m
=E2=86=90[32mFetching with LWP:
http://cpan.perl.org/authors/01mailrc.txt.gz=E2=86=90[0m
=E2=86=90[32mLWP failed with code[500] message[Can't connect to cpan.perl.o=
rg:80 (10060)
]=E2=86=90[0m
=E2=86=90[31mWarning: no success downloading 'C:\Perl\cpan\sources\authors\=
01mailrc.txt.
gz.tmp2360'. Giving up on it.=E2=86=90[0m
=E2=86=90[31mWarning: no success downloading 'C:\Perl\cpan\sources\authors\=
01mailrc.txt.
gz.tmp2360'. Giving up on it.=E2=86=90[0m
=E2=86=90[32mNo external ftp command available=E2=86=90[0m

=E2=86=90[32mFetching with LWP:
http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz=E2=86=90[0m
=E2=86=90[32mLWP failed with code[500] message[Can't connect to ppm.actives=
tate.com:80 (
10060)]=E2=86=90[0m
=E2=86=90[31mWarning: no success downloading 'C:\Perl\cpan\sources\authors\=
01mailrc.txt.
gz.tmp2360'. Giving up on it.=E2=86=90[0m
=E2=86=90[32mFetching with LWP:
http://cpan.perl.org/authors/01mailrc.txt.gz=E2=86=90[0m
=E2=86=90[32mLWP failed with code[500] message[Can't connect to cpan.perl.o=
rg:80 (10060)
]=E2=86=90[0m
=E2=86=90[31mWarning: no success downloading 'C:\Perl\cpan\sources\authors\=
01mailrc.txt.
gz.tmp2360'. Giving up on it.=E2=86=90[0m
=E2=86=90[31mWarning: no success downloading 'C:\Perl\cpan\sources\authors\=
01mailrc.txt.
gz.tmp2360'. Giving up on it.=E2=86=90[0m
=E2=86=90[32mNo external ftp command available=E2=86=90[0m

=E2=86=90[31mPlease check, if the URLs I found in your configuration file
(http://ppm.activestate.com/CPAN, http://cpan.perl.org) are valid. The
urllist can be edited. E.g. with 'o conf urllist push ftp://myurl/'=E2=86=
=90[0m

=E2=86=90[31mCould not fetch authors/01mailrc.txt.gz=E2=86=90[0m
=E2=86=90[32mLockfile removed.=E2=86=90[0m


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

Date: Mon, 18 Aug 2014 20:33:14 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: Cannot install Perl modules on Windows
Message-Id: <87mwb1pp8l.fsf@sable.mobileactivedefense.com>

Ben Switala <benswitala@gmail.com> writes:
> I'm trying to install a Perl module on my Windows computer, and it's
> now working.  What am I missing?
>
> Also, how do I get rid of the strange strings like "¡û[32m" and "¡û[0m"
> from printing all over the place?

These are character rendition of ANSI escape sequences for terminal
control (the first one is supposed to change the foreground colour to
green, the second to change it back to whatever it happened to be
before). The 'window' (program) used to provide you with a way of using
the CPAN CLI-interface should usually interpret these.

> cpan> install Tie::IxHash
> ¡û[32mFetching with LWP:
> http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz¡û[0m
> ¡û[32mLWP failed with code[500] message[Can't connect to ppm.activestate.com:80 (
> 10060)]¡û[0m

Isn't this clear-cut enough? The software tried to connect to
ppm.activestate.com port 80 (HTTP default port) which failed.


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

Date: Sun, 17 Aug 2014 21:21:32 +0200
From: "Peter J. Holzer" <hjp-usenet3@hjp.at>
Subject: Re: New topic: time flow simulation
Message-Id: <slrnlv205s.7k5.hjp-usenet3@hrunkner.hjp.at>

On 2014-08-17 18:06, gamo <gamo@telecable.es> wrote:
> I consider two scenarios for 1 week planning.
>
> #!/usr/bin/perl -w
>
> use Time::HiRes qw(time);
>
> $t0 = time;
> for my $day (0..6){
>      for my $hour (0..23){
>          for my $minute (0..59){
>              for my $second (0..59){
>                  for my $milisecond (0..999){
>                      $timer++;
>                  }
>              }
>          }
>      }
> }
> print "$timer\n";
> $t1 = time;
> $days=$hours=$minutes=$seconds=$timer=0;
> while (1){
>      $timer++;
>      $miliseconds = $timer;
>      if ($miliseconds % 1000 ==0) {
>          $miliseconds =0;
>          $seconds++;
>          if ($seconds % 60 ==0) {
>              $seconds =0;
>              $minutes++;
>              if ($minutes % 60 ==0) {
>                  $minutes =0;
>                  $hours++;
>                  if ($hours % 24 ==0) {
>                      $hours =0;
>                      $days++;
>                      if ($days % 7 ==0) {
>                          last;
>                      }
>                  }
>              }
>          }
>      }
> }

Both require you to step through all milliseconds. This looks wasteful
to me unless you expect something interesting to happen (e.g. a state
change) in a significant fraction of milliseconds. If most milliseconds
are just "state unchanged, continue as you were", you can save a lot of
time by skipping those.

        hp


-- 
   _  | Peter J. Holzer    | Fluch der elektronischen Textverarbeitung:
|_|_) |                    | Man feilt solange an seinen Text um, bis
| |   | hjp@hjp.at         | die Satzbestandteile des Satzes nicht mehr
__/   | http://www.hjp.at/ | zusammenpaßt. -- Ralph Babel


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

Date: Sun, 17 Aug 2014 21:04:09 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: New topic: time flow simulation
Message-Id: <878ummzxvq.fsf@sable.mobileactivedefense.com>

gamo <gamo@telecable.es> writes:
> I consider two scenarios for 1 week planning.
>
> #!/usr/bin/perl -w
>
> use Time::HiRes qw(time);
>
> $t0 = time;
> for my $day (0..6){
>     for my $hour (0..23){
>         for my $minute (0..59){
>             for my $second (0..59){
>                 for my $milisecond (0..999){
>                     $timer++;
>                 }
>             }
>         }
>     }
> }

[different way to do the same]

There are various ways to implement the 'insane counting loop'. Once
that's slightly faster for me (on my seven-years-old 32-bit machine at
home) would be

my ($day, $hour, $min, $next_sec, $sec, $milli, $timer);
do {
    {
	$next_sec = $timer + 1000;
	1 while ++$timer < $next_sec;
	
	$sec < 59 and ++$sec, redo;
	$sec = 0;
	
	$min < 59 and ++$min, redo;
	$min = 0;
	
	$hour < 23 and ++$hour, redo;
	$hour = 0;
    }
} while ++$day < 7;

but as the code is completely useless as it stands, it's somewhat
difficult to reply anything meaningful.




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

Date: Sun, 17 Aug 2014 22:44:38 +0200
From: gamo <gamo@telecable.es>
Subject: Re: New topic: time flow simulation
Message-Id: <lsr488$cue$1@speranza.aioe.org>

El 17/08/14 a las 21:21, Peter J. Holzer escribió:
> Both require you to step through all milliseconds. This looks wasteful
> to me unless you expect something interesting to happen (e.g. a state
> change) in a significant fraction of milliseconds. If most milliseconds
> are just "state unchanged, continue as you were", you can save a lot of
> time by skipping those.
>
>          hp

Good point, but that could be unpredictable. What I have noted with that 
eskeletons is that time spend by them is neligible if you introduce a 
simple if and sub call after $timer. BTW seems better using the for, and 
more clear, but as I said, the problem is taking input coming and 
calling events sub/s.

-- 
http://www.telecable.es/personales/gamo/


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

Date: Sun, 17 Aug 2014 22:56:04 +0200
From: gamo <gamo@telecable.es>
Subject: Re: New topic: time flow simulation
Message-Id: <lsr4tm$ei9$1@speranza.aioe.org>

El 17/08/14 a las 22:04, Rainer Weikusat escribió:

> [different way to do the same]
>
> There are various ways to implement the 'insane counting loop'. Once
> that's slightly faster for me (on my seven-years-old 32-bit machine at
> home) would be
>
> my ($day, $hour, $min, $next_sec, $sec, $milli, $timer);
> do {
>      {
> 	$next_sec = $timer + 1000;
> 	1 while ++$timer < $next_sec;
> 	
> 	$sec < 59 and ++$sec, redo;
> 	$sec = 0;
> 	
> 	$min < 59 and ++$min, redo;
> 	$min = 0;
> 	
> 	$hour < 23 and ++$hour, redo;
> 	$hour = 0;
>      }
> } while ++$day < 7;
>
> but as the code is completely useless as it stands, it's somewhat
> difficult to reply anything meaningful.
>
>

That does the same but it's not clear where is the place
to insert the main block of conditionals to read input and call
event subs. As I said it's only a eskeleton main() to do
things knowing the appropiate timing/time/date.

Thanks

-- 
http://www.telecable.es/personales/gamo/


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

Date: Mon, 18 Aug 2014 00:40:53 +0300
From: George Mpouras <gravitalsun@hotmail.foo>
Subject: Re: New topic: time flow simulation
Message-Id: <lsr7ha$11fq$1@news.ntua.gr>

On 17/8/2014 9:06 μμ, gamo wrote:
>
> I consider two scenarios for 1 week planning.
>
> #!/usr/bin/perl -w
>
> use Time::HiRes qw(time);
>
> $t0 = time;
> for my $day (0..6){
>      for my $hour (0..23){
>          for my $minute (0..59){
>              for my $second (0..59){
>                  for my $milisecond (0..999){
>                      $timer++;
>                  }
>              }
>          }
>      }
> }

As far I understand what you are trying to do, your approach is not 
correct, considering the electrity you spent! This is how they coded the 
first versions of cron.
So, it is better, when you import events to your program, to implement a 
new fork for each event where it simple sleeps the remaing anmount of 
seconds. Thats the idea, having your process idle while doing the job.



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

Date: Mon, 18 Aug 2014 00:17:04 +0200
From: gamo <gamo@telecable.es>
Subject: Re: New topic: time flow simulation
Message-Id: <lsr9lm$p8v$1@speranza.aioe.org>

El 17/08/14 a las 23:40, George Mpouras escribió:
> As far I understand what you are trying to do, your approach is not
> correct, considering the electrity you spent! This is how they coded the
> first versions of cron.
> So, it is better, when you import events to your program, to implement a
> new fork for each event where it simple sleeps the remaing anmount of
> seconds. Thats the idea, having your process idle while doing the job.

That's excelent! Could you provide a skeleton?

Thanks

-- 
http://www.telecable.es/personales/gamo/


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

Date: Mon, 18 Aug 2014 01:26:10 +0300
From: George Mpouras <gravitalsun@hotmail.foo>
Subject: Re: New topic: time flow simulation
Message-Id: <lsra67$17a3$1@news.ntua.gr>

On 18/8/2014 1:17 πμ, gamo wrote:
> El 17/08/14 a las 23:40, George Mpouras escribió:
>> As far I understand what you are trying to do, your approach is not
>> correct, considering the electrity you spent! This is how they coded the
>> first versions of cron.
>> So, it is better, when you import events to your program, to implement a
>> new fork for each event where it simple sleeps the remaing anmount of
>> seconds. Thats the idea, having your process idle while doing the job.
>
> That's excelent! Could you provide a skeleton?
>
> Thanks
>

it is not difficult , but it needs some thinking and time ...


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

Date: Mon, 18 Aug 2014 13:02:27 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: New topic: time flow simulation
Message-Id: <87oavi80q4.fsf@sable.mobileactivedefense.com>

gamo <gamo@telecable.es> writes:
> El 17/08/14 a las 22:04, Rainer Weikusat escribió:
>
>> [different way to do the same]
>>
>> There are various ways to implement the 'insane counting loop'. Once
>> that's slightly faster for me (on my seven-years-old 32-bit machine at
>> home) would be
>>
>> my ($day, $hour, $min, $next_sec, $sec, $milli, $timer);
>> do {
>>      {
>> 	$next_sec = $timer + 1000;
>> 	1 while ++$timer < $next_sec;
>> 	
>> 	$sec < 59 and ++$sec, redo;
>> 	$sec = 0;
>> 	
>> 	$min < 59 and ++$min, redo;
>> 	$min = 0;
>> 	
>> 	$hour < 23 and ++$hour, redo;
>> 	$hour = 0;
>>      }
>> } while ++$day < 7;
>>
>> but as the code is completely useless as it stands, it's somewhat
>> difficult to reply anything meaningful.
>
> That does the same but it's not clear where is the place
> to insert the main block of conditionals to read input and call
> event subs.

The

1 while ++$timer < $next_sec

could be turned into a real inner-loop. I doubt (didn't test) that the
trick employed here to get rid of the explicit millisecond counter would
still be useful if a count of 'milliseconds since the last second' was
actually needed.


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

Date: Mon, 18 Aug 2014 16:53:33 +0200
From: gamo <gamo@telecable.es>
Subject: Re: New topic: time flow simulation
Message-Id: <lst421$vfs$1@speranza.aioe.org>

El 18/08/14 a las 14:02, Rainer Weikusat escribió:
> gamo <gamo@telecable.es> writes:
>> El 17/08/14 a las 22:04, Rainer Weikusat escribió:
>>
>>> [different way to do the same]
>>>
>>> There are various ways to implement the 'insane counting loop'. Once
>>> that's slightly faster for me (on my seven-years-old 32-bit machine at
>>> home) would be
>>>
>>> my ($day, $hour, $min, $next_sec, $sec, $milli, $timer);
>>> do {
>>>       {
>>> 	$next_sec = $timer + 1000;
>>> 	1 while ++$timer < $next_sec;
>>> 	
>>> 	$sec < 59 and ++$sec, redo;
>>> 	$sec = 0;
>>> 	
>>> 	$min < 59 and ++$min, redo;
>>> 	$min = 0;
>>> 	
>>> 	$hour < 23 and ++$hour, redo;
>>> 	$hour = 0;
>>>       }
>>> } while ++$day < 7;
>>>
>>> but as the code is completely useless as it stands, it's somewhat
>>> difficult to reply anything meaningful.
>>
>> That does the same but it's not clear where is the place
>> to insert the main block of conditionals to read input and call
>> event subs.
>
> The
>
> 1 while ++$timer < $next_sec
>
> could be turned into a real inner-loop. I doubt (didn't test) that the
> trick employed here to get rid of the explicit millisecond counter would
> still be useful if a count of 'milliseconds since the last second' was
> actually needed.
>

It's not needed because $timer is irrepetible and that's its
best property.

Thanks


-- 
http://www.telecable.es/personales/gamo/


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

Date: Mon, 18 Aug 2014 21:52:05 +0200
From: "Peter J. Holzer" <hjp-usenet3@hjp.at>
Subject: Re: New topic: time flow simulation
Message-Id: <slrnlv4mb5.2ks.hjp-usenet3@hrunkner.hjp.at>

On 2014-08-17 21:40, George Mpouras <gravitalsun@hotmail.foo> wrote:
> On 17/8/2014 9:06 μμ, gamo wrote:
>>
>> I consider two scenarios for 1 week planning.
>>
>> #!/usr/bin/perl -w
>>
>> use Time::HiRes qw(time);
>>
>> $t0 = time;
>> for my $day (0..6){
>>      for my $hour (0..23){
>>          for my $minute (0..59){
>>              for my $second (0..59){
>>                  for my $milisecond (0..999){
>>                      $timer++;
>>                  }
>>              }
>>          }
>>      }
>> }
>
> As far I understand what you are trying to do, your approach is not 
> correct, considering the electrity you spent!

I haven't seen the spec of Gamos project, but I doubt that it mentions
power consumption.

> This is how they coded the first versions of cron.

Somehow I doubt that.

> So, it is better, when you import events to your program, to implement a 
> new fork for each event where it simple sleeps the remaing anmount of 
> seconds. Thats the idea, having your process idle while doing the job.

The subject mentions a "simulation". I doubt that Gamo wants to wait a
week for his simulated week to finish.

        hp


-- 
   _  | Peter J. Holzer    | Fluch der elektronischen Textverarbeitung:
|_|_) |                    | Man feilt solange an seinen Text um, bis
| |   | hjp@hjp.at         | die Satzbestandteile des Satzes nicht mehr
__/   | http://www.hjp.at/ | zusammenpaßt. -- Ralph Babel


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

Date: Mon, 18 Aug 2014 22:08:27 +0200
From: gamo <gamo@telecable.es>
Subject: Re: New topic: time flow simulation
Message-Id: <lstmgg$kj1$1@speranza.aioe.org>

El 18/08/14 a las 21:52, Peter J. Holzer escribió:
> The subject mentions a "simulation". I doubt that Gamo wants to wait a
> week for his simulated week to finish.
>
>          hp

Yes, yes, but if there is any manner to predict
sleep (x)
I could translate that into
timer += x
and improve the old algorithms.

-- 
http://www.telecable.es/personales/gamo/


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

Date: Sun, 17 Aug 2014 18:09:26 +0000 (UTC)
From: tmcd@panix.com (Tim McDaniel)
Subject: Re: Perl bug ;
Message-Id: <lsqr4l$gdo$1@reader1.panix.com>

In article <slrnlv0mae.qjg.hjp-usenet3@hrunkner.hjp.at>,
Peter J. Holzer <hjp-usenet3@hjp.at> wrote:
>On 2014-08-17 05:01, gamo <gamo@telecable.es> wrote:
>> El 17/08/14 a las 06:26, Tim McDaniel escribi_:
>>> I know what you're thinking, punk.  You're thinking "does he have
>>> twelve significant digits or only six?"  Now to tell you the truth,
>>> I forgot myself in all this roundoff.  But being this is double
>>> precision, the most powerful floating point in the world and will blow
>>> away all your notions of precision, you've gotta ask yourself a
>>> question: "Do I feel lucky?"  Well, do ya, punk?
>>
>> Wrong, Tim.
>
>The good thing abour search engines is that you can look up any quotes
>from movies, books, etc. if you don't recognize them.
>
>This one is from Dirty Harry.

Indeed, but mangled significantly.  In the US "Dirty Harry" is one of
the classic movie characters, and in the US the quotation is one of
the most famous movie quotations of all time, though often in the
mangled form "Do ya feel lucky, punk?".  I saw "Are 6 digits enough or
do you need 12?" and it reminded me of the start of the little scene.

So yeah, it's just a joke of no significance.

-- 
Tim McDaniel, tmcd@panix.com


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

Date: Sun, 17 Aug 2014 11:24:31 -0700
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: Perl bug ;
Message-Id: <vj87cbx394.ln2@goaway.wombat.san-francisco.ca.us>

On 2014-08-17, Tim McDaniel <tmcd@panix.com> wrote:
>
> So yeah, it's just a joke of no significance.

Not even one digit?

--keith

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



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

Date: Sun, 17 Aug 2014 20:58:31 +0200
From: "Peter J. Holzer" <hjp-usenet3@hjp.at>
Subject: Re: Perl bug ;
Message-Id: <slrnlv1uqo.7k5.hjp-usenet3@hrunkner.hjp.at>

On 2014-08-17 17:13, Jürgen Exner <jurgenex@hotmail.com> wrote:
> "Peter J. Holzer" <hjp-usenet3@hjp.at> wrote:
>>On 2014-08-16 18:17, Jürgen Exner <jurgenex@hotmail.com> wrote:
>>> My point is that your $eps is irrelevant.
>>
>>It is certainly not irrelevant. If you are doing serious numerical
>>work, you have to consider how it propagates through your computation
>>and affects the result.
>
> Hmmm, yes and no. I guess I worded this poorly.
>
> This particular value is useful to give you a very general idea of how
> large a range your FP numbers will cover and as a measure to compare one
> computer/compiler/library against another. Kind of a normative baseline.

Yes. Although on a different level I might agree with you: Eps is very
often irrelevant because there are other errors (measurement errors,
simplified formulas, etc.) which are many magnitudes greater, so usually
you have to worry about them a lot more than about eps. As you wrote:
"show me a problem where double precision isn't enough".

> But for your actual programming it is insufficient because the truly
> relevant value of $eps will change with the magnitude of the other
> numbers that are involved in your calculations.
> If your largest FP number is one million, then your $eps will be roughly
> 10^-11 insteda of 10^-15. And if the largest number in calculation is
> something like 10^12 then your $eps will be somewhere around one million
> (assuming the original $eps as previously stated as ~10^-15).

10^-3, actually. Yes, eps is relative to the magnitude of you numbers,
not absolute. But that's actually a feature, because it means that
our computations are independent of scale. We can can use millimetres or
astronomical units as units to measure the solar system and in any case
we have enough precision to determine Pluto's position to the
millimeter (not that we could measure it that exactly).

        hp


-- 
   _  | Peter J. Holzer    | Fluch der elektronischen Textverarbeitung:
|_|_) |                    | Man feilt solange an seinen Text um, bis
| |   | hjp@hjp.at         | die Satzbestandteile des Satzes nicht mehr
__/   | http://www.hjp.at/ | zusammenpaßt. -- Ralph Babel


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

Date: Mon, 18 Aug 2014 15:37:28 +0200
From: "G.B." <bauhaus@futureapps.invalid>
Subject: Re: perl6 too much pointless functionality
Message-Id: <lssvil$91v$1@dont-email.me>

On 15.08.14 23:33, Peter J. Holzer wrote:
> On 2014-08-14 11:02, G.B. <bauhaus@futureapps.invalid> wrote:
>> While there appears to be some concerted work on some
>> libraries, the creative people still behind Perl 6 seem to spend
>> more energy on mixing more 7 bit ASCII ideographs with the current
>> syntax,
>
> Do they? Which ASCII characters have been added to the syntax recently?
> The twigils that confused Mpouras have been in Perl6 for a long time.

Current Perl, by any statistical reference to software being used,
means Perl 5, not 6.  (As in: on any Unixoid, from Active State,
what IBM staff are using, "Programming Perl", ….)

The CPAN packages provide much needed infrastructure. Some pieces
are allow to rot. This is due to lack of financial backing, I suppose.
I don't see how more arrows and hats can change that.



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

Date: Mon, 18 Aug 2014 17:03:45 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: perl6 too much pointless functionality
Message-Id: <87zjf1pyxq.fsf@sable.mobileactivedefense.com>

"G.B." <bauhaus@futureapps.invalid> writes:
> On 15.08.14 23:33, Peter J. Holzer wrote:
>> On 2014-08-14 11:02, G.B. <bauhaus@futureapps.invalid> wrote:
>>> While there appears to be some concerted work on some
>>> libraries, the creative people still behind Perl 6 seem to spend
>>> more energy on mixing more 7 bit ASCII ideographs with the current
>>> syntax,
>>
>> Do they? Which ASCII characters have been added to the syntax recently?
>> The twigils that confused Mpouras have been in Perl6 for a long time.
>
> Current Perl, by any statistical reference to software being used,
> means Perl 5, not 6.  (As in: on any Unixoid, from Active State,
> what IBM staff are using, "Programming Perl", ¡­.)
>
> The CPAN packages provide much needed infrastructure. Some pieces
> are allow to rot. This is due to lack of financial backing, I suppose.
> I don't see how more arrows and hats can change that.

Some CPAN packages do this and they're typically not 'allowed to rot'
(an example would be nice here). But a lot of CPAN-packages are really
just vanityware created by people who wanted to put their name on
something available on the internet. These will end up abandoned once
their creators lost interest in them and they don't really have many
users who are not only doing one-off stuff themselves because if there
were 'many users', there'd be an implicit 'financial backing', just not
by people trying to sell access rights to the code but people using it.


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

Date: Mon, 18 Aug 2014 17:17:45 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: perl6 too much pointless functionality
Message-Id: <87vbpppyae.fsf@sable.mobileactivedefense.com>

"G.B." <bauhaus@futureapps.invalid> writes:
> On 13.08.14 22:03, Rainer Weikusat wrote:
>> It doesn't really work anywhere except when concertedly looking into
>> another direction.
>
> =head2 RANT
>
> Perl 6 also doesn't really work anymore since everyone who is
> considering languages and libraries is concertedly looking into
> other directions, for reasons of rational business, or mental
> health. (Or following the crowd, but I grant you that wouldn't
> be specific to Perl.)

I used to follow the Apocalypses for a while but these started to become
too esoteric for my tastes (too focused on designing angels such that a
maximum number of pins could dance on their heads). The first serious
'usage alert' occurred when I read about redefining the meaning of the
bit operators based on the assertion that "nobody uses them, anyway" ---
that had a strong smell of 'clueless university kid who believes that
computer internally count using their ten fingers and who hasn't ever
seen any real-world code' to it.

Since I learnt about the 'real garbage collection' thing, I've lost any
interest in the language: If I want to use that, there's a plethora of
available options already but the one thing I still like about C++ is
the idea that management of all resources should be tied to
language-object lifetimes, eg, when something goes out of scope, all
required cleanups occur automatically at this point, not "sometime next
year after we've actually gotten around to implementing
that".

Deterministic finalization is also a useful feature for creating
objects. Eg, I have something which provides a interface to Linux
kernel IP sets: An object is created and 'set contents' are then added
to it. As soons as the object goes out of scope, the destructor creates
the actual kernel object because surely, all members must have been
added by then.


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

Date: Mon, 18 Aug 2014 21:47:48 +0200
From: "Peter J. Holzer" <hjp-usenet3@hjp.at>
Subject: Re: perl6 too much pointless functionality
Message-Id: <slrnlv4m34.2ks.hjp-usenet3@hrunkner.hjp.at>

On 2014-08-18 13:37, G.B. <bauhaus@futureapps.invalid> wrote:
> On 15.08.14 23:33, Peter J. Holzer wrote:
>> On 2014-08-14 11:02, G.B. <bauhaus@futureapps.invalid> wrote:
>>> While there appears to be some concerted work on some
>>> libraries, the creative people still behind Perl 6 seem to spend
>>> more energy on mixing more 7 bit ASCII ideographs with the current
>>> syntax,
>>
>> Do they? Which ASCII characters have been added to the syntax recently?
>> The twigils that confused Mpouras have been in Perl6 for a long time.
>
> Current Perl, by any statistical reference to software being used,
> means Perl 5, not 6.

Yes, everybody knows that. 

What does this have to do with your claim that "the creative people
still behind Perl 6 seem to spend energy on mixing more 7 bit ASCII
ideographs with the current syntax"? I haven't really been following
Perl6 development the last few years (I think it's a dead end), but
AFAIK work was mostly done on the VMs (Oh, MoarVM has aquired a JIT over
the summer), not on the syntax of Perl6.

        hp


-- 
   _  | Peter J. Holzer    | Fluch der elektronischen Textverarbeitung:
|_|_) |                    | Man feilt solange an seinen Text um, bis
| |   | hjp@hjp.at         | die Satzbestandteile des Satzes nicht mehr
__/   | http://www.hjp.at/ | zusammenpaßt. -- Ralph Babel


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

Date: Mon, 18 Aug 2014 02:20:16 +0300
From: George Mpouras <gravitalsun@hotmail.foo>
Subject: Re: Sorting Keys in Tie::IxHash::Easy
Message-Id: <lsrdbl$1gcv$1@news.ntua.gr>

>
> Since this is a switching construct based on sequences of string
> comparisons, it can be replaced with a hash lookup returning a reference
> to a subroutine supposed to be executed. This means less code because
> the explicit switching logic isn't needed anymore.
>


Ok then : )
Hash everything (plus scalars), and compact code almost to its limits




my %data= (
k1b => \'VAR1',
k1c => ['v11','v12',{D01=>'p01',D02=>'p02'}],
k1d => {
        k2a => 'v2a',
        k2c => ['p20','p22','p23',{deepH2k1=>'p2v1'}],
        k2d => {
               k3a => 'v3a',
               k3b => 'v3b',
               k3d => {
                      k4a => 'v4a',
                      k4b => 'v4b'
                      }
               },

        k2b => 'v2b'
        },

k1a => \'VAR2'
);





my %Handler = (
'SCALAR' => sub { walk(${$_[0]}, $_[1], @{$_[2]} )},
'ARRAY'  => sub { walk($_[0]->[$_], $_[1], @{$_[2]}, $_) for 0 .. 
$#{$_[0]} },
'HASH'   => sub { walk($_[0]->{$_}, $_[1], @{$_[2]}, $_) for sort keys 
%{$_[0]} },
''       => sub { $_[1]->($_[0], @{$_[2]}) }
);

sub walk {
my $data = shift;
$Handler{ref $data}->($data, shift, \@_)
}


walk(\%data, sub {
my ($data, @rest) = @_;
printf('[%s] ', join('/', @rest)) if @rest;
print("$data\n")
});



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

Date: Mon, 18 Aug 2014 13:39:02 +0300
From: George Mpouras <gravitalsun@hotmail.foo>
Subject: Re: Sorting Keys in Tie::IxHash::Easy
Message-Id: <lssl34$28l9$1@news.ntua.gr>

 ...  more compact ...


sub walk
{
my %Handler;
%Handler = (
SCALAR => sub { $Handler{WALKER}->(${$_[0]}, $_[1], @{$_[2]} )},
ARRAY  => sub { $Handler{WALKER}->($_, $_[1], @{$_[2]}) for @{$_[0]} },
HASH   => sub { $Handler{WALKER}->($_[0]->{$_}, $_[1], @{$_[2]}, $_) for 
sort keys %{$_[0]} },
''     => sub { $_[1]->($_[0], @{$_[2]}) },
WALKER => sub { my $data = shift; $Handler{ref $data}->($data, shift, 
\@_) } );
$Handler{WALKER}->(@_)
}



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

Date: Mon, 18 Aug 2014 13:00:15 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: Sorting Keys in Tie::IxHash::Easy
Message-Id: <87siku80ts.fsf@sable.mobileactivedefense.com>

George Mpouras <gravitalsun@hotmail.foo> writes:
> ...  more compact ...
>
>
> sub walk
> {
> my %Handler;
> %Handler = (
> SCALAR => sub { $Handler{WALKER}->(${$_[0]}, $_[1], @{$_[2]} )},
> ARRAY  => sub { $Handler{WALKER}->($_, $_[1], @{$_[2]}) for @{$_[0]} },
> HASH   => sub { $Handler{WALKER}->($_[0]->{$_}, $_[1], @{$_[2]}, $_)
> for sort keys %{$_[0]} },
> ''     => sub { $_[1]->($_[0], @{$_[2]}) },
> WALKER => sub { my $data = shift; $Handler{ref $data}->($data, shift,
> \@_) } );
> $Handler{WALKER}->(@_)
> }

I think you've meanwhile 'succinctly' expressed that your harbour a  strong
emotional aversion to the idea of using anything but if - elsif - else
cascaded for making conditional flow control descisions[*].

Loosely related: This re-introduces the ::RMap misfeature of venturing
beyond the actual data structure into whatever else can be reached by
dereferencing something which happens to be a reference, in this
particular case, references to scalars. In Perl, complex data structures
have to be built by storing references to anonymous container objects in
other container objects, hence it is reasonable (though possibly
undesired, that's why my original example restricted itself to
traversing 'hashes of hashes) to assume that a reference to an array
found in a hash belongs to the same compound object the hash also
belongs to. But this is not true for references to scalars because the
scalar value could be stored directly in the container if it was
supposed to be a part of it. Consequently, it should not be treated as
if it was one (except when the purpose is inspection aka 'code to help
with debugging').

[*]  Was der Bauer nit kennt mag er vielleicht nit fressen aber in
den Schmutz treten tut er's jedenfalls gern.


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

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


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