jdh30
The F# News blog has had many applications on it:
http://fsharpnews.blogspot.co.uk/2010/12/most-popular-f-samp...
So has Phil Trelford's blog:
And many others.
I just watched it. Great to see somebody else trying but this is no more advanced than OC4MC and they are using Fibonacci as an example when I already used a complete parallel ray tracer with shared memory when benchmarking parallelised HLVM code:
http://flyingfrogblog.blogspot.co.uk/2010/01/naive-paralleli...
They've got a lot of catching up to do before they can overtake and I'm concerned that retrofitting a modern GC on a 20th century VM will never work because OCaml has such poor locality of reference due to massive unnecessary boxing.
> TBH I don't miss multithreading in OCaml,
I said multicore, not multithreading. I dot lots of concurrency and parallelism in F# without having to worry about multithreading.
> if you write applications which expose some sort of API over a socket that will scale to clusters not just multicore.
You're proposing deep copying all of your data structures when multicore programming is all about sharing data between cores using shared caches. If you copy then your identical copies of the data compete for space in a shared cache.
> And you can program those kinds of applications quite nicely with Lwt or Async already.
Lwt and Async are for concurrent programming. In particular, they are extremely slow.
> Regarding FFI, ocaml-ctypes is interesting, it allows you to bind to a C library at runtime using pure OCaml (and a wrapper around libffi), or to generate C stubs.
Ctypes looks great. Didn't exist when I last used OCaml.
> Regarding OpenGL there is a new binding called 'tgls' for OpenGL 3.x/4.x (besides LablGL) that is mostly generated from the XML description of the OpenGL APIs.
Has anyone tried to write anything much using it?
I prefer this:
http://www.ffconsultancy.com/languages/ray_tracer/code/1/ray...
to this:
http://www.ffconsultancy.com/languages/ray_tracer/code/1/ray...
I must disagree. I once translated a significant (15kLOC) commercial OCaml code base into F# and took the opportunity to quantify the syntactic benefits as <3% by volume of code. The flipside is that F# misinterprets code pasted from the web, rendering most code on the web useless. That is a crippling deficiency of F# in my eyes and a major reason to go back to the superior OCaml solution.
I'm still waiting for OCaml to get decent multicore support, decent Windows support and an FFI that doesn't suck donkey brains through a straw (which is why so many OCaml libraries, like OpenGL bindings, suck beyond belief). Multicore became ubiquitous 10 years ago. Last I looked the vestigial OCaml community still hadn't noticed.
Luke Hoban's F# product team in Redmond develop F# with the research team in Cambridge UK continuing to evolve it.
> Some of the reasons given for F# are not a direct customer benefit. Example: show that CLR can support languages other than C#.
F# was not the second language after C# to run on the CLR.
> Given the question here on HN, it's not obvious to some people why Microsoft invested so much in the language.
The investment is tiny for Microsoft and has already paid off by drawing people into the Windows platform who then buy Visual Studio 2010 in order to use F#.
Purely functional programs have a lot of problems with parallelism. If you want to parallelize your F# code effectively, you write Cilk-style code with heavy use of mutation and not Haskell-style code with purely functional data structures.
Read this: http://flyingfrogblog.blogspot.com/2010/06/regular-shape-pol...
Also, F# executables tend to be orders of magnitude smaller than OCaml executables but, of course, the F# ones need a CLR installed to run them.
I suggest you think carefully about when HLVM's fat references are a disadvantage compared to the alternatives and why. The real reasons are not at all what you're thinking (or what I thought for a long time).