Hacker News new | ask | show | jobs
by alexatkeplar 4181 days ago
That sounds very tempting! What's the dependency bundling story like with F#/Mono - what would be the equivalent to assembling a fatjar for the JVM, or indeed `go build` for Go?
1 comments

As in a self executing file? Not the standard deploy story, but is in theory possible on Mono with a combination of F# compiler options to compile in all dependencies, and mono's "ahead of time (AOT)" build.

It does mean that you lose a number of traditional clr advantages such as JITting - and I have to admit that I haven't tried this route myself. Almost all of the clr code I've written has been server side.

Ah - not necessarily a self-executing file - a fatjar still depends on having the JVM installed on the box. I guess I was asking if there is a way of packaging an F# script or app so that it can be installed on a server with a simple wget from Bintray? So all dependencies vendored in.
F# applications are compiled to ordinary .NET executables, so you can look at how other .NET applications are packaged on *nix. Basically, you can package them as you would any other software, though it would help to either have .NET executables configured to launch with mono via binfmt_misc (on Linux), or have a small launcher script to do the 'mono myapp.exe' invocation.
As mentioned above, fsx files can be executed with the correct #! if fsharpi is installed.
I'd probably look into Paket (a nuget aware package/source dependency manager) for that. Sorry for the short answer, New Years celebrations beckon!