New toolbox: original F # modules or ported from OCaml

A new language is interesting only if I can use the new libraries. So I want to know what new libraries I can use in .net with F #. If F # is compatible with ML / OCaml, then which Ocaml libraries are ported to F # or can be ported. I am interested in signal processing / voice recognition, logical programming / SLD libraries in .NET.

+4
source share
3 answers

I do not think that there are a large number of ML / OCaml libraries ported to F #. The F # programming style has become completely different than what people use in ML / OCaml, so the ML / OCaml library will be a little alien to F # programmers.

However, there are several projects that cross-compile in F # and OCaml. The F # compiler itself was like that, and I believe that MSR Slayer is (or was?) Another example. However, for the two domains you have specified, I do not know a single F # library.

If you are interested in compiling OCaml code in F #, here are a few things that might help you:

  • The greater the language restriction when porting OCaml code to F #, the greater the likelihood that F # does not support functors.
  • Some standard OCaml libraries are implemented in the FSharp.PowerPack.Compatibility.dll assembly (which can be found in F # PowerPack )
+11
source

F # includes some ports from OCaml, such as the Set and Map collections. Other specific data structures can be easily ported, such as purely functional data structures from Chris Okasaki, an excellent monograph . I described a heap type based on its left heap here in OCaml and F #. I published a more detailed review of several purely functional heaps in F # here . However, F # does not seem to be able to express abstract data structures (e.g. catenable lists abstracted over queues) very well, because it lacks a higher order module system that Okasaki uses so skillfully. I also posted some other translations, such as converting Burrows-Wheeler to OCaml and F #. OCaml has many amazing libraries, such as ocamlgraph , but it is often difficult or impossible to translate directly, because F # lacks main language features such as higher order modules, polymorphic options, macros, etc.

Microsoft was the first adopter of F #, of course, moving its TrueSkill Coherent PDF ranking system to manage PDF documents is one of the few base codes compiled in both OCaml and F #.

We've converted the Smoke Vector Graphics engine and our (discontinued) Presenta application from OCaml to F #, and now it is sold as F # for rendering . Of course, the translation was simplified due to the similarities between the languages, but it still took several days, and we will not be able to cross-compile.

Most of the code translated from OCaml to F # is commercial, because F # is primarily a commercial language, and therefore, commercial users of OCaml are ported to F #. The open source F # code may begin to be removed after the recent version of F # itself as OSS, but it is too early.

As for your specific topics (for example, signal processing), I'm not sure what to recommend after binding to FFTW, which I described in Visual F # 2010 for technical computing .

+11
source

I found one library that supports the development of evolutionary algorithms.

F # Artificial Intelligence Library - Implementing Differential Evolution: http://fsai.codeplex.com/documentation?version=11

about evolutionary algorithms: http://en.wikipedia.org/wiki/Evolutionary_algorithm

There is also a short discussion about the "good to have" SLD-resolution of the engine in F # (and one link to the prologue is ported to C #) http://cs.hubfs.net/forums/thread/6676.aspx

What all...

+1
source

All Articles