[32811] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4076 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 14 14:09:36 2013

Date: Thu, 14 Nov 2013 11:09:06 -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           Thu, 14 Nov 2013     Volume: 11 Number: 4076

Today's topics:
    Re: 'depth n' combinations of a sequence of numbers <gravitalsun@hotmail.foo>
    Re: 'depth n' combinations of a sequence of numbers <rweikusat@mobileactivedefense.com>
    Re: 'depth n' combinations of a sequence of numbers (Tim McDaniel)
    Re: 'depth n' combinations of a sequence of numbers <rweikusat@mobileactivedefense.com>
        ImageMagick to rotate an image <jwcarlton@gmail.com>
    Re: ImageMagick to rotate an image <ben@morrow.me.uk>
    Re: ImageMagick to rotate an image <hjp-usenet3@hjp.at>
        Program Translation - Nov. 14, 2013 <edgrsprj@ix.netcom.com>
    Re: Program Translation - Nov. 14, 2013 <mecej4_nospam@operamail.com>
    Re: Program Translation - Nov. 14, 2013 <Gordon.Sande@gmail.com>
    Re: Several Perl Questions - Nov. 5, 2013 <john@castleamber.com>
    Re: Several Perl Questions - Nov. 5, 2013 <news@lawshouse.org>
    Re: Several Perl Questions - Nov. 5, 2013 <jurgenex@hotmail.com>
    Re: Several Perl Questions - Nov. 5, 2013 <edgrsprj@ix.netcom.com>
    Re: Several Perl Questions - Nov. 5, 2013 <ben.usenet@bsb.me.uk>
    Re: Several Perl Questions - Nov. 5, 2013 <rweikusat@mobileactivedefense.com>
    Re: Several Perl Questions - Nov. 5, 2013 <cwilbur@chromatico.net>
    Re: Several Perl Questions - Nov. 5, 2013 <ben.usenet@bsb.me.uk>
    Re: Several Perl Questions - Nov. 5, 2013 <rweikusat@mobileactivedefense.com>
    Re: Several Perl Questions - Nov. 5, 2013 <jurgenex@hotmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 13 Nov 2013 01:31:29 +0200
From: George Mpouras <gravitalsun@hotmail.foo>
Subject: Re: 'depth n' combinations of a sequence of numbers
Message-Id: <l5udoq$1mn5$1@news.ntua.gr>

# I hope this is fancy enough for you !

my $iterator = CodeGen();


print $iterator->();
print $iterator->();

while (my $res = $iterator->()) {print $res}




sub CodeGen
{
my ($i,$j)=(0,0);

	sub
	{
	$i++;
	if ($i>31){$i=0;$j++}
	if ($j>31){return undef}
	return "$i,$j\n"
	}
}






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

Date: Wed, 13 Nov 2013 11:40:20 +0000
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: 'depth n' combinations of a sequence of numbers
Message-Id: <878uwsa5sr.fsf@sable.mobileactivedefense.com>

George Mpouras <gravitalsun@hotmail.foo> writes:
> # I hope this is fancy enough for you !
>
> my $iterator = CodeGen();

[...]

> sub CodeGen
> {
> my ($i,$j)=(0,0);
>
> 	sub
> 	{
> 	$i++;
> 	if ($i>31){$i=0;$j++}
> 	if ($j>31){return undef}
> 	return "$i,$j\n"
> 	}
> }

This starts with 1, 0 and not with 0, 0. It doesn't return a list. And
it doesn't cycle. Something simple which works (as intended) just for pairs from 0
 .. 31 could be

sub gen
{
    use integer;
    my $x = -1;

    return sub {
	++$x;
	return ($x / 32, $x % 32);
    };
}

or

sub gen
{
    use integer;
    my $x = -1;
    sub { (++$x / 32, $x % 32) }
}

[Compared with the overhead of the function call, the time needed for
the divisions is probably a negligible quantity]


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

Date: Wed, 13 Nov 2013 20:29:50 +0000 (UTC)
From: tmcd@panix.com (Tim McDaniel)
Subject: Re: 'depth n' combinations of a sequence of numbers
Message-Id: <l60nft$6kt$1@reader1.panix.com>

In article <87wqkd4lmu.fsf@new.chromatico.net>,
Charlton Wilbur  <cwilbur@chromatico.net> wrote:
>>>>>> "RW" == Rainer Weikusat <rweikusat@mobileactivedefense.com> writes:
>
>    RW> There are some things about this code I really dislike, eg, the
>    RW> $size = int(shift(@_)) instead of the equivalent $size =
>    RW> $_[0]. 
>
>Those are not, strictly speaking, equivalent.

I was about to kvetch about that, but in this particular context,
there was no need for the two places of shifting @_.  That is, I'm
sure he knows that; he just expressed himself a bit unclearly.

-- 
Tim McDaniel, tmcd@panix.com


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

Date: Wed, 13 Nov 2013 21:25:17 +0000
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: 'depth n' combinations of a sequence of numbers
Message-Id: <87k3gcvvsy.fsf@sable.mobileactivedefense.com>

Charlton Wilbur <cwilbur@chromatico.net> writes:
>>>>>> "RW" == Rainer Weikusat <rweikusat@mobileactivedefense.com> writes:
>
>     RW> There are some things about this code I really dislike, eg, the
>     RW> $size = int(shift(@_)) instead of the equivalent $size =
>     RW> $_[0]. 
>
> Those are not, strictly speaking, equivalent.

In the given context,

,----
| sub rings
| {
|     my($size,@values);
|     
|     $size=int(shift(@_));
|     @values=(0) x shift(@_);
|     sub
|     {
|         my(@result);
|         
|         @result=@values;
|         $_=($_+1)%$size and last for reverse @values;
|         @result;
|     };
| }
`----

they were 'mostly' equivalent: Technically, the first shift is needed,
because otherwise, the second shift will return the wrong argument. But
since @_ isn't accessed anymore after the second shift, the first can be
replaced with $_[0] and the second with $_[1] which is (IMHO) clearer
because there's no point in shifting @_. This would turn the

$size = int(shift(@_))

into

$size = int($_[0])

If the value of $size is <= UV_MAX, $x % $size == $x % int($size),
example of the other case (on a 32-bit system):

[rw@sable]~#perl -e '$a = 2**33; $b = 2**32 + 1.3; print($a % $b, " ", $a % int($b), "\n")'
4294967294.7 4294967295

but practically, that's outside of the domain of 'sensible' $size
values.

Nevertheless, I didn't know that about the latter.





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

Date: Wed, 13 Nov 2013 18:53:06 -0800 (PST)
From: Jason C <jwcarlton@gmail.com>
Subject: ImageMagick to rotate an image
Message-Id: <1b53dcbb-a9e7-479f-a8a2-c2ee020cbb94@googlegroups.com>

I understand that I can use convert() in ImageMagick to rotate an uploaded =
picture. The question, though, is how to automatically determine when the p=
icture NEEDS to be rotated?

I know that I can set up a button for the user to manually click if they wa=
nt to rotate the picture, but is there a way to do it without asking? I've =
seen it done on bigger sites, but I don't know if it's a simple command tha=
t already exists, or if it's a big system that they've bought.


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

Date: Thu, 14 Nov 2013 03:49:05 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: ImageMagick to rotate an image
Message-Id: <hqtdla-1n6.ln1@anubis.morrow.me.uk>


Quoth Jason C <jwcarlton@gmail.com>:
> I understand that I can use convert() in ImageMagick to rotate an
> uploaded picture. The question, though, is how to automatically
> determine when the picture NEEDS to be rotated?
> 
> I know that I can set up a button for the user to manually click if they
> want to rotate the picture, but is there a way to do it without asking?
> I've seen it done on bigger sites, but I don't know if it's a simple
> command that already exists, or if it's a big system that they've
> bought.

I believe this is usually done by reading the EXIF data, assuming the
camera put any there. (Why the camera does this rather than simply
rotating the picture I don't know.) This is not something I know much
about, but Image::ExifTool looks like a... rather complete
implementation. Probably you want the 'Orientation' tag; if that doesn't
work you'll need to (find and) read the appropriate EXIF specs.

Ben



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

Date: Thu, 14 Nov 2013 08:24:44 +0100
From: "Peter J. Holzer" <hjp-usenet3@hjp.at>
Subject: Re: ImageMagick to rotate an image
Message-Id: <slrnl88uls.eik.hjp-usenet3@hrunkner.hjp.at>

On 2013-11-14 03:49, Ben Morrow <ben@morrow.me.uk> wrote:
> Quoth Jason C <jwcarlton@gmail.com>:
>> I understand that I can use convert() in ImageMagick to rotate an
>> uploaded picture. The question, though, is how to automatically
>> determine when the picture NEEDS to be rotated?
[...]
> I believe this is usually done by reading the EXIF data, assuming the
> camera put any there. (Why the camera does this rather than simply
> rotating the picture I don't know.) This is not something I know much
> about, but Image::ExifTool looks like a... rather complete
> implementation. Probably you want the 'Orientation' tag;

Rotation or Orientation, yes. Apparently both are in use.

Here is what I use:

    use Image::ExifTool qw(ImageInfo);
    ...
    my $info = ImageInfo($filename);
    my $rot = $info->{'Rotation'} || $info->{'Orientation'};
    my ($angle) = $rot =~ m/Rotate (\d+) CW/;
    return $angle;

	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: Thu, 14 Nov 2013 08:18:22 -0600
From: "E.D.G." <edgrsprj@ix.netcom.com>
Subject: Program Translation - Nov. 14, 2013
Message-Id: <ro-dnch2dPtbRhnPnZ2dnUVZ_rSdnZ2d@earthlink.com>

Posted by E.D.G.  on November 14, 2013

       In view of the fact that I mentioned the following project in both 
Perl and Python Newsgroup notes and did not get any hostile responses I am 
going to take a chance and mention it again in all three of these 
Newsgroups.  People posting responses might want to do that in just one 
Newsgroup.  I will check all three for responses for a few weeks.


       This is the Web address for an interesting and apparently unique 
computer program written using FORTRAN 77.  As far as I am aware, it has 
never been translated to newer language.  There is a BASIC version that was 
apparently written around the same time as the FORTRAN version.

http://www.bfo.geophys.uni-stuttgart.de/etgtab.html

       What a number of us would like to do is obtain a copy of the program 
that is written in a newer language so that we can then merge it with the 
programs available through the following Web page.  The new programs would 
then be made available as freeware programs to researchers around the world. 
This indirect link is being used in an effort to keep Web site related spam 
to a minimum.  I don't collect credits by having people visit that 
(indirect) Web site.

http://www.freewebs.com/eq-forecasting/RH.html

       If there are any programmers who might be interested in such a 
translation effort then I would be interested in hearing from them.

       Etgtab generates Solid Earth Tide and ocean tide data for any 
location on or inside the planet.  I am not aware of any other freeware 
program that can do that.

       SunGP available at that second Web site is the only freeware program 
that I know about that generates what are sometimes referred to as subsolar 
and sublunar types of data.  The download code was written using True BASIC.

       If you draw a line between the centers of the sun and the Earth then 
the place where that line crosses the surface of the Earth is the subsolar 
location.  The sublunar location is the same type of thing.  The SunGP 
program code is also available in Perl code, but not through any Web sites.




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

Date: Thu, 14 Nov 2013 11:07:45 -0600
From: mecej4 <mecej4_nospam@operamail.com>
Subject: Re: Program Translation - Nov. 14, 2013
Message-Id: <l63014$nk9$1@dont-email.me>

On 11/14/2013 8:18 AM, E.D.G. wrote:
> Posted by E.D.G.  on November 14, 2013
>
>        In view of the fact that I mentioned the following project in
> both Perl and Python Newsgroup notes and did not get any hostile
> responses I am going to take a chance and mention it again in all three
> of these Newsgroups.  People posting responses might want to do that in
> just one Newsgroup.  I will check all three for responses for a few weeks.
>
>
>        This is the Web address for an interesting and apparently unique
> computer program written using FORTRAN 77.  As far as I am aware, it has
> never been translated to newer language.  There is a BASIC version that
> was apparently written around the same time as the FORTRAN version.
>
> http://www.bfo.geophys.uni-stuttgart.de/etgtab.html
>
>        What a number of us would like to do is obtain a copy of the
> program that is written in a newer language so that we can then merge it
> with the programs available through the following Web page.  The new
> programs would then be made available as freeware programs to
> researchers around the world. This indirect link is being used in an
> effort to keep Web site related spam to a minimum.  I don't collect
> credits by having people visit that (indirect) Web site.
>
> http://www.freewebs.com/eq-forecasting/RH.html
>
>        If there are any programmers who might be interested in such a
> translation effort then I would be interested in hearing from them.
>
>        Etgtab generates Solid Earth Tide and ocean tide data for any
> location on or inside the planet.  I am not aware of any other freeware
> program that can do that.
>
>        SunGP available at that second Web site is the only freeware
> program that I know about that generates what are sometimes referred to
> as subsolar and sublunar types of data.  The download code was written
> using True BASIC.
>
>        If you draw a line between the centers of the sun and the Earth
> then the place where that line crosses the surface of the Earth is the
> subsolar location.  The sublunar location is the same type of thing.
> The SunGP program code is also available in Perl code, but not through
> any Web sites.
>
>
If this old program is to be translated or reused, do use this 
opportunity to fix some bugs in the program.

The data file contains data for 1200 waves, but the program computes 
results for 1212 waves. For waves 1201 to 1212, the program ends up 
calculating results based on uninitialized data. Whether or not this 
affects the validity of the final output results is something that 
someone knowledgeable about the field of application has to judge.

-- mecej4


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

Date: Thu, 14 Nov 2013 13:36:20 -0400
From: Gordon Sande <Gordon.Sande@gmail.com>
Subject: Re: Program Translation - Nov. 14, 2013
Message-Id: <l631mj$2ri$1@dont-email.me>

On 2013-11-14 17:07:45 +0000, mecej4 said:

> On 11/14/2013 8:18 AM, E.D.G. wrote:
>> Posted by E.D.G.  on November 14, 2013
>> 
>> In view of the fact that I mentioned the following project in
>> both Perl and Python Newsgroup notes and did not get any hostile
>> responses I am going to take a chance and mention it again in all three
>> of these Newsgroups.  People posting responses might want to do that in
>> just one Newsgroup.  I will check all three for responses for a few weeks.
>> 
>> 
>> This is the Web address for an interesting and apparently unique
>> computer program written using FORTRAN 77.  As far as I am aware, it has
>> never been translated to newer language.  There is a BASIC version that
>> was apparently written around the same time as the FORTRAN version.
>> 
>> http://www.bfo.geophys.uni-stuttgart.de/etgtab.html
>> 
>> What a number of us would like to do is obtain a copy of the
>> program that is written in a newer language so that we can then merge it
>> with the programs available through the following Web page.  The new
>> programs would then be made available as freeware programs to
>> researchers around the world. This indirect link is being used in an
>> effort to keep Web site related spam to a minimum.  I don't collect
>> credits by having people visit that (indirect) Web site.
>> 
>> http://www.freewebs.com/eq-forecasting/RH.html
>> 
>> If there are any programmers who might be interested in such a
>> translation effort then I would be interested in hearing from them.
>> 
>> Etgtab generates Solid Earth Tide and ocean tide data for any
>> location on or inside the planet.  I am not aware of any other freeware
>> program that can do that.
>> 
>> SunGP available at that second Web site is the only freeware
>> program that I know about that generates what are sometimes referred to
>> as subsolar and sublunar types of data.  The download code was written
>> using True BASIC.
>> 
>> If you draw a line between the centers of the sun and the Earth
>> then the place where that line crosses the surface of the Earth is the
>> subsolar location.  The sublunar location is the same type of thing.
>> The SunGP program code is also available in Perl code, but not through
>> any Web sites.
>> 
>> 
> If this old program is to be translated or reused, do use this 
> opportunity to fix some bugs in the program.
> 
> The data file contains data for 1200 waves, but the program computes 
> results for 1212 waves. For waves 1201 to 1212, the program ends up 
> calculating results based on uninitialized data. Whether or not this 
> affects the validity of the final output results is something that 
> someone knowledgeable about the field of application has to judge.
> 
> -- mecej4

Indeed! Under NAGWare Fortran it runs to completion with C=all but pulls an
undefined reference when C=undefined is added.

Lots of obsolete features and other warnings but no compiler error messages.

The obvious lessons are that 1. Fortran has very good historical continuity
and 2. the good debugging Fortran compilers do a good job.




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

Date: Wed, 13 Nov 2013 16:14:42 -0600
From: John Bokma <john@castleamber.com>
Subject: Re: Several Perl Questions - Nov. 5, 2013
Message-Id: <87wqkcrlt9.fsf@castleamber.com>

Jürgen Exner <jurgenex@hotmail.com> writes:

> Oh my $DEITY !!!
> Are there really people writing code like this? 

Yes, and way worse.

-- 
John Bokma                                                               j3b

Blog: http://johnbokma.com/        Perl Consultancy: http://castleamber.com/
Perl for books:    http://johnbokma.com/perl/help-in-exchange-for-books.html


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

Date: Wed, 13 Nov 2013 22:41:10 +0000
From: Henry Law <news@lawshouse.org>
Subject: Re: Several Perl Questions - Nov. 5, 2013
Message-Id: <__-dnaKdAo2bnRnPnZ2dnUVZ8kSdnZ2d@giganews.com>

On 12/11/13 21:23, Jürgen Exner wrote:
> there is no indentation missing in this snippet

Indeed, that's true; what I snipped wasn't representative.  Try this:

> if ($templength2 < $templength1 +3){;# if end is 4 lines down - clear sequence number and exit program at bottom
> open filenam, '> '.$filenumber;
> close filenam;
> print 'OUTPUT FILE SEQUENCE NUMBER CLEARED - EXITING PROGRAM', "\n\n";
> goto endit};# end of if statement started 4 lines up - end program at bottom
> for $num($templength1..$templength2){;# end of for is about 15 lines down
> if (substr($fileresults, $num, 1) eq '.'){;# check for . end of if is about 10 lines down
> open filenam, '< '.$filenumber;
> $sequencenumber = readline(filenam);
> close filenam;
> $sequencenumber = $sequencenumber + 1;
> open filenam, '> '.$filenumber;
> print filenam $sequencenumber;
> close filenam;
> $fileresults = substr($fileresults, 0, $templength1).substr($fileresults, $templength1 +1, $num - $templength1 -1).$sequencenumber.substr($fileresults, $num, 100);
> goto sequenceend;
> };# end of if statement started 10 lines up
> };# end of for statement started 15 lines up

-- 

Henry Law            Manchester, England


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

Date: Wed, 13 Nov 2013 16:48:44 -0800
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Several Perl Questions - Nov. 5, 2013
Message-Id: <c568899a54uft3unihh2tu2qd41q52lvsj@4ax.com>

Henry Law <news@lawshouse.org> wrote:
>On 12/11/13 21:23, Jürgen Exner wrote:
>> there is no indentation missing in this snippet
>
>Indeed, that's true; what I snipped wasn't representative.  Try this:

[snip-snap]

Please don't! Reading those code fragments is cruel and unusual
punishment.
Even worse than being forced to watch all episodes of Gilligan's Island
or Golden Girls. 

jue


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

Date: Thu, 14 Nov 2013 07:02:29 -0600
From: "E.D.G." <edgrsprj@ix.netcom.com>
Subject: Re: Several Perl Questions - Nov. 5, 2013
Message-Id: <_86dnS5OD4V1VBnPnZ2dnUVZ_vudnZ2d@earthlink.com>

"E.D.G." <edgrsprj@ix.netcom.com> wrote in message 
news:UeadnQjSw-zvYxzPnZ2dnUVZ_hidnZ2d@earthlink.com...
> "E.D.G." <edgrsprj@ix.netcom.com> wrote in message 
> news:CKWdneJtr5yvpebPnZ2dnUVZ_g6dnZ2d@earthlink.com...

       The program that I mentioned that my colleague could not translate 
was apparently written using FORTRAN 77 with the LAHEY-F77 compiler.  And 
this appears to be the present Web site for download versions of the 
program.

http://www.bfo.geophys.uni-stuttgart.de/etgtab.html

       Since he could not determine how to translate the code I am assuming 
that FORTRAN 77 is no longer in general use.


       An upsetting thing about that earthquake code that is available at my 
Web site is the fact that geologists have not made use of that information 
in spite of the fact that it has been available for quite a while.

       The data that can be generated using that code indicate to me that we 
could probably be doing a fairly good job of forecasting many of our 
powerful earthquakes by simply creating a probability calculation program 
that started with those code and then incorporated data regarding past 
earthquakes plus current data about tectonic plate movement gathered from 
GPS systems etc.

        A Perl program running on a personal computer could do the 
calculations.  But it might take a thousand years of processor time. 
However, such a program could be run with fast code on one of those 
extremely powerful government computers.  It could be constructed so that it 
would optimize each of the important variables.  And it would do that for 
every fault zone on the planet.  There are quite a few variables to optimize 
and quite a few fault zones around the world.  So it would require a fast 
and powerful computer to do the optimization work.

       Scientists have probably not been able to do this in the past because 
they did not use my code as a starting point.  They contain some key 
discoveries that are needed to get started and moving in the right 
direction.  If those discoveries are not used then good data can still be 
generated.  Other researchers have sent me those types of data.  But they 
are not anywhere near as clear as they could be.

       Considering the amount of damage that earthquakes can cause one might 
expect that governments around the world would take an intensive look at any 
possible approach to forecasting them.  But for certain reasons that is not 
happening.  And I know that because I have been working for years with 
forecasting personnel around the world.  And they all say that same thing.

       What is true for this science is also true for other sciences and 
areas of medicine etc.


       There are several important projects that I am presently working on 
that I might post some notes about to a variety of computer language 
Newsgroups before too long.  People might want to comment on them and offer 
some helpful suggestions.

       Those projects largely pertain to explaining to government officials 
how they can develop better senses of direction so that we don't have 
problems occur so often such as that oil spill in the Gulf of Mexico and the 
current problems with the U.S. Government Medicare Web site.

These are personal opinions.



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

Date: Thu, 14 Nov 2013 14:10:52 +0000
From: Ben Bacarisse <ben.usenet@bsb.me.uk>
Subject: Re: Several Perl Questions - Nov. 5, 2013
Message-Id: <0.1e0600d645c9a00a3e73.20131114141052GMT.87zjp7ul8z.fsf@bsb.me.uk>

"E.D.G." <edgrsprj@ix.netcom.com> writes:

> "E.D.G." <edgrsprj@ix.netcom.com> wrote in message
> news:UeadnQjSw-zvYxzPnZ2dnUVZ_hidnZ2d@earthlink.com...
>> "E.D.G." <edgrsprj@ix.netcom.com> wrote in message
>> news:CKWdneJtr5yvpebPnZ2dnUVZ_g6dnZ2d@earthlink.com...
>
>       The program that I mentioned that my colleague could not
> translate was apparently written using FORTRAN 77 with the LAHEY-F77
> compiler.  And this appears to be the present Web site for download
> versions of the program.
>
> http://www.bfo.geophys.uni-stuttgart.de/etgtab.html

There does not seem to be anything odd about that program.  It goes
through gfortran fine.  -Wall -Wextra give a few warnings, but none look
to be serious.

>       Since he could not determine how to translate the code I am
> assuming that FORTRAN 77 is no longer in general use.

It is considered old, but Fortran is good at backwards compatibility.  I
really don't see any reason why the program can't be used as-is.  (There
is a system dependency in the timer code, but that's trivial.)

<snip>
-- 
Ben.


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

Date: Thu, 14 Nov 2013 15:49:40 +0000
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: Several Perl Questions - Nov. 5, 2013
Message-Id: <87wqkb0yqz.fsf@sable.mobileactivedefense.com>

Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
> "E.D.G." <edgrsprj@ix.netcom.com> writes:
>> "E.D.G." <edgrsprj@ix.netcom.com> wrote in message
>> news:UeadnQjSw-zvYxzPnZ2dnUVZ_hidnZ2d@earthlink.com...
>>> "E.D.G." <edgrsprj@ix.netcom.com> wrote in message
>>> news:CKWdneJtr5yvpebPnZ2dnUVZ_g6dnZ2d@earthlink.com...
>>
>>       The program that I mentioned that my colleague could not
>> translate was apparently written using FORTRAN 77 with the LAHEY-F77
>> compiler.  And this appears to be the present Web site for download
>> versions of the program.
>>
>> http://www.bfo.geophys.uni-stuttgart.de/etgtab.html
>
> There does not seem to be anything odd about that program.  It goes
> through gfortran fine.  -Wall -Wextra give a few warnings, but none look
> to be serious.
>
>>       Since he could not determine how to translate the code I am
>> assuming that FORTRAN 77 is no longer in general use.
>
> It is considered old, but Fortran is good at backwards compatibility.  I
> really don't see any reason why the program can't be used as-is.

In the sense that the high priest prepares the fruits and vegetables and
chicken and lambs and first born children for the sacrifice while
wearing the white, ornamental robes, then kills everything alive, making
sure to mix and spread the blood exactly as the ancient ritual
prescribes and then takes a deep breath and waits ... until a thunderous
voice booms "The answer is 42!" from the skies, surely.


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

Date: Thu, 14 Nov 2013 10:40:26 -0500
From: Charlton Wilbur <cwilbur@chromatico.net>
Subject: Re: Several Perl Questions - Nov. 5, 2013
Message-Id: <87d2m32dqt.fsf@new.chromatico.net>

>>>>> "EDG" == E D G <edgrsprj@ix.netcom.com> writes:

    EDG>       Since he could not determine how to translate the code I
    EDG> am assuming that FORTRAN 77 is no longer in general use.

General use, no; it's been superseded by several later standards. 
However, Fortran 90 didn't remove any features and explicitly stated
that any conforming FORTRAN 77 code was also conforming Fortran 90
code.  Anyone with experience of Fortran since 1966 (when the FORTRAN
77 standardization process began) should be able to make sense of the
code.  

Hell, anyone with programming experience at all ought to be able to; one
of my jobs in graduate school was translating from FORTRAN code to C for
an engineering/computer science cross-department project. (I'd be happy
to send you a rate card, but I doubt you'd be willing to pay my rates.)

Your problem is not FORTRAN 77; your problem is your choice of
"professional programmers" and the incoherence of the code you're
starting with.  

Charlton



-- 
Charlton Wilbur
cwilbur@chromatico.net


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

Date: Thu, 14 Nov 2013 16:21:12 +0000
From: Ben Bacarisse <ben.usenet@bsb.me.uk>
Subject: Re: Several Perl Questions - Nov. 5, 2013
Message-Id: <0.ac3ed18992a3c9b0b53e.20131114162112GMT.87ob5nuf7r.fsf@bsb.me.uk>

Rainer Weikusat <rweikusat@mobileactivedefense.com> writes:

> Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>> "E.D.G." <edgrsprj@ix.netcom.com> writes:
>>> "E.D.G." <edgrsprj@ix.netcom.com> wrote in message
>>> news:UeadnQjSw-zvYxzPnZ2dnUVZ_hidnZ2d@earthlink.com...
>>>> "E.D.G." <edgrsprj@ix.netcom.com> wrote in message
>>>> news:CKWdneJtr5yvpebPnZ2dnUVZ_g6dnZ2d@earthlink.com...
>>>
>>>       The program that I mentioned that my colleague could not
>>> translate was apparently written using FORTRAN 77 with the LAHEY-F77
>>> compiler.  And this appears to be the present Web site for download
>>> versions of the program.
>>>
>>> http://www.bfo.geophys.uni-stuttgart.de/etgtab.html
>>
>> There does not seem to be anything odd about that program.  It goes
>> through gfortran fine.  -Wall -Wextra give a few warnings, but none look
>> to be serious.
>>
>>>       Since he could not determine how to translate the code I am
>>> assuming that FORTRAN 77 is no longer in general use.
>>
>> It is considered old, but Fortran is good at backwards compatibility.  I
>> really don't see any reason why the program can't be used as-is.
>
> In the sense that the high priest prepares the fruits and vegetables and
> chicken and lambs and first born children for the sacrifice while
> wearing the white, ornamental robes, then kills everything alive, making
> sure to mix and spread the blood exactly as the ancient ritual
> prescribes and then takes a deep breath and waits ... until a thunderous
> voice booms "The answer is 42!" from the skies, surely.

That's too obscure for me (I get the reference, just not the point).

-- 
Ben.


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

Date: Thu, 14 Nov 2013 17:10:14 +0000
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: Several Perl Questions - Nov. 5, 2013
Message-Id: <87habe29l5.fsf@sable.mobileactivedefense.com>

Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
> Rainer Weikusat <rweikusat@mobileactivedefense.com> writes:
>
>> Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>>> "E.D.G." <edgrsprj@ix.netcom.com> writes:

[...]

>>>>       The program that I mentioned that my colleague could not
>>>> translate was apparently written using FORTRAN 77 with the LAHEY-F77
>>>> compiler.  And this appears to be the present Web site for download
>>>> versions of the program.
>>>>
>>>> http://www.bfo.geophys.uni-stuttgart.de/etgtab.html

[...]

>>>  I really don't see any reason why the program can't be used as-is.
>>
>> In the sense that the high priest prepares the fruits and vegetables and
>> chicken and lambs and first born children for the sacrifice while
>> wearing the white, ornamental robes, then kills everything alive, making
>> sure to mix and spread the blood exactly as the ancient ritual
>> prescribes and then takes a deep breath and waits ... until a thunderous
>> voice booms "The answer is 42!" from the skies, surely.
>
> That's too obscure for me (I get the reference, just not the point).

Considering that there's certainly no living being who understands this
code (and I very much doubt that there ever was), all one can do with this
program is humbly feed it with some input and gratefully accept whatever
output it produces, with the result being defined as correct because
"The computer said so!", despite nobody understands how it arrived there
and why this result and not some other one was produced.

That's closer to asking an oracle than what I would consider 'science'
 ...


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

Date: Thu, 14 Nov 2013 09:31:33 -0800
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Several Perl Questions - Nov. 5, 2013
Message-Id: <602a89d44l5e83q9abfs1ab4np23kcge3i@4ax.com>

Charlton Wilbur <cwilbur@chromatico.net> wrote:
>Your problem is not FORTRAN 77; your problem [...] the incoherence of the code you're
>starting with.  

To put it more bluntly (based on the 2 code snippets that I have seen):
it is exceedingly difficult to transform garbage into diamonds or even
just into something useful.

jue


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

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


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