Sun Releases Fortran Replacement as OSS
sproketboy writes "Sun Microsystems has released an alpha version of a new programming language called Fortress to eventually replace Fortran for high performance scientific computing tasks. Fortress was designed specifically for multi-core processors and is published under the BSD license."
In a hundred years, programmers will be using a language that's completely unrecognizable to modern users -- and it will be called "Fortran".
Much as I like Java, I'm not exactly sure how much a fortran-esqe language is going to "benefit from the lesson's learned with Java". It's apples to oranges, because of fortran's narrow focus, and equally narrow deployment base. Java's primary schtick is in the exact opposite direction, with wide focus, and deployment on a large number of systems.
I suppose increased multi-processor support would be nice. It'll all depend on performance.
ad logicam Claiming a proposition is false because it was presented as the conclusion of a fallacious argument.
Anyone wanna post a sample "Hello World" program or something? I don't see any code samples printed on the site. I wanna see what this looks like!
This one looks like a winner.
Help stamp out iliturcy.
All they do release under an OSS license is an *interpreter* of the language. This is completely worthless for high-end number crunching. Wake me up when they open source a good optimising *compiler*.
Bah... Slashvertisement...
FTFA:
``Mathematical notation: We would like to reduce the time it takes for a domain expert to turn a mathematical specification into a working high-performance program. We are examining language changes which would enable computations to be written in a more mathematical format.''
So does this mean they will bring back APL?
Personally, I find functional notation and names much easier to understand than mathematical notation and symbols. Of course, I'm not a mathematician, so I guess I'm not the target audience for this project. However, I still think this is a really bad idea.
Please correct me if I got my facts wrong.
"God is REAL unless declared INTEGER"
"Q: What will the scientific programming language of 2050 look like? A: No one knows, but it will be called FORTRAN."
"CS without FORTRAN and COBOL is like birthday cake without ketchup and mustard."
"Consistently separating words by spaces became a general custom about the tenth century A.D., and lasted until about 1957, when FORTRAN abandoned the practice."
"The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change."
I'd actually venture that FORTRAN has more jokes about it than C. I for one welcome our FORTRESS-joke-making overlords.
So, Sun sets out to do what programming languages designed since the 1960s have tried and failed. Ambitious...
Please correct me if I got my facts wrong.
For those who won't bother to read the article, Fortress was designed by Guy Steele, which gives it a good pedigree in my book. I heard his talk at OOPSLA 2006 on the language design decisions they made for Fortress, and although my Fortran (and math) experience is too shallow to fully appreciate it, I found it fascinating nonetheless.
At the very least, Sun has given people something to think about.
It's a strange world -- let's keep it that way
I wrote a Fortran program that printed out a calendar with the year in a banner font at the top. It took 57 cards (no library calls etc, beyound PRINT). Try do anything useful in 57 lines with today's languages.
Engineering is the art of compromise.
I do apologize for my mangling of the spelling of 'ambitious'. My browser went berserk and, somehow, I submitted the post while trying to correct the spelling...
Please correct me if I got my facts wrong.
What does "designed specifically for multi-core processors" mean? Has something radically changed about SMP and multithreading since Intel and AMD decided to put two CPUs into one package? I suppose there are some cache differences, but that's about it. What is it with people who have apparently never heard of any computer hardware outside the home desktop, now excitedly babbling about "multicore" software?
LOAD "SIG",8,1
[Rocking back and forth and mumbling]
Find a happy place.
Find a happy place.
Well, there's spam egg sausage and spam, that's not got much spam in it.
~= scwizard =~
In recent times, we've seen all kinds of credit given to companies that have nothing more than vaporware (I don't dare mention anything from Apple here or I'll get modded as troll) and yet Sun, like them or not, is giving back. Perhaps they are not giving back things that you will immediately use or notice, but they are giving back, making it open source, working to stay relevant. That last phrase was on purpose.
They are doing this in complete (nearly) opposition to the position that MS takes. I think Sun deserves a little credit. The did (sort of) open some of the hardware as well, and while that may not fall into hobbyists hands soon, it is a start. Opening (in any meaningful fashion) some high end hardware is a big thing.
No, I don't have tons of Sun hardware or software at home, but I do use it at work, and its incredibly stable, if not super easy to administrate.
Support NYCountryLawyer RIAA vs People
Robert O'Callahan (a core Mozilla developer) had some fairly insightful comments on Fortress a couple of days ago I personally found interesting...
Gee, how many languages now have been designed to replace FORTRAN? 10? 20? And its still due for replacement as of today!!
With this guy as project lead, you can't fail in this domain.
Their FAQ answers questions like "Is Fortress intended as a replacement for Java?" (ans: NO) But nowhere do they even mention FORTRAN. From the example code, it looks a whole lot more like APL to me.
I've seen this a couple of days before and bothered to skim through the specifications carefully hidden in the depths of Sun's site. I am not pleased with what I saw. Summarizing:
It seems that the only Fortran-esque side of Fortress is that it is aimed at scientific computing and number-crunching. Other than that, the programming paradigm of Fortress is based on object orientation and programming-by-contract. If Java smelled like Smalltalk, Fortress smells like Eiffel.
Fortress has focus on three basic things:
1) programming by contract (pre-conditions and post-conditions of a method)
2) Numerical and dimensional correctness
3) Keeping the programming language as close to mathematical notation as possible.
1) means that people will write more to achieve the same thing with some guarantee of correctness. Much like Java's enforcement of exception handling, an be easily misused.
2) means that Sun bothered to include kelvin, Pascal, meter, second, Newton and every Physical unit you can think of as language keywords, that all parameters should specify what unit they're in, and that the language will do some effort to prevent errors arising from adding oranges and bananas, or precision errors from summing milligrams to some hundreds of kilograms.
3) means that Fortress will make Perl look readable. Good part of the language specification deals on how the editor should render the source code onscreen. The logical AND operator is the upward-pointing wedge symbol of math. The logical OR operator is the downward-poiting wedge symbol. The Integer type is that special-font Z, and a real is that special-font R. The specification deals on how to represent these in an ASCII file, using a meta-language similar to TeX (but incompatible with).
Programming Fortress on anything other than Sun's own IDE will most likely be unfeasible. Think of every math operator you've seen. If you have experience with TeX/LaTeX, think of those 4 pages from symbols.dvi with all symbols you could use. Those are the Fortress operators. Sun has finally come with something mor unreadable and with more operators than Perl. And the operators aren't even ASCII, they're untypeable. The bitwise AND and OR operators are a weird thing I had never seen before (after 5 years of engineering, and 5 years as graduate student in CompSci).
That said, Fortress may even succeed as a niche programming language. But I still have two concerns left:
How will non-scientific code look on it ? Surely Fortress programs will want to open windows, and dialog boxes, access files and the network. The math-oriented syntax has all it takes to make UI programming uglier than C+Xlib.
Sun claims that Fortress is aimed at High Performance Computing. Sun released an alpha interpreter of Fortress, which is written in Java. What kind of sick language designer writes an interpreter in Java to demonstrate something related to High Performance computing ?
This announcement is great news because the parallel programming problem is quite difficult and is becoming more important as multi-core systems emerge. One important distinction that is often not made, is the difference between concurrency and parallel execution. (although the article does touch on it)
Basically, determining whether a program or algorithm is concurrent (parts can computed independently) is possible but can be difficult in some cases. Many people think that is the essence of parallel computing. It is not.
Once you have the concurrent parts, the questions becomes "whether they should be executed in parallel". The answer depends upon the ratio of computation to communication (parallel overhead). All parallel computers (and clusters) have different ratios and therefore, something that runs well in parallel on one machine, may run poorly on another.
Having a language where concurrency can be expressed and controlled, allows researchers to investigate the second issue (parallel scheduling).
If you want to read more about this kind of thing (and some other parallel programing ideas) take a look at some of the Cluster Programming articles on ClusterMonkey.
HPC for Primates. Read Cluster Monkey
A good substitute for FORTRAN is C. From the (very little) information one gets from the article, this Fortress will have ways for the programmer to select which loops will run serial and which will run in parallel. This could be done very easily with the current standard C, that's why #pragma exists.
I think people are rather overdoing this trend for creating new languages. I still have doubts whether it's better to use Perl or Python or Ruby or Lisp or PHP, each and every language has fans and detractors, each has advantages and disadvantages, depending on the application. Perhaps it would be wiser to let creation of new languages to one day when we may have a more objective way of doing it, when we have an analysis tool that will let one optimize a language design by choosing which parameters to maximize or minimize.
pgfortran produces highly optimized parallel code for running on multi processor machines and clusters. It has for years. CF90 produces highly optimized code for running on 1024 processor machines, and has for years. Neither one is an interpreter. If you want fast parallel math code, get a good compiler. There are plenty of them available, including many free ones.
We have a couple million lines of physics implemented in FORTRAN. It is an exaggeration to actually describe this as "software" in the modern sense - it is physics equations. FORTRAN has never been a well standardized language (e.g. F77, vs. many vendor extensions) and legacy techniques like "byte-parallel" coding were once commonly used but cause platform dependencies (I'm told by friends in the database realm that COBOL has analogous problems). gcc/f77 support for FORTRAN is also fading and gcc/f77 has always compiled FORTRAN at a snail's pace.
I would welcome a new option if the porting is easy. Because of the computer horsepower today, even for real-time usage, an interpreted language would work fine if callable from a C wrapper.
...and is published under the BSD license.
-...You keep using that license. I do not think it means what you think it means.
Rome taught me patience and assiduous application to detail. Virtues which temper the boldness of great, general views.
What is it with people reinventing the wheel when it comes to entering mathematical notation? Every serious mathematician, and many in CS, Physics, etc. (can't say for sure because they aren't my fields) uses Latex to write papers and communicate math in ascii. As far as I know, exactly noone uses unicode. If they are interested in adoption, why on earth not use Latex notation instead of untypeable unicode or their ascii version of it? Latex is the standard. Unicode will never be flexible enough to be as dominant. Use a subset of Latex, or any goal of making it easier for math folk to write these programs is lost.
...all i've seen Sun do over the last few years is open more things up. Solaris used to cost us money for disks; now it's free (and there's an open source version), same for Java, now it's GPL'd. Anyone like open source chips?
don't get me wrong, i don't think the sun (not much pun intended) shines out of their collective behind. there's still some stuff that grates; service plans just to get the 'recommended' patch clusters. they are moving in the right direction, as parent said.
But when I was postgrad at university, I helped a Math mate recode some department apps used in his thesis from Fortran into 'C'.
The end result is the damn stuff ran faster. I looked into it more deeply to try to understand the difference - was it that I (comp-sci major) was coding the apps more cleanly than the original math majors?
Details are lost - it was a while ago - but I do recall that the 'C' libs were doing most floating point operations faster than fortran. Not just the low level co-processor stuff, but also the more complex operations.
Surprised the heck out of both of us. I suspected at the time that it was just the variant of fortran we were running on Vax's, but didn't bother checking further.
Never. To say as such is heresy, HERESY!!! Besides this 'replacement' (I use the term laughably) bears as much in common with Fortran as PCs do with real computers and Windows does with 'operating system'. Computers should weigh at least six tons, have massive water-cooling systems and be programmed using dumb terminals with a CLI interface.
As previously noted http://it.slashdot.org/article.pl?sid=06/11/22/203 7231, Fortress was Sun's failed entry in DARPA's HPC program.
Folks,
Seriously, first go and read about it before making any comments or cracking FORTRAN jokes.
This language is unfortunately advertised as "FORTRAN replacement" though probably the only thing it shares with FORTRAN is that it is targetted at scientific computing. But that's about it!
Secondly, there is a different between language specification and implementation! The "interpreter" is just proof of concept and a fast way of giving means to people to play with it so that you can ot just try to express your computation in it, but also see it running in flesh! Though, it is primarily of interest to language designers to find out implementation quirks and iron them out as the language design evolves. A compiler is usually the final outcome, but is not the goal. The goal of language design is to address the problems in the domain it is targetted to, effectively.
I have been following the developments in Fortress community for a while and it is a very peculiar one in its own regard. Guy Steele has bettered himself again and has set some of the firsts-
1. Integration with typography system. The programs are not just typed, but typed well. You can typeset your equations. The primary symbol set is unicode (with ASCII symbols for lagacy compatibility).
2. Full support for closures, mixins etc with multi-paradigm programming support.
3. The language specification implies parallelism by default! loops are parallel, unless specified serial.
4. Units are included in the language type system. So the compiler can not just check whether you're using the right storage type (int, real etc), but also whether the calculation you're coding actually makes sense!
and many more. It is a great read for anyone remotely interested in computing, languages and software enginnering and development.
Please follow the links to the specification down in this thread and go through it, if your busy schedule permits.
Thanks
- mritunjai
pi does not equal 3.141592653589793. It has many more digits than that.
"Follow me" the wise man said, but he walked behind.
All they do release under an OSS license is an *interpreter* of the language. This is completely worthless for high-end number crunching. Wake me up when they open source a good optimising *compiler*.
It's a "draft specification" -- calm down. And an interpreter is a great first step: it makes it easy to play with the language.
If you've ever written a compiler, you know that an interpreter is just a compiler that calls eval() on the nodes of the AST, instead of emit() to generate opcodes. It's half a compiler, and arguably the more useful half.
They could have waited until they had the opcode generation and optimization working, but what would be the purpose of that? It's useful today, even if it's not super fast. Premature optimization, you know -- better to get lots of feedback about the language before you spend a bunch of time tweaking your optimizers.
The language looks like a cross between Pascal and Java, and with a Java virtual machine, it will not be fast. If HPC is the market for this language, Sun is way off.
Performance is the first and last consideration in the HPC arena. When Fortress can be compiled to machine code, then maybe it will be considered. There are already some good parallelizing compilers for FORTRAN, which are getting better all the time.
It's worth noting that Sun's Fortress project was not selected for Phase III of DARPA's HPCS project. (And for good measure, a link to a blog at Sun and an FAQ on how Fortress relates to the other HPCS languages/projects.)
Wasn't Fortress the loser in DARPA's High Productivity Computing Systems challenge?
3 7231
http://it.slashdot.org/article.pl?sid=06/11/22/20
Perhaps deriving "integer" from "commutative ring" made people think Sun went a little overboard with the OO.
C Hello World in Fortran
/)
PROGRAM HELLO
WRITE (*,100)
STOP
100 FORMAT (' Hello World! '
END
640YB ought to be enough for anybody.
Has anyone been able to do a fresh checkout via SVN since the SlashDot posting? I keep getting the following error:
svn: REPORT request failed on '/svn/fortress/!svn/vcc/default'
svn: REPORT of '/svn/fortress/!svn/vcc/default': 400 Bad Request (http://fortress.sunsource.net)
I even registered as an "observer" of the project in case that was blocking my SVN access.
I thought it'd be nice to play with it for a while... you know, before bashing it. :-)
I apologize for wasting people's time with my ignorance concerning wrappers, etc. Will this new language run legacy Fortran-77 code with minimal alteration, as I hear is the case with Fortran 90/95? It seems to me the reason Fortran is still used so much is the huge amount of legacy code and libraries that will do just about any computational task by simply understanding the input/output and cutting and pasting, without having to constantly reinvent the wheel.
I have taken a single course in C++ and learned F77 by programming in it. Comparing the two, I have to say that F77 seems more readable (as long as variable names are descriptive), as if it were simply glorified BASIC with a complex data type.
I did run into a problem once where I needed more than seven dimensions for an array, and had to come up with a function to map "composite" indices. It was then I learned that C++ can handle greater dimensions. I also had memory problems, but could always restructure things to eliminate the problem. I guess C++ would have handled this better with dynamic memory allocation, but I hear this is also implemented in the newer versions of Fortran.
Fortress is hosted within a JVM.
The possibility exists to compile one's domain-specific fortress logic to bytecode. So where the fortress paradigm is applicable, use it. But if it is more natural to develop a GUI shell around it using Java, that's an option too.
Were this option explored fully, 'jfortress' code would have access to the java class libraries, as I believe ports such as jruby, jython and the rhino ecmascript environment do.
"Equal enough" sounds like some weird animal farm invention...
exp(Pi*i) + 1 = 0 (equal)
exp(Pi) - Pi = 20 (equal enough)
exp(Pi*sqrt(163)) = 262537412640768744 (equal enough)
Equal enough is fine, but are some are more equal than others?
Fortress looks decent but wholly pointless. Numerical code these days has to co-exist with large C and C++ libraries and integrated into general purpose applications. Maybe a Fortress-to-JVM and Fortress-to-CLR compiler would be useful, but if Fortress lives in its own, separate world, they might as well not bother. As a language, I think it's unnecessarily complex. Fortran became popular because, as a language, it's dead simple; Fortress isn't.
Guy, fix Java, or start over with the next version of Java. Fortress is pointless.
I like the units capability - having done astronomy, this can be very useful.
I'd like to see matricies having all sorts of flags to specify their properties - real, complex, double precision, hermitian, symmetric, diagonal, triangular etc. Linear algebra libraries have huge numbers of routines for various combinations of these (e.g. a different routine to solve a system of equations where the matrix is diagonal than when it is not, or eigenvectors of a symmetric matrix vs an asymmetric one.) With these flags, the compiler could quietly use the correct routine. It would also know how to assign flags to newly calculated matricies, e.g. a matrix times its transpose is always symmetric.
It would also be handy to allow matricies to quietly acquire and carry alternative representations: LU factorization, eigen-decomposition/diagonalization etc. Once the LU factorization has been done, it is cached, and any later operations with that matrix which can benefit from an LU factorization make use of it. (This automatic behaviour would need to be easily overriden, for memory efficiency reasons.)
Quattuor res in hoc mundo sanctae sunt: libri, liberi, libertas et liberalitas.
There's a place for everything, and I'm not convinced that simulations are the place for it.
Um, one of the earliest OO languages was Simula (http://en.wikipedia.org/wiki/Simula). The clue is in the name, it was designed for simulation. I can write code that's near impossible to debug in any language, and OO code is no exception. Writing OO code does take a bit of practice. But well written OO code can be a real pleasure to use, very easy to read, maintain and extend.