Re: Fortran and Python
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Fortran and Python         

Group: comp.lang.fortran · Group Profile
Author: Gary Scott
Date: Aug 8, 2008 10:02

rusi_pathan wrote:
> On Aug 8, 10:00 am, Paul van Delst noaa.gov> wrote:
>
>>Charles Doust wrote:
>>
>>>On Thu, 7 Aug 2008 22:02:35 -0600, Ron Ford
>>>wrote:
>>
>>>>Charlie,
>>
>>>Hello Ron, thanks for answering.
>>>
>>>>I think you'll find that more fortran fellas are using ruby as a front end.
>>>>The idea is fundamentally similar.
>>
>>>>I'd be curious to see a python caller get information from one of fortran's
>>>>intrinsics. Python seems to come in the same package that ubuntu does.
>>
>>>I did notice that ruby and python always come together in a
>>>conversation, yes. However, I got the feeling that more people are
>>>using python, for some reason (google, old c.l.f. archives ...)
>>>Could you give some examples of possible troublesome areas in
>>>connecting python to fortran, or some distinct advantages of ruby ?
>>
>>Python has been around a little bit longer. When I was looking to teach myself OOP
>>principles a couple two three years ago, I figured the best way to do it was to use an OOP
>>language. I look at both the python and ruby scripting languages. I chose ruby purely because:
>>1) *Everything* in ruby is an object. In Python, I believe there a very few things that
>>are not objects. Being a total noob, I liked that in ruby there weren't any special cases.
>>2) In Python you *have* to indent every line in a block the same amount - it's part of the
>>syntax. For some obscure reason, that just rubbed me the wrong way. I cannot justify why
>>it did since I do the same in my Fortran, IDL, and ruby codes; I just didn't like that I
>>*had* to do it.
>>
>>So I picked ruby.
>>
>>
>>>I don't have an option here of switching to ruby for this, but I would
>>>still like to know a little more about ruby as well. They seem like
>>>very similar languages to each other, btw. For now all I could notice
>>>is that I like python's syntax more :-) (no brackets, never could get
>>>used to brackets :-)
>>
>>Functionally, I think they are the same dog, different leg. You just have to look at all
>>the various apps that have been written in both to see that whatever it is you want to do
>>you can do in either of them.
>>
>>
>>>My general idea is to have subroutines/modules written in fortran, and
>>>some kind of front end in python. Do you think I stand any chance in
>>>something like that, or should I give up my hands on the whole thing ?
>>
>>The f2py project shows it's doable in Fortran. It's also doable in ruby - I just don't
>>know if it has already been done in a general way. The GFD-Dennou folks have wrappers for
>>some specific Fortran codes (http://ruby.gfd-dennou.org/products-body.htm) but
>>unfortunately all the documentation I looked at was in Japanese so I couldn't tell too
>>much more.
>>
>>For more ruby/Fortran info you should contact Bil Kleb. He occasionally posts to clf. Then
>>there's:http://www.ruby-lang.org/en/http://www.ruby-doc.org/
>>...and a bzillion more. Alsohttp://sciruby.codeforpeople.com/
>>You might be able to ask the latter if ruby/Fortran has already been done.
>>
>>Anyway....
>>
>>cheers,
>>
>>paulv
>>
>>
>>
>>
>>>Charlie
>
>
> I am also looking to properly learn either Python or Ruby.
> Syntactically I like Ruby but the scientific community seems to be
> bending towards Python with projects like f2py, Numpy/Scipy/Sage,
> Matplotlib/Mayavi/Paraview, Cubit etc. Moreover python bindings are
> also being made available for many useful libraries such as MPI, Petsc
> and so on.
>
> Though unlike Fortran, whenever I try to write python I just dont feel
> in control and everything seems pretty loose. I am also not sure if I
> should be learning python specially when Fortran compilers supporting
> features of 2003 standard are being made available.
REXX more Fortran-ish but a little C-ish too unfortunately.

--

Gary Scott
mailto:garylscott@sbcglobal dot 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

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

-- Henry Ford
no comments
diggit! del.icio.us! reddit!

RELATED THREADS
SubjectArticles qty Group
Bug#426953: Installing python-matplotlib, python-numpy gets removedlinux.debian.bugs.rc ·