Questions tagged [fsi]

fsi is the REPL (read-eval-print-loop) for the F# programming language.

fsi is the REPL (read-eval-print-loop) for the F# programming language.

fsi can either mean standalone console application or F# Interactive embedded in Visual Studio , that allow you to interactively send F# commands that are subsequently compiled and executed. The interface then replies with the type signature and result values, if any.

After which you are presented with a prompt and can start all over again (previously defined functions and variables are retained until you reset the session).

This is a good way to spike functions or do exploratory development.

MSDN info: http://msdn.microsoft.com/en-us/library/dd233175.aspx

81 questions
2
votes
1 answer

FSharpChart with Windows.Forms very slow for many points

I use code like the example below to do basic plotting of a list of values from F# Interactive. When plotting more points, the time taken to display increases dramatically. In the examples below, 10^4 points display in 4 seconds whereas 4.10^4…
imateapot
  • 141
  • 1
  • 1
  • 8
2
votes
1 answer

F# interactive GC heap dump

I was investigating an F# script running via FsiAnyCpu which was using a lot of memory. I took a heap snapshot using PerfView and it looks like the majority of high count nodes were rooted in…
eulerfx
  • 36,769
  • 7
  • 61
  • 83
2
votes
0 answers

error FS0193: internal error: Could not load type 'Position' from assembly 'FSI-ASSEMBLY, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'

When I build my solution, everything goes fine. However, when I try to run a script in the FSI I get the following: error FS0193: internal error: Could not load type 'Position' from assembly 'FSI-ASSEMBLY, Version=0.0.0.0, Culture=neutral,…
NoIdeaHowToFixThis
  • 4,484
  • 2
  • 34
  • 69
2
votes
1 answer

How to undefine in fsi?

I re-defined ref, for example, by mistake. And it replaced the default ref. Is it possible to remove my definition and restore to the original one without restart?
ca9163d9
  • 27,283
  • 64
  • 210
  • 413
1
vote
2 answers

Using F# Interactive in emacs?

Ok, so I just got the F# extension working for emacs. I now need to figure out how to make the scripts I write actually execute. In Visual Studio, to run them you just highlight, right click, and choose "Send to Interactive". I do not expect that…
MirroredFate
  • 12,396
  • 14
  • 68
  • 100
1
vote
2 answers

Trouble using 'expect' for automatic testing of interative dotnet program

I'm working on an automated testing of an interactive script in fsharp, and I'm using brew's version of expect on a osx system. It works with mono's fsharpi, but not with dotnet fsi, and I don't understand the difference. I want to automatize…
Jon
  • 163
  • 1
  • 8
1
vote
1 answer

F# FSI "Unexpected compiler generated literal in interaction" with "#I __SOURCE_DIRECTORY__"

If I create a new F# file 'Test.fsx' in VSCode with the line #I __SOURCE_DIRECTORY__ attempting to run the code in FSI generates the error Test.fsx(2,4): error FS0010: Unexpected compiler generated literal in interaction. Expected incomplete…
roboleek
  • 11
  • 2
1
vote
1 answer

Upload image with PHP curl with parameters gives '415'

This is the description of what I need to do (I know it's vague, but it's all I got): Images can be uploaded by sending an HTTP PUT request to the image URI. The body of the request should contain the image data or if the last modified date of the…
1
vote
1 answer

F# interactive - "reset session" hotkey

I have assigned a new Global hotkey to VS 2010/Options/Environment/Keyboard/OtherContextMenus.FSIConsoleContext.ResetSession But it seems to work only in the FSI window. How can I make the hotkey work globally?
Oldrich Svec
  • 4,191
  • 2
  • 28
  • 54
1
vote
0 answers

F# FSI and .Net Core. Can't find the right System.Runtime.dll

I'm trying to start a .net core app within fsi but I keep getting this error. I tried #r "{the right System.Runtime}" but it still fails. Any ideas? > System.TypeLoadException: Could not load type 'System.Threading.CancellationToken' from assembly…
Ray
  • 2,974
  • 20
  • 26
1
vote
1 answer

FSI WPF Event Loop

Is the WPF event loop in this answer still a good one for FSI (besides rethrow which is now reraise)? The answer is from 2008 and I'm not sure if there are any "better" implementations around. If not what would one be? My understanding is that the…
Stephen Swensen
  • 22,107
  • 9
  • 81
  • 136
1
vote
0 answers

Close Wpf Application in FSharp Interactive

I'm currently trying some F# programming together with WPF. I'm trying to make use of FSI as much as it's possible, but have no idea how to work with it if I want to run some WPF windows. After creating a window with simple let myWindow =…
Bartek
  • 149
  • 3
  • 13
1
vote
0 answers

Xamarin.Forms in F# Interactive

By referencing the default WPF DLLs, it's pretty easy to do anything you could do using code-only WPF: #r "Accessibility.dll" #r "PresentationCore.dll" #r "PresentationFramework.dll" #r "System.Core.dll" #r "System.Data.dll" #r "System.dll" #r…
Overlord Zurg
  • 3,430
  • 2
  • 22
  • 27
1
vote
1 answer

Exception using XPlot from fsi

I'm trying to run a simple example of Xplot from FSI. I've installed all the nuget packages of XPLot and I copied the example in their hello world page. #r "../packages/Google.DataTable.Net.Wrapper.1.0.0/lib/Google.DataTable.Net.Wrapper.dll" #r…
vgaltes
  • 1,150
  • 11
  • 18
1
vote
1 answer

Releasing SQLite resources in F#

Consider the following F# script, which creates a simple SQLite database and table, and then should delete it. However, the SQLite obejct doesn't seem to be disposed of properly and isn't releasing its lock on the file. #r…
user1393477
  • 845
  • 10
  • 13