Forgot your password?
typodupeerror
Sun Microsystems Programming IT Technology

Sun Releases Fortran Replacement as OSS 233

Posted by ScuttleMonkey
from the going-backward-while-moving-forward dept.
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 discussion has been archived. No new comments can be posted.

Sun Releases Fortran Replacement as OSS

Comments Filter:
  • by gardyloo (512791) on Monday January 15, 2007 @05:13PM (#17618922)
    In a hundred years, programmers will be using a language that's completely unrecognizable to modern users -- and it will be called "Fortran".
    • by Harmonious Botch (921977) on Monday January 15, 2007 @05:17PM (#17618970) Homepage Journal
      Yep, programming languages advance by evolution, not intelligent design.
      • Re: (Score:3, Funny)

        by celardore (844933) *

        Yep, programming languages advance by evolution, not intelligent design.


        Thanks for shattering my illusions. I thought programming languages were as they were, are, and always will be. I'm going to sue you.
      • by soliptic (665417)
        Offtopic: Brilliant sig :)
      • Re: (Score:3, Funny)

        by Mister Whirly (964219)
        "And on the 7th day God created Cobol, when he should have been resting..."
    • by EmbeddedJanitor (597831) on Monday January 15, 2007 @05:29PM (#17619152)
      I used fortran quite a lot around 25 years ago. Sure it had some oddball limitations and wierdness, but it is damn fast and quite efficient for some coding purposes.

      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.

      • by mhore (582354) on Monday January 15, 2007 @05:36PM (#17619234)

        I used fortran quite a lot around 25 years ago. Sure it had some oddball limitations and wierdness, but it is damn fast and quite efficient for some coding purposes.

        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.

        It shouldn't surprise you... but I use fortran quite a lot today. A lot of the oddball limitations and weirdness are gone in Fortran 90/95... though I still use Fortran 77. It is still an amazingly useful and fast language to code numerical stuff in. Yes indeed. No need for any math.h in this programmer's world! I just hope this Fortress business is just as fast as fortran, because if it's not... you won't see many fortran guys switching over. The main reason (as far as I'm concerned) that we're still using it is that it is fast, and simple. OOP belongs in business... not in Molecular Dynamics.

        Mike.

        • OOP belongs in business... not in Molecular Dynamics.

          Yes, because in physics, nothing is like anything else. (rolls eyes)

          • Re: (Score:2, Insightful)

            by mhore (582354)

            OOP belongs in business... not in Molecular Dynamics.

            Yes, because in physics, nothing is like anything else. (rolls eyes)

            Nah, that's not what I'm saying. It's just that OOP can sometimes obscure what's going on and just add unneeded complexity to a program. I had a friend do some Monte Carlo stuff, and he used all kinds of OOP in his code, and it was done in a sane way. But trying to debug that code was hell. There's a place for everything, and I'm not convinced that simulations are the place for it.

            Mike.

            • Re: (Score:3, Insightful)

              An OOP program that follows good object-oriented design principles will actually be very easy to debug.

              Naturally in many types of scientific programming, object-oriened design isn't strictly necessary and can get in your way. Most of these programs are simple programs designed to do one task -- calculate this or simulate that. But as you get more and more complex, with lots of little discrete parts that need to interact in specific ways, object-oriented design is, IMHO, the only way to go.

              The problem with
              • Re: (Score:3, Insightful)

                by conradp (154683)
                OOP is not just for "business programming" and GUIs, it's actually perfect for large-scale simulations. Simulations have events and objects and forces and flows and all of these are very well modeled by objects. The sort of "units consistency" and dimension and bounds checking that Fortress wants to embed in the language can all be done in C++ with cleverly-designed template classes.

                If debugging is hard it can be for a couple of different reasons. You may have poor debugging tools. Or the object abstraction
        • > OOP belongs in business... not in Molecular Dynamics.

          Because Molecular Dynamics doesn't deal at all with self-contained interacting entities!

          Chris Mattern
        • by spagetti_code (773137) on Monday January 15, 2007 @06:55PM (#17620532)
          I know that Fortran has a good reputation for speed...

          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.

          • 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.
            What would one such complex operation be?
          • by mjc_w (192427) on Monday January 15, 2007 @09:20PM (#17622394)
            Another possibility is that the program used a lot of indices (for 1 and 2 (or more) dimensional arrays) and the fortran version had subscript checking on. My experience is that subscript checking can add (undex VAX VMS) up to 20 to 30 percent to the run time. My experience is also that this catches at least 1/3 of my errors and is definitely worth it.

            Fortran (and Ada) are languages that understand arrays.

            In C, an array is a pointer, an offset, and a prayer.

      • Re: (Score:3, Insightful)

        Try do anything useful in 57 lines with today's languages.

        Given that DeCSS can be written in six lines of illegible Perl [cmu.edu], I shudder to think of what a Perl coder could accomplish with 57 lines...

        -Stephen

      • 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.

        You've never tried to write anything in Perl, have you?
      • by repvik (96666)
        Pah! That's nothing. You didn't put any limitations on linelength, so a perl one-liner can do pretty damn much ;-)
  • Wellllllll... (Score:3, Interesting)

    by SatanicPuppy (611928) * <Satanicpuppy@g m a i l .com> on Monday January 15, 2007 @05:15PM (#17618948) Journal
    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.
    • Re: (Score:3, Funny)

      by metamatic (202216)
      Perhaps by benefiting from the lessons learned with Java, they mean they're going to plan ahead and have just the one implementation of each major data structure, rather than (for example) 4 different array implementations.
      • Re: (Score:3, Insightful)

        by kaffiene (38781)
        WTF?

        You may as well say the STL is bad because it gives you multiple data structures!

        Only the basic array is part of the Java language, all the other structures are library based (exactly like C++ with STL!)

        Talk about FUD
    • by drgonzo59 (747139)
      It's not really a Fortran-esque language. If you would have clicked the link to the project page you would have noticed that...


      The language tries to mimic mathematical notation and thus it wants to appeal to scientists more than anyone else. You if you are a regular programmer that does web development or database or anything except scientific computing, there is nothing for you to see here, move along. You can still safely continue using Java or C++.


    • Re: (Score:3, Interesting)

      by geoff lane (93738)
      Fortress doesn't look anything like Fortran.

      The source form looks more like Algol60 printed on a flexowriter (all aged programmers will recognise this blast from the past.) There is some resemblence to BCPL. But the language is much more complex than anything most people will be familiar with.
      • actually seems more APL like than Algol like to me but I don't pretend to be more than
        a minor hack in either.
        • APL? Gag..I remember that... IIRC, Algol60 was the first block structured language? Been about 28 yrs since Programming Languages class...
  • 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!
    • Read the FAQ (Score:5, Informative)

      by symbolset (646467) on Monday January 15, 2007 @05:20PM (#17619016) Journal
      The FAQ [sun.com] gives this pdf example [sun.com]

      This one looks like a winner.

      • Re: (Score:3, Interesting)

        So they're going to include, what, a LaTeX implementation so programmers can make their symbols look right?
        • Re: (Score:3, Informative)

          by msuzio (3104)
          Actually, yes, that's exactly how they are doing the mathematical notations inside the source code. I thought that actually quite clever!
          • by owlstead (636356)
            Hopefully with some kind of wysiwyg kind of IDE, because the main reasons of the mathematical notation of source code is for the programmers themselves. If they are staring at tagged ASCII or Unicode, it doesn't make much sense. Allthough checking the correct working of the code would be interesting.
        • by Coryoth (254751)
          So they're going to include, what, a LaTeX implementation so programmers can make their symbols look right?
          In a sense, yes. The real question, however, is why this wasn't done earlier? Sure we have to type in code in ASCII because we're stuck with keyboards to enter it with, but that doesn't mean the default view has to be ASCII. Really, why not let your IDE render it into proper mathematical symbols for you? As a mathematician it looks damn appealing to me.
          • Re: (Score:3, Insightful)

            by glwtta (532858)
            Really, why not let your IDE render it into proper mathematical symbols for you? As a mathematician it looks damn appealing to me.

            Because as programmers, we'd rather not have what essentially is a whole new edit-compile-debug cycle just to type the damn code. IDEs are great, and they vastly improve productivity, but they start to hurt productivity if they are required to do something with your code.
            • by Coryoth (254751)

              Because as programmers, we'd rather not have what essentially is a whole new edit-compile-debug cycle just to type the damn code. IDEs are great, and they vastly improve productivity, but they start to hurt productivity if they are required to do something with your code.

              I was rather expecting the IDE to render it on the fly as you enter it, which, really, makes it no harder to deal with that mistyping a variable name (easier, in fact, given that if mistyped it won't render to the appropriate symbol). You c

    • by gardyloo (512791) on Monday January 15, 2007 @05:21PM (#17619020)
      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

    • by nuzak (959558) on Monday January 15, 2007 @05:23PM (#17619044) Journal
      http://research.sun.com/projects/plrg/PLDITutorial Slides9Jun2006.pdf [sun.com]

      Fortress uses a lot of unicode mathematical operators, which slashdot will quite pitifully fail to display.
      • Re: (Score:3, Insightful)

        Fortress uses a lot of unicode mathematical operators, which slashdot will quite pitifully fail to display.

        And most keyboards will pitifully fail to type, in any straightforward and reliable way.

        And most monitors will fail to display unambiguously, in any straightforward and reliable way.

        Programming should be based on mathematics, not written in it -- and that's from someone who writes specialist mathematical libraries for a living. Seriously, if TeX is the least friendly programming environment I h

        • by Goaway (82658) on Monday January 15, 2007 @06:09PM (#17619732) Homepage
          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.
        • by Coryoth (254751)

          And most keyboards will pitifully fail to type, in any straightforward and reliable way.

          They did think of that you know. They provide ASCII equivalents, akin to TeX, that let you type stuff in, and then it gets rendered to the appropriate symbol.

          Programming should be based on mathematics, not written in it -- and that's from someone who writes specialist mathematical libraries for a living. Seriously, if TeX is the least friendly programming environment I have ever encountered in serious use, and the averag

        • Re: (Score:3, Insightful)

          by aztektum (170569)
          Coming from someone who hasn't written more than a couple shell and Python scripts, why does it feel like there is nothing but resistance from the "seasoned" IT crowd over new ways of trying to do things? I'm not saying either way is better or worse, but suggesting a new method, and from my already admittedly newbie viewpoint, more "human readable" methods (in this case assuming one is a pure math junkie), for coding would seem far more natural and easy to accomplish tasks in. Inevitably though, someone al
      • Re: (Score:3, Funny)

        by glwtta (532858)
        Fortress uses a lot of unicode mathematical operators

        This is also something I'm really looking forward to in Perl 6; I'm guessing the conversation went like this:

        Guy: "Here's an idea - let's require the coders to use a lot of characters that aren't on the keyboard!"
        Other Guy: "Brilliant!"

        I'm sure productivity will skyrocket with this invention.

        They also seem to have jumped on the (to me) unfathomable "using braces to clearly delineate code blocks is evil!" bandwagon. I guess it's what all th
    • by rrohbeck (944847)
      From The Fortress Language Specification, version 1.0alpha [sun.com]:

      component HelloWorld
      export Executable
      run(args) = print "Hello, world!"
      end
  • This is fake... (Score:5, Insightful)

    by Anonymous Coward on Monday January 15, 2007 @05:24PM (#17619060)
    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...
    • by owlstead (636356)
      Getting code quickly developed and creating components out of used code is as much important with high end computing as with other disciplines. What good is a 128 node supercomputer if it stands there waiting for someone to implement the code? And as there are Java to native compilers out there, there will be native compilers for Fortress as well. Even if there aren't, the JVM (which is what the current version runs on) is pretty fast. It's faster than C++ in many cases (e.g., when C++ programmers start to
  • APL (Score:3, Insightful)

    by RAMMS+EIN (578166) on Monday January 15, 2007 @05:25PM (#17619082) Homepage Journal
    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.
    • Re: (Score:3, Informative)

      by Coryoth (254751)

      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.

      I think that depends on what you mean by mathematical notation and symbols. In the case of Fortress that means Unicode input and the ability to actually render code, thus x^2 gets rendered with a proper superscript 2, array indexes a[i] get rendered to ap

      • by RAMMS+EIN (578166)
        ``for instance the floating point type is denoted by a blackboard bold R (as in the usual symbol mathematicians use to denote the reals)''

        I'm not sure that's a good idea, either, since reals and floats are different things. Reals have infinite precision, whereas precision is finite for floats.

        ``The result is that you can enter mathematics via the keyboard and have it rendered in code with captial sigma for sums, standard arrows and cartesian product symbols to denote function signatures, actual square root
        • Re:APL (Score:4, Interesting)

          by Coryoth (254751) on Monday January 15, 2007 @06:33PM (#17620124) Homepage Journal
          I'm not sure that's a good idea, either, since reals and floats are different things. Reals have infinite precision, whereas precision is finite for floats.

          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, that's what I imagined it would be like. I also imagine actually _typing_ something that looks a lot more like regular program code, so that you still have to learn an alternative to math 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.

          Also, the result will look like what one would see printed in a math textbook, as you said which is (1) not what the programmer typed, and (2) horribly obfuscated to me (which is a personal thing, but applies to many people).

          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.
    • "However, I still think this is a really bad idea."
      Persisting in using an argument, despite the fact that you yourself have demolished its validity, is also a bad idea.
    • by rbanffy (584143)
      Noooo!

      APL is my textbook example of a write-only language.

      I couldn't figure out in the afternoon what the program I wrote in the morning did (actually, the problem was "how it did it").

      There must be a better way.
  • by locokamil (850008) on Monday January 15, 2007 @05:27PM (#17619118) Homepage
    "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.
  • by msuzio (3104) on Monday January 15, 2007 @05:28PM (#17619130) Homepage
    For those who won't bother to read the article, Fortress was designed by Guy Steele [wikipedia.org], 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.
    • Re: (Score:3, Insightful)

      by Coryoth (254751)

      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.

      I lack the fortran experience (I've only done the bare minimum of fortran programming), but I do have the math, and from my perspective, having read through the fortress spec (PDF) [sun.com] (okay, I skimmed it - it's huge) it looks like an excellent language for any mathematics intensive work (and indeed physic

    • by plopez (54068)
      Steele.... Fortress.... nice....
      • by belmolis (702863)

        Right. And following another tradition, the various versions of Fortress will be called: Graphite, Gypsum, Apatite, Quartz, and Diamond or something like that.

  • Multi-core? (Score:3, Insightful)

    by Nasarius (593729) on Monday January 15, 2007 @05:38PM (#17619262)
    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?
    • Re:Multi-core? (Score:4, Insightful)

      by IvyKing (732111) on Monday January 15, 2007 @05:47PM (#17619356)
      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.
      • by DrDitto (962751)
        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.

        And Sun's latest 8-core jewel, the Niagara T1000, has a _single_ floating-point unit shared by all eight cores. Running scientific codes on the Niagara is not a good way with keeping all 8 cores busy!
      • by Nasarius (593729)
        And it differs from 8-way multiprocessor systems how? Did you even read my post?
    • Re:Multi-core? (Score:4, Informative)

      by Cassini2 (956052) on Monday January 15, 2007 @06:02PM (#17619618)
      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.
      • Re: (Score:3, Insightful)

        by AchilleTalon (540925)
        "Fortress is proposing a language to automate that scaling."

        I beg your pardon, if we need to use and learn a specific language to take advantage of the multicore technology, it is mainly because it is not automatic.

        So, I guess learning the language itself is only part of the problem. The other one will be to be able to identify by hand what can take advantage of the multi-cores and how.

        I don't see were there is a big advantage to use this language for the users, maybe Sun is seeing much advantages to it

      • by TeknoHog (164938)

        Fortran does some level of parallelization since F90. Specifically, it has builtin matrix/vector operations, which are inherently parallel operations, so they can be readily parallelized by a compiler. In 2001 I wrote some code at CERN for a dual Pentium III, and the PGF90 compiler made good use of SMP and MMX/SSE.

        Of course, there's a lot to improve when it comes to parallelizing code besides vectors/matrices, and I assume Fortress is addressing some of these issues. In any case, a higher-level language

      • by owlstead (636356)
        Fortunately, home pc's like to run multiple things in parallel. Especially if flash or other memory takes over from HDD's for running the OS and applications, there will be something to do for multi-processors. The state of current programs is pretty abysmal regarding multi-threading. Many programs do things in batches instead of delegating tasks to other threads. And for many programs this makes sense, because any (parallel) IO would kill the performance anyway. If that goes away, there is quite a lot to o
    • by RAMMS+EIN (578166)
      ``What does "designed specifically for multi-core processors" mean?''

      I assume they really mean multiple cores, whether they are on a single CPU or not. As far as that goes, there is a lot to gain over languages in common use today, as these typically express algorithms in an imperative fashion where only one thing happens at a time.
    • by iluvcapra (782887)

      Please read about parallelization [wikipedia.org] and how many algorithms, particularly ones that act over sets of data, can be broken into "parallel" and "serial" elements. If your language implies the two and provides syntax to richly describe these, the compiler can smartly break your program down into threads (or procs or distributed procs) and make the parallel ops magically happen at once, without the programmer dealing with threading or synchronization or any of that other junk (and getting a huge boost in performa

  • [Rocking back and forth and mumbling]
    Find a happy place.
    Find a happy place.
  • by zappepcs (820751) on Monday January 15, 2007 @05:44PM (#17619318) Journal
    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.

    • i totally agree... (Score:2, Informative)

      by andyr0ck (847274)
      ...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? [sunsource.net]

      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.
  • by namtro (22488) on Monday January 15, 2007 @05:47PM (#17619362)
    Robert O'Callahan (a core Mozilla developer) had some fairly insightful comments [mozillazine.org] 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!!
  • 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.
    • by rbanffy (584143)
      Would something designed to replace APL actually replace something?

      Will it make any sound?
  • by XPulga (1242) on Monday January 15, 2007 @06:11PM (#17619766) Homepage
    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 ?

    • by Coryoth (254751) on Monday January 15, 2007 @07:13PM (#17620768) Homepage Journal

      It seems that the only Fortran-esque side of Fortress is that it is aimed at scientific computing and number-crunching.

      Which is to say, its aimed at the niche that Fortran, despite how old and creaky it is, still rules. The world of programming has come a long way since Fortran, but nothing matches it for scientific computing and number crunching. To be honest that's about the only aspect of Fortran worth keeping...

      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.

      You say that like it's a bad thing! Eiffel is, surprisingly enough, a very nice language to work in. I'd be very happy with a language targetted toward numerics (And with real math style notation to boot!) that was as pleasant to work with as Eiffel. Design by contract is a good thing, and importantly it is optional. You can specify a contract or property for a function, but you don't have to. The ability to flesh out an API with contracts and properties is a damn good thing - something far too many languages lack.

      means that people will write more to achieve the same thing with some guarantee of correctness.

      Contracts and properties are optional. If you don't want correctness guarantees then don't use them. On the other hand if you would like a little more insurance... well then they're very useful indeed.

      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.

      Again, specification of units is optional. If you don't want to worry about units then don't use them. Then again if you're writing some physics code then having the sanity check of unit analysis to make sure everything is working properly is a damn useful thing to have available. Having dimensions and units as not more onerous than having types - it is simply another level of checking available; the benefit here is that the units are optional: if you don't want the extra checks, don't use them.

      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).

      Well that depends on who you are really: Fortress looks incredibly readable to me. Then again I am a mathematician and look at math, formatted in exactly that way, all the time. If you spend all day looking at Java and C code then sure, it's going to look unfamiliar to you. Then again, you probably aren't in the target market for a language aimed specifically at scientific computing. To me a lot of C looks awful and can be hard to read because of its requirement that you pound everything into basic ASCII. It really all depends on what you're used to. As to how easy it is to enter - sure it would be nice if it was straight TeX - but then it is so similar that there is really no problem learning it. If you actually do a lot of math then you can name all those symbols straight away, and what you have to type in to get the symbol is simply it's name. Again, not ideal for people who don't do a lot of math, but then that isn't the target audience. If you do much math then the symbols look right instead of being the ugly ASCII kluges of other languages, and

      • Re: (Score:3, Interesting)

        by XPulga (1242)
        The major issue with Eiffel was the lack of APIs (or bindings) for useful stuff when the language appeared. The bindings came too late. My point in comparing Fortress to Eiffel was pointing out that Fortress may be closer to Eiffel than to Fortran, and the press release from Sun mentions Fortran alone.

        Fortress may be wonderful for the scientific part, but I do hope Sun finds a way to keep the GUI/OS-interaction code in some other language (Java is reasonable), making it possible to build applications from F
        • by Coryoth (254751) on Monday January 15, 2007 @08:35PM (#17621862) Homepage Journal
          My point in comparing Fortress to Eiffel was pointing out that Fortress may be closer to Eiffel than to Fortran, and the press release from Sun mentions Fortran alone.

          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 do hope Sun finds a way to keep the GUI/OS-interaction code in some other language (Java is reasonable), making it possible to build applications from Fortress and non-Fortress parts. Treating mouse and other UI events with that math notation won't be fun, even for the most devout Mathematician.

          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.

          I didn't see in the specs (I skimmed through it quickly, could be my fault) how Fortress is meant to parallelize computations more efficiently. From all I saw, I assume each method runs atomically in a single thread and parallelization of methods is be based on the contracts.

          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 am a Perl programmer, and I don't think Perl is that unreadable. In fact, I agree with most of its design. I am happy that now we can point the finger at something else when someone complains about "weird syntax" and "too many operators".

          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.
    • 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.
      Cool! Should you or I tell NASA?
    • by mritunjai (518932)

      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

  • by deadline (14171) on Monday January 15, 2007 @06:12PM (#17619794) Homepage

    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 [clustermonkey.net] articles on ClusterMonkey.

  • by Anonymous Admin (304403) on Monday January 15, 2007 @06:19PM (#17619916)
    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.

  • INCONCEIVABLE (Score:2, Interesting)

    by OpenSourced (323149)
    ...and is published under the BSD license.

    -...You keep using that license. I do not think it means what you think it means [slashdot.org].

    • by Aladrin (926209)
      I don't have any mod points, so I'm going to express my regard in text.

      Excellent reference!
  • Go read about it... (Score:5, Informative)

    by mritunjai (518932) on Monday January 15, 2007 @07:21PM (#17620938) Homepage
    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
    • by bunyip (17018)
      Integration with typography? Mathematica does this, and also has multi-paradigm support. I've been using Mathematica for years and really like being able to type readable equations, use Greek letters, etc.

      That said, typing of variables is kind of interesting.

      Alan.

Old programmers never die, they just become managers.

Working...