Slashdot Mirror


Microsoft Open Sources F#

aabelro writes "Don Syme has announced the release of the F# compiler source code as a code drop under Apache 2.0. He wrote, 'The F# PowerPack now includes libraries, tools and the compiler/library source code drops. I'd like to take a moment to explain the F# team's approach to this. Firstly, the source for the F# compiler in our MSI/CTP releases has been available for some time, in the releases themselves, so in that sense there's not much new in this release. Secondly, we've always made sure we have a free download binary release of F# available, and will continue to do that, and that should still be the main way you "get" a release of F#. However, we've long discussed making compiler+library source available in a different way. After some discussion, we've decided to do this via a "code drop" model, where we make available versions of the compiler+library code logically matching each release of the F# language itself.'"

47 of 212 comments (clear)

  1. So .... by Chrisq · · Score: 3, Insightful

    Where's the catch? What will you inadvertently start using that will later need licensing?

    1. Re:So .... by Anonymous Coward · · Score: 4, Funny

      It's more like that exercise machine that nobody's used in years, so somebody finally leaves it out at the curb. You can take it if you'd like.

    2. Re:So .... by Nerdfest · · Score: 2, Interesting

      Does F# compile to a stand-alone executable on any platform, or does it need to be deployed on a .net framework?

    3. Re:So .... by Richard_at_work · · Score: 4, Informative

      Its hosted on the .Net platform.

    4. Re:So .... by tibit · · Score: 4, Informative

      Not quite so. There are plenty of companies out there that use Ocaml, F#'s undermaintained cousin. Jane Street, a private investment house, is one having perhaps the biggest Ocaml codebase next to Microsoft's. I see that MS opensourcing of F# compiler will lead to perhaps well-earned retirement of Ocaml from mainstream use. I think the biggest issue with Ocaml was that it was mainly a reasearch tool, maintained by INRIA. The developers have little incentive to have Ocaml do much besides what they need for their R&D, and that's understood and I don't think there's anything wrong with that. What it leads to, though, is that Ocaml is rough around the edges, and not really ready for primetime outside of niches.

      F# should IIRC run just fine under Mono.

      --
      A successful API design takes a mixture of software design and pedagogy.
    5. Re:So .... by tepples · · Score: 4, Informative

      nobody really cares about functional languages except a few nerds.

      Nobody really cares about programming languages at all except a few nerds. As for applications, explain Jak and Daxter, the majority of which was written in a Lisp dialect called GOAL.

    6. Re:So .... by scribblej · · Score: 3, Informative

      Offtopic, but since you asked, I can explain it. They were following a cult of personality, and they got burned for it. They plan on C++ for all future projects.

      "GOAL sucks! While it's true that GOAL gave us many advantages, GOAL caused us a lot of grief. A single programmer (who could easily be one of the top ten Lisp programmers in the world) wrote GOAL. While he called his Lisp techniques and programming practices "revolutionary," others referred to them as "code encryption," since only he could understand them. Because of this, all of the support, bug fixes, feature enhancements, and optimizations had to come from one person, creating quite a bottleneck. Also, it took over a year to develop the compiler, during which time the other programmers had to make do with missing features, odd quirks, and numerous bugs.

      Eventually GOAL became much more robust, but even now C++ has some advantages over GOAL, such as destructors, better constructors, and the ease of declaring inline methods."

    7. Re:So .... by shutdown+-p+now · · Score: 3, Informative

      F# should IIRC run just fine under Mono.

      It does. In fact, if you look at the download page, Mono/Linux is an officially supported platform for F#.

      One thing that needs to be understood about F# and why the attitude there is so remarkably different is that it is, essentially, a Microsoft Research project. Yes, it was productized and shipped "in the box" for VS2010, but a large number of folks who work on it are still from MSR.

    8. Re:So .... by tibit · · Score: 2, Interesting

      I'd say that for all practical purposes, at least in my limited testing, the performance you get from the code running on CLR is not appreciably worse from what you get with OCaml's native code, so I don't see any real benefit of OCaml's native code over code running on CLR. I've found plenty of cases where CLR outperforms OCaml by an order of magnitud -- basically as soon as you use OCaml to the fullest, plenty of POD stays boxed, and everything goes downhill from there.

      --
      A successful API design takes a mixture of software design and pedagogy.
  2. Seriously, by Anonymous Coward · · Score: 2, Funny

    F### that Microsoft S###.

  3. WTF is "F#"?? by bradgoodman · · Score: 3, Funny

    Never-mind...rhetorical question...

    1. Re:WTF is "F#"?? by Anpheus · · Score: 5, Informative

      It's a functional language following in the footsteps of the ML category of languages, but written for the .NET platform. It's open source with a patent grant, and the F# team has made sure each release has both a .NET and a Mono installer.

  4. Nice, but... by cerberusss · · Score: 2, Insightful

    It's really nice they did this, and the license they chose (Apache 2.0) is very free/libre.

    But honestly... is there going to be a big community around this? I don't think so. You can say a lot about the Windows ecosystem, but "lively open source developer community" isn't one of them. So the source code is probably going to be of use for debugging purposes, or research purposes, but other than that, I can't see lots of people chipping in on the F# libs or something like that.

    --
    8 of 13 people found this answer helpful. Did you?
    1. Re:Nice, but... by jgagnon · · Score: 3, Insightful

      Maybe port it to JVM or LLVM?

      --
      Remember to maintain your supply of /facepalm oil to prevent chafing.
    2. Re:Nice, but... by cindyann · · Score: 2, Interesting

      Almost seems like their thought process is:

          "We aren't going to get more resources in-house to continue developing it. Maybe if we throw it over the wall we'll get something (for free) from the Community."

    3. Re:Nice, but... by NevarMore · · Score: 5, Insightful

      So all those Windows projects on Sourceforge aren't part of a lively community? All of the open source web projects that make sure they work on Windows browsers aren't lively?

    4. Re:Nice, but... by Richard_at_work · · Score: 3, Interesting

      Not to mention the projects on Codeplex, which is pretty much Windows only...

    5. Re:Nice, but... by slapout · · Score: 3, Insightful

      There are actually several .NET tools that are open source like NHibernate and NUnit.

      --
      Coder's Stone: The programming language quick ref for iPad
    6. Re:Nice, but... by tibit · · Score: 5, Informative

      No, this isn't a prelude to cancellation. MS is a heavy in-house F# user. All of static verification tools that Windows kernel team uses are AFAIK written in F#, and every driver that's signed by MS was tested using a static analysis tool written in F#.

      Heck, they have seen so much internal demand for F# that they developed it in the first place -- initially, their static verifier codebase was written in Ocaml. They figured there's possibly so much more to be done in that area, that they developed a whole new programming language. That's as much commitment as you can get, in my book.

      --
      A successful API design takes a mixture of software design and pedagogy.
    7. Re:Nice, but... by tepples · · Score: 4, Insightful

      Which are just clones of the original java tools, like C# is a clone of Java

      And GNU/Linux is a clone of UNIX, and Quadrapassel from GNOME Games is a clone of Tetris...

    8. Re:Nice, but... by interval1066 · · Score: 2, Interesting

      "This is a prelude to cancellation."

      Too bad, if true. From a technical perspective its a good language, a respectable entry in the world of functional languages. Its one of the Microsoft-developed tools they appear to have gotten right, in my opinion.

      --
      Python: 'And then suddenly you have a language which says "we're all stuck with whatever the whiniest coder wants".'
    9. Re:Nice, but... by cbhacking · · Score: 2, Informative

      It already is officially supported on Mono; I don't know why you'd feel it needs to be ported. Might be worth doing for fun, but you can already run F# on pretty much all mainstream OSes, not just Windows.

      --
      There's no place I could be, since I've found Serenity...
  5. Re:What is F#? by Instant_Karmma · · Score: 2, Informative

    It Microsoft's implementation of objective Caml.

  6. /. snottery by dgower2 · · Score: 5, Insightful

    Unbelievable! They start moving in a direction that they've been criticized for NOT moving in/adopting and what's the response from the /. snots? I guess it takes some honor/courage/maturity to give credit when it's due.

    --

    Proverbs 21:19 It is better to dwell in the wilderness, than with a contentious and an angry woman.

    1. Re:/. snottery by _0rm_ · · Score: 2, Insightful

      It's commendable that they would move in this direction, but history has shown us that Microsoft has a tendency to take a step forward, then another two steps back as far as the Open Source community is concerned. Does seeking royalties for companies to use Linux in their devices ring any bells?

      --
      Boredom is bliss.
  7. Re:What is F#? by Anonymous Coward · · Score: 3, Funny

    For starters, it's five semitones higher!

  8. there's always a catch by viralMeme · · Score: 2, Interesting

    There's always a catch, in this case you'll stop using other development platforms and produce apps that will only run on dotNET ..

    1. Re:there's always a catch by formfeed · · Score: 3, Insightful

      F# will be free, but you will have to pay for the full Microsoft F#$@ experience.

  9. Re:Why when we already have Ocaml? by Instant_Karmma · · Score: 5, Insightful

    Because many of us - like it or not - develop on Windows platforms. F# works better with .NET than Ocaml does.

  10. Re:What is F#? by Mouldy · · Score: 2, Informative

    I've never used it personally, but IIRC from my functional programming unit at University, F# is MS's language for the functional programming paradigm. Similar to Haskell (which is what we did study). I *think* it also has elements of other programming paradigms too, but don't quote me on that (:

  11. Re:What is F#? by MBGMorden · · Score: 5, Informative

    Very few .NET languages have strong advantages over the others aside from programmer preference. It's more about which one you like coding in, as all of them have pretty much the same capabilities.

    With that said, it appears that F# is essentially a tweaked OCaml syntax, whereas C# is a tweaked C++ syntax. It's really more about what you prefer coding in.

    I must say though, despite loving my Linux desktop at home, I work in C# a great deal at work, and I love it. I know there's a lot of MS hate on Slashdot, but their development tools are amazing. I'd do a lot more coding in Linux if I had something that was similar to (and of the same quality, which throws out things like Monodevelop) Visual Studio.

    --
    "People who think they know everything are very annoying to those of us who do."-Mark Twain
  12. F#CK Yeah by fonky · · Score: 5, Funny

    so they released the F# Compiler Kit?

  13. Re:Patents by mattdm · · Score: 5, Insightful

    Until Microsoft permanently ceases asserting software patent rights, sharing their source code is of very limited value.

    And therefore, it's interesting that the chose to use a license that explicitly offers a Grant of Patent License.

  14. Re:What is F#? by _0rm_ · · Score: 2, Insightful

    --- I'd do a lot more coding in Linux if I had something that was similar to (and of the same quality, which throws out things like Monodevelop) Visual Studio. Vim ;)

    --
    Boredom is bliss.
  15. Re:Congrats.... by zombieChan51 · · Score: 2, Informative

    I do. F# has a good size of developers using it.

  16. Re:F Pound WTF? by tigre · · Score: 2, Informative

    F-sharp (pseudo musical notation)

  17. No catch. by AnonymousClown · · Score: 2, Insightful

    Where's the catch? What will you inadvertently start using that will later need licensing?

    There is no catch. Microsoft is doing this because F# has no commercial value. Who uses F#? A couple of math/CS geeks?

    --
    RIP America

    July 4, 1776 - September 11, 2001

    1. Re:No catch. by tibit · · Score: 3, Insightful

      Ocaml, F#'s cousin, is used by a large private investment house -- Jane Street. F# itself is used in MS's static code analysis tools, like the driver verifier, and surely in a lot of in-house tools.

      --
      A successful API design takes a mixture of software design and pedagogy.
    2. Re:No catch. by Giometrix · · Score: 3, Insightful

      From my understanding there is a lot of interest in F# in financial areas.

      --
      Download free e-books, lectures, and tutorials at bookgoldmine.com
    3. Re:No catch. by shutdown+-p+now · · Score: 4, Insightful

      There is no catch. Microsoft is doing this because F# has no commercial value.

      Yup, that's precisely why F# - previously a research project in Microsoft Research - was taken up for inclusion in Visual Studio 2010, IDE support added, new documentation written and put into MSDN Library etc. Because it has absolutely no commercial value.

  18. Re:Why when we already have Ocaml? by Richard_at_work · · Score: 4, Informative

    Because you can do the bits that functional languages are good at in F#, and the bits traditional languages are good at in C#, and call one from the other without having to resort to the traditional inter-language calling methods like COM et al (not sure if I have the right example there, I never did modern application development before C#).

    Literally, with C# and F# you can just define classes in either and call them in the other language directly.

    Thats what sets this apart from Ocaml, and thats why people use it over Ocaml on .Net.

  19. Re:Why when we already have Ocaml? by tibit · · Score: 5, Informative

    Because next to F#, Ocaml frankly said sucks. And I don't mean to be a troll. Almost anything you look at in Ocaml, F# has it better. Libraries, performance, interoperability, ...

    All of the facilities of CLR are available from F# -- that includes vast core .NET libraries, all of 3rd party .NET libraries, interoperability with all of the code that runs on CLR,... To give a transportation analogy: the libraries available in Ocaml are to libraries available in F# like a car's driver is to a seagoing ferry.

    Ocaml was developed by INRIA to support their own R&D program, pretty much. There is, understandably, little incentive for them to have Ocaml do much more besides what they themselves need. It's OK, really, there's only so much you can do with limited funds and the day only being 24h long.

    Never mind that there are serious technical issues with the virtual machine that runs Ocaml bytecode, and with the runtime library that supports native-compiled Ocaml. Those issues are benign enough to allow Ocaml to be deployed in certain scenarios, but for a language platform to be widely used they are pretty much non-starters. F# runs on CLR, a platform that gets as much or more development resources allotted to it yearly than Ocaml saw through the whole of its long existence, including that of Caml-lite.

    --
    A successful API design takes a mixture of software design and pedagogy.
  20. Does this mean that.. by crf00 · · Score: 2, Insightful

    Does this mean that we can use the source code to port F# to other platform such as GCC and LLVM?

  21. Re:What is F#? by slyrat · · Score: 2, Insightful

    Forgive my lack of knowledge as Delphi developer, but what is F# and does it have any advantages over, say, C#?

    Well really the power of F# comes from the functional programming style. So there are much easier, cleaner ways to do some things in F# than C#. They both have the same capabilities, the way you implement and code them is just different. Also, with the ability to have F# and C# code call each other makes it so you can have the benefits of object oriented (C#) along with the benefits of functional (F#) while having clean code in both.

  22. Re:Great news for someone in scientific computing by zerojoker · · Score: 2, Insightful

    I agree that this is a really nice from Microsoft, but why not go for the "original", i.e. Ocaml?

  23. Re:Great news for someone in scientific computing by jeffb+(2.718) · · Score: 2, Informative

    I was intrigued with Sun's Fortress, but this has gone nowhere, and it is fundamentally flawed from the start in that it is tied to the JVM, which is no-no when it comes to high performance computing.

    How's that again? I haven't seen any indication that CLR is better suited for HPC than the JVM. Not that I've looked extensively, mind you, but it seems like the two runtimes are not that far apart.

  24. Re:What is F#? by simula · · Score: 2, Informative

    You might want to look into Qt-Creator for your cross-platform C++ development. It just so happens that it is integrated with the Qt libraries and tools quite seamlessly and makes developing applications for linux and windows at the same time a snap.

    Qt Creator