Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Is FORTRAN Still Kicking?

Cliff posted more than 12 years ago | from the the-langage-that-never-dies dept.

Programming 745

Algorithm wrangler queries: "I'm beginning to wonder if I should invest the time in learning FORTRAN. Although it is, arcane it seems to be the best tool when it comes to demanding optimization tasks and heavy computations. C/C++ does not cut it for me - it is simply too easy to make mistakes and I find myself using half of my time hunting bugs unrelated to the problem at hand. Additionally, although tools like Matlab exist they don't provide the power that justify the huge price tag they carry. I find any script based language (Matlab, Numeric Python, Scilab) to be inadequate as soon as it is necessary to use loops to describe a problem and using such tools for recursive systems can be a real pain. As another data-point, the Netlib repository seems to be very FORTRAN oriented, and it is a true gold mine when it comes to free routines for solving almost any computing task. What bothers me though is that FORTRAN code is really ugly and the language lacks almost any modern day language feature (I know about Fortran 90 but it is not much nicer than F77, and no one seems to use it). Can it really be true that the best tool we have for heavy duty computing is a 25 year old language, or have you found anything better - free or non-free?"

Sorry! There are no comments related to the filter you selected.

FORTRAN? (-1, Flamebait)

Gizzmonic (412910) | more than 12 years ago | (#4027280)

More like smacking you down with the stick of FIRST POST!

Re:FORTRAN? (-1, Offtopic)

B3ryllium (571199) | more than 12 years ago | (#4027313)

Dude, are you mocking my first post [slashdot.org] ? lol :)

Confuzzled! [beryllium.ca] A dictionary of made-up, sometimes-useful words!

Yes (2, Informative)

mfos.org (471768) | more than 12 years ago | (#4027287)

FORTRAN is used in high performance scientific computing. The language allows for high parrelelization.

Use Fortran 90 (5, Informative)

Lally Singh (3427) | more than 12 years ago | (#4027289)

Fortran 90 has plenty of structured programming features to make maintainable code. Equally, if not more important, is that Fortran code can be much better optimized than C/C++ code for numerics. IBM did a good job on Fortran, and it's still a major player today.

Re:Use Fortran 90 (1)

manobes (541867) | more than 12 years ago | (#4027334)

I'll second that... Fortran 90 is really nice for scientific work, definatly worth learning.

Re:Use Fortran 90 (0)

Anonymous Coward | more than 12 years ago | (#4027421)

How about learning English 90? I hear it's definitely worth learning.

Re:Use Fortran 90 (3, Informative)

rsilva (128737) | more than 12 years ago | (#4027438)

Yes, I completely agree. I have already posted a message about this in Slashdot foruns where I described some of the Fortran 95 characteristics:

http://slashdot.org/comments.pl?sid=3041&cid=145 39 90

Something that changed from that time is that now we have a free compiler for non-commercial use (linux, i386):

http://www.intel.com/software/products/compilers /f 60l/noncom.htm

Re:Use Fortran 90 (1)

rsilva (128737) | more than 12 years ago | (#4027506)

The link for my former comment on fortran 95 is broken. The right link is:

[slashdot.org]
http://slashdot.org/comments.pl?sid=3041&cid=145 39 90

Re:Use Fortran 90 (0)

Anonymous Coward | more than 12 years ago | (#4027450)

Indeed, however, DEC -- er I mean Compaq -- er I mean HP ... oh no actually I mean Intel also has possession of some pretty damn awesome Fortran compilers technology as well.

Don't use Fortran 90. (5, Informative)

Tim (686) | more than 12 years ago | (#4027505)

Don't use Fortran 90. It's as messy a language as C++, with the significant disadvantage that it has a much smaller user base.

Honestly, your objection to C++ is unclear to me...you say you spend more time fixing bugs than approaching the task at hand? Is this because you don't know the language that well? Perhaps because you're not taking advantage of the many excellent libraries available to you? Keep in mind that C++ library design requires a great deal of skill, but using a well-designed library is actually easier than coding in other languages.

C++ is my own personal choice for anything by the most demanding of high-performance computing applications. Is there an overhead to the language? Debatably, yes. Does it matter, in 99.9% of applications? No. And with only a little bit of forethought, even the "inherent" performance hits can be avoided in the places where it matters. It's just that you have to rely on a profiler to tell you where those places are...

There is a significant community of researchers and developers working on scientific and high-performance computing in C++. Check out some of these:

  • POOMA [lanl.gov] - a high-performance mathematics C++ framework
  • Blitz++ [oonumerics.org] - a C++ mathematics library which uses template metaprogramming to achieve FORTRAN-caliber performance.
  • MTL [iu.edu] - another example of template metaprogramming.
  • oonumerics.org [oonumerics.org] - a good site for information on high-performance object-oriented code.


These are just a few good starting points. Do a google search for 'high performance c++' to find many more. Just, please, for the love of Deity, don't code in FORTRAN. ick....

NO (0)

Anonymous Coward | more than 12 years ago | (#4027290)

IT IS NOT

Too easy to make mistakes? (0, Flamebait)

Tyball (139432) | more than 12 years ago | (#4027294)

Learn C/C++ better. Stupid mistakes are not an inherent property of C.

Re:Too easy to make mistakes? (1)

joeljkp (254783) | more than 12 years ago | (#4027311)

Although C/C++ is truly slower when it comes to heavy number-crunching. FORTRAN is a better option for number-crunching applications.

Uhh... (-1, Troll)

delta407 (518868) | more than 12 years ago | (#4027296)

Can it really be true that the best tool we have for heavy duty computing is a 25 year old language, or have you found anything better - free or non-free?
How about SQL? Depends on the type of heavy duty computing, I guess.

FORTRAN lives (2)

evilpenguin (18720) | more than 12 years ago | (#4027298)

Yes, FORTRAN is still alive, and many important scientific applications are still written in it and maintained in it.

Alas, for the rest of the question, I'm not a mathematician/number cruncher. The only floating point numbers I deal with are currency...

Re:FORTRAN lives (1)

zer0vector (94679) | more than 12 years ago | (#4027338)

As an example, AIPS [nrao.edu] , a program many radio astronomers are intimately familiar with, was written ~1980 for reduction of interferometer data. It has been continually supported and maintained since then, and there appears to be no planned end to its use.

Re:FORTRAN lives (2)

catfood (40112) | more than 12 years ago | (#4027404)

Mod parent +1 funny?

You really, really don't want to use floating point for currency values. Eventually the logarithmic nature of floating point data formats [inet-one.com] will cause your calculations to be just a penny or two off.

Much better to use a BCDish class or dedicated decimal type, depending on your programming language. Worst case, do all your calculations in the smallest unit possible, e.g. cents in the US.

A beauty all its own (2)

Yoda2 (522522) | more than 12 years ago | (#4027301)

FORTRAN was one of the first languages that I learned and although I don't use it much now it still has a special place in my heart. I always found its simplicity and structure sort of comforting.

I'm a Java convert now thought.

Re:A beauty all its own (1)

Yoda2 (522522) | more than 12 years ago | (#4027316)

Damn you extra "t"! Damn you!!!!

Re:A beauty all its own (1, Funny)

Anonymous Coward | more than 12 years ago | (#4027368)

You know, it is truly insightful answers like the above that make "Ask Slashdot" the wonder that it truly is:

Submitter: Slashdot, I am wondering - is it worth it to learn X?

Poster: I used to use X, and I found it truly comforting. I'm a Y convert now, though!

+5 Informative, baby!!!

Re:A beauty all its own (3, Funny)

jazman_777 (44742) | more than 12 years ago | (#4027385)

FORTRAN was one of the first languages that I learned and although I don't use it much now it still has a special place in my heart. I always found its simplicity and structure sort of comforting.

I always liked how I could define variables on the fly anywhere in the code. Really catered to my total lack of organization and self-discipline. I can do that in Perl, now, too!

NOAA (4, Insightful)

OpenSourceRulez (183923) | more than 12 years ago | (#4027302)

As a recent CS grad I had to help some of my friends in the Meteorology department with their programming course(of course not taught by a CS prof). To my surprise it was FOTRAN. It seems a lot of the stuff NOAA and other government agenicies program is in FORTRAN so it is compatible with the stuff they stil use from the 70's and 80's.

Re:NOAA (5, Informative)

GuidoDEV (57554) | more than 12 years ago | (#4027416)

Speaking of meteorological programming, ALL the major atmospheric models are written in FORTRAN. The ETA, AVN, NGM, MM5, WRF, and scores of lesser-known models...all of them written in FORTRAN (most of them FORTRAN-90 now, but some of the older ones are FORTRAN-77). The MM5 & WRF may be found here [ucar.edu] and here [ucar.edu] . The source code to several others is readily available as well if you're so inclined, for instance the ETA [noaa.gov] and the ARPS [ou.edu] . Anyone wanting to run them may do so fairly easily on a PC running Linux (any new PC will be able to run a fairly hi-res model real-time); I do so myself.

FORTRAN is DYING (-1, Troll)

Anonymous Coward | more than 12 years ago | (#4027303)

FORTRAN is dying

Yet another crippling bombshell hit the beleaguered *FORTRAN community when last month IDC confirmed that *FORTRAN accounts for less than a fraction of 1 percent of all servers. Coming on the heels of the latest Netcraft survey which plainly states that *FORTRAN has lost more market share, this news serves to reinforce what we've known all along. *FORTRAN is collapsing in complete disarray, as further exemplified by failing dead last [sysadminmag.com] in the recent Sys Admin comprehensive networking test.

You don't need to be a Kreskin [amdest.com] to predict *FORTRAN's future. The hand writing is on the wall: *FORTRAN faces a bleak future. In fact there won't be any future at all for *FORTRAN because *FORTRAN is dying. Things are looking very bad for *FORTRAN. As many of us are already aware, *FORTRAN continues to lose market share. Red ink flows like a river of blood. FreeFORTRAN is the most endangered of them all.

Let's keep to the facts and look at the numbers.

OpenFORTRAN leader Theo states that there are 7000 users of OpenFORTRAN. How many users of NetFORTRAN are there? Let's see. The number of OpenFORTRAN versus NetFORTRAN posts on Usenet is roughly in ratio of 5 to 1. Therefore there are about 7000/5 = 1400 NetFORTRAN users. FORTRAN/OS posts on Usenet are about half of the volume of NetFORTRAN posts. Therefore there are about 700 users of FORTRAN/OS. A recent article put FreeFORTRAN at about 80 percent of the *FORTRAN market. Therefore there are (7000+1400+700)*4 = 36400 FreeFORTRAN users. This is consistent with the number of FreeFORTRAN Usenet posts.

Due to the troubles of Walnut Creek, abysmal sales and so on, FreeFORTRAN went out of business and was taken over by FORTRANI who sell another troubled OS. Now FORTRANI is also dead, its corpse turned over to yet another charnel house.

All major surveys show that *FORTRAN has steadily declined in market share. *FORTRAN is very sick and its long term survival prospects are very dim. If *FORTRAN is to survive at all it will be among OS hobbyist dabblers. *FORTRAN continues to decay. Nothing short of a miracle could save it at this point in time. For all practical purposes, *FORTRAN is dead.

*FORTRAN is dying

But Netcraft didn't confirm it (-1)

Anonymous Coward | more than 12 years ago | (#4027378)

So I'm still skeptical.

Why Not? (1)

CarrionBird (589738) | more than 12 years ago | (#4027304)

Even COBOL's still around in one form or another. Any-way, some people swear by PASCAL/DELPHI. I've never tried it, but it looks easy enough.

Try Common Lisp (1)

Javamonkey (11366) | more than 12 years ago | (#4027305)

I'm not a true lisp hacker but from lurking on comp.lang.lisp I believe that the lisp guys belive that a good Common Lisp implementation can get pretty kickin' numeric performance. Of course you have to put in various declarations to allow the compiler to generate efficient code. But if you do that, it's supposed to be pretty good. And the advantage is you can build up your program without the declarations, get it working and then optimize by adding them in. Or that's the theory. Also these things vary from implementation to implementation--some are more tuned toward numeric style computation than others.

AHAHAHAHAHA (0)

Anonymous Coward | more than 12 years ago | (#4027352)

you would hear shit like that on comp.lang.lisp. try actually writing the "efficient code" and benchmark it against Digital Fortran (or whatever the hell it's called these days), and find out why everyone but comp.lang.lisp posters have given up on it.

Re:Try Common Lisp (3, Informative)

ultima (3696) | more than 12 years ago | (#4027408)

Common Lisp is a very high level language with a tremendous amount of expressiveness, and it is suited towards academia in that in general, functionality is not sacrificed for performance.

Check out http://www.lisp.org, http://cmucl.cons.org/cmucl for a really good implementation (and there are even Debian packages of it).

CL is not known for its parallelization abilities, but if you need a language that lets you describe mathematics, CL is useful.

Lisp is actually based around something called the Lambda Calculus, which is a way of expressing concepts by transforming data into other data using data which is expressed as a "function". Because of this, Lisp has a lot of abilities that other languages lack, such as extremely simple and powerful function composition, even at run-time. CL also has a massive core library with OO facilities, basic mathematic primitives, good FFT suppot in most implementations, windowing system support, and good commercial vendors like Franz. Check it out; it's almost as old as Fortran, but has evolved in a much more elegant manner.

Re:Try Common Lisp (2, Insightful)

bowronch (56911) | more than 12 years ago | (#4027471)

I'm a big fan of Lisp... The ability to declare as much or as little as you want about your data types is very nice... And it has the greatest macros of any language I've ever used... Once you get used to the Lisp macro functionality, you will cry when the most you can do is a #define in C...

When programming in Fortran or C its important to remember Greenspun's Tenth Rule of Programming: "Any sufficient complicated C or Fortran program contains an ad-hoc, informally specified, bug-ridden, slow implementation of half of Common Lisp"

of course it's still kicking (2)

krog (25663) | more than 12 years ago | (#4027306)

my dad is a physicist. he, and every colleague of his who writes code, writes it in Fortran.

part of it is that there's 40 years of perfectly good legacy code to keep using. but mostly it's that C's numerical libraries still, after all this time, aren't as fast as a good Fortran's.

Re:of course it's still kicking (3, Informative)

ttfkam (37064) | more than 12 years ago | (#4027497)

C's libraries may not be (and may never be due to compiler pointer aliasing issues), but C++'s are. One in particular is Blitz++ [oonumerics.org] .

Not to take away from Fortran. Language in general means far less to performance than an experienced programmer and good algorithms.

Re:of course it's still kicking (2)

brer_rabbit (195413) | more than 12 years ago | (#4027498)

part of it is that there's 40 years of perfectly good legacy code to keep using. but mostly it's that C's numerical libraries still, after all this time, aren't as fast as a good Fortran's.

I used to accept this as a good argument but I'm starting to question it. C has been around long enough that it's math libraries shouldn't be lacking. What's wrong? Why haven't the C libraries caught up to speed? Are you talking about proprietary libraries or the basic libm.so?

WTF is this? (0)

Anonymous Coward | more than 12 years ago | (#4027310)

I'm beginning to wonder if I should invest the time in learning FORTRAN.... [I]t seems to be the best tool when it comes to demanding optimization tasks and heavy computations.

If you don't know the language, how can you state that? Hmm.. I wonder if I should invest the time in learning Pascal? It seems to be the best tool when it comes to parsing text files.

Depends (1)

Apocalypse111 (597674) | more than 12 years ago | (#4027312)

It depends on what you mean exactly by the "best tool". If you're looking for something easier, then I can't help you. If you're looking for something FASTER, then just use Assembly Language.

Fortran 90 (0)

Anonymous Coward | more than 12 years ago | (#4027319)

Active work is underway to provide a front-end
for the GCC-system for Fortran 95.

See: http://g95.sourceforge.net/

Toon Moene (current g77 maintainer).

Re:Fortran 90 (0)

Anonymous Coward | more than 12 years ago | (#4027394)

you're the current g77 "maintainer"? pardon me while i kick you in the nuts, you lazy hack

FORTRAN is easy (2, Informative)

Philippe (3665) | more than 12 years ago | (#4027320)

You can become a passable FORTRAN programmer in a couple of hours if you already know another language, such as C or Pascal. There are a couple of gotchas (predeclared variables & COMMON statements IMHO).

If you are going to touch any heavy simulation code (such as statistics, physics & biology) learn FORTRAN. It works very well for those problems. Yes, it is old, but that doesn't mean it's bad. It's not modern, but it works surprisingly well.

I find myself teaching FORTRAN to budding scientists, and they are able to write complex stuff very quickly because they don't trip all over the language (e.g. '==' vs '=' in C).

Welcome to Legacy Land (0, Offtopic)

grendelkhan (168481) | more than 12 years ago | (#4027323)

Home of the VAX and land of Basic, FORTRAN, and COBOL!

Re:Welcome to Legacy Land (1)

Shalda (560388) | more than 12 years ago | (#4027447)

Actually, BASIC is alive and well. Really, if you want a nice freindly modern language, use VB.NET and find some good math libraries. I find VB to create far more readable code than any other language I've worked with. (Having at one point or another used BASIC, C, C++, C#, Pascal, Fortran, x86 assembly, 6502 assembly and 68k assembly.)

Re:Welcome to Legacy Land (2)

unicron (20286) | more than 12 years ago | (#4027482)

Because you haven't experienced danger until your run 100+ user production databases on legacy hardware. Suppose I'll go make it safe for another day:

TAPE OPER RES MKC500
INIT MKC500 TAP007
TAPE OPER AVAIL MKC500

*sob*....

It's still kicking... (5, Insightful)

drudd (43032) | more than 12 years ago | (#4027327)

Fortran has several things going for it...

1) it's been the standard scientific computing language for so long, that every platform has a compiler, and that compiler is likely to be very mature (i.e. stable, and produces fast code).

2) since it's been a standard for so long, everyone has routines written in it which have been debugged and work, no sense rewriting them and introducing errors.

3) the language itself lacks complicated constructs, so it is very simple to optimize. This, with (1) makes fortran still outperform c, thanks to the compilers.

That said, I HATE fortran with a passion, mostly because it's ugly. 6 character variable names are impossible to deal with. Couple this with capitalization and indentation rules left over from the punch card era and you have code which is literally painful to read.

Doug

FORTRAN is great (0, Flamebait)

SpanishInquisition (127269) | more than 12 years ago | (#4027329)

if you want to multiply two numbers a million time, for everything else C still rules.

Fortran is definitely still in use (2)

MarvinMouse (323641) | more than 12 years ago | (#4027330)

I know of a lot of research and development facilities that still use fortran for mathematical modelling, and mathematical programming. Especially mathematical modelling of physical phenomena (ie. nuclear power plants, etc.)

I didn't find it that hard of a language and I believe it would be worth learning for someone who needs to mathematics on a computer simply and easily without having all of the dongles and doo-dads. :-)

How can something be dying? (0, Flamebait)

jsonmez (544764) | more than 12 years ago | (#4027339)

When it's already dead? Use C++. C++ can do everything fortran can do and more. If you are tracking bugs in C++, learn C++ better.

Stupid question (1, Flamebait)

Laplace (143876) | more than 12 years ago | (#4027340)

Yes: Fortran is still alive (the FORTRAN spelling has been depricated). There is a shitload of stuff for Fortran 77. Fortran 95 kicks some ass, and has a lot of features seen in modern languages.

Shit, what a stupid question.

Just link your FORTRAN libs (2, Informative)

mocm (141920) | more than 12 years ago | (#4027345)

to your C code. You just have to know how FORTRAN arrays are held in memory and how long the FORTRAN types are. Then you need to know what standard FORTRAN libs you need to link, so that your numerical libs will work. I did that for lots of my numerical work and it worked fine. You have to test it of course and it takes a while to work out the kinks.

What else do you want? (2)

khendron (225184) | more than 12 years ago | (#4027355)

What are these modern language features you are looking for?

FORTRAN is almost perfect for what it is used for: massive number crunching. Very little bells and whistles, which allows the programmer to concentrate on the numerics of the problem at hand and not the picky little programming details.

ahhhhh FORTRAN (0)

Anonymous Coward | more than 12 years ago | (#4027357)

I thought FORTRAN was more like 50 years old?

Right Tool for the Job (1)

lpp (115405) | more than 12 years ago | (#4027360)

First, an admission...I have used only a little FORTRAN in college, and that only to satisfy the requirements of a freshman level course. That said, although I find it hard to believe that other languages or libraries or toolsets are not up to snuff when it comes to the kind of number crunching you are doing. In any case, if it does seem that your application has serious number crunching needs, but you still feel compelled to use C,C++,Delphi,Perl,whatever, then perhaps you ought to wrap your number crunching code in a library, but written in FORTRAN. Then do your "other" code (infrastructure, UI, control) in the language of your choice, calling out to the FORTRAN code whenever necessary. If your application is as computationally intensive as you seem to imply, the additional runtime cost of a library load and callout should easily be offset by the savings in computation time due to the "better" language.

Another way to look at this is that most languages are created because a problem domain exists which the language creator thought would be better served by this new language. FORTRAN has long been considered the best language/implementation for computationally intensive applications. Use the right tool for the job.

G'luck.

Re:Right Tool for the Job (2, Insightful)

anonymous_wombat (532191) | more than 12 years ago | (#4027489)

You can use CORBA, or XML to communicate between your Fortran application, and any other code that you may write. That way, you can get the best of both worlds. I wouldn't give up so fast on C++/Java though. Investigate those languages more thoroughly before you decide to code in Fortran.

I used F77 for a while (4, Insightful)

IPFreely (47576) | more than 12 years ago | (#4027366)

... 20 years ago, (ye gads). It is OK, but not anything special. About the only special feature it has is the builtin COMPLEX type. Beyond that, you're in just another procedural language, and an old one at that.

The problems you described in C/C++ are probably mostly inherant to C. C is not type strict, so it lets you shoot yourself in the foot (or head) a lot.

What it sounds like you want is a strongly typed and type safe language. That would catch most of your problems, assuming your're just writing algorithms and not trying to interface to strange API or hardware.

PASCAL/MODULA-2/-3, or ADA can probably do what you want, and have GCC frontends available. These languages usually have runtime checks for safety, but after debugging, you can usually optomize them out for a production release.

So over all, go compiled, go type safe, go modern/OO if you can.

hmm perl (0, Flamebait)

josepha48 (13953) | more than 12 years ago | (#4027367)

perl has loops and it does computation..

perl -e ' print 5/3 ; '

will give = 1.66666666666667 on an hp...

Do you need more? Also try javascript as it can do loops and computation, pseudo-objects, etc...

Re:hmm perl (0)

Anonymous Coward | more than 12 years ago | (#4027409)

LOL, How the f*ck did this get modded up???

Re:hmm perl (0)

Anonymous Coward | more than 12 years ago | (#4027452)

Somebody please mod this as "funny". I can't imagine anyone would be retarded enough to have been serious when writing this.

Don't complain about C! (1, Interesting)

ngtni (470389) | more than 12 years ago | (#4027369)

C is older than Fortran (developed in the early 1970s I believe); age of language should have absolutely nothing to do with your choice.

And it seems that C does all the things you describe (mainly that it's used in high-end commercial apps etc).

Of course FORTRAN may be just as reasonable a choice (I've never used it), but I'm just suggesting you dig a little deeper before throwing out C (and others) from your shortlist.

And finally, if you are doing some "heavy duty computing", you can completely rule out scripting languages.

Re:Don't complain about C! (2, Informative)

owlmeat (197799) | more than 12 years ago | (#4027402)

C is not older than Fortran. Fortran dates back to 1954, when K & R were probably toddlers.

Re:Don't complain about C! (1)

ngtni (470389) | more than 12 years ago | (#4027437)

Whoops. My bad. :(

Thanks for the correction. And for the thought of K&R as wee nippers!!

Re:Don't complain about C! (2)

Eharley (214725) | more than 12 years ago | (#4027434)

I believe that the poster is referring to F77 as being 25 years old. Fortran was the first programming language.

Re:Don't complain about C! (1)

owlmeat (197799) | more than 12 years ago | (#4027493)

No, assembly language was the first programming language. Machine language might arguably be the first before that.

Re:Don't complain about C! (0)

Anonymous Coward | more than 12 years ago | (#4027476)

Fortran was developed prior to that. I believe there are arguments between Fortran and COBOL as to which was actually the first HLL ever created.

FORTRAN is a must learn language! (5, Funny)

teamhasnoi (554944) | more than 12 years ago | (#4027374)

Why? You ask?

Approximately 8000 years from now, when the date flips on December 31, 9999, I predict widespread panic and failure of computer systems all over the world. Since these 8040± year old systems will run on FORTRAN, it is imperitive that we all learn FORTRAN and teach it to our children. This oral tradition will save the human race when these systems fail to roll over the date on December 31, 9999.

You must act now! Only YOU can prevent Y10K!

Re:FORTRAN is a must learn language! (1)

Ziviyr (95582) | more than 12 years ago | (#4027470)

You must act now! Only YOU can prevent Y10K!

Bleh, year would take up too much of my calendar at that point. I say we roll over at 8999.

where my dad works (1)

odenshaw (471011) | more than 12 years ago | (#4027379)

my dad says that the "old guys" have problems talking with the new guys because the "old guys" are all fortran , and the new people dont know it. i think that they are in the process of converting the fortran code into c/c++, so i think you would be an asset if you knew both.

FORTRAN is alive and well in HPC space (5, Interesting)

Deagol (323173) | more than 12 years ago | (#4027381)

I work for a High Performance Computing center at the university which employs me. A good percentage of the code people write (or acquire and maintain from some government project) is FORTRAN. There are compilers for every major OS we support, and they are used.

Saddly, there's no GNU (or other Free) FORTRAN 90 compiler that competes well (or at all) with the commercial ones.

Let's have a look, shall we? (0)

Anonymous Coward | more than 12 years ago | (#4027392)

http://www.tiobe.com/tpci.htm [tiobe.com]

  1. Java (pad)
  2. C (more pad)
  3. C++ (still padding)
  4. Perl (guess)
  5. Basic (spacing)
  6. HTML (PAD!)
  7. PHP (wasted space)
  8. SQL (however you choose to pronounce it)
  9. Delphi/Pascal
  10. XML (padding)
  11. C# (d flat, etc.)
  12. JavaScript (ECMAScript, whatever)
  13. Python (Monty, Ltd.)
  14. Fortran (huh?)
  15. COBOL (no comment)
  16. Lisp (whose cruel idea for a name wast that)
  17. Prolog (SQL was better)
  18. Awk (fat city!)
  19. Scheme (more LISP?)
  20. Ada (pad pad pad)

The lameness filter has gotten just a bit too lame for its own good...

Still Alive. (2)

floopy (28552) | more than 12 years ago | (#4027393)

I use Fortran 90. That is, I port Fortran 90.

My beef with Fortran 90 is that it is very unportable. Every compiler follows the standard to some extent, and then has its own extensions. Many, but not all, support some obsolescent Fortran 77 syntax. Your best bet, if you want to achieve portability, is to use Intel's Fortran 90 compiler; it is the strictest.

As for Fortran 90's use, it is used very much by scientific and mathematical types who do parallel programming. I'm working this summer at a ``high-performance computing'' lab, and of three scientific applications I've looked at, all three have been written in Fortran 90. I can understand why. Dynamic matrices are *so* much easier. But if you write or find a good C++ class for dynamic matrices, then you might not need Fotran 90.

Still alive - also C (1)

olympus_coder (471587) | more than 12 years ago | (#4027405)

Many developers at my school use Fortran. There are many very mature compilers with lots of optimization. MPI was developed with Fortran in mind. In short it is a good language for optimization.

However, C has received alot of attention in the area of optimization in the last 10 to 15 years. It is not at the level Fortran is at (mostly because it has some features that kill some optimizations) but it is also very good. There are also a healthy set of developers here developing in C.

Basicly, I think the problem you want to solve will dictate the language. There are some things that C is just going to to much better (anything that requires lots of dynamic memory for example) than Fortran. For more static problems (working with a latice of known size for example) fortran may be the best choice.

Matlab.... (0)

Anonymous Coward | more than 12 years ago | (#4027407)

You need to learn Matlab a bit more... Looks like you dont have a clue...

fortran is old (0)

Anonymous Coward | more than 12 years ago | (#4027411)

i did some work for a optimization research center a year ago and rather than use fortran, we wrote hybrid programs with C++ and matlab, and we found that they were faster than similar programs written in fortran 99% of the time. as to the expense of matlab, there are plenty of free copies floating around on the web

~steve

Just in case... (1)

heneon (570292) | more than 12 years ago | (#4027412)

...the site gets slashdotted and and google cache is too busy, here is a google mirror [alltooflat.com]

which to choose (1)

mike77 (519751) | more than 12 years ago | (#4027413)

Ok in college I did a TON of coding in fortran for courses and research. I also learned c and C++. The key thing here is that the ONLY time you want to use Fortran is for Crunching numbers to high degrees of accuracy and if you're not a big coder. If you're really into coding, Fortran has the habit of making you pull out your hair. If yolu want any kinds of bell/whistles/ability to use character variables, use c or c++. Fortran has it's purpose, and right now it's only purpose is high accuracy computing.

That's just my opinion, I could be wrong....

seems like your looking for... (1)

Mandelbrot-5 (471417) | more than 12 years ago | (#4027414)

Lisp. I can do anything you want it to, quickly.

errr... (1)

Mandelbrot-5 (471417) | more than 12 years ago | (#4027448)

IT... it can do anything you want it to... I should drink more coffee before I post...

Re:seems like your looking for... (0)

Anonymous Coward | more than 12 years ago | (#4027500)

I agree ... except for the "quickly" part. Lisp bigots who claim/think Lisp is as fast as C are smoking weed. Its simply not true. And For numerics, Fortran rapes C -- so Lisp ... forget it.

fortran joke (1)

zrodney (253699) | more than 12 years ago | (#4027419)

hey I get to post my favorite fortran joke
about variable naming.

"God is real; unless declared integer"

my other favorite math joke is
"what's purple and commutes?"

On languages and Fortran. (5, Informative)

McDoobie (409584) | more than 12 years ago | (#4027423)

Different languages have different strengths and weaknesses. I use Fortran, C, Ada95, and Ocaml interchangeably for different tasks. Often times linking the object files into a single executable.
Fortran, designed for mathematics and engineering, obviously excels at that job. You might want to consider writing the "intensive" parts of your application in Fortran and then linking it with modules written in another language such as C or Ada.
I've found that C is perfect for handling the I/O routines for such apps, but my Ada libs are ideal for doing memory managment and when the code outgrows the practical limitations imposed by Fortran.(Note: Interfaces.C and Interfaces.Fortran).
Likewise Ocaml tends to fit around anything with a minimum of hassle.
Of course, this is just a subjective evaluation derived from my own experiences. However I would encourage you to experiment to find the combination that works best for you. As we all should know "Theres more than one way to do it."

I'm sorry if this post seems somewhat vague, but it would be rather hypocritical of me to outright prescribe a certain language or tool when I personally have a tendency to float around and use whatever tool is most convenient.

NiCad

Good Fortran Book (1)

hypermodernist (226007) | more than 12 years ago | (#4027424)

Fortran was one of the first programming languages I taught myself in preparation for an engineering contest in High School.

The book that I used to learn this great language is "Fortran 77 Programming w/ An Introduction to the Fortran 90 Standard" by Ellis, Published by Addison Wesley.

I have the second edition of this book and not only is it a great programming book but a great Math book as well teaching such concepts as Data Fitting by least Squares approximation and the Newton-Raphson method for solving non-linear equations. (Using the first derivitive of an equation to approximate a root.)

This book put me well ahead of the people in my calculus classes.

Good Fortran 77/95 Compilers? (1)

citanon (579906) | more than 12 years ago | (#4027425)

G77 works great, but what about ifc (Intel Fortran Compiler)? Anybody tried using it? I tried using ifc (free Linux version) to compile some of my Fortran 77 code, but the program crashes on writing to and from internal files. Is ifc only compatible with Fortran 95? Is G77 compatible with Fortran 95? Anybody know other good free compilers?

You're a fuckin moron!!! (-1, Flamebait)

Anonymous Coward | more than 12 years ago | (#4027428)

Fortran sucks dick big time. I'm a C++ guy, and if you can't hack it, then you are stupid! Anyone can learn C++, it's not rocket science! Why don't you see a mohel, and get circumcised you sorry ass bitch? That fix your complaining incompetent ass and give you something else to worry about.

Use Maple (2)

swagr (244747) | more than 12 years ago | (#4027432)

It will export your script as C.

Re:Use Maple (2)

swagr (244747) | more than 12 years ago | (#4027501)

It will export your script as C. ...and Java and Fortran.

From the websites www.maplesoft.com and www.mapleapps.com:

The new CodeGeneration package provides routines to translate "numeric" Maple procedures and code, such as expressions, lists, arrays, rtables, and lists of equations, to Java code. This new package also contains improved versions of codegen[C] and codegen[fortran]. You now have several options to choose from when translating Maple code to Java, C or Fortran code that provide greater control over how analysis and translation of types are performed. Maple 8 has extended the external linking capability with the ability to link to static Java methods.

FORTRAN is very much alive (1)

twem2 (598638) | more than 12 years ago | (#4027435)

I know people who only write FORTRAN code. They need the speed which the heavily optimised compilers provide (they use it for simulation of stellar evolution and planetary evolution)
Its still taught to many Physics students at Cambridge University due to the speed and wide availability of scientific libraries.

In the Smithsonian (1)

jazman_777 (44742) | more than 12 years ago | (#4027440)

It's in the Museum of American History. I saw McCracken's _FORTRAN IV Programming_ or whatever it is, in the IT section in the basement. I learned Fortran with that book! Dang, it's old, and so am I!

fortran 90 and modern computing (1)

cyberwinds (222742) | more than 12 years ago | (#4027441)

The DOC institute I am working at uses F90 to develop FMS (Flexible Modeling System) for the purpose of climate research. The NCAR/NOAA uses F90 in their latest CAM2 (Community Atmospheric Model v2). So it seems pretty safe for me to say that F77/F90 is still very active and is a proven tool in the academic environment.

Good with cheetohs too! (0)

Anonymous Coward | more than 12 years ago | (#4027444)

I still turn to FORTRAN when I have a linear programming problem. There aren't too many simplex solvers out there and most of the good ones I know of are in FORTRAN libraries. In some ways more modern languages just don't go the extra mile on the obscure math and as we all know math doesn't go out of style.

Yes, it's worth wile (1)

unoengborg (209251) | more than 12 years ago | (#4027449)

There are still lots, and lots of libraries for
numerical analasys written in Fortran.
So if you intend to use it for somthing like that
it's a good idea to learn it.

Octave (1)

Density_Altitude (250074) | more than 12 years ago | (#4027458)

If the only thing you hate in Matlab is the price, give octave [octave.org] a try!

This is a really ignorant/uninformed question. (3, Insightful)

Wakko Warner (324) | more than 12 years ago | (#4027464)

Fortran is used HEAVILY in very specialized industries -- almost any mechanical design or scientific modelling program has some Fortran code in it.

What do you want to do with it? Model fluid dynamics? Do structural or materials analysis? (Such software already exists.) Or do you simply want to find a better way to encode your DivX files?

It appears to me as though you are trying to select the proper tool for driving nails into wood, while looking in the screwdriver section of the hardware store. If you need to ask why you should learn Fortran, you probably shouldn't learn it.

- A.P.

The hell with Fortran (0, Flamebait)

Cro Magnon (467622) | more than 12 years ago | (#4027466)

COBOL rulez!

always remember (-1, Offtopic)

Anonymous Coward | more than 12 years ago | (#4027473)

Fortran is
Fort + ran

and is named in reverence for Pearl Harbor day

Not Really (1)

briancnorton (586947) | more than 12 years ago | (#4027474)

I've had to do some fortran, and I cant see ANY benefit from using it over something like mathematica or maple for modeling or computation. The price tag isnt that high, and if you're a student, you can usually swing a free copy of one or the other if you look hard. Using fortran, you're going to spend five times as long and get something that might run differently on your development platform than your processing platform. Perhaps you need to specify your task better. "demanding optimization tasks and heavy computations" is vague.

Fortran vs. C/C++ (1)

death00 (551487) | more than 12 years ago | (#4027477)

Learning a new language isn't going to help you avoid debugging. C can do anything Fortran can do (but not vice-versa!) Fortran is a simple language to learn, but so is C. Mastery of either is difficult. Because is it so popular, the support base for C is much larger than for Fortran, so I would suggest sticking with it.

What is your application? (0)

Anonymous Coward | more than 12 years ago | (#4027486)

You don't say what kind of programs you want to write. For general-purpose programs you're worse of in Fortran than C/C++.

Your mention matlab and the netlib, which suggests you're doing numerical stuff. For that kind of program Fortran is indeed still very much alive, mainly because of the efficient compilers, the good support for array manipulation, and the enormeous amounts of legacy code.

You also mention recursion. If you're working on tree-like data structures Fortran is not so great. In that case a functional language such as ML or Haskell can be a very good choice. As a bonus, functional languages are often very comfortable to program in, since a lot of irrelevant detail is silently handled by the language.

why not C? (2)

4im (181450) | more than 12 years ago | (#4027490)

A friend of mine is very much into computer simulations of physics and chemistry - he writes his own code in c / c++, and so manages to do on a (heavily optimized) Linux PC what his colleagues using FORTRAN still need Crays to run. All the difference is that he can use custom datastructures that FORTRAN (and the existing libraries) does not offer him.

Matlab and Octave (2)

Vireo (190514) | more than 12 years ago | (#4027491)

If you need to do numerical linear algebra (vectors and matrix), nothing beats Matlab. But as you said, Matlab costs a bunch of money. Maybe you'd be interested in Octave [octave.org] , an open-source, Matlab-like and mostly Matlab-compatible scripting language / interpreter.

Physics and other legacy code (2)

Soong (7225) | more than 12 years ago | (#4027492)

My dad is a computational physicist. He works with some codes that are k*100,000 lines of FORTRAN. Mostly f77 too.

Once upon a time, Cray had a really good automatically vectorizing compiler for FORTRAN and a mediocre C compiler. The Killer App stuck.

The word on the street (from my dad) is that new physics codes are being written in C/C++. So, maybe in 20 years most of the old FORTRAN will be replaced.

I've tried to get my dad to learn more C/C++, but he plans to retire before that's necessary.

I use FORTRAN daily but not for long =P (1)

iamwoodyjones (562550) | more than 12 years ago | (#4027495)

Only learn it to convert it...

I've begun writing a perl converter it convert my company's routines that doesn't mangle the C code like the fortran2c program. Fortran 90 is a bit better than Fortran 77 but only because of the C work around features in the compiler. I also have to disagree about the performance of Fortran compared to C in math heavy routines. I've been having better performance on my math routines after they've been converted to C.

Reasons why not to use FORTRAN:

Lack of structures, classes, and a lot of OOP that C/C++ have. Even though Fortran 90 has memory allocation and dynamics, think about how Fortran 77 and g77 don't!

Not convinced that it isn't for you!? Then try the fact that Fortran passes ALL variables by reference only! Excellent isn't it?

Still not convinced not to use it for big projects yet? Try that since everything is pass by reference it has no pointers.

Try making linked lists/trees and stuff out of it easily!

The only thing it has going for it is the fact that you can pass variable length arrays into a function like so:

func(array,m,n)

double precision array
integer m,n

-------

Don't let that fool you into thinking it's robust! You can do that in C although a bit of ugly pointer arithmetic is involved.

Continuing... If you accidently mistype a variable the compiler will go ahead and create that variable implicitly based on its first letter to determine its primative data type instead of reporting an error!

Seriously, C can do all the stuff it can do and then some.

Fortran isn't so bad (1)

mthiel (21378) | more than 12 years ago | (#4027503)

I've been using MS Visual Fortran for several weeks now, and it's able to make all the same GUI components I'm used to using in other languages. And, with the Calculator OCX, I'm even able to do math!

This is stupid beyobd measure... (0)

Anonymous Coward | more than 12 years ago | (#4027507)

Can you read your iPAQ when the battery is dead? I can't. And as good as my iPAQ is for some things, that screen is just too damned small for reading.

I much prefer books. You can annotate the hell out of them. Books don't crash. Books don't have issues with "alternate" operating systems. Books aren't subject to the whims of some funky piece of software that might just decide to stop working.

And most importantly, when was the last time you replaced the missing leg on that old couch with an iPAQ?
-- "It's just this little chromium switch here..."
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?