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."
This one looks like a winner.
Help stamp out iliturcy.
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.
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
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
And I think that's reasonable, given that the role that Fortress is intended to play is far more important (especially given that it is a niche role) than what Fortresses ancestor languages are. It owes as much to Scala (at least it looks that way - I have no idea whether Scala was actually an influence) as it does to Eiffel. What counts is what it is intended to be used for - which is scientific computing and HPC where parallelisation counts: that is to say the niche currently filled by Fortran.
I honestly have no idea what you mean here. I expect GUI/OS-interaction code would most likely look an awful lot like Scala, which is hardly a problem. The math formatting onlycomes in when actually doing mathematics. The rest of the time it's essentially just an OO language like any other, and won't look any different to any other language. Treating UI events will be straightforward.
There are a number of things that Fortress does to make parallelisation work. For instance for loops are parallel by default, as are vector operations. Try looking at the "atomic" keyword to see more on how control of serial and parallel operation is handled. If you want easy parallelisation via each method working in a separate thread and contracts determining wait conditions then look at Eiffel and SCOOP: it introduces a single new keyword (separate) and allows you to do just that.
I think what you need to consider is how many operator symbols are defined by default in Fortress: it actually isn't that many. Fortress simply supports unicode and the ability to define new operators using classical math symbols - it doesn't have them all defined in the base language. Almost everything is farmed out to libraries. You may think it looks ugly and complicated compared to Perl but I (who have done a fair bit of Perl programming, and have spent time looking at Fortress as it developed) think you're being premature. See it in action or actually try using it yourself and I think you'll quickly find it is, in fact, a lot more readable than Perl.
Craft Beer Programming T-shirts