#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Options

# FORTRAN

Finally created a page for FORTRAN.

Amusingly, there is a project "f2j" which is supposed to be a tool that translates a subset of FORTRAN77 to Java. Can this be done? I don't know of any tool that can translate C to Java, without the need of excessive rewriting the generated code to make it compile.

• Options
1.

Sure it can be done.

I once wrote an Object Pascal to C++ translator that was used by most of the biggest Macintosh developers to move their code when Apple switched chips from the Motorola 68XXX chip to the PowerPC. The new chip only had a C++ compiler so everyone needed to make the switch and most Mac programs were written in Object Pascal.

Fortran 77 is actually quite a bit simpler than Object Pascal was, if I remember my Fortran 77 college course correctly. It was in 1982 or 83, so Fortran 77 was relatively new and exciting then.

C is much more problematic because of the pointers. Fortran 77 didn't have pointers like C. All the datatypes were static, IIRC.

Comment Source:Sure it can be done. I once wrote an Object Pascal to C++ translator that was used by most of the biggest Macintosh developers to move their code when Apple switched chips from the Motorola 68XXX chip to the PowerPC. The new chip only had a C++ compiler so everyone needed to make the switch and most Mac programs were written in Object Pascal. Fortran 77 is actually quite a bit simpler than Object Pascal was, if I remember my Fortran 77 college course correctly. It was in 1982 or 83, so Fortran 77 was relatively new and exciting then. C is much more problematic because of the pointers. Fortran 77 didn't have pointers like C. All the datatypes were static, IIRC.
• Options
2.

I don't know FORTRAN, I extrapolated from C: C++ has many language features that Java simply does not have, so that a translation is not possible, unless those features are not used, of course. It should be possible to translate C however, because there are workarounds to handle the pointer arithmetic of C - but as far as I know nobody took the pains to write a translator that includes the C preprocessor. Ergo one has to do the preprocessing of C and C++ "by hand" by a translation of C or C++ to Java, which is what I did when I translated the random number algorithms of numerical recipes to Java.

Comment Source:I don't know FORTRAN, I extrapolated from C: C++ has many language features that Java simply does not have, so that a translation is not possible, unless those features are not used, of course. It should be possible to translate C however, because there are workarounds to handle the pointer arithmetic of C - but as far as I know nobody took the pains to write a translator that includes the C preprocessor. Ergo one has to do the preprocessing of C and C++ "by hand" by a translation of C or C++ to Java, which is what I did when I translated the random number algorithms of numerical recipes to Java.
• Options
3.

This leads to an unfortunate schism in the high performance computing community: On one hand, there are scientists with various backgrounds but less training in software engineering using FORTRAN, on the other hand there is a large number of computer scientists and industrial programmers who neither know nor are interested in FORTRAN.

Actually I think there are actually some high-performance computing people who know about Fortran and whom I expect are also aware of modern software engineering. HLRS comes to my mind, for example.

I'm not a software engineer so I can't discuss about that, but I know that programming in F77 is highly discouraged. F90 isn't really modern either (and there's still no compiler for the F2003 standard) but it does offer advantages for high-performance computing, so it's not only because of inheritance from older code why people still use it.

Comment Source:> This leads to an unfortunate schism in the high performance computing community: On one hand, there are scientists with various backgrounds but less training in software engineering using FORTRAN, on the other hand there is a large number of computer scientists and industrial programmers who neither know nor are interested in FORTRAN. Actually I think there are actually some high-performance computing people who know about Fortran and whom I expect are also aware of modern software engineering. HLRS comes to my mind, for example. I'm not a software engineer so I can't discuss about that, but I know that programming in F77 is highly discouraged. F90 isn't really modern either (and there's still no compiler for the F2003 standard) but it does offer advantages for high-performance computing, so it's not only because of inheritance from older code why people still use it.
• Options
4.

What I would like to write on that page is a list of references for FORTAN knowledge, i.e. which departments have courses in FORTRAN, are there any communities etc. The statement you cited is more of a reminder for myself resp. a provocation for others to provide this information. Since one of John's student has started to work with FORTRAN I will spend some time now to do some "research" about this and expand this page.

Right now I am not really any wiser than I was a year ago. At least in the context of my everyday job it is quite clear that people don't even know what FORTRAN is (which does include some applications of high performance computing at the BMW AG, for example).

Comment Source:What I would like to write on that page is a list of references for FORTAN knowledge, i.e. which departments have courses in FORTRAN, are there any communities etc. The statement you cited is more of a reminder for myself resp. a provocation for others to provide this information. Since one of John's student has started to work with FORTRAN I will spend some time now to do some "research" about this and expand this page. Right now I am not really any wiser than I was a year ago. At least in the context of my everyday job it is quite clear that people don't even know what FORTRAN is (which does include some applications of high performance computing at the BMW AG, for example).
• Options
5.

i.e. which departments have courses in FORTRAN

the TU Berlin had classes in Fortran. That is I had to take a one semester class within the physics diploma course. There was a bit of assembler programming in it too. So you might check out the homepage of TU berlin (i think it was offered by the informatik department), but my class was something around 1985. However i didnt like it very much, and thus I was more or less only learning that what was needed in order to pass the oral exam.

Comment Source:>i.e. which departments have courses in FORTRAN the TU Berlin had classes in Fortran. That is I had to take a one semester class within the physics diploma course. There was a bit of assembler programming in it too. So you might check out the homepage of TU berlin (i think it was offered by the informatik department), but my class was something around 1985. However i didnt like it very much, and thus I was more or less only learning that what was needed in order to pass the oral exam.
• Options
6.
edited January 2013

....I should may be add that I tried later to learn a little more programming, like in 1987/88 I voluntarily learned a bit how to program in C. So its not that I don't know nothing. It is just that I dont like sitting too long in front of a machine especially not without humans around (the programming task of course play also a role). Moreover since a lot of nowadays communication is taking part in the Internet*** there is even less time and energy left for programming.

*** Like for example I was just editing a wikipedia page about the german income taxes in order to link to the newest numbers of the german income taxes for 2013, because these numbers are quite hard to find and I think the concrete amount of income taxes is somewhat interesting for some people....

Comment Source:....I should may be add that I tried later to learn a little more programming, like in 1987/88 I voluntarily learned a bit how to program in C. So its not that I don't know nothing. It is just that I dont like sitting too long in front of a machine especially not without humans around (the programming task of course play also a role). Moreover since a lot of nowadays communication is taking part in the Internet*** there is even less time and energy left for programming. *** Like for example I was just editing a wikipedia page about the german income taxes in order to link to the newest numbers of the german income taxes for 2013, because these numbers are quite hard to find and I think the concrete amount of income taxes is somewhat interesting for some people....
• Options
7.
edited January 2013

Right, I can understand that. A lot of people like interaction with others much more than sitting all alone at a desk, whatever the task. Me, I would much like to be able to program more, but am talking most of the time actually during my everyday job. Well...

Anyway, I succeeded in setting up Eclipse as an IDE with Cygwin and to compile and run a "Hello World" in FORTRAN on my Windows machine, so I wrote about how I did it on the page FORTRAN. Anyone who would like to do some programming in FORTRAN, check it out :-)

Comment Source:Right, I can understand that. A lot of people like interaction with others much more than sitting all alone at a desk, whatever the task. Me, I would much like to be able to program more, but am talking most of the time actually during my everyday job. Well... Anyway, I succeeded in setting up Eclipse as an IDE with Cygwin and to compile and run a "Hello World" in FORTRAN on my Windows machine, so I wrote about how I did it on the page [[FORTRAN]]. Anyone who would like to do some programming in FORTRAN, check it out :-)
• Options
8.
edited January 2013

Me, I would much like to be able to program more, but am talking most of the time actually during my everyday job.

Oh shit, are you working in such a terrible open plan office?

I always wonder how people can get any concentration intensive work done in these. For high-concentration work - at least for me- it is much better to have silence and no interruption. So I guess I prefer something like a noise free room for me, with noone allowed to knock on the door.

Comment Source:>Me, I would much like to be able to program more, but am talking most of the time actually during my everyday job. Oh shit, are you working in such a terrible open plan office? I always wonder how people can get any concentration intensive work done in these. For high-concentration work - at least for me- it is much better to have silence and no interruption. So I guess I prefer something like a noise free room for me, with noone allowed to knock on the door.
• Options
9.

Comment Source:Nad, I just posted about this on G+ (see +Jim Stuttard). I agree and iirc cognitive studies corroborate it.
• Options
10.
edited January 2013

Oh shit, are you working in such a terrible open plan office?

No :-) I have to talk most of the time because I do a management-like job. Of course many people believe that "software developers" are nerds that spend most of their time staring at computer screens, but my job is actually mostly about walking around and talking to people.

With regard to the topic of this thread: While one drowns in Java/.NET/whatever big topic books, it is not quite easy to find a good book to start learning FORTRAN from, but it would seem I have found one that I can recommend:

• Michael Metcalf, John Reid, Malcolm Cohen: Modern Fortran Explained. Oxford University Press, Oxford 2011

Added that to the reference section of FORTRAN.

Comment Source:<blockquote> <p> Oh shit, are you working in such a terrible open plan office? </p> </blockquote> No :-) I have to talk most of the time because I do a management-like job. Of course many people believe that "software developers" are nerds that spend most of their time staring at computer screens, but my job is actually mostly about walking around and talking to people. With regard to the topic of this thread: While one drowns in Java/.NET/whatever big topic books, it is not quite easy to find a good book to start learning FORTRAN from, but it would seem I have found one that I can recommend: * Michael Metcalf, John Reid, Malcolm Cohen: Modern Fortran Explained. Oxford University Press, Oxford 2011 Added that to the reference section of [[FORTRAN]].
• Options
11.
edited January 2013

Yes, Metcalf and Reid (and Cohen) is good. For beginners in programming (i.e. not you guys) Chapman would be better.

Comment Source:Yes, Metcalf and Reid (and Cohen) is good. For beginners in programming (i.e. not you guys) Chapman would be better.