[nycbug-talk] instructions for building f# on freebsd

Siraaj Khandkar siraaj at khandkar.net
Sat May 18 22:57:57 EDT 2013

On May 16, 2013, at 1:50 PM, Pete Wright <pete at nomadlogic.org> wrote:

> On 05/16/13 10:41, Marc Spitzer wrote:
>> basic instructions for getting f# up and running on freebsd:
>> http://fsharp.org/use/freebsd/
>> thought it might be useful to some,
> I am new to F# - is there a good tutorial and/or good usecase of when I would want to use F#?  It looks like it is built on top of Microsoft's .NET CLR - is that a good thing?
> I'm not trolling - just hoping someone on the list has experience with this lang that provide some insight :)

F# is one of the latest additions to the ML [1] family of languages, which are strongly, statically-typed, mostly-functional [2] languages, sporting Hindley–Milner type inference (so type-annotations are optional).

It was originally modeled on OCaml [3], though leaving-out some important features (like functors and first-class modules) and adding a bunch of .NET-specific stuff.

I'm a regular user of OCaml and spent only a few concentrated days exploring F# - my impression was that if you're hopelessly stuck in MS/.NET world - F# is quite a treat. For a *nix user, OCaml is probably a better choice [4] - you get the unadulterated ML goodness (functors), excellent Unix interface [5] and compilation down to blazing-fast native code.

To be fair, F# did introduce some very cool new features like concurrency primitives - async tasks. You can also do shared memory parallelism (due to .NET's concurrent GC) whereas in OCaml you'd have to fork for parallelism (threads are supported, but bounded by the single-core GC). That said, last I checked, both .NET and Mono were using stop-the-world GC, whereas OCaml's GC is incremental and optimized for lots of short-lived allocations (to better support functional style) so it gives a much more predictable latency profile.

Sorry to make this more of comparison than just about F#, but my point is that MLs are awesome and F# is the best ML experience on Windows, while Unix users have better options.

[1]: https://en.wikipedia.org/wiki/ML_(programming_language)
[2]: Imperative features, like loops and muatable data types are supported, though unidiomatic in most cases.
[3]: http://ocaml.org
[4]: SML would also be great, just with much less libraries
[5]: http://caml.inria.fr/pub/docs/manual-ocaml/libref/Unix.html

Siraaj Khandkar
.o.  o.o  ..o  o..  .o.
..o  .oo  o.o  .oo  ..o
ooo  .o.  .oo  oo.  ooo

More information about the talk mailing list