Code Monkey home page Code Monkey logo

ifsharp's Introduction

Build status Linux macOS Windows
.NET Framework / Mono Build Status Build Status
.NET Core (experimental) Build Status Build Status Build Status

F# and Jupyter

This implements F# for Jupyter notebooks. View the Feature Notebook for some of the features that are included.

.NET Interactive (alternative)

There's related project of .NET Interactive which was inspired by this one but a completly rethought approach with integrated package management, VS Code support, and variable sharing between languages. If you're moving to .NET Core support it's definitely worth checking out. There's a great video from cartermp demoing some of the features: https://youtu.be/_QnbV6CAWXc?t=1298

Getting Started

Docker

To run using a Docker container on Linux/macOS:

docker run -v $PWD:/notebooks -p 8888:8888 fsprojects/ifsharp

or with PowerShell on Windows:

docker run -v ${PWD}:/notebooks -p 8888:8888 fsprojects/ifsharp

The container exposes your current directory as a volume called notebooks where the files get saved. Open with

http://localhost:8888

and enter the token printed by the docker container startup, or set up a password.

Notes:

  • Add -p <your_port>:8888 if a different port mapping is required.

  • If using Windows you must enable file sharing for docker on that drive.

Azure Notebooks

You can use Jupyter F# Notebooks with free server-side execution at Azure Notebooks. If you select "Show me some samples", then there is an "Introduction to F#" which guides you through the language and its use in Jupyter.

Windows Local Installation and Use

  1. Download Anaconda for Python 3.6

  2. Launch Anaconda3-4.4.0-Windows-x86_64.exe (or later exe should work, file an issue if you have issues) Click through the installation wizard, choosing the given install location. At the 'advanced installation options' screen shown below, select "Add Anaconda to my PATH environment variable". The installer warns against this step, as it can clash with previously installed software, however it's currently essential for running IfSharp. Now install.

    This should also install Jupyter: you may check this by entering 'jupyter notebook' into the Anaconda console window. If Jupyter does not launch (it should launch in the browser), install using 'pip install jupyter', or by following Jupyter instructions.

    Installation screenshot

  3. Download the latest IfSharp zip release

  4. Run IfSharp.exe (IfSharp application icon).

Jupyter will start and a notebook with F# can be selected. This can be run via "jupyter notebook" in future

Troubleshooting

If the launch fails in the console window, check that the Anaconda version used is currently added to the path. If not, uninstalling Anaconda and reinstalling using instructions 1-

macOS Local Installation and Use

  1. Install Jupyter via pip or Anaconda etc.

  2. Install Mono (tested Mono 6.6.0)

  3. Download the latest IfSharp zip release

  4. Unzip the release then run mono ifsharp.exe

Jupyter will start and a notebook with F# can be selected. This can be run via "jupyter notebook" in future

Linux Local Installation and Use

  1. Install Jupyter via pip or Anaconda etc.

  2. Install Mono (tested Mono 5.18, "mono-complete" recommended).

  3. Download the latest IfSharp zip release

  4. Unzip the release then run mono ifsharp.exe (this sets up the Jupyter kernel files in ~/.local/share/jupyter/kernels/ifsharp/)

Jupyter will start and a notebook with F# can be selected. This can be run via "jupyter notebook" in future

Linux Local Installation (HDInsights)

  1. Follow instructions to install or update Mono on HDInsights.

  2. SSH into the HDInsights cluster.

  3. Download the latest IfSharp zip release

# create ifsharp folder under /tmp
mkdir ifsharp
cd ifsharp
wget https://github.com/fsprojects/IfSharp/releases/download/v3.0.4/IfSharp.v3.0.4.zip
unzip IfSharp.v3.0.4.zip
chmod +x ifsharp.exe
  1. From the Azure portal, open your cluster. See List and show clusters for the instructions. The cluster is opened in a new portal blade.

  2. From the Quick links section, click Cluster dashboards to open the Cluster dashboards blade. If you don't see Quick Links, click Overview from the left menu on the blade.

  3. Click Jupyter Notebook. If prompted, enter the admin credentials for the cluster.

    [!NOTE] You may also reach the Jupyter notebook on Spark cluster by opening the following URL in your browser. Replace CLUSTERNAME with the name of your cluster:

    https://CLUSTERNAME.azurehdinsight.net/jupyter

  4. Click New, and then click Terminal.

  5. In the terminal window cd into the /tmp/ifsharp/ folder and using mono, run the installer:

cd /tmp/ifsharp
mono ifsharp.exe
  1. Back on the Jupyter homepage, click New and you will now see the F# kernel installed.

Screenshots

Intellisense

Intellisense Example #1


Intellisense Example #2

Integrated NuGet (via Paket)

NuGet Example

Inline Error Messages

Inline Error Message

Development Guide

Building Docker image locally

Build the container with:

docker build -t fsprojects/ifsharp:local .

Compatibility

IfSharp supports Jupyter 5.7.7 and works with both Python 2.X and Python 3.X

If you need IPython 1.x or 2.x support please see the archived https://github.com/fsprojects/IfSharp/tree/ipython-archive

Automatic Installation

Previous releases for the IPython notebook are here: release repository. Automatic installs for Jupyter may be provided in the future. Contributions are welcome!

ifsharp's People

Contributors

agnescameron avatar algunion avatar aprooks avatar arnodenuijl avatar cdrnet avatar cgravill avatar dcharbon avatar dgrechka avatar dobretzberger avatar dsyme avatar frelon avatar godu avatar jancura avatar lucymukh avatar luminescent avatar npmurphy avatar nrolland avatar pblasucci avatar prosconi avatar rickasaurus avatar rudihorn avatar smcl avatar smoothdeveloper avatar sylvanc avatar williamberryiii avatar zakaluka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ifsharp's Issues

Not all 0mq client->kernel messages are handled

Currently, only a subset of the messages from the UI to the kernel are handled. However, everything seems to work just fine.

The unhanded messages need to be evaluated so it can be determined if they should be implemented.

Cannot run commands

I have just installed iF# as described in the readme. I then run the ipython notebook --profile ifsharp command, which starts up the server. At this point, all seems to be working fine. But when I open the Feature Notebook, the following is written in the console, and nothing really seems to work in the notebook itself.

2014-10-20 19:46:39.091 [NotebookApp] WARNING | Notebook /Feature Notebook.ipynb is not trusted
2014-10-20 19:46:39.400 [NotebookApp] ERROR | Unhandled error in API request
Traceback (most recent call last):
  File "/Users/torbonde/anaconda/lib/python2.7/site-packages/IPython/html/base/handlers.py", line 336, in wrapper
    result = method(self, *args, **kwargs)
  File "/Users/torbonde/anaconda/lib/python2.7/site-packages/IPython/html/services/sessions/handlers.py", line 65, in post
    kernel_id = km.start_kernel(path=path)
  File "/Users/torbonde/anaconda/lib/python2.7/site-packages/IPython/html/services/kernels/kernelmanager.py", line 90, in start_kernel
    kernel_id = super(MappingKernelManager, self).start_kernel(**kwargs)
  File "/Users/torbonde/anaconda/lib/python2.7/site-packages/IPython/kernel/multikernelmanager.py", line 116, in start_kernel
    km.start_kernel(**kwargs)
  File "/Users/torbonde/anaconda/lib/python2.7/site-packages/IPython/kernel/manager.py", line 217, in start_kernel
    **kw)
  File "/Users/torbonde/anaconda/lib/python2.7/site-packages/IPython/kernel/manager.py", line 173, in _launch_kernel
    return launch_kernel(kernel_cmd, **kw)
  File "/Users/torbonde/anaconda/lib/python2.7/site-packages/IPython/kernel/launcher.py", line 260, in launch_kernel
    stdin=_stdin, stdout=_stdout, stderr=_stderr, cwd=cwd, env=os.environ)
  File "/Users/torbonde/anaconda/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/Users/torbonde/anaconda/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
ERROR:tornado.access:{
  "Origin": "http://localhost:8888",
  "Content-Length": "56",
  "Accept-Language": "da-dk",
  "Accept-Encoding": "gzip, deflate",
  "Connection": "keep-alive",
  "Accept": "application/json, text/javascript, */*; q=0.01",
  "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/600.1.25 (KHTML, like Gecko) Version/8.0 Safari/600.1.25",
  "Host": "localhost:8888",
  "Referer": "http://localhost:8888/notebooks/Feature%20Notebook.ipynb",
  "X-Requested-With": "XMLHttpRequest",
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
}
ERROR:tornado.access:500 POST /api/sessions (::1) 37.50ms referer=http://localhost:8888/notebooks/Feature%20Notebook.ipynb
WARNING:tornado.access:404 GET /static/components/codemirror/mode/fsharp/fsharp.js (::1) 1.02ms referer=http://localhost:8888/notebooks/Feature%20Notebook.ipynb

Can anyone tell me what is going on? I should probably tell you that I am running OS X. I have a feeling this might cause the problems.

fake install script issue

I get this error when running the cmd file. probably due to fake, I don't see versioning.
It works fine from VS though.

System.Exception: Empty Release file.
   at Fake.ReleaseNotesHelper.parseAllReleaseNotes(IEnumerable`1 data)
   at Fake.ReleaseNotesHelper.parseReleaseNotes(IEnumerable`1 data)
   at <StartupCode$FSI_0001>.$FSI_0001.main@() in C:\Users\a-niroll\IfSharp\build.fsx:line 57
Stopped due to error
Press any key to continue . . .

Installing kernels to wrong location on Mac

Description

We're installing the F# kernel to the wrong location for Mac. The root cause is that:

Environment.OSVersion.Platform

does not return Platform.MacOSX in the current version of Mono. Background to this:
http://mono.1490590.n4.nabble.com/Why-does-Environment-OSVersion-Platform-report-PlatformID-Unix-on-OS-X-td4038093.html

We'll need to perform the platform check in a different manner

Actual behavior

Jupyter doesn't allow you to load F# kernel.

Known workarounds

Copy the files yourself:
http://jupyter-client.readthedocs.io/en/latest/kernels.html#kernel-specs

Related information

  • OS X
  • Jupyter branch
  • Mono 4.2.4

#N NuGet referencing isn't supported in Include.fsx

It would be handy if #N were supported in Include.fsx. My particular use case is setting up a shared IFSharp installation that references an internal NuGet package and opens a few namespaces from that package as the shared default, rather than every notebook having to reference that package and specify the default set of namespaces to open.

Installation instructions OS X/Linux

I tried to follow the installation instructions but first got stuck because setup.exe isn't a cross-platform way of installation. Then when doing the manual installation, on step four, it asks me to open the iF# sln file, but there's no such file to open as a result of the previous commands. At least not one that I could find.

"dict" not working

I believe this is because "dict" is defined as one of the types in IF# and masks the actual keyword:

let alphabet = dict [('A', 0); ('C', 1); ('G', 2); ('T', 3)]

returns:

error FS0041: No overloads match for method 'Dictionary`2'. The available overloads are shown below (or in the Error List window).
Possible overload: 'Collections.Generic.Dictionary(capacity: int) : unit'. Type constraint mismatch. The type
(char * int) list
is not compatible with type
int
The type '(char * int) list' is not compatible with the type 'int'.
Possible overload: 'Collections.Generic.Dictionary(comparer: Collections.Generic.IEqualityComparer) : unit'. Type constraint mismatch. The type
(char * int) list
is not compatible with type
Collections.Generic.IEqualityComparer
The type '(char * int) list' is not compatible with the type 'Collections.Generic.IEqualityComparer'.
Possible overload: 'Collections.Generic.Dictionary(dictionary: Collections.Generic.IDictionary<string,obj>) : unit'. Type constraint mismatch. The type
(char * int) list
is not compatible with type
Collections.Generic.IDictionary<string,obj>
The type '(char * int) list' is not compatible with the type 'Collections.Generic.IDictionary<string,obj>'.

ifsharp.exe --install got strange FileNotFoundException on Windows

My environment is:

  • Windows 7 64bit

  • Up to date .Net environment

    C:\Program Files\BayardRock\IFSharp>ifsharp.exe --install
    
    Unhandled Exception: System.IO.FileNotFoundException: Could not find file 'C:\Pr
    ogram Files\BayardRock\IFSharp\--install'.
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, I
    nt32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions o
    ptions, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolea
    n useLongPath, Boolean checkHost)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
    FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean
    bFromProxy, Boolean useLongPath, Boolean checkHost)
       at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detec
    tEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
       at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean
     checkHost)
       at IfSharp.Kernel.App.Start$cont@227(String[] args, Unit unitVar)
       at IfSharpConsole.Program.Main(String[] args)
    

build.fsx

Invoking "build Build" (build being the script calling Fake calling MSBuild ) does not seem to actually build the projects IfSharpConsole and Kernel, although going through VS for compiling the solution does compile it. can someone reproduce ?

Custom default visualizations

Loving this - great work guys!

Just wondering whether it is possible to register some custom visualizations for a type. For example, a Deedle frame?

Right now, if I reference Deedle and create a series I get a textual output. Would love for the default to be an HTML table for a Series or Frame.

e.g.:

open Deedle

series [ 1 => 2; 2 => 3]

val it : Series<int,int> = series [ 1 => 2; 2 => 3]

Only the last chart/expression evaluated is currently shown.

Currently we look into the FSI pretty printer for our output. However, F# suppresses output for all but the last evaluated expression.

There are many approaches to fixing this. The best in my mind would be to stick with the iPython style of having an explicit output function.

setups

Hello. I have a problem with this:
6 Open up the copied "ipython_config.py" file and change "..\bin\ifsharp.exe" to the path of your compiled ifsharp executable.
In ipython_config.py I dont have any path to ifsharp.exe. So, what I need to change?

Compulsory reference to (old version of) FSharp.Charting blocks reference of newer versions

I've been using Jupyter/Ifsharp in combination with FSharp.Charting (FSC) a lot recently. To make use of the newest features of FSC (histograms and bug fixes in my case), I've been building FSC locally. Annoyingly, in order to reference my local FSC build in a notebook, I've had to forcibly remove the existing compulsory reference to v0.9 of FSC in Ifsharp. Without doing this, it seems that the compulsory reference blocks my local reference.

Do others find this annoying? The compulsory reference is definitely more of a hindrance than a convenience for me.

I'd be happy to submit a pull request for the removal of the compulsory reference, but thought it best to garner opinions before doing this.

Automatically reference NuGet dependencies

I don't know how easy this would be to include, but I was hoping it would be possible to mimic the default behavior for the Visual Studio NuGet Package Manager. If you reference a packaged via #N the dependencies are not retrieved if not already downloaded. An example that has a few layers of dependencies would be #N "FsLab/0.0.13-beta".

Win 8.1 repeated "Kernel Restarting"

Win 8.1 x64 in a virtual machine, VS not installed, Anacoda/IPython/Latest installer as per Automatic Installation directions.

Initially when running IFSharp, it would crash when I tried to "Create new notebook". The error thrown was along the lines of unable to find libzmq.dll. I solved that by installing Visual C++ 2012 Redistributable Package here http://support.microsoft.com/kb/2019667 (I installed both x64 and x86, not sure if both were needed).

This solved the error with the specific message above, it now loops a few times restarting the kernel after "Create new notebook" is pressed with no other input. "Assertion failed" might be a clue, but it might also just be a side effect of restarting: https://zeromq.jira.com/browse/LIBZMQ-292 . Command line output follows:

2014-04-30 18:41:52.809 [NotebookApp] Using existing profile dir: u'C:\Users\a
olne_000.ipython\profile_ifsharp'
2014-04-30 18:41:52.825 [NotebookApp] Using MathJax from CDN: http://cdn.mathjax
.org/mathjax/latest/MathJax.js
2014-04-30 18:41:52.904 [NotebookApp] Serving notebooks from local directory: C:
\Users\aolne_000
2014-04-30 18:41:52.904 [NotebookApp] 0 active kernels
2014-04-30 18:41:52.904 [NotebookApp] The IPython Notebook is running at: http:/
/127.0.0.1:8888/
2014-04-30 18:41:52.904 [NotebookApp] Use Control-C to stop this server and shut
down all kernels (twice to skip confirmation).
2014-04-30 18:41:55.822 [NotebookApp] Creating new notebook in /
2014-04-30 18:41:58.661 [NotebookApp] Kernel started: d2553a58-410e-4ba7-b464-5f
0b2c7e1631
2014-04-30 18:41:58.793 [tornado.access] WARNING | 404 GET /static/components/co
demirror/mode/fsharp/fsharp.js (127.0.0.1) 2.00ms referer=http://127.0.0.1:8888/
notebooks/Untitled8.ipynb
2014-04-30 18:42:01.657 [NotebookApp] KernelRestarter: restarting kernel (1/5)
WARNING:root:kernel d2553a58-410e-4ba7-b464-5f0b2c7e1631 restarted
Assertion failed: ok (......\src\mailbox.cpp:84)
2014-04-30 18:42:04.874 [NotebookApp] KernelRestarter: restarting kernel (2/5)
WARNING:root:kernel d2553a58-410e-4ba7-b464-5f0b2c7e1631 restarted
Assertion failed: ok (......\src\mailbox.cpp:84)
2014-04-30 18:42:08.088 [NotebookApp] KernelRestarter: restarting kernel (3/5)
WARNING:root:kernel d2553a58-410e-4ba7-b464-5f0b2c7e1631 restarted
Assertion failed: ok (......\src\mailbox.cpp:84)
2014-04-30 18:42:11.303 [NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel d2553a58-410e-4ba7-b464-5f0b2c7e1631 restarted

Could not load FSharp.Core assembly

Hi, I'm trying to build from VS2012.
On my first attempt the projects are fussy because they can't resolve FSharp.Core 4.3.1. I tried deleting the references and re-adding them for IFSharp.Kernel and IFSharp.Kernel.Tests. When I create a new notebook I see this odd combination of errors: one still hunting for FS4.3.1 and the other unable to find FS 4.3.0. I've marked the new references to copy local. fwiw I would gladly upgrade to 4.3.1 if I could figure out where to find it- is it specific to VS2013?

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'FSharp.Core, Version=4.3.1.0, Culture=neutral
, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoun
dException: Could not load file or assembly 'FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one
of its dependencies. The system cannot find the file specified.
--- End of inner exception stack trace ---
at IfSharp.Kernel.App.Start(String[] args)
at IfSharpConsole.Program.Main(String[] args) in c:\GitHub\IfSharp\src\IfSharpConsole\Program.cs:line 9

As a side note what is the purpose of the optdata and sigdata files in IFSharpConsole? Do they have a hard dependency on 4.3.1?

Thanks

NetMQ version upgrade breaks on Linux/Mono

Since the upgrade from NetMQ 3.0.11 to 3.3.2, Jupyter cannot connect or send commands to IfSharp kernel on Mono 4.4.

In the file "Kernel.fs" the debugger seems to lose the connection in
the socket.ReceiveMultipartBytes() function.
It runs the line let recvAll (socket: NetMQSocket) = socket.ReceiveMultipartBytes() twice and then the process stops talking with the debugger.
I added some printf statements before and after the call to ReceiveMultipartBytes, only the "before" message is printed, twice. These seem to be control messages.

So it looks like two control messages are received but then socket.ReceiveMultipartBytes is waiting forever.

Perhaps this zeromq/netmq#553 is related.

Related information

  • Operating system: Ubuntu 15.10
  • Mono Version: (Stable 4.4.0.142/81f38a9)

Problems with Include.fsx using Jupyter 4.1

I recently reimaged my machine, with only VS2015 installed (no VS2013). I found a workaround to get Ifsharp working, by changing App.config to use the latest MSBuild.

There is a problem with the automatic running of Include.fsx, which produces error messages in my log file:

2016-03-01 16:36:04 - input.fsx(8,1): error FS0082: Could not resolve this reference. Could not locate the assembly "FSharp.Data.TypeProviders.dll". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (Code=MSB3245)
2016-03-01 16:36:04 - input.fsx(8,1): error FS0084: Assembly reference 'FSharp.Data.TypeProviders.dll' was not found or is invalid

I was able to workaround this by commenting out the TypeProvider.dll reference in Include.fsx.

This raises the question about whether to automatically include DLLs using this strategy. There have been similar issues with including FSharp.Charting: #52

Notebook is run in 32-bit even if Anaconda is 64-bit

The iFSharp notebook runs 32-bit by default, even if Anaconda is 64-bit. I got around this in a local build by removing the preference for 32-bit in IFSharp.Console and by linking to a locally built 64-bit assembly for libzmq.dll.

Perhaps 64-bit should be the default and have gcAllowVeryLargeObjects (mentioned by @Rickasaurus in email).

Kernel dies when triggering auto-complete and Intellisense does not work.

Hello and thanks in advance!

I'm running Windows 8.1 Pro x64 in Parallels VM and recently installed IfSharp. It looks really great, and I'm able to execute code and generate graphs.

Issue is that Intellisense does not work, and when i hit shift + tab to trigger auto-complete, the kernel dies. Below is my log - after the 2nd open system is when i hit . Anyone have any ideas?

As an aside, I'm rather new to windows, but when I execute .\ifsharp.exe --install from Powershell I get ifsharp program crash errors, including a ..\--install file not found...

2015-07-17 13:00:39 - --> Added 'C:\Program Files\BayardRock\IFSharp' to library include path
2015-07-17 13:00:39 - --> Referenced 'C:\Program Files\BayardRock\IFSharp\IfSharp.Kernel.dll' (file may be locked by F# Interactive process)
2015-07-17 13:00:39 - --> Referenced 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Data.dll' (file may be locked by F# Interactive process)
2015-07-17 13:00:39 - --> Referenced 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Windows.Forms.DataVisualization.dll' (file may be locked by F# Interactive process)
2015-07-17 13:00:39 - --> Referenced 'C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.0.0\Type Providers\FSharp.Data.TypeProviders.dll' (file may be locked by F# Interactive process)
2015-07-17 13:00:39 - --> Referenced 'C:\Program Files\BayardRock\IFSharp\FSharp.Charting.dll' (file may be locked by F# Interactive process)
2015-07-17 13:00:39 - --> Referenced 'C:\Program Files\BayardRock\IFSharp\fszmq.dll' (file may be locked by F# Interactive process)
2015-07-17 13:01:02 - open System
2015-07-17 13:01:09 - open System
2015-07-17 13:01:13 - ArgumentNullExceptionValue cannot be null.
2015-07-17 13:01:13 - Parameter name: value
2015-07-17 13:01:13 -    at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
2015-07-17 13:01:13 -    at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
2015-07-17 13:01:13 -    at IfSharp.Kernel.IfSharpKernel.completeRequest(KernelMessage msg, CompleteRequest content)
2015-07-17 13:01:13 -    at IfSharp.Kernel.IfSharpKernel.doShell()
2015-07-17 13:01:17 - ArgumentNullExceptionValue cannot be null.
2015-07-17 13:01:17 - Parameter name: value
2015-07-17 13:01:17 -    at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
2015-07-17 13:01:17 -    at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
2015-07-17 13:01:17 -    at IfSharp.Kernel.IfSharpKernel.completeRequest(KernelMessage msg, CompleteRequest content)
2015-07-17 13:01:17 -    at IfSharp.Kernel.IfSharpKernel.doShell()
2015-07-17 13:01:17 - ArgumentNullExceptionValue cannot be null.
2015-07-17 13:01:17 - Parameter name: value
2015-07-17 13:01:17 -    at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
2015-07-17 13:01:17 -    at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
2015-07-17 13:01:17 -    at IfSharp.Kernel.IfSharpKernel.completeRequest(KernelMessage msg, CompleteRequest content)
2015-07-17 13:01:17 -    at IfSharp.Kernel.IfSharpKernel.doShell()
2015-07-17 13:01:17 - ArgumentNullExceptionValue cannot be null.
2015-07-17 13:01:17 - Parameter name: value
2015-07-17 13:01:17 -    at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
2015-07-17 13:01:17 -    at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
2015-07-17 13:01:17 -    at IfSharp.Kernel.IfSharpKernel.completeRequest(KernelMessage msg, CompleteRequest content)
2015-07-17 13:01:17 -    at IfSharp.Kernel.IfSharpKernel.doShell()
2015-07-17 13:01:21 - // include directory, this will be replaced by the kernel
2015-07-17 13:01:21 - #I "C:\\Program Files\\BayardRock\\IFSharp"
2015-07-17 13:01:21 - // load base dlls
2015-07-17 13:01:21 - #r "IfSharp.Kernel.dll"
2015-07-17 13:01:21 - #r "System.Data.dll"
2015-07-17 13:01:21 - #r "System.Windows.Forms.DataVisualization.dll"
2015-07-17 13:01:21 - #r "FSharp.Data.TypeProviders.dll"
2015-07-17 13:01:21 - #r "FSharp.Charting.dll"
2015-07-17 13:01:21 - #r "fszmq.dll"
2015-07-17 13:01:21 - // open the global functions and methods
2015-07-17 13:01:21 - open FSharp.Charting
2015-07-17 13:01:21 - open IfSharp.Kernel
2015-07-17 13:01:21 - open IfSharp.Kernel.Globals
2015-07-17 13:01:24 - F# Interactive for F# 3.1 (private)
2015-07-17 13:01:24 - Freely distributed under the Apache 2.0 Open Source License
2015-07-17 13:01:24 - For help type #help;;
2015-07-17 13:01:24 - > 
2015-07-17 13:01:24 - --> Added 'C:\Program Files\BayardRock\IFSharp' to library include path
2015-07-17 13:01:24 - --> Referenced 'C:\Program Files\BayardRock\IFSharp\IfSharp.Kernel.dll' (file may be locked by F# Interactive process)
2015-07-17 13:01:24 - --> Referenced 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Data.dll' (file may be locked by F# Interactive process)
2015-07-17 13:01:24 - --> Referenced 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Windows.Forms.DataVisualization.dll' (file may be locked by F# Interactive process)
2015-07-17 13:01:24 - --> Referenced 'C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.0.0\Type Providers\FSharp.Data.TypeProviders.dll' (file may be locked by F# Interactive process)
2015-07-17 13:01:24 - --> Referenced 'C:\Program Files\BayardRock\IFSharp\FSharp.Charting.dll' (file may be locked by F# Interactive process)
2015-07-17 13:01:24 - --> Referenced 'C:\Program Files\BayardRock\IFSharp\fszmq.dll' (file may be locked by F# Interactive process)

Display type of things

Would it be possible to imlement showing the type of various parts of the code? For example the original F# interactive will display the type of anything that is not evaluated:

> Seq.find;;
val it : (('a -> bool) -> seq<'a> -> 'a) = <fun:clo@4-1>

ghci has the command :t expr to print the type of expr. Some IDE's display the type as a tooltip (that would need support selection so that you can choose what you want evaluated for type).

Thanks 👍

Intellisense is not supported

Getting the needed data out of the compiler is straightforward, but we need to figure out a way to track the contents of all cells on the F# kernel side.

Fill out release notes

Let's start using RELEASE_NOTES.md for its intended purpose. The project's mature enough now.

build.sh fails on linux (mono/xbuild)

Building project with version: LocalBuild
Shortened DependencyGraph for Target All:
<== All
   <== RunTests
      <== Build
         <== AssemblyInfo
            <== RestorePackages
               <== Clean

The resulting target order is:
 - Clean
 - RestorePackages
 - AssemblyInfo
 - Build
 - RunTests
 - All
Starting Target: Clean 
Deleting contents of bin
Deleting contents of temp
Finished Target: Clean
Starting Target: RestorePackages (==> Clean)
mono  "/home/jon/fs/git/IfSharp/.nuget/NuGet.exe"  "install" "/home/jon/fs/git/IfSharp/.nuget/packages.config" "-OutputDirectory" "/home/jon/fs/git/IfSharp/packages"
mono  "/home/jon/fs/git/IfSharp/.nuget/NuGet.exe"  "install" "/home/jon/fs/git/IfSharp/docs/tools/packages.config" "-OutputDirectory" "/home/jon/fs/git/IfSharp/packages"
mono  "/home/jon/fs/git/IfSharp/.nuget/NuGet.exe"  "install" "/home/jon/fs/git/IfSharp/src/IfSharp.Kernel/packages.config" "-OutputDirectory" "/home/jon/fs/git/IfSharp/packages"
mono  "/home/jon/fs/git/IfSharp/.nuget/NuGet.exe"  "install" "/home/jon/fs/git/IfSharp/src/IfSharpConsole/packages.config" "-OutputDirectory" "/home/jon/fs/git/IfSharp/packages"
mono  "/home/jon/fs/git/IfSharp/.nuget/NuGet.exe"  "install" "/home/jon/fs/git/IfSharp/tests/IfSharp.Kernel.Tests/packages.config" "-OutputDirectory" "/home/jon/fs/git/IfSharp/packages"
Finished Target: RestorePackages
Starting Target: AssemblyInfo (==> RestorePackages)
Created AssemblyInfo file "src/IfSharp.Kernel/AssemblyInfo.fs".
Finished Target: AssemblyInfo
Starting Target: Build (==> AssemblyInfo)
Building project: /home/jon/fs/git/IfSharp/IfSharp.sln
  xbuild  /home/jon/fs/git/IfSharp/IfSharp.sln /t:Rebuild    /p:RestorePackages="False" /p:Configuration="Release" /logger:Fake.MsBuildLogger+ErrorLogger,"/home/jon/fs/git/IfSharp/packages/FAKE/tools/FakeLib.dll"
xbuild  /home/jon/fs/git/IfSharp/IfSharp.sln /t:Rebuild    /p:RestorePackages="False" /p:Configuration="Release" /logger:Fake.MsBuildLogger+ErrorLogger,"/home/jon/fs/git/IfSharp/packages/FAKE/tools/FakeLib.dll"
XBuild Engine Version 12.0
Mono, Version 4.2.3.0
Copyright (C) 2005-2013 Various Mono authors

Build started 5/13/2016 1:56:36 PM.
__________________________________________________
Project "/home/jon/fs/git/IfSharp/IfSharp.sln" (Rebuild target(s)):
    Target ValidateSolutionConfiguration:
        Building solution configuration "Release|x64".
    Target Rebuild:
        Project "/home/jon/fs/git/IfSharp/src/IfSharp.Kernel/IfSharp.Kernel.fsproj" (Rebuild target(s)):
            Target CoreClean:
                Deleting file '/home/jon/fs/git/IfSharp/src/IfSharp.Kernel/obj/x64/Release/IfSharpResources.resources'
                Deleting file '/home/jon/fs/git/IfSharp/src/IfSharp.Kernel/obj/x64/Release/IfSharp.Kernel.dll'
                Deleting file '/home/jon/fs/git/IfSharp/src/IfSharp.Kernel/obj/x64/Release/IfSharp.Kernel.dll.mdb'
                Deleting file '/home/jon/fs/git/IfSharp/src/IfSharp.Kernel/obj/x64/Release/IfSharp.Kernel.fsproj.FilesWrittenAbsolute.txt'
            Target PrepareForBuild:
                Configuration: Release Platform: x64
            Target CopyFilesMarkedCopyLocal:
                Copying file from '/home/jon/fs/git/IfSharp/packages/FSharp.Charting.0.90.5/lib/net40/FSharp.Charting.dll' to '/home/jon/fs/git/IfSharp/bin/FSharp.Charting.dll'
                Copying file from '/home/jon/fs/git/IfSharp/packages/FSharp.Compiler.Service.0.0.81/lib/net45/FSharp.Compiler.Service.dll' to '/home/jon/fs/git/IfSharp/bin/FSharp.Compiler.Service.dll'
                Copying file from '/home/jon/fs/git/IfSharp/packages/NetMQ.3.3.0.11/lib/net40/NetMQ.dll' to '/home/jon/fs/git/IfSharp/bin/NetMQ.dll'
                Copying file from '/home/jon/fs/git/IfSharp/packages/Newtonsoft.Json.5.0.8/lib/net45/Newtonsoft.Json.dll' to '/home/jon/fs/git/IfSharp/bin/Newtonsoft.Json.dll'
                Copying file from '/home/jon/fs/git/IfSharp/lib/NuGet.dll' to '/home/jon/fs/git/IfSharp/bin/NuGet.dll'
                Copying file from '/usr/lib/mono/gac/FSharp.Core/4.3.1.0__b03f5f7f11d50a3a/FSharp.Core.dll' to '/home/jon/fs/git/IfSharp/bin/FSharp.Core.dll'
            Target GenerateResources:
                Tool /usr/lib/mono/4.5/resgen.exe execution started with arguments: /useSourcePath /compile "IfSharpResources.resx,obj/x64/Release/IfSharpResources.resources" 
            Target GenerateSatelliteAssemblies:
            No input files were specified for target GenerateSatelliteAssemblies, skipping.
            Target CoreCompile:
                Tool /usr/lib/mono/4.5/fsc.exe execution started with arguments: -o:obj/x64/Release/IfSharp.Kernel.dll --debug:pdbonly --noframework --define:TRACE --doc:../../bin/IfSharp.Kernel.XML --optimize+ --platform:x64 --resource:obj/x64/Release/IfSharpResources.resources -r:../../packages/FSharp.Charting.0.90.5/lib/net40/FSharp.Charting.dll -r:../../packages/FSharp.Compiler.Service.0.0.81/lib/net45/FSharp.Compiler.Service.dll -r:/usr/lib/mono/4.5/mscorlib.dll -r:../../packages/NetMQ.3.3.0.11/lib/net40/NetMQ.dll -r:../../packages/Newtonsoft.Json.5.0.8/lib/net45/Newtonsoft.Json.dll -r:../../lib/NuGet.dll -r:/usr/lib/mono/4.5/System.dll -r:/usr/lib/mono/gac/FSharp.Core/4.3.1.0__b03f5f7f11d50a3a/FSharp.Core.dll -r:/usr/lib/mono/4.5/System.Configuration.dll -r:/usr/lib/mono/4.5/System.Drawing.dll -r:/usr/lib/mono/4.5/System.Numerics.dll -r:/usr/lib/mono/4.5/System.Web.dll -r:/usr/lib/mono/4.5/System.Windows.Forms.dll -r:/usr/lib/mono/4.5/System.Windows.Forms.DataVisualization.dll -r:/usr/lib/mono/4.5/System.Xml.Linq.dll -r:/usr/lib/mono/4.5/System.Core.dll --target:library --warn:3 --warnaserror:76 --fullpaths --flaterrors --highentropyva- Config.fs IfSharpResources.fs NuGetManager.fs FsCompiler.fs Util.fs MainTypes.fs ShellMessages.fs Evaluation.fs Printers.fs Kernel.fs App.fs Globals.fs 
                F# Compiler for F# 4.0 (Open Source Edition)
                Freely distributed under the Apache 2.0 Open Source License
            Target _CopyDeployFilesToOutputDirectoryPreserveNewest:
                Copying file from '/home/jon/fs/git/IfSharp/src/IfSharp.Kernel/Include.fsx' to '/home/jon/fs/git/IfSharp/bin/Include.fsx'
            Target _CopyAppConfigFile:
                Copying file from '/home/jon/fs/git/IfSharp/src/IfSharp.Kernel/app.config' to '/home/jon/fs/git/IfSharp/bin/IfSharp.Kernel.dll.config'
            Target DeployOutputFiles:
                Copying file from '/home/jon/fs/git/IfSharp/src/IfSharp.Kernel/obj/x64/Release/IfSharp.Kernel.dll.mdb' to '/home/jon/fs/git/IfSharp/bin/IfSharp.Kernel.dll.mdb'
                Copying file from '/home/jon/fs/git/IfSharp/src/IfSharp.Kernel/obj/x64/Release/IfSharp.Kernel.dll' to '/home/jon/fs/git/IfSharp/bin/IfSharp.Kernel.dll'
        Done building project "/home/jon/fs/git/IfSharp/src/IfSharp.Kernel/IfSharp.Kernel.fsproj".
        Project "/home/jon/fs/git/IfSharp/tests/IfSharp.Kernel.Tests/IfSharp.Kernel.Tests.fsproj" (Rebuild target(s)):
            Target CoreClean:
                Deleting file '/home/jon/fs/git/IfSharp/tests/IfSharp.Kernel.Tests/bin/Release/FSharp.Core.dll'
                Deleting file '/home/jon/fs/git/IfSharp/tests/IfSharp.Kernel.Tests/bin/Release/NetMQ.dll'
                Deleting file '/home/jon/fs/git/IfSharp/tests/IfSharp.Kernel.Tests/obj/x64/Release/IfSharp.Kernel.Tests.fsproj.FilesWrittenAbsolute.txt'
            Target PrepareForBuild:
                Configuration: Release Platform: x64
            Target CopyFilesMarkedCopyLocal:
                Copying file from '/usr/lib/mono/gac/FSharp.Core/4.3.1.0__b03f5f7f11d50a3a/FSharp.Core.dll' to '/home/jon/fs/git/IfSharp/tests/IfSharp.Kernel.Tests/bin/Release/FSharp.Core.dll'
                Copying file from '/home/jon/fs/git/IfSharp/packages/NetMQ.3.3.0.11/lib/net40/NetMQ.dll' to '/home/jon/fs/git/IfSharp/tests/IfSharp.Kernel.Tests/bin/Release/NetMQ.dll'
            Target GenerateSatelliteAssemblies:
            No input files were specified for target GenerateSatelliteAssemblies, skipping.
            Target CoreCompile:
                Tool /usr/lib/mono/4.5/fsc.exe execution started with arguments: -o:obj/x64/Release/IfSharp.Kernel.Tests.dll --debug:pdbonly --noframework --define:TRACE --doc:bin/Release/IfSharp.Kernel.Tests.XML --optimize+ --platform:x64 -r:/usr/lib/mono/4.5/mscorlib.dll -r:/usr/lib/mono/gac/FSharp.Core/4.3.1.0__b03f5f7f11d50a3a/FSharp.Core.dll -r:../../packages/NetMQ.3.3.0.11/lib/net40/NetMQ.dll -r:/usr/lib/mono/4.5/System.dll -r:/usr/lib/mono/4.5/System.Numerics.dll -r:/usr/lib/mono/4.5/System.Core.dll --target:library --warn:3 --warnaserror:76 --fullpaths --flaterrors --highentropyva-  
                F# Compiler for F# 4.0 (Open Source Edition)
                Freely distributed under the Apache 2.0 Open Source License
FSC: error FS0207: No inputs specified
            Task "Fsc" execution -- FAILED
            Done building target "CoreCompile" in project "/home/jon/fs/git/IfSharp/tests/IfSharp.Kernel.Tests/IfSharp.Kernel.Tests.fsproj".-- FAILED
        Done building project "/home/jon/fs/git/IfSharp/tests/IfSharp.Kernel.Tests/IfSharp.Kernel.Tests.fsproj".-- FAILED
    Task "MSBuild" execution -- FAILED
    Done building target "Rebuild" in project "/home/jon/fs/git/IfSharp/IfSharp.sln".-- FAILED
Done building project "/home/jon/fs/git/IfSharp/IfSharp.sln".-- FAILED

Build FAILED.
Errors:

/home/jon/fs/git/IfSharp/IfSharp.sln (Rebuild) ->
(Rebuild target) ->
/home/jon/fs/git/IfSharp/tests/IfSharp.Kernel.Tests/IfSharp.Kernel.Tests.fsproj (Rebuild) ->
/usr/lib/mono/4.5/Microsoft.FSharp.Targets (CoreCompile target) ->

    FSC: error FS0207: No inputs specified

     0 Warning(s)
     1 Error(s)

Time Elapsed 00:00:06.9157690
Running build failed.
Error:
Building /home/jon/fs/git/IfSharp/IfSharp.sln failed with exitcode 1.

---------------------------------------------------------------------
Build Time Report
---------------------------------------------------------------------
Target            Duration
------            --------
Clean             00:00:00.0039956
RestorePackages   00:00:01.5060224
AssemblyInfo      00:00:00.0072718
Total:            00:00:08.8480716
Status:           Failure
---------------------------------------------------------------------
  1) Building /home/jon/fs/git/IfSharp/IfSharp.sln failed with exitcode 1.
  2) FS0207: FSC(0,0): No inputs specified
---------------------------------------------------------------------


Proposal: Dockerfile for Jupyter - Linux

Hello

Let me start by saying thank you for the wonderful effort put into building the F# kernel for Jupyter, it is a great and useful piece of work, especially on Linux where the tooling around this language is not as well developed as on Windows.

In my efforts to streamline my work I built a Dockerfile for getting started immediately with Jupyter F#. It is based on Anaconda3 and accepts connections from everyone on 8888. The notebooks get saved in a volume that can be mounted on running the image.
I'm guessing it could be useful for people who want to quickly take a look at how it works and don't want to install everything locally (by everything I mean Anaconda, Jupyter and mono), or update their already configured environment to support the versions we need for running the F# kernel.

I could bring the Docker file into this repo, if there's any interest in it. Currently I have it here along with a more elaborate explanation of how to use it.

Off the top of my head there are a few things I could tweak:

  • base it on something smaller than Anaconda3 (though my initial attempts to use minimal-notebook - the official image, have failed)
  • stop hard-coding allowed IP addresses and just pass the arguments to jupyter-notebook via the docker run
  • perhaps not clone the IfSharp repo inside the image (once built, re-building the image will not pull newer versions of the code because of the Docker cache), however not sure how to checkout a branch using the Docker context
  • etc

Please do let me know if you think it would benefit the project and I'll work on it a bit more.
Thank you.

Timeout waiting for kernel - Linux

Hello,

Trying to run the last version of the Jupyter branch on Linux (amazon linux).
Tried both the v3 alpha binaries and built the last source code version.
The kernel won't work at all.

[I 19:08:36.548 NotebookApp] Kernel started: be59d74b-c0ed-4190-9af3-990f1eb783cb
[W 19:08:46.623 NotebookApp] Timeout waiting for kernel_info reply from be59d74b-c0ed-4190-9af3-990f1eb783cb

This version would solve the problem for me : https://github.com/FilippoPolo/IfSharp
Any chance this can be merged in the main project ?

Thanks!

no mouse-over type signatures

Description

I don't see any examples of mouse-over type signatures in the README or Feature Notebook, so I'm not sure if I screwed up the installation or if they are not implemented.

Repro steps

Please provide the steps required to reproduce the problem

  1. Clean install of IFSharp on Windows 10
  2. Mouse-over assigned value

Expected behavior

I expect to see a tooltip pop-up with the value's type signature as I would in Visual Studio

Actual behavior

Nothing happens

Known workarounds

Related information

  • Windows 10
  • IFSharp v2.0.2-Beta

Jupyter / IPython 3.0 version

For Anaconda the latest version of IPython is 3.0. I tried using IfSharp and was sucessful in getting cells to evaluate with the IfSharp kernel, but intellisense/code completion does not work. I do not know how much work it is to get this project upgraded, but thought I should submit a placeholder issue.

Dave

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.