7 ms·
the Microsoft .net core compiler is FOSS, but if that doesn't count there is also mono.
by gameswithgo 5y ago
the Microsoft .net core compiler is FOSS, but if that doesn't count there is also mono.
- BBC-vs-neolibs 5y ago... to be clear, Mono does not provide F#. Microsoft releases F# for Mono.
- UK-Al05 5y agoF# and .net core are completely open source. You don't need mono.
- ur-whale 5y ago> the Microsoft .net core compiler is FOSS Oh, I didn't know that. Very cool. Can I apt-get the toolchain? [EDIT]: and for those interested, here's the github repo: https://github.com/dotnet/fsharp/ https://github.com/dotnet/fsharp/
- DeathArrow 5y agoYes, you can.
- ur-whale 5y ago> Yes, you can. I can indeed. apt-get install fsharp (although it pulls in 300MB of dependencies :( ) This is great. How times have changed!
- chusk3 5y agoI wouldn't do this, as this is the mono bundle of fsharp. The blessed/supported way to go now is to install the dotnet-sdk packages[1] and then use `dotnet fsi` for interactive work, and `dotnet build/run/etc` for project-based work in F#. 1: https://docs.microsoft.com/en-us/dotnet/core/install/linux-debian https://docs.microsoft.com/en-us/dotnet/core/install/linux-d...
- ur-whale 5y agoI'll give it a shot, but TBH, I like the no-brainer apt-get way. Goal is not to spend a couple of hours fighting to install the stack, but to use the time learning about the language. apt-get gives me that. MSFT-specific stack install tool don't really sound like a no-brainer, but I'll look anyways.
- aloisdg 5y agoAs a fellow linux user, my package manager does the job for both the runtime and the sdk. It should work for yours too.
- orra 5y ago> Oh, I didn't know that. In fact, F# has been open source longer than Roslyn (the C#/VB.NET compilers) and .NET Core! There used to be a funny split in the repos: Microsoft had their own visualfsharp repo, and there was a blessed fork which was more community and Linux friendly.
- ddek 5y agoYou can, but I wouldn't. The dotnet CLI contains its own version manager, so you need to have more precise control over the versions of the runtime & sdk you have installed. You can have multiple versions installed simultaneously, dotnet then chooses the runtime based on the project. IME linux package managers mess this up bad. Fortunately MS provides a better alternative: the dotnet install scripts. [0] Make sure you add the install directory to $PATH. [0] - https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-in...
- ur-whale 5y ago> so you need to have more precise control over the versions of the runtime & sdk you have installed Oh, this doesn't sound good at all. One thing I positively hate about Java is always having to worry about which version of this and that (sdk, vm, headless, etc...) you run on top of. The claim of write once run anywhere has not really happened in my book. Even C++ is better in that regard these days. I am certainly hoping the .NET / F# environment didn't inherit that attribute from the Java ecosystem, that'd be a major downer. My goal is only to learn F# / experiment with it, and I'm certainly hoping never to have to spend a second thinking about "versions of the runtime & sdk".
- piaste 5y agoIf you just want to learn, install the latest version of the SDK (.NET 6, currently in RC) and it will be able to build code or reference libraries from every older framework version. Runtime versions are something you worry about when you are actually deploying / distributing applications.
- 7331 5y agoI did some tinkering with F# this week, and found out you can use this command (even from a Windows desktop): dotnet build "myproject.fsproj" --runtime linux-x64 --self-contained ...it will compile your project with dotnet bundled together. So you don't need to "install" dotnet on the destination systems running your program. It worked on some Debian and CentOS/cpanel servers that I have (never installed dotnet on them). That command alone gives you a whole directory of files that you need to deploy. But I think it's also possible to have to completely bundle all of it into a single file. I think this guide tells you how to do that: https://www.hanselman.com/blog/making-a-tiny-net-core-30-entirely-selfcontained-single-executable https://www.hanselman.com/blog/making-a-tiny-net-core-30-ent... ... haven't tried it yet though.
- enricosada 5y agoSee https://dotnet.microsoft.com/download https://dotnet.microsoft.com/download Download the Sdk, who bundle both the runtime and the C#/F# compilers (everything you need to build a program) and the `dotnet fsi` REPL All of that is open source, developed in different repos and bundled there in a nice installer. Support all platform and can cross compile for other OS Please do not use Mono, because contains an old version of F# and lots of quirks to use. The current way is .NET (was called .NET Core, renamed recently) because is cross platform by design, and eventually Mono will be merged 100% there. Plus is tons more performant and better tooling