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."
Yep, programming languages advance by evolution, not intelligent design.
This one looks like a winner.
Help stamp out iliturcy.
program Hello_world
### The following is the canonical 'Hello World' program implemented in fortress ###
load fortran77
print *,"Hello World"
fortress.obfuscate
end program Hello_world
http://research.sun.com/projects/plrg/PLDITutorial Slides9Jun2006.pdf
Fortress uses a lot of unicode mathematical operators, which slashdot will quite pitifully fail to display.
Done with slashdot, done with nerds, getting a life.
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...
"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.
Thanks for shattering my illusions. I thought programming languages were as they were, are, and always will be. I'm going to sue you.
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.
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
Not sure if you're being sarcastic or ignorant. One of Sun's latest jewels is the 8 core Niagara and it behooves them to come up with ways of keeping all 8 cores going on a processor.
Robert O'Callahan (a core Mozilla developer) had some fairly insightful comments on Fortress a couple of days ago I personally found interesting...
Multi-processor programming is becoming a real force / nightmare. Dual-core is only the beginning. At the rate AMD and Intel are moving, we will have Niagara like chips in our home PCs. Already, AMD and Intel have quad-core processors, and are talking about dual quad core (8 core) computers. The average program just can't scale well to 8 cores. Most programs, programming languages, and algorithms don't scale well with increasing the number of cores.
Fortress is proposing a language to automate that scaling. They are discussing language features to deal with multi-CPU systems, where multiple memory banks are present. AMD's multi-CPU system's (Opteron) with HyperTransport each have a separate memory banks for each processor. It makes sense to allocate the half of the array used by CPU #1 in CPU #1's memory bank, and the other half used by CPU #2 in CPU #2's memory bank. Then the threads should be split so first pair of cores on CPU #1 work in the first half of the array, and the second pair of cores on CPU #2 work on the activities related to CPU #2. Currently, all these multi-processor mapping activities happens manually, and it really sucks. It would be wonderful if programming languages supported this activity automatically.
I don't know if Fortress is the answer to the multi-core / multi-CPU problem. I hope something is. The computing world needs a solution.
And most monitors will fail to display unambiguously, in any straightforward and reliable way.
You may not have noticed, but cutting-edge monitors nowadays are capable of displaying graphics, and not just text.
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
In Fortress the basic types ZZ and RR provide arbitrary preceision integers and floats. If you want a specfied precision then you need, say, ZZ32 or RR64 etc. So in fact it is the correct notation.
Yes, but it is well documented and, if you are at all familiar with mathematics, straightforward to learn (indeed, you almost don't need to learn - instinctually typing in whatever you would say works for most symbols. It is no harder to learn than TeX - easier if you already know TeX in fact.
Sure, it applies to many people. None of them are in the target market for Fortess though. Fortress is aimed at mathematicians and scientists - the sort of people who are still using Fortran - and for them the math notation makes the whole thing much, much easier to read. It all depends on what you're used to. If you're a programmer who reads C and Java all day then that probably looks good to you. If you spend much of your time reading math papers, however, then mathematical syntax looks far more natural the the elaborate and obfuscated look of C. Congratulations, you're not the target market for the language - that doesn't mean it isn't a great idea that will be of great value to many other people.
Craft Beer Programming T-shirts
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.
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