rdoubleui
rdoubleui

Reputation: 3598

Reference FSharp.Data within online repls

I wonder if and how I could make use of packages like FSharp.Data at online REPLs such as repl.it. The usual #r or #load are not sufficient, maybe I'm lacking knowledge on how these environments work.

So does anybody know how to enable them?

Upvotes: 2

Views: 119

Answers (1)

Gene Belitski
Gene Belitski

Reputation: 10350

I cannot say anything about repl.it, but in Azure Notebooks Paket is supported. Below is a screenshot of a quick demo I've crafted for you demonstrating pull of FSharp.Data into your REPL:

F# Notebook with FSharp.Data

All magic happens in the first cell:

  • #load "Paket.fsx" enables paket within jupyter environment
  • the following expression Paket.Dependencies.Install [dependencies list] specifies external dependencies for the notebook and their source(s), just like paket.dependencies file in F# paket build environment
  • the following expression Paket.Package [libraries list] generates references to downloaded libraries as #r <path> directives bound to the local notebook environment
  • finally, #load Paket.Generated.Refs.fsx performs the actual referencing.

The cells following one with the paket machinery may customarily open library namespaces and use the associated library entities.

Upvotes: 5

Related Questions