English 中文(简体)
Hosting .fsx scripts inside larger applications
原标题:

I want to expose my F# libraries as a scriptable tool for data manipulation.

Optimally, I want this scripting facility to not require a full F# install with fsi and so on.

Is there a way to link into the FSI libraries to execute scripts from F# code? My google-fu is failing me on this one, and the F# sources for fsi are a bit tangled.

最佳回答

No, there s no hosting API for F# interactive sessions. fsi.exe itself is factored into a lightweight client process that handles the interaction, and a background server process that does the heavy lifting. (The server process is built atop the F# compiler DLLs, which is why you need a full install of F#, and not just the F# runtime redist. BTW, exposing an API for this is a somewhat common request and something the F# team will consider for a future release.)

That said, if clients do have a full install of F#, then you can always just ship some scripts (.fsx files) clients can #load, or libraries (.dll files) that clients can #r to start off their interactive fsi sessions. This is definitely a good mode for using F# interactive for data manipulation and exploration.

问题回答

暂无回答




相关问题
What does it mean "to write a web service"?

I just asked a question about whether it was possible to write a web-page-checking code and run it from free web server, and one supporter answered and said that it was possible only if I run "a web ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Dynamically building a command in bash

I am construcing a command in bash dynamically. This works fine: COMMAND="java myclass" ${COMMAND} Now I want to dynamically construct a command that redirectes the output: LOG=">> myfile.log ...

Why does Scala create a ~/tmp directory when I run a script?

When I execute a Scala script from the command line, a directory named "tmp" is created in my home directory. It is always empty, so I simply deleted it without any apparent problem. Of course, when I ...

Ivy, ant and start scripts

I have a project that uses ant to build and ivy for dependencies. I would like to generate the start scripts for my project, with the classpath, based on the dependencies configured in Ivy, ...

热门标签