Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there F# Interactive for Linux on .NET Core, without using Mono?

I'm able to build and run F# projects with .NET Core, but unable to use or see F# Interactive with it. Is it on the roadmap somewhere?

I'm using Linux Mint 18.3

like image 202
OctarineSorcerer Avatar asked Feb 08 '18 16:02

OctarineSorcerer


People also ask

What is the meaning of F in the English alphabet?

F, or f, is the sixth letter in the modern English alphabet and the ISO basic Latin alphabet. Its name in English is ef (pronounced / ˈɛf / ), and the plural is efs. The origin of 'F' is the Semitic letter waw that represented a sound like /v/ or /w/.

What is the frequency of the letter F?

F is the twelfth least frequently used letter in the English language (after C, G, Y, P, B, V, K, J, X, Q, and Z ), with a frequency of about 2.23% in words. In the writing systems of other languages, ⟨f⟩ commonly represents /f/, [ɸ] or /v/ .

What languages use ⟨F⟩?

Other languages. In Slavic languages, ⟨f⟩ is used primarily in words of foreign (Greek, Latin, or Germanic) origin. In spoken Icelandic, ⟨f⟩ in the middle of a word is often pronounced as a v (e.g. Að sofa - to sleep).

What is F Minus?

The legendary grade of myth given by teachers to those students demonstrating a level of suck beyond imaginable. Acquiring an F minus for a grade is such a feat beyond the norm that this student must be beyond hope. Such a feat as acquiring an F- is not an easy gain, and the everyday slacker will just not do.


2 Answers

dotnet core 3 preview 3 supports F# interactive as a pure .NET Core application:

dotnet fsi --readline
like image 187
lorefnon Avatar answered Nov 15 '22 19:11

lorefnon


Yes there is, but it's hidden in a deep directory.

I have the following script in my $PATH, with name fsi, to find it and launch it:

#!/bin/sh

dotnet=/usr/bin/dotnet
fsi=/usr/share/dotnet/sdk/*/FSharp/fsi.exe

if ! [ -f $fsi ] 2>/dev/null; then
    echo ERROR Cannot find fsi.exe or more than one is present
    exit 2
fi

exec $dotnet $fsi "$@"

Result:

$ fsi

Microsoft (R) F# Interactive version 10.2.3 for F# 4.5
Copyright (c) Microsoft Corporation. All Rights Reserved.

For help type #help;;

> 1+1;;
val it : int = 2

> 

With this, you can uninstall Mono and the old fsharp package.

like image 45
Tobia Avatar answered Nov 15 '22 19:11

Tobia