Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Python for Fortran programmers
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 81 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
beliav...@aol.com  
View profile  
 More options Feb 15 2006, 2:07 pm
Newsgroups: comp.lang.fortran
From: beliav...@aol.com
Date: 15 Feb 2006 11:07:12 -0800
Local: Wed, Feb 15 2006 2:07 pm
Subject: Python for Fortran programmers
Michael Tobis has posted an essay in comp.lang.python regarding "the
value-add
proposition for Python in the Fortran community", which I am reposting
here. He said he wants feeback.

I think a scripting language such as Python is a good complement to a
compiled language such as Fortran or C++, but I would still prefer to
have the "guts" of a computationally intensive program in Fortran,
because of speed, finer control (Fortran KIND's for example), and the
greater number of programming errors that are typically detected by a
good compiler vs. an interpreter.

Here is his essay.

===

The established use of Fortran in continuum models such as climate
models has some benefits, including very high performance and
flexibility in dealing with regular arrays, backward compatibility with

the existing code base, and the familiarity with the language among the

modeling community. Fortran 90 and later versions have taken many of
the lessons of object oriented programming and adapted them so that
logical separation of modules is supported, allowing for more effective

development of large systems. However, there are many purposes to which

Fortran is ill-suited which are increasingly part of the modeling
environment.

These include: source and version control and audit trails for runs,
build system management, test specification, deployment testing (across

multiple platforms), post-processing analysis, run-time and
asynchronous visualization, distributed control and ensemble
management. To achieve these goals, a combination of shell scripts,
specialized build tools, specialized applications written in several
object-oriented languages, and various web and network deployment
strategies have been deployed in an ad hoc manner. Not only has much
duplication of effort occurred, a great deal of struggling up the
learning curves of various technologies has been required as one need
or another has been addressed in various ad hoc ways.

A new need arises as the ambitions of physical modeling increase; this
is the rapid prototyping and testing of new model components. As the
number of possible configurations of a model increases, the expense and

difficulty of both unit testing and integration testing becomes more
demanding.

Fortunately, there is Python. Python is a very flexible language that
has captured the enthusiasm of commercial and scientific programmers
alike. The perception of Python programmers coming from almost any
other language is that they are suddenly dramatically several times
more productive than previously, in terms of functionality delivered
per unit of programmer time.

One slogan of the Python community is that the language "fits your
brain". Why this might be the case is an interesting question. There
are no startling computer science breakthroughs original to the
language, Rather, Python afficionados will claim that the language
combines the best features of such various languages as Lisp, Perl,
Java, and Matlab. Eschewing allegiance to a specific theory of how to
program, Python's design instead offers the best practices from many
other software cultures.

The synergies among these programming modes is in some ways harder  to
explain than to experience. The Python novice may nevertheless observe
that a single language can take the place of shell scripts, makefiles,
desktop computation environments, compiled languages to build GUIs, and

scripting languages to build web interfaces. In addition,  Python is
useful as a wrapper for Fortran modules, facilitating the
implementation of true test-driven design processes in Fortran models.

Another Python advocacy slogan is "batteries included". The point here
is that (in part because Python is dramatically easier to write than
other languages) there is a very broad range of very powerful standard
libraries that make many tasks which are difficult in other languages
astonishingly easy in Python. For instance, drawing upon the standard
libraries (no additional download required)  a portable webserver
(runnable on both Microsoft and Unix-based platforms) can be
implemented in seven lines of code. (See
http://effbot.org/librarybook/simplehttpserver.htm ) Installation of
pure python packages is also very easy, and installation of mixed
language products with a Python component is generally not
significantly harder than a comparable product with no Python
component.

Among the Python components and Python bindings of special interest to
scientists are the elegant and powerful matplotlib plotting package,
which began by emulating and now surpasses the plotting features of
Matlab, SWIG, which allows for runtime interoperability with various
languages, f2py which specifically interoperates with Fortran, NetCDF
libraries (which cope with NetCDF files with dramatically less fuss
than the standard C or Fortran bindings), statistics packages including

bindings to the R language,  linear algebra packages,  various
platform-specific and portable GUI libraries, genetic algorithms,
optimization libraries, and bindings for high performance differential
equation solvers (notably, using the Argonne National Laboratory
package PetSC). An especially interesting Python trick for runtime
visualization in models that were not designed to support it, pioneered

by David Beazley's SWILL, embeds a web server in your model code.

See especially http://starship.python.net/~hinsen/ScientificPython/ and

http://scipy.org as good starting points to learn about scientific uses

of Python.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Van Delst  
View profile  
 More options Feb 15 2006, 3:00 pm
Newsgroups: comp.lang.fortran
From: Paul Van Delst <Paul.vanDe...@noaa.gov>
Date: Wed, 15 Feb 2006 15:00:58 -0500
Local: Wed, Feb 15 2006 3:00 pm
Subject: Re: Python for Fortran programmers

What's his point? "Python is great so let's all use it" ?

He mentioned the things that Fortran is ill-suited for (not actually describing them for
non-CS folks. "distributed control and ensemble management" ?? What does that mean?) but I
didn't see much in his list that is particularly Fortran-specific. I mean, "source and
version control"? What does that have to do with Fortran? You'd have the same issue with
Python; or <insert language of choice>. My experience with source control has been that
the biggest weakness is the people using it (or not as the case may be), not the method
employed.

And there was no analysis of the balance between his mentioned pros (high performance and
flexibility in dealing with regular arrays, backward compatibility with the existing code
base, and the familiarity with the language among the modeling community) and cons (source
and version control and audit trails for runs, build system management, test
specification,etc..) Should we weight them all equally? Should all involved disciplines
weight them the same way?

As to the ad hoc deployment - when you (figuratively) throw 1000's of people together to
work on something (such as a climate model) and those people are spread across the globe,
work for instituitions that typically have very different goals (even *within* agencies),
and are funded based on who-knows-what criteria, and -- assuming the grand master plan
poobah is prescient enough to forsee all the issues that will crop up along the way --
then good luck trying to come up with a plan for "ad-hoc deployment prevention" upon which
everybody involved can agree. More often than not single viewpoints will dominate (Did
somebody say security?)

I absolutely agree with his comments about unit and integration testing. But no real info
was put forth on how Python can help solve this problem. Will python help design the test
parameters and write the test code?

A rather bland series of paragraphs, IMO. It reads like either a) a funding proposal
[hence all the interspersed buzzwords and jargon to make managers get all excited] or b)
an undergraduate CS assignment.

Now, you'll have to excuse me while I go back to studying PHP/MySQL. It's going to solve
all my problems I'm told.... :o)

cheers,

paulv

--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sebastien.boisgera...@gmail.com  
View profile  
 More options Feb 15 2006, 5:53 pm
Newsgroups: comp.lang.fortran
From: Sebastien.Boisgera...@gmail.com
Date: 15 Feb 2006 14:53:39 -0800
Local: Wed, Feb 15 2006 5:53 pm
Subject: Re: Python for Fortran programmers

Paul Van Delst a écrit :

> [...]
> I absolutely agree with his comments about unit and integration testing. But no real info
> was put forth on how Python can help solve this problem. Will python help design the test
> parameters and write the test code?

Please have a look at doctest, a Python module for unit testing
included in the
standard lib:

http://www.python.org/pycon/dc2004/papers/4/PyCon2004DocTestUnit.pdf

Far better than xUnit style unit testing IMHO and AFAIK, it has no
equivalent
outside the python world.

Cheers,

SB


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Krahn  
View profile  
 More options Feb 15 2006, 7:59 pm
Newsgroups: comp.lang.fortran
From: Joe Krahn <kr...@niehs.nih.gov>
Date: Wed, 15 Feb 2006 19:59:09 -0500
Local: Wed, Feb 15 2006 7:59 pm
Subject: Re: Python for Fortran programmers

beliav...@aol.com wrote:
> Michael Tobis has posted an essay in comp.lang.python regarding "the
> value-add
> proposition for Python in the Fortran community", which I am reposting
> here. He said he wants feeback.

> I think a scripting language such as Python is a good complement to a
> compiled language such as Fortran or C++, but I would still prefer to
> have the "guts" of a computationally intensive program in Fortran,
> because of speed, finer control (Fortran KIND's for example), and the
> greater number of programming errors that are typically detected by a
> good compiler vs. an interpreter.

I started using Python because many other scientific programmers are
using it. I initially thought of it as just another Perl, but with
cleaner syntax, and slower. Python-philic developers promise that you
will learn to appreciate the syntax rules. However, after using it for
quite a while, I grew to really hate the indentation syntax.

I think that the typical Fortran programmer will feel the same. Python
begins blocks but never ends them with words, only by un-indentation.
The only way to see how many blocks are ending is to find the matching
indent and count intervening indents.

Ruby should be a better fit for the typical Fortran programmer. I am
surprised Ruby is not more the standard scripting language for
scientists. At least some people who know both say that Ruby is better
even though Python is (at least for now) more popular.

However, I have come to the decision that scripts should be for small
tasks, and that any "Application" should be in a compiled language. All
of these multi-language packages a bloated and slow.

Now that Fortran is finally getting a proper C interface for utilizing
things like regex and GUI libraries, and variable-length strings, I
think it is much more worth while for the average Fortran programmer to
develop modern code using Fortran rather than trying to learn Python.

Joe Krahn


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jan Vorbrüggen  
View profile  
 More options Feb 16 2006, 3:57 am
Newsgroups: comp.lang.fortran
From: Jan Vorbrüggen <jvorbrueggen-...@mediasec.de>
Date: Thu, 16 Feb 2006 09:57:33 +0100
Local: Thurs, Feb 16 2006 3:57 am
Subject: Re: Python for Fortran programmers

> I think that the typical Fortran programmer will feel the same. Python
> begins blocks but never ends them with words, only by un-indentation.
> The only way to see how many blocks are ending is to find the matching
> indent and count intervening indents.

I have used a language that does that (occam2) extensively, and it's not
a problem - actually, it can make life easier in some respects - but you
need the right tool for the job, in particular a folding editor. If you
use that, such problems just go away.

        Jan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Krahn  
View profile  
 More options Feb 16 2006, 2:50 pm
Newsgroups: comp.lang.fortran
From: Joe Krahn <kr...@niehs.nih.gov>
Date: Thu, 16 Feb 2006 14:50:02 -0500
Local: Thurs, Feb 16 2006 2:50 pm
Subject: Re: Python for Fortran programmers

Jan Vorbrüggen wrote:
>> I think that the typical Fortran programmer will feel the same. Python
>> begins blocks but never ends them with words, only by un-indentation.
>> The only way to see how many blocks are ending is to find the matching
>> indent and count intervening indents.

> I have used a language that does that (occam2) extensively, and it's not
> a problem - actually, it can make life easier in some respects - but you
> need the right tool for the job, in particular a folding editor. If you
> use that, such problems just go away.

>     Jan

And then you also need a folding viewer to read code sensibly? To me,
that means that the language syntax really is a deficiency, but you can
offset that deficiency with the "right" tools, which may mean having to
learn to use a different editor than the one you've become used to for
many years.

Also, how can the indentation rules make life easier? The idea of
forcing proper indentation is probably good for making code more
readable, but the how can idea of invisible end-of-block syntax ever be
good? Some people may get used to or even like it, but I think that
programmers who use Fortran a lot are the least likely to be comfortable
with that syntax.

What might be nice is for a language to offer syntax variations to allow
a programmer to pick different block-delimiter styles. I think there is
not much of a language syntax conflict, just a language developer conflict.

Joe Krahn


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Giles  
View profile  
 More options Feb 16 2006, 7:12 pm
Newsgroups: comp.lang.fortran
From: "James Giles" <jamesgi...@worldnet.att.net>
Date: Fri, 17 Feb 2006 00:12:39 GMT
Local: Thurs, Feb 16 2006 7:12 pm
Subject: Re: Python for Fortran programmers
Joe Krahn wrote:

...

> And then you also need a folding viewer to read code sensibly? To me,
> that means that the language syntax really is a deficiency, [...]

I have always thought that if it requires a specialized tool to
read or maintain your program, then either the language or
the program (or both) was poorly designed.  This is probably
an old-fashioned view.  Having such a tool almost certainly
makes it easier to read even well written code in a well
designed language.  Once the crutch is ubiquitous (or,
at least, not rare) no doubt people using poorly designed
languages and writing bad code will consider the deficiencies
irrelevant if the special tool can make up for them.

--
J. Giles

"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies."   --  C. A. R. Hoare


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jan Vorbrüggen  
View profile  
 More options Feb 17 2006, 3:19 am
Newsgroups: comp.lang.fortran
From: Jan Vorbrüggen <jvorbrueggen-...@mediasec.de>
Date: Fri, 17 Feb 2006 09:19:40 +0100
Local: Fri, Feb 17 2006 3:19 am
Subject: Re: Python for Fortran programmers

>>And then you also need a folding viewer to read code sensibly? To me,
>>that means that the language syntax really is a deficiency, [...]
> I have always thought that if it requires a specialized tool to
> read or maintain your program, then either the language or
> the program (or both) was poorly designed.  This is probably
> an old-fashioned view.  Having such a tool almost certainly
> makes it easier to read even well written code in a well
> designed language.  Once the crutch is ubiquitous (or,
> at least, not rare) no doubt people using poorly designed
> languages and writing bad code will consider the deficiencies
> irrelevant if the special tool can make up for them.

In fact, I quite agree with you...but I don't think it applies in this
case.

Let's face it - we write a lot of hierarchically structured documents.
Every time I write a piece of text longer than, say a page, it will be
hierarchically structured - hey, that fairly often even applies to e-mail.
Any F90 program that doesn't fit on a single screen matches as well. And
so on, and so on, ... So why are we still using editors that have no other
view of the document but the single-level sequential one?

And you don't need to use a different editor: emacs, for instance, has a
folding mode you can use.

In this case, I think it's the other way 'round: the traditional way of
doing things is so entrenched that an apporpriate tool - appropriate to
human cognition - is _not_ being used widely.

        Jan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bil Kleb  
View profile  
 More options Feb 17 2006, 5:05 am
Newsgroups: comp.lang.fortran
From: Bil Kleb <Bil.K...@NASA.gov>
Date: Fri, 17 Feb 2006 05:05:30 -0500
Local: Fri, Feb 17 2006 5:05 am
Subject: Re: Python for Fortran programmers

Paul Van Delst wrote:

> Now, you'll have to excuse me while I go back to studying PHP/MySQL.
> It's going to solve all my problems I'm told.... :o)

Oh, so they haven't told you about Ruby on Rails?  ;)

--
Bil
http://fun3d.larc.nasa.gov


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bil Kleb  
View profile  
 More options Feb 17 2006, 5:26 am
Newsgroups: comp.lang.fortran
From: Bil Kleb <Bil.K...@NASA.gov>
Date: Fri, 17 Feb 2006 05:26:35 -0500
Local: Fri, Feb 17 2006 5:26 am
Subject: Re: Python for Fortran programmers

Joe Krahn wrote:

> Ruby should be a better fit for the typical Fortran programmer.

I second this hypothesis.  Some of our new-to-Ruby developers
write Fortran in Ruby!

(In fact, I managed to get this injected into the new Pragmatic
Bookshelf book I recently reviewed: /Practices of an Agile Developer/,
http://www.pragmaticprogrammer.com/titles/pad/.)

> However, I have come to the decision that scripts should be for small
> tasks, and that any "Application" should be in a compiled language.

While I agree to some extent, the power of using dynamic
languages like Python and Ruby for "gluing together" systems
of high-level components is quite liberating.

> I think it is much more worth while for the average Fortran programmer to
> develop modern code using Fortran rather than trying to learn Python.

It depends what you mean by "learn".  Learning the /basic/ constructs
and behavior of a dynamic language like Ruby, for example, can be
grasped in a matter of minutes:  http://tryruby.hobix.com/

I have found that learning at least one other language that
is significantly different than your "native" language reaps
many unexpected benefits.  You gain not only the new ability
provided by the new language, but also the many lessons and
idioms that you are able to take back to your original one.

Regards,
--
Bil
http://fun3d.larc.nasa.gov


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bil Kleb  
View profile  
 More options Feb 17 2006, 11:36 am
Newsgroups: comp.lang.fortran
From: Bil Kleb <Bil.K...@NASA.gov>
Date: Fri, 17 Feb 2006 11:36:41 -0500
Local: Fri, Feb 17 2006 11:36 am
Subject: Re: Python for Fortran programmers

beliav...@aol.com wrote:

> I think a scripting language such as Python is a good complement to a
> compiled language such as Fortran or C++, but I would still prefer to
> have the "guts" of a computationally intensive program in Fortran,
> because of speed, finer control (Fortran KIND's for example), and the
> greater number of programming errors that are typically detected by a
> good compiler vs. an interpreter.

Agreed. (Although I prefer the Ruby flavor.)  In fact,
I just posted a request for information of sorts along these lines
in news:comp.lang.ruby.  (see http://tinyurl.com/7s9zy)

> A new need arises as the ambitions of physical modeling increase; this
> is the rapid prototyping and testing of new model components. As the
> number of possible configurations of a model increases, the expense and
> difficulty of both unit testing and integration testing becomes more
> demanding.

This exactly one of the points I tried to make in my "Scientific
Simulations and the Scientific Method" paper available here,

  http://hdl.handle.net/2002/16096

Regards,
--
Bil Kleb
http://fun3d.larc.nasa.gov


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Van Delst  
View profile  
 More options Feb 17 2006, 12:51 pm
Newsgroups: comp.lang.fortran
From: Paul Van Delst <Paul.vanDe...@noaa.gov>
Date: Fri, 17 Feb 2006 12:51:27 -0500
Local: Fri, Feb 17 2006 12:51 pm
Subject: Re: Python for Fortran programmers

Great paper - I'm going to direct colleagues to the link (the guy that wrote the Python
essay that started this thread might want to give it a read too :o). The one thing I'm
still having trouble with is: if you want to component test various modules of a software
package (in my case, all in Fortran95), where does all the Ruby (or Python) stuff come
into it? I mean, what do you actually use Ruby (or Python) for? (Apologies if the question
seems braindead).

I guess I'm looking for a more concrete example closer to my own situation as we're
dealing with these sorts of issues here (in the group I work with). Software updates are
getting further and further apart because the testing schedule (component + regression)
keeps growing. It would be really nice if the testing requirements could be formalised in
such as way so that the individual developers (i.e. scientists) of new stuff (new
algorithms for old data/instruments, or new algorithms to deal with new data/instruments)
are also tasked with testing, but in a way that eases integration.

cheers,

paulv

--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bil Kleb  
View profile  
 More options Feb 17 2006, 1:22 pm
Newsgroups: comp.lang.fortran
From: Bil Kleb <Bil.K...@NASA.gov>
Date: Fri, 17 Feb 2006 13:22:54 -0500
Local: Fri, Feb 17 2006 1:22 pm
Subject: Re: Python for Fortran programmers

Paul Van Delst wrote:
> Bil Kleb wrote:
>> This exactly one of the points I tried to make in my "Scientific
>> Simulations and the Scientific Method" paper available here,

>>  http://hdl.handle.net/2002/16096

> Great paper.

Thanks.  We certainly had fun writing and presenting it.

If you liked the style of that one, you might also enjoy:

  http://doi.ieeecomputersociety.org/10.1109/MS.2003.1196317

or, an earlier (free) version, http://hdl.handle.net/2002/12649

> The one thing I'm still having trouble with is: if you
> want to component test various modules of a software package (in my
> case, all in Fortran95), where does all the Ruby (or Python) stuff come
> into it? I mean, what do you actually use Ruby (or Python) for?

Got some links (a bit old) for that one too. ;)

  http://www.devsource.com/article2/0,1759,1778699,00.asp
  http://www-128.ibm.com/developerworks/linux/library/l-oslab/
  http://www.rubygarden.org/ruby?WhatDoesNasaUseRubyFor
  http://www.rubyquiz.com/quiz46.html
  (see also the front page of our FUN3D website)

Regards,
--
Bil Kleb
http://fun3d.larc.nasa.gov


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Giles  
View profile  
 More options Feb 17 2006, 5:32 pm
Newsgroups: comp.lang.fortran
From: "James Giles" <jamesgi...@worldnet.att.net>
Date: Fri, 17 Feb 2006 22:32:39 GMT
Local: Fri, Feb 17 2006 5:32 pm
Subject: Re: Python for Fortran programmers
Jan Vorbrüggen wrote:

...

> In this case, I think it's the other way 'round: the traditional way
> of doing things is so entrenched that an apporpriate tool -
> appropriate to human cognition - is _not_ being used widely.

Well, I would still say that more important than the tools
are the design of the language and of programs.

However, the tools have a long way to go before they can
beat what I can already do without them.  If some part of
the program's text is to be folded, an abstract needs to be
provided in its stead that describes something of what the
invisible code does and the principal variables it operates
on.  Well, I can already do that without any special purpose
tool or feature of the editor: I can give a properly nested
part of the code a mnemonic name, and list its principal
variables as its argument list and make it a called procedure.

Depending on how closely bound the code is to the caller, it
may be an internal procedure, a module procedure, or an
independent external procedure.  The fact that it's also reusable
is convenient since pure hierarchies are not always the best
way to sort things out after all.

--
J. Giles

"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies."   --  C. A. R. Hoare


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gary L. Scott  
View profile  
 More options Feb 17 2006, 8:51 pm
Newsgroups: comp.lang.fortran
From: "Gary L. Scott" <garysc...@ev1.net>
Date: Fri, 17 Feb 2006 19:51:37 -0600
Local: Fri, Feb 17 2006 8:51 pm
Subject: Re: Python for Fortran programmers

I agree that a standard macro language does wonders for programming
efficiency.  But it is hardly new.  It is entwined in most legacy
operating systems.  It is absolutely inescapable on the mainframe.  I've
always been disappointed that a suitable one didn't come built into
DOS/Windows (batch files do not qualify).  IBM started offering REXX,
but that didn't get far.

--

Gary Scott
mailto:garysc...@ev1.net

Fortran Library:  http://www.fortranlib.com

Support the Original G95 Project:  http://www.g95.org
-OR-
Support the GNU GFortran Project:  http://gcc.gnu.org/fortran/index.html

Why are there two?  God only knows.

If you want to do the impossible, don't hire an expert because he knows
it can't be done.

-- Henry Ford


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian Elmegaard  
View profile  
 More options Feb 18 2006, 3:24 am
Newsgroups: comp.lang.fortran
From: Brian Elmegaard <br...@rkspeed-rugby.dk>
Date: Sat, 18 Feb 2006 09:24:37 +0100
Local: Sat, Feb 18 2006 3:24 am
Subject: Re: Python for Fortran programmers

Joe Krahn <kr...@niehs.nih.gov> writes:
> quite a while, I grew to really hate the indentation syntax.

> I think that the typical Fortran programmer will feel the same. Python

Maybe I am not typical. At least I appreciate very much the python
syntax where there are no ugly constructions with #{}:@* used in
cryptic ways, like fortran.

I write fortran with indentation and the end statement is more or less
only needed because fortran requires it. However, I guess a more
popular python would allow the programmer to choose either significant
indentation or begin/end.

> Ruby should be a better fit for the typical Fortran programmer.

But it doesn't look like fortran/python, more like perl/c

> language. All of these multi-language packages a bloated and slow.

That's not what the pythonists claim in c-to-python comparisons.

> Now that Fortran is finally getting a proper C interface for utilizing
> things like regex and GUI libraries, and variable-length strings, I
> think it is much more worth while for the average Fortran programmer
> to develop modern code using Fortran rather than trying to learn
> Python.

This sounds interesting. Where can I learn about it? Does g77/gfortran
have it? Python has never has a gui builder that I found easy to
understand.

--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
http://www.rugbyklubben-speed.dk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Maine  
View profile  
 More options Feb 18 2006, 12:11 pm
Newsgroups: comp.lang.fortran
From: nos...@see.signature (Richard Maine)
Date: Sat, 18 Feb 2006 09:11:21 -0800
Local: Sat, Feb 18 2006 12:11 pm
Subject: Re: Python for Fortran programmers

Brian Elmegaard <br...@rkspeed-rugby.dk> wrote:
> Joe Krahn <kr...@niehs.nih.gov> writes:

> > Now that Fortran is finally getting a proper C interface for utilizing
> > things like regex and GUI libraries, and variable-length strings,...

> This sounds interesting. Where can I learn about it? Does g77/gfortran
> have it? Python has never has a gui builder that I found easy to
> understand.

The C interface stuff is in f2003. Note that there isn't something
specifically for regex and GUI libraries, but instead there is a
general-purpose C interop facility, which should allow use of C
libraries in general, wih the regex and GUI libraries just used here as
examples.

The variable length strings referred to are, I presume, the allocatable
string length stuff of f2003. There is also the ISO_VARYING_STRING
module, but it doesn't integrate nearly as cleanly with the rest of the
language as allocatable strings do. (And, in particular, it doesn't
integrate at all reasonably with C).

The odds of g77 getting the f2003 C interop stuff are zero, if not less.
First g77 would need modules, as most of the C interop stuff is in an
intrinsic module. That's too major a chunk of f90 to have any chance. I
consider modules to be the major dividing line between f77 and f90
compilers. Many f77 compilers do a few f90 features, but if they don't
do modules, then they miss out on most of f90; and once modules are
done, it ends up making sense to finish off f90 and have a full f90
compiler.

I don't think that gfortran has the C interop stuff yet (though I could
be wrong), but it is certainly plausible that it could come. G95 does
have at least some of it - I haven't sat down and looked to see what
parts might still be missing.

I don't think that any compilers yet do the allocatable string length
thing. It is a step beyond the f95 allocatable TR. It wouldn't be
shocking if some do soon, or even if one does already and I've missed
it.

--
Richard Maine                    | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle           |  -- Mark Twain


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steven G. Kargl  
View profile  
 More options Feb 18 2006, 1:51 pm
Newsgroups: comp.lang.fortran
From: ka...@troutmask.apl.washington.edu (Steven G. Kargl)
Date: Sat, 18 Feb 2006 18:51:05 +0000 (UTC)
Local: Sat, Feb 18 2006 1:51 pm
Subject: Re: Python for Fortran programmers
In article <1hay65r.1hixn4m1337txvN%nos...@see.signature>,
        nos...@see.signature (Richard Maine) writes:

Two individuals at LANL have almost completed the C interop stuff
for gfortran (at last report).  They are supposedly submitting the
FSF Copyright assignment paperwork and wrapping up some final details.  
Perhaps, gfortran will have C interop in a month or two.

--
Steve
http://troutmask.apl.washington.edu/~kargl/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian Elmegaard  
View profile  
 More options Feb 19 2006, 2:50 am
Newsgroups: comp.lang.fortran
From: Brian Elmegaard <br...@rkspeed-rugby.dk>
Date: Sun, 19 Feb 2006 08:50:55 +0100
Local: Sun, Feb 19 2006 2:50 am
Subject: Re: Python for Fortran programmers
ka...@troutmask.apl.washington.edu (Steven G. Kargl) writes:

> Two individuals at LANL have almost completed the C interop stuff
> for gfortran (at last report).  

Sounds good.

--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
http://www.rugbyklubben-speed.dk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
beliav...@aol.com  
View profile  
 More options Feb 19 2006, 4:07 pm
Newsgroups: comp.lang.fortran
From: beliav...@aol.com
Date: 19 Feb 2006 13:07:06 -0800
Local: Sun, Feb 19 2006 4:07 pm
Subject: Re: Python for Fortran programmers

Brian Elmegaard wrote:
> Joe Krahn <kr...@niehs.nih.gov> writes:

> > quite a while, I grew to really hate the indentation syntax.

> > I think that the typical Fortran programmer will feel the same. Python

> Maybe I am not typical. At least I appreciate very much the python
> syntax where there are no ugly constructions with #{}:@* used in
> cryptic ways, like fortran.

I don't understand your assertion. The characters : and * have special
meaning in Fortran, but I don't recall # { } @ having any.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Maine  
View profile  
 More options Feb 19 2006, 4:25 pm
Newsgroups: comp.lang.fortran
From: nos...@see.signature (Richard Maine)
Date: Sun, 19 Feb 2006 13:25:08 -0800
Local: Sun, Feb 19 2006 4:25 pm
Subject: Re: Python for Fortran programmers

<beliav...@aol.com> wrote:
> Brian Elmegaard wrote:
> > Joe Krahn <kr...@niehs.nih.gov> writes:

> > > quite a while, I grew to really hate the indentation syntax.

> > > I think that the typical Fortran programmer will feel the same. Python

> > Maybe I am not typical. At least I appreciate very much the python
> > syntax where there are no ugly constructions with #{}:@* used in
> > cryptic ways, like fortran.

> I don't understand your assertion. The characters : and * have special
> meaning in Fortran, but I don't recall # { } @ having any.

I wondered the same. But it seemed such a strange comment that I went
back and relooked to see if I had read it correctly. On about the 3rd or
4th reading, I noticed the comma before "like fortrran". That gave me
the clue. Although I consider the construction slightly cryptic <grin>,
I think he means that python has no stuff used in cryptic ways, just
like fortran has no such stuff used in cryptic ways that is "like
fortran" applies to the "there are no ugly constructions" instead of the
"used in cryptic ways".

I abstain on whether things like Fortran's distinction between : and *
counts as cryptic. :-) I'm just trying to interpret what was written
here.

--
Richard Maine                    | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle           |  -- Mark Twain


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Steiner  
View profile  
 More options Feb 19 2006, 5:34 pm
Newsgroups: comp.lang.fortran
From: rstei...@visi.com (Richard Steiner)
Date: Sun, 19 Feb 2006 17:34:47 -0500
Local: Sun, Feb 19 2006 5:34 pm
Subject: Re: Python for Fortran programmers
Here in comp.lang.fortran, beliav...@aol.com spake unto us, saying:

>I don't understand your assertion. The characters : and * have special
>meaning in Fortran, but I don't recall # { } @ having any.

On Unisys 2200 Fortran compilers "@" is to delimit inline comments.  :-)

That ain't standard, tho...          @ Although it *is* useful

--
 -Rich Steiner >>>---> http://www.visi.com/~rsteiner >>>---> Mableton, GA USA
  OS/2 + eCS + Linux + Win95 + DOS + PC/GEOS + Executor = PC Hobbyist Heaven!
       WARNING: I've seen FIELDATA FORTRAN V and I know how to use it!
                   The Theorem Theorem: If If, Then Then.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian Elmegaard  
View profile  
 More options Feb 20 2006, 2:11 am
Newsgroups: comp.lang.fortran
From: Brian Elmegaard <br...@rkspeed-rugby.dk>
Date: Mon, 20 Feb 2006 08:11:51 +0100
Local: Mon, Feb 20 2006 2:11 am
Subject: Re: Python for Fortran programmers

nos...@see.signature (Richard Maine) writes:
> I think he means that python has no stuff used in cryptic ways, just
> like fortran has no such stuff used in cryptic ways that is "like

You think right¹.

¹ You may insert a comma wherever you like.

--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
http://www.rugbyklubben-speed.dk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jan Vorbrüggen  
View profile  
 More options Feb 20 2006, 5:31 am
Newsgroups: comp.lang.fortran
From: Jan Vorbrüggen <jvorbrueggen-...@mediasec.de>
Date: Mon, 20 Feb 2006 11:31:33 +0100
Local: Mon, Feb 20 2006 5:31 am
Subject: Re: Python for Fortran programmers

> However, the tools have a long way to go before they can
> beat what I can already do without them.  If some part of
> the program's text is to be folded, an abstract needs to be
> provided in its stead that describes something of what the
> invisible code does and the principal variables it operates
> on.  Well, I can already do that without any special purpose
> tool or feature of the editor: I can give a properly nested
> part of the code a mnemonic name, and list its principal
> variables as its argument list and make it a called procedure.

Yes about the requirement of describing, in some sense or the other,
what the contents of a fold does.

However, using a folding editor applies this at several below the
modularity you then imply:

 > Depending on how closely bound the code is to the caller, it
 > may be an internal procedure, a module procedure, or an
 > independent external procedure.

For instance, all declarations would be one fold, with subfolds
for the declaration of dummy arguments, local parameters, local
arrays, and local scalars (by way of example). Same principle
applies to the executable statements. This made it possible to
quickly navigate largish pieces of code even on a 24x80 screen.

        Jan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
m...@skyway.usask.ca  
View profile  
 More options Feb 20 2006, 8:40 am
Newsgroups: comp.lang.fortran
From: m...@skyway.usask.ca
Date: 20 FEB 06 13:40:53 GMT
Local: Mon, Feb 20 2006 8:40 am
Subject: RE: Python for Fortran programmers
In a previous article, beliav...@aol.com wrote:

>Brian Elmegaard wrote:
>> Joe Krahn <kr...@niehs.nih.gov> writes:

>> > quite a while, I grew to really hate the indentation syntax.

>> > I think that the typical Fortran programmer will feel the same. Python

>> Maybe I am not typical. At least I appreciate very much the python
>> syntax where there are no ugly constructions with #{}:@* used in
>> cryptic ways, like fortran.

>I don't understand your assertion. The characters : and * have special
>meaning in Fortran, but I don't recall # { } @ having any.

 They mean "this is not Fortran"  (at least not yet)./
Chris

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 81   Newer >
« Back to Discussions « Newer topic     Older topic »