Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
Expand Up@@ -175,3 +175,5 @@ temp/
# Test results produced by build
TestResults.xml
.paket/paket.exe
paket.lock

2 changes: 1 addition & 1 deletion build.cmd
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ if errorlevel 1 (
exit /b %errorlevel%
)

.paket\paket.exe restore
.paket\paket.exe install
if errorlevel 1 (
exit /b %errorlevel%
)
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@ if [ ! -f packages/FAKE/tools/FAKE.exe ]; then
exit $exit_code
fi
fi
${EXE} ${PREFIX}/.paket/paket.exe restore
${EXE} ${PREFIX}/.paket/paket.exe install
exit_code=$?
if [ $exit_code -ne 0 ]; then
exit $exit_code
Expand Down
9 changes: 4 additions & 5 deletions docs/content/customPrinters.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,13 +3,12 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
// #r "System.Data.dll"
// #r "System.Windows.Forms.DataVisualization.dll"
// #r "FSharp.Data.TypeProviders.dll"
// #r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

Expand Down
10 changes: 6 additions & 4 deletions docs/content/globals.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,8 +3,6 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"
Expand All@@ -16,22 +14,26 @@ open IfSharp.Kernel.Globals
(**
The Display global
==================
The `Display` function is a 'global' function that can be accessed anywhere throughout
The `Display` function is a global function that can be accessed anywhere throughout
the notebook. It will take any object and attempt to display it to the user. Built-in
supported types are:

* `FSharp.Charting.ChartTypes.GenericChart`
* `IfSharp.Kernel.GenericChartWithSize`
* `IfSharp.Kernel.TableOutput`
* `IfSharp.Kernel.HtmlOutput`
* `IfSharp.Kernel.BinaryOutput`

Additional `Display` printers are provided via helper scripts.

<hr />

FSharp.Charting.ChartTypes.GenericChart
---------------------------------------
*)

#load "FSharp.Charting.Paket.fsx"
#load "FSharp.Charting.fsx"

let fruitData = [| ("Cherries", 100); ("Apples", 200); ("Bananas", 150); ("Peaches", 10) |]
Chart.Bar(fruitData) |> Display

Expand Down
46 changes: 35 additions & 11 deletions docs/content/index.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,25 +38,49 @@ Startup script
is executed on startup. The script automatically references the following assemblies:

* IfSharp.Kernel.dll
* System.Data.dll
* System.Windows.Forms.DataVisualization.dll
* FSharp.Data.TypeProviders.dll
* FSharp.Charting.dll
* NetMQ.dll

And automatically opens the following namespaces:

* FSharp.Charting
* IfSharp.Kernel
* IfSharp.Kernel.Global

Integrated NuGet support
Paket support
------------------------
To automatically download NuGet package, use the #N directive: `#N "Newtonsoft.Json"`.
This will download the package and automatically reference assemblies within the package.
[More NuGet integration documentation](nuget.html).
To download [Paket](https://fsprojects.github.io/Paket/) packages, start with:
*)

#load "Paket.fsx"

(**
This will allow you to specify Paket dependencies with a declarative syntax.
*)

Paket.Package ["Newtonsoft.Json"]

(**
You will need to load any assemblies you require from those packages using `#r` directives.

If you need to specify a version, you can use an alternate form:
*)

![NuGet Example](img/NuGet-1.png "NuGet example")
Paket.Version ["Newtonsoft.Json", "~> 9.0.1"]

(**
Some helper scripts are provided to handle Paket package installation, assembly dependency, and custom `Display` printers for commonly used packages. Each helper script is divided into a script that installs Paket dependencies, and another that loads assemblies and sets up extension functions and `Display` printers.
*)

#load "Angara.Charting.Paket.fsx"
#load "Angara.Charting.fsx"

#load "XPlot.Plotly.Paket.fsx"
#load "XPlot.Plotly.fsx"

#load "FSharp.Charting.Paket.fsx"
#load "FSharp.Charting.fsx"

(**
[`Angara.Charting`](http://predictionmachines.github.io/Angara.Chart/) and [`XPlot.Plotly`](https://tahahachana.github.io/XPlot/plotly.html) are both feature-rich, cross-platform charting packages. [`FSharp.Charting`](https://fslab.org/FSharp.Charting/) is a Windows-only charting package.

Sin chart wave example
----------------------
Expand DownExpand Up@@ -85,4 +109,4 @@ Util.Math("f(x) = sin(x)") |> Display

(**
<img src="img/chart-1.png" alt="sin function" />
*)
*)
50 changes: 30 additions & 20 deletions docs/content/installation.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,37 +3,47 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

(**
# Automatic Installation
1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
# Windows Installation

3. Download the latest version of IfSharp from the [release repository](https://github.com/BayardRock/IfSharp/releases).
Run the setup wizard and execute the icon that is placed on the desktop.
## Automatic Installation

Running the executable after it is installed will automatically generate the files necessary
for starting up (if the file structure does not exist) and then execute the `ipython notebook --profile ifsharp` command.
1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
3. Download the latest version of IfSharp from the [release repository](https://github.com/BayardRock/IfSharp/releases)
4. Run the setup wizard and execute the icon that is placed on the desktop

If the file structure does exist, only the command `ipython notebook --profile ifsharp` is executed.
Running the executable after it is installed will automatically generate the files necessary for starting up (if the file structure does not exist) and then execute the `ipython notebook --profile ifsharp` command.

To overwrite the file structure again, invoke ifsharp.exe with the install parameter: `ifsharp.exe --install`.

# Manual Installation
## Manual Installation

1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
3. Run: "ipython profile create ifsharp" in your user directory
4. Open the iF# solution file, restore nuget packages, and compile it
5. Copy the files from IfSharp\ipython-profile to the iFSharp profile directory
6. Open up the copied "ipython_config.py" file and replace "%s" with the path of your compiled ifsharp executable. E.g. "C:\\git\\ifsharp\\bin\\Release\\ifsharp.exe"
7. Run: "ipython notebook --profile ifsharp" to launch the notebook process with the F# kernel.
*)
3. Either open the iF# solution file, restore nuget packages, and compile it
4. Or run `./build.cmd` from the command line
5. Run `isharp.exe --install` to set up the F# kernel
6. `jupyter notebook`

# Linux Installation

1. Use your package manager to install `mono`, `fsharp`, and `python3`
2. `pip3 install jupyter`
3. Download IfSharp and build it with `./build.sh`
4. Install IfSharp with `mono ./bin/ifsharp.exe --install`
5. `jupyter notebook`

# OSX Installation

1. `brew install mono fsharp python3`
2. `pip3 install jupyter`
3. Download IfSharp and build it with `./build.sh`
4. Install IfSharp with `mono ./bin/ifsharp.exe --install`
5. `jupyter notebook`
*)
39 changes: 0 additions & 39 deletions docs/content/nuget.fsx

This file was deleted.

3 changes: 0 additions & 3 deletions docs/content/utils.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,11 +5,8 @@
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

Expand Down
22 changes: 14 additions & 8 deletions docs/tools/generate.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,22 +12,28 @@ let website = "/IfSharp"
let info =
[ "project-name", "IfSharp"
"project-author", "Bayard Rock (Peter Rosconi)"
"project-summary", "F# implementation of iPython"
"project-github", "http://github.com/BayardRock/IfSharp/"
"project-summary", "F# kernel for Jupyter"
"project-github", "http://github.com/fsprojects/IfSharp/"
"project-nuget", "http://nuget.com/packages/IfSharp/" ]

// --------------------------------------------------------------------------------------
// For typical project, no changes are needed below
// --------------------------------------------------------------------------------------

#I "../../packages/FSharp.Formatting.2.1.6/lib/net40"
#I "../../packages/RazorEngine.3.3.0/lib/net40/"
#r "../../packages/Microsoft.AspNet.Razor.2.0.30506.0/lib/net40/System.Web.Razor.dll"
#r "../../packages/FAKE/tools/FakeLib.dll"
#r "../../packages/docs/FSharp.Compiler.Service/lib/net45/FSharp.Compiler.Service.dll"
#r "../../packages/docs/FSharpVSPowerTools.Core/lib/net45/FSharpVSPowerTools.Core.dll"

#I "../../packages/docs/FSharp.Formatting/lib/net40/"

#r "System.Web.Razor.dll"
#r "RazorEngine.dll"
#r "FSharp.Literate.dll"
#r "FSharp.CodeFormat.dll"
#r "FSharp.Markdown.dll"
#r "FSharp.Formatting.Common.dll"
#r "FSharp.Literate.dll"
#r "FSharp.MetadataFormat.dll"

open Fake
open System.IO
open Fake.FileHelper
Expand All@@ -48,7 +54,7 @@ let content = __SOURCE_DIRECTORY__ @@ "../content"
let output = __SOURCE_DIRECTORY__ @@ "../output"
let files = __SOURCE_DIRECTORY__ @@ "../files"
let templates = __SOURCE_DIRECTORY__ @@ "templates"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/FSharp.Formatting.2.1.6/"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/docs/FSharp.Formatting/"
let docTemplate = formatting @@ "templates/docpage.cshtml"

// Where to look for *.csproj templates (in this order)
Expand All@@ -60,7 +66,7 @@ let layoutRoots =
let copyFiles () =
CopyRecursive files output true |> Log "Copying file: "
ensureDirectory (output @@ "content")
CopyRecursive (formatting @@ "content") (output @@ "content") true
CopyRecursive (formatting @@ "styles") (output @@ "content") true
|> Log "Copying styles and scripts: "

// Build API reference from XML comments
Expand Down
1 change: 0 additions & 1 deletion docs/tools/templates/template.cshtml
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,7 +44,6 @@
<li><a href="@Root/globals.html">Globals</a></li>
<li><a href="@Root/utils.html">Utils</a></li>
<li><a href="@Root/customPrinters.html">Custom Printers</a></li>
<li><a href="@Root/nuget.html">NuGet Integration</a></li>
<li class="divider"></li>
<li><a href="@Properties["project-github"]">Source Code on GitHub</a></li>
<li><a href="@Properties["project-github"]blob/master/LICENSE.txt">License</a></li>
Expand Down
21 changes: 14 additions & 7 deletions paket.dependencies
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
framework: >= net451
source https://www.nuget.org/api/v2

nuget FSharp.Compiler.Service 6.0.2 framework: >= net451
nuget NetMQ 3.3.3.1
nuget Newtonsoft.Json ~> 9.0.1 framework: >= net451
nuget FSharp.Compiler.Service
nuget NetMQ
nuget Newtonsoft.Json
nuget FAKE
nuget xUnit >= 2.1 framework: >= net451
nuget xunit.runner.console >= 2.1 framework: >= net451
nuget Paket.Core >= 3.17.2
nuget Chessie ~> 0.6
nuget xUnit
nuget xunit.runner.console
nuget Paket.Core

group Docs

framework: >= net451
source https://www.nuget.org/api/v2

nuget FSharp.Formatting
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
Expand Up@@ -175,3 +175,5 @@ temp/
# Test results produced by build
TestResults.xml
.paket/paket.exe
paket.lock

2 changes: 1 addition & 1 deletion build.cmd
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ if errorlevel 1 (
exit /b %errorlevel%
)

.paket\paket.exe restore
.paket\paket.exe install
if errorlevel 1 (
exit /b %errorlevel%
)
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@ if [ ! -f packages/FAKE/tools/FAKE.exe ]; then
exit $exit_code
fi
fi
${EXE} ${PREFIX}/.paket/paket.exe restore
${EXE} ${PREFIX}/.paket/paket.exe install
exit_code=$?
if [ $exit_code -ne 0 ]; then
exit $exit_code
Expand Down
9 changes: 4 additions & 5 deletions docs/content/customPrinters.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,13 +3,12 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
// #r "System.Data.dll"
// #r "System.Windows.Forms.DataVisualization.dll"
// #r "FSharp.Data.TypeProviders.dll"
// #r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

Expand Down
10 changes: 6 additions & 4 deletions docs/content/globals.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,8 +3,6 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"
Expand All@@ -16,22 +14,26 @@ open IfSharp.Kernel.Globals
(**
The Display global
==================
The `Display` function is a 'global' function that can be accessed anywhere throughout
The `Display` function is a global function that can be accessed anywhere throughout
the notebook. It will take any object and attempt to display it to the user. Built-in
supported types are:

* `FSharp.Charting.ChartTypes.GenericChart`
* `IfSharp.Kernel.GenericChartWithSize`
* `IfSharp.Kernel.TableOutput`
* `IfSharp.Kernel.HtmlOutput`
* `IfSharp.Kernel.BinaryOutput`

Additional `Display` printers are provided via helper scripts.

<hr />

FSharp.Charting.ChartTypes.GenericChart
---------------------------------------
*)

#load "FSharp.Charting.Paket.fsx"
#load "FSharp.Charting.fsx"

let fruitData = [| ("Cherries", 100); ("Apples", 200); ("Bananas", 150); ("Peaches", 10) |]
Chart.Bar(fruitData) |> Display

Expand Down
46 changes: 35 additions & 11 deletions docs/content/index.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,25 +38,49 @@ Startup script
is executed on startup. The script automatically references the following assemblies:

* IfSharp.Kernel.dll
* System.Data.dll
* System.Windows.Forms.DataVisualization.dll
* FSharp.Data.TypeProviders.dll
* FSharp.Charting.dll
* NetMQ.dll

And automatically opens the following namespaces:

* FSharp.Charting
* IfSharp.Kernel
* IfSharp.Kernel.Global

Integrated NuGet support
Paket support
------------------------
To automatically download NuGet package, use the #N directive: `#N "Newtonsoft.Json"`.
This will download the package and automatically reference assemblies within the package.
[More NuGet integration documentation](nuget.html).
To download [Paket](https://fsprojects.github.io/Paket/) packages, start with:
*)

#load "Paket.fsx"

(**
This will allow you to specify Paket dependencies with a declarative syntax.
*)

Paket.Package ["Newtonsoft.Json"]

(**
You will need to load any assemblies you require from those packages using `#r` directives.

If you need to specify a version, you can use an alternate form:
*)

![NuGet Example](img/NuGet-1.png "NuGet example")
Paket.Version ["Newtonsoft.Json", "~> 9.0.1"]

(**
Some helper scripts are provided to handle Paket package installation, assembly dependency, and custom `Display` printers for commonly used packages. Each helper script is divided into a script that installs Paket dependencies, and another that loads assemblies and sets up extension functions and `Display` printers.
*)

#load "Angara.Charting.Paket.fsx"
#load "Angara.Charting.fsx"

#load "XPlot.Plotly.Paket.fsx"
#load "XPlot.Plotly.fsx"

#load "FSharp.Charting.Paket.fsx"
#load "FSharp.Charting.fsx"

(**
[`Angara.Charting`](http://predictionmachines.github.io/Angara.Chart/) and [`XPlot.Plotly`](https://tahahachana.github.io/XPlot/plotly.html) are both feature-rich, cross-platform charting packages. [`FSharp.Charting`](https://fslab.org/FSharp.Charting/) is a Windows-only charting package.

Sin chart wave example
----------------------
Expand DownExpand Up@@ -85,4 +109,4 @@ Util.Math("f(x) = sin(x)") |> Display

(**
<img src="img/chart-1.png" alt="sin function" />
*)
*)
50 changes: 30 additions & 20 deletions docs/content/installation.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,37 +3,47 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

(**
# Automatic Installation
1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
# Windows Installation

3. Download the latest version of IfSharp from the [release repository](https://github.com/BayardRock/IfSharp/releases).
Run the setup wizard and execute the icon that is placed on the desktop.
## Automatic Installation

Running the executable after it is installed will automatically generate the files necessary
for starting up (if the file structure does not exist) and then execute the `ipython notebook --profile ifsharp` command.
1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
3. Download the latest version of IfSharp from the [release repository](https://github.com/BayardRock/IfSharp/releases)
4. Run the setup wizard and execute the icon that is placed on the desktop

If the file structure does exist, only the command `ipython notebook --profile ifsharp` is executed.
Running the executable after it is installed will automatically generate the files necessary for starting up (if the file structure does not exist) and then execute the `ipython notebook --profile ifsharp` command.

To overwrite the file structure again, invoke ifsharp.exe with the install parameter: `ifsharp.exe --install`.

# Manual Installation
## Manual Installation

1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
3. Run: "ipython profile create ifsharp" in your user directory
4. Open the iF# solution file, restore nuget packages, and compile it
5. Copy the files from IfSharp\ipython-profile to the iFSharp profile directory
6. Open up the copied "ipython_config.py" file and replace "%s" with the path of your compiled ifsharp executable. E.g. "C:\\git\\ifsharp\\bin\\Release\\ifsharp.exe"
7. Run: "ipython notebook --profile ifsharp" to launch the notebook process with the F# kernel.
*)
3. Either open the iF# solution file, restore nuget packages, and compile it
4. Or run `./build.cmd` from the command line
5. Run `isharp.exe --install` to set up the F# kernel
6. `jupyter notebook`

# Linux Installation

1. Use your package manager to install `mono`, `fsharp`, and `python3`
2. `pip3 install jupyter`
3. Download IfSharp and build it with `./build.sh`
4. Install IfSharp with `mono ./bin/ifsharp.exe --install`
5. `jupyter notebook`

# OSX Installation

1. `brew install mono fsharp python3`
2. `pip3 install jupyter`
3. Download IfSharp and build it with `./build.sh`
4. Install IfSharp with `mono ./bin/ifsharp.exe --install`
5. `jupyter notebook`
*)
39 changes: 0 additions & 39 deletions docs/content/nuget.fsx

This file was deleted.

3 changes: 0 additions & 3 deletions docs/content/utils.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,11 +5,8 @@
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

Expand Down
22 changes: 14 additions & 8 deletions docs/tools/generate.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,22 +12,28 @@ let website = "/IfSharp"
let info =
[ "project-name", "IfSharp"
"project-author", "Bayard Rock (Peter Rosconi)"
"project-summary", "F# implementation of iPython"
"project-github", "http://github.com/BayardRock/IfSharp/"
"project-summary", "F# kernel for Jupyter"
"project-github", "http://github.com/fsprojects/IfSharp/"
"project-nuget", "http://nuget.com/packages/IfSharp/" ]

// --------------------------------------------------------------------------------------
// For typical project, no changes are needed below
// --------------------------------------------------------------------------------------

#I "../../packages/FSharp.Formatting.2.1.6/lib/net40"
#I "../../packages/RazorEngine.3.3.0/lib/net40/"
#r "../../packages/Microsoft.AspNet.Razor.2.0.30506.0/lib/net40/System.Web.Razor.dll"
#r "../../packages/FAKE/tools/FakeLib.dll"
#r "../../packages/docs/FSharp.Compiler.Service/lib/net45/FSharp.Compiler.Service.dll"
#r "../../packages/docs/FSharpVSPowerTools.Core/lib/net45/FSharpVSPowerTools.Core.dll"

#I "../../packages/docs/FSharp.Formatting/lib/net40/"

#r "System.Web.Razor.dll"
#r "RazorEngine.dll"
#r "FSharp.Literate.dll"
#r "FSharp.CodeFormat.dll"
#r "FSharp.Markdown.dll"
#r "FSharp.Formatting.Common.dll"
#r "FSharp.Literate.dll"
#r "FSharp.MetadataFormat.dll"

open Fake
open System.IO
open Fake.FileHelper
Expand All@@ -48,7 +54,7 @@ let content = __SOURCE_DIRECTORY__ @@ "../content"
let output = __SOURCE_DIRECTORY__ @@ "../output"
let files = __SOURCE_DIRECTORY__ @@ "../files"
let templates = __SOURCE_DIRECTORY__ @@ "templates"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/FSharp.Formatting.2.1.6/"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/docs/FSharp.Formatting/"
let docTemplate = formatting @@ "templates/docpage.cshtml"

// Where to look for *.csproj templates (in this order)
Expand All@@ -60,7 +66,7 @@ let layoutRoots =
let copyFiles () =
CopyRecursive files output true |> Log "Copying file: "
ensureDirectory (output @@ "content")
CopyRecursive (formatting @@ "content") (output @@ "content") true
CopyRecursive (formatting @@ "styles") (output @@ "content") true
|> Log "Copying styles and scripts: "

// Build API reference from XML comments
Expand Down
1 change: 0 additions & 1 deletion docs/tools/templates/template.cshtml
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,7 +44,6 @@
<li><a href="@Root/globals.html">Globals</a></li>
<li><a href="@Root/utils.html">Utils</a></li>
<li><a href="@Root/customPrinters.html">Custom Printers</a></li>
<li><a href="@Root/nuget.html">NuGet Integration</a></li>
<li class="divider"></li>
<li><a href="@Properties["project-github"]">Source Code on GitHub</a></li>
<li><a href="@Properties["project-github"]blob/master/LICENSE.txt">License</a></li>
Expand Down
21 changes: 14 additions & 7 deletions paket.dependencies
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
framework: >= net451
source https://www.nuget.org/api/v2

nuget FSharp.Compiler.Service 6.0.2 framework: >= net451
nuget NetMQ 3.3.3.1
nuget Newtonsoft.Json ~> 9.0.1 framework: >= net451
nuget FSharp.Compiler.Service
nuget NetMQ
nuget Newtonsoft.Json
nuget FAKE
nuget xUnit >= 2.1 framework: >= net451
nuget xunit.runner.console >= 2.1 framework: >= net451
nuget Paket.Core >= 3.17.2
nuget Chessie ~> 0.6
nuget xUnit
nuget xunit.runner.console
nuget Paket.Core

group Docs

framework: >= net451
source https://www.nuget.org/api/v2

nuget FSharp.Formatting
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
Expand Up@@ -175,3 +175,5 @@ temp/
# Test results produced by build
TestResults.xml
.paket/paket.exe
paket.lock

2 changes: 1 addition & 1 deletion build.cmd
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ if errorlevel 1 (
exit /b %errorlevel%
)

.paket\paket.exe restore
.paket\paket.exe install
if errorlevel 1 (
exit /b %errorlevel%
)
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@ if [ ! -f packages/FAKE/tools/FAKE.exe ]; then
exit $exit_code
fi
fi
${EXE} ${PREFIX}/.paket/paket.exe restore
${EXE} ${PREFIX}/.paket/paket.exe install
exit_code=$?
if [ $exit_code -ne 0 ]; then
exit $exit_code
Expand Down
9 changes: 4 additions & 5 deletions docs/content/customPrinters.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,13 +3,12 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
// #r "System.Data.dll"
// #r "System.Windows.Forms.DataVisualization.dll"
// #r "FSharp.Data.TypeProviders.dll"
// #r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

Expand Down
10 changes: 6 additions & 4 deletions docs/content/globals.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,8 +3,6 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"
Expand All@@ -16,22 +14,26 @@ open IfSharp.Kernel.Globals
(**
The Display global
==================
The `Display` function is a 'global' function that can be accessed anywhere throughout
The `Display` function is a global function that can be accessed anywhere throughout
the notebook. It will take any object and attempt to display it to the user. Built-in
supported types are:

* `FSharp.Charting.ChartTypes.GenericChart`
* `IfSharp.Kernel.GenericChartWithSize`
* `IfSharp.Kernel.TableOutput`
* `IfSharp.Kernel.HtmlOutput`
* `IfSharp.Kernel.BinaryOutput`

Additional `Display` printers are provided via helper scripts.

<hr />

FSharp.Charting.ChartTypes.GenericChart
---------------------------------------
*)

#load "FSharp.Charting.Paket.fsx"
#load "FSharp.Charting.fsx"

let fruitData = [| ("Cherries", 100); ("Apples", 200); ("Bananas", 150); ("Peaches", 10) |]
Chart.Bar(fruitData) |> Display

Expand Down
46 changes: 35 additions & 11 deletions docs/content/index.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,25 +38,49 @@ Startup script
is executed on startup. The script automatically references the following assemblies:

* IfSharp.Kernel.dll
* System.Data.dll
* System.Windows.Forms.DataVisualization.dll
* FSharp.Data.TypeProviders.dll
* FSharp.Charting.dll
* NetMQ.dll

And automatically opens the following namespaces:

* FSharp.Charting
* IfSharp.Kernel
* IfSharp.Kernel.Global

Integrated NuGet support
Paket support
------------------------
To automatically download NuGet package, use the #N directive: `#N "Newtonsoft.Json"`.
This will download the package and automatically reference assemblies within the package.
[More NuGet integration documentation](nuget.html).
To download [Paket](https://fsprojects.github.io/Paket/) packages, start with:
*)

#load "Paket.fsx"

(**
This will allow you to specify Paket dependencies with a declarative syntax.
*)

Paket.Package ["Newtonsoft.Json"]

(**
You will need to load any assemblies you require from those packages using `#r` directives.

If you need to specify a version, you can use an alternate form:
*)

![NuGet Example](img/NuGet-1.png "NuGet example")
Paket.Version ["Newtonsoft.Json", "~> 9.0.1"]

(**
Some helper scripts are provided to handle Paket package installation, assembly dependency, and custom `Display` printers for commonly used packages. Each helper script is divided into a script that installs Paket dependencies, and another that loads assemblies and sets up extension functions and `Display` printers.
*)

#load "Angara.Charting.Paket.fsx"
#load "Angara.Charting.fsx"

#load "XPlot.Plotly.Paket.fsx"
#load "XPlot.Plotly.fsx"

#load "FSharp.Charting.Paket.fsx"
#load "FSharp.Charting.fsx"

(**
[`Angara.Charting`](http://predictionmachines.github.io/Angara.Chart/) and [`XPlot.Plotly`](https://tahahachana.github.io/XPlot/plotly.html) are both feature-rich, cross-platform charting packages. [`FSharp.Charting`](https://fslab.org/FSharp.Charting/) is a Windows-only charting package.

Sin chart wave example
----------------------
Expand DownExpand Up@@ -85,4 +109,4 @@ Util.Math("f(x) = sin(x)") |> Display

(**
<img src="img/chart-1.png" alt="sin function" />
*)
*)
50 changes: 30 additions & 20 deletions docs/content/installation.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,37 +3,47 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

(**
# Automatic Installation
1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
# Windows Installation

3. Download the latest version of IfSharp from the [release repository](https://github.com/BayardRock/IfSharp/releases).
Run the setup wizard and execute the icon that is placed on the desktop.
## Automatic Installation

Running the executable after it is installed will automatically generate the files necessary
for starting up (if the file structure does not exist) and then execute the `ipython notebook --profile ifsharp` command.
1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
3. Download the latest version of IfSharp from the [release repository](https://github.com/BayardRock/IfSharp/releases)
4. Run the setup wizard and execute the icon that is placed on the desktop

If the file structure does exist, only the command `ipython notebook --profile ifsharp` is executed.
Running the executable after it is installed will automatically generate the files necessary for starting up (if the file structure does not exist) and then execute the `ipython notebook --profile ifsharp` command.

To overwrite the file structure again, invoke ifsharp.exe with the install parameter: `ifsharp.exe --install`.

# Manual Installation
## Manual Installation

1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
3. Run: "ipython profile create ifsharp" in your user directory
4. Open the iF# solution file, restore nuget packages, and compile it
5. Copy the files from IfSharp\ipython-profile to the iFSharp profile directory
6. Open up the copied "ipython_config.py" file and replace "%s" with the path of your compiled ifsharp executable. E.g. "C:\\git\\ifsharp\\bin\\Release\\ifsharp.exe"
7. Run: "ipython notebook --profile ifsharp" to launch the notebook process with the F# kernel.
*)
3. Either open the iF# solution file, restore nuget packages, and compile it
4. Or run `./build.cmd` from the command line
5. Run `isharp.exe --install` to set up the F# kernel
6. `jupyter notebook`

# Linux Installation

1. Use your package manager to install `mono`, `fsharp`, and `python3`
2. `pip3 install jupyter`
3. Download IfSharp and build it with `./build.sh`
4. Install IfSharp with `mono ./bin/ifsharp.exe --install`
5. `jupyter notebook`

# OSX Installation

1. `brew install mono fsharp python3`
2. `pip3 install jupyter`
3. Download IfSharp and build it with `./build.sh`
4. Install IfSharp with `mono ./bin/ifsharp.exe --install`
5. `jupyter notebook`
*)
39 changes: 0 additions & 39 deletions docs/content/nuget.fsx

This file was deleted.

3 changes: 0 additions & 3 deletions docs/content/utils.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,11 +5,8 @@
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

Expand Down
22 changes: 14 additions & 8 deletions docs/tools/generate.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,22 +12,28 @@ let website = "/IfSharp"
let info =
[ "project-name", "IfSharp"
"project-author", "Bayard Rock (Peter Rosconi)"
"project-summary", "F# implementation of iPython"
"project-github", "http://github.com/BayardRock/IfSharp/"
"project-summary", "F# kernel for Jupyter"
"project-github", "http://github.com/fsprojects/IfSharp/"
"project-nuget", "http://nuget.com/packages/IfSharp/" ]

// --------------------------------------------------------------------------------------
// For typical project, no changes are needed below
// --------------------------------------------------------------------------------------

#I "../../packages/FSharp.Formatting.2.1.6/lib/net40"
#I "../../packages/RazorEngine.3.3.0/lib/net40/"
#r "../../packages/Microsoft.AspNet.Razor.2.0.30506.0/lib/net40/System.Web.Razor.dll"
#r "../../packages/FAKE/tools/FakeLib.dll"
#r "../../packages/docs/FSharp.Compiler.Service/lib/net45/FSharp.Compiler.Service.dll"
#r "../../packages/docs/FSharpVSPowerTools.Core/lib/net45/FSharpVSPowerTools.Core.dll"

#I "../../packages/docs/FSharp.Formatting/lib/net40/"

#r "System.Web.Razor.dll"
#r "RazorEngine.dll"
#r "FSharp.Literate.dll"
#r "FSharp.CodeFormat.dll"
#r "FSharp.Markdown.dll"
#r "FSharp.Formatting.Common.dll"
#r "FSharp.Literate.dll"
#r "FSharp.MetadataFormat.dll"

open Fake
open System.IO
open Fake.FileHelper
Expand All@@ -48,7 +54,7 @@ let content = __SOURCE_DIRECTORY__ @@ "../content"
let output = __SOURCE_DIRECTORY__ @@ "../output"
let files = __SOURCE_DIRECTORY__ @@ "../files"
let templates = __SOURCE_DIRECTORY__ @@ "templates"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/FSharp.Formatting.2.1.6/"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/docs/FSharp.Formatting/"
let docTemplate = formatting @@ "templates/docpage.cshtml"

// Where to look for *.csproj templates (in this order)
Expand All@@ -60,7 +66,7 @@ let layoutRoots =
let copyFiles () =
CopyRecursive files output true |> Log "Copying file: "
ensureDirectory (output @@ "content")
CopyRecursive (formatting @@ "content") (output @@ "content") true
CopyRecursive (formatting @@ "styles") (output @@ "content") true
|> Log "Copying styles and scripts: "

// Build API reference from XML comments
Expand Down
1 change: 0 additions & 1 deletion docs/tools/templates/template.cshtml
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,7 +44,6 @@
<li><a href="@Root/globals.html">Globals</a></li>
<li><a href="@Root/utils.html">Utils</a></li>
<li><a href="@Root/customPrinters.html">Custom Printers</a></li>
<li><a href="@Root/nuget.html">NuGet Integration</a></li>
<li class="divider"></li>
<li><a href="@Properties["project-github"]">Source Code on GitHub</a></li>
<li><a href="@Properties["project-github"]blob/master/LICENSE.txt">License</a></li>
Expand Down
21 changes: 14 additions & 7 deletions paket.dependencies
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
framework: >= net451
source https://www.nuget.org/api/v2

nuget FSharp.Compiler.Service 6.0.2 framework: >= net451
nuget NetMQ 3.3.3.1
nuget Newtonsoft.Json ~> 9.0.1 framework: >= net451
nuget FSharp.Compiler.Service
nuget NetMQ
nuget Newtonsoft.Json
nuget FAKE
nuget xUnit >= 2.1 framework: >= net451
nuget xunit.runner.console >= 2.1 framework: >= net451
nuget Paket.Core >= 3.17.2
nuget Chessie ~> 0.6
nuget xUnit
nuget xunit.runner.console
nuget Paket.Core

group Docs

framework: >= net451
source https://www.nuget.org/api/v2

nuget FSharp.Formatting
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
Expand Up@@ -175,3 +175,5 @@ temp/
# Test results produced by build
TestResults.xml
.paket/paket.exe
paket.lock

2 changes: 1 addition & 1 deletion build.cmd
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ if errorlevel 1 (
exit /b %errorlevel%
)

.paket\paket.exe restore
.paket\paket.exe install
if errorlevel 1 (
exit /b %errorlevel%
)
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@ if [ ! -f packages/FAKE/tools/FAKE.exe ]; then
exit $exit_code
fi
fi
${EXE} ${PREFIX}/.paket/paket.exe restore
${EXE} ${PREFIX}/.paket/paket.exe install
exit_code=$?
if [ $exit_code -ne 0 ]; then
exit $exit_code
Expand Down
9 changes: 4 additions & 5 deletions docs/content/customPrinters.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,13 +3,12 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
// #r "System.Data.dll"
// #r "System.Windows.Forms.DataVisualization.dll"
// #r "FSharp.Data.TypeProviders.dll"
// #r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

Expand Down
10 changes: 6 additions & 4 deletions docs/content/globals.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,8 +3,6 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"
Expand All@@ -16,22 +14,26 @@ open IfSharp.Kernel.Globals
(**
The Display global
==================
The `Display` function is a 'global' function that can be accessed anywhere throughout
The `Display` function is a global function that can be accessed anywhere throughout
the notebook. It will take any object and attempt to display it to the user. Built-in
supported types are:

* `FSharp.Charting.ChartTypes.GenericChart`
* `IfSharp.Kernel.GenericChartWithSize`
* `IfSharp.Kernel.TableOutput`
* `IfSharp.Kernel.HtmlOutput`
* `IfSharp.Kernel.BinaryOutput`

Additional `Display` printers are provided via helper scripts.

<hr />

FSharp.Charting.ChartTypes.GenericChart
---------------------------------------
*)

#load "FSharp.Charting.Paket.fsx"
#load "FSharp.Charting.fsx"

let fruitData = [| ("Cherries", 100); ("Apples", 200); ("Bananas", 150); ("Peaches", 10) |]
Chart.Bar(fruitData) |> Display

Expand Down
46 changes: 35 additions & 11 deletions docs/content/index.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,25 +38,49 @@ Startup script
is executed on startup. The script automatically references the following assemblies:

* IfSharp.Kernel.dll
* System.Data.dll
* System.Windows.Forms.DataVisualization.dll
* FSharp.Data.TypeProviders.dll
* FSharp.Charting.dll
* NetMQ.dll

And automatically opens the following namespaces:

* FSharp.Charting
* IfSharp.Kernel
* IfSharp.Kernel.Global

Integrated NuGet support
Paket support
------------------------
To automatically download NuGet package, use the #N directive: `#N "Newtonsoft.Json"`.
This will download the package and automatically reference assemblies within the package.
[More NuGet integration documentation](nuget.html).
To download [Paket](https://fsprojects.github.io/Paket/) packages, start with:
*)

#load "Paket.fsx"

(**
This will allow you to specify Paket dependencies with a declarative syntax.
*)

Paket.Package ["Newtonsoft.Json"]

(**
You will need to load any assemblies you require from those packages using `#r` directives.

If you need to specify a version, you can use an alternate form:
*)

![NuGet Example](img/NuGet-1.png "NuGet example")
Paket.Version ["Newtonsoft.Json", "~> 9.0.1"]

(**
Some helper scripts are provided to handle Paket package installation, assembly dependency, and custom `Display` printers for commonly used packages. Each helper script is divided into a script that installs Paket dependencies, and another that loads assemblies and sets up extension functions and `Display` printers.
*)

#load "Angara.Charting.Paket.fsx"
#load "Angara.Charting.fsx"

#load "XPlot.Plotly.Paket.fsx"
#load "XPlot.Plotly.fsx"

#load "FSharp.Charting.Paket.fsx"
#load "FSharp.Charting.fsx"

(**
[`Angara.Charting`](http://predictionmachines.github.io/Angara.Chart/) and [`XPlot.Plotly`](https://tahahachana.github.io/XPlot/plotly.html) are both feature-rich, cross-platform charting packages. [`FSharp.Charting`](https://fslab.org/FSharp.Charting/) is a Windows-only charting package.

Sin chart wave example
----------------------
Expand DownExpand Up@@ -85,4 +109,4 @@ Util.Math("f(x) = sin(x)") |> Display

(**
<img src="img/chart-1.png" alt="sin function" />
*)
*)
50 changes: 30 additions & 20 deletions docs/content/installation.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,37 +3,47 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

(**
# Automatic Installation
1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
# Windows Installation

3. Download the latest version of IfSharp from the [release repository](https://github.com/BayardRock/IfSharp/releases).
Run the setup wizard and execute the icon that is placed on the desktop.
## Automatic Installation

Running the executable after it is installed will automatically generate the files necessary
for starting up (if the file structure does not exist) and then execute the `ipython notebook --profile ifsharp` command.
1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
3. Download the latest version of IfSharp from the [release repository](https://github.com/BayardRock/IfSharp/releases)
4. Run the setup wizard and execute the icon that is placed on the desktop

If the file structure does exist, only the command `ipython notebook --profile ifsharp` is executed.
Running the executable after it is installed will automatically generate the files necessary for starting up (if the file structure does not exist) and then execute the `ipython notebook --profile ifsharp` command.

To overwrite the file structure again, invoke ifsharp.exe with the install parameter: `ifsharp.exe --install`.

# Manual Installation
## Manual Installation

1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
3. Run: "ipython profile create ifsharp" in your user directory
4. Open the iF# solution file, restore nuget packages, and compile it
5. Copy the files from IfSharp\ipython-profile to the iFSharp profile directory
6. Open up the copied "ipython_config.py" file and replace "%s" with the path of your compiled ifsharp executable. E.g. "C:\\git\\ifsharp\\bin\\Release\\ifsharp.exe"
7. Run: "ipython notebook --profile ifsharp" to launch the notebook process with the F# kernel.
*)
3. Either open the iF# solution file, restore nuget packages, and compile it
4. Or run `./build.cmd` from the command line
5. Run `isharp.exe --install` to set up the F# kernel
6. `jupyter notebook`

# Linux Installation

1. Use your package manager to install `mono`, `fsharp`, and `python3`
2. `pip3 install jupyter`
3. Download IfSharp and build it with `./build.sh`
4. Install IfSharp with `mono ./bin/ifsharp.exe --install`
5. `jupyter notebook`

# OSX Installation

1. `brew install mono fsharp python3`
2. `pip3 install jupyter`
3. Download IfSharp and build it with `./build.sh`
4. Install IfSharp with `mono ./bin/ifsharp.exe --install`
5. `jupyter notebook`
*)
39 changes: 0 additions & 39 deletions docs/content/nuget.fsx

This file was deleted.

3 changes: 0 additions & 3 deletions docs/content/utils.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,11 +5,8 @@
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

Expand Down
22 changes: 14 additions & 8 deletions docs/tools/generate.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,22 +12,28 @@ let website = "/IfSharp"
let info =
[ "project-name", "IfSharp"
"project-author", "Bayard Rock (Peter Rosconi)"
"project-summary", "F# implementation of iPython"
"project-github", "http://github.com/BayardRock/IfSharp/"
"project-summary", "F# kernel for Jupyter"
"project-github", "http://github.com/fsprojects/IfSharp/"
"project-nuget", "http://nuget.com/packages/IfSharp/" ]

// --------------------------------------------------------------------------------------
// For typical project, no changes are needed below
// --------------------------------------------------------------------------------------

#I "../../packages/FSharp.Formatting.2.1.6/lib/net40"
#I "../../packages/RazorEngine.3.3.0/lib/net40/"
#r "../../packages/Microsoft.AspNet.Razor.2.0.30506.0/lib/net40/System.Web.Razor.dll"
#r "../../packages/FAKE/tools/FakeLib.dll"
#r "../../packages/docs/FSharp.Compiler.Service/lib/net45/FSharp.Compiler.Service.dll"
#r "../../packages/docs/FSharpVSPowerTools.Core/lib/net45/FSharpVSPowerTools.Core.dll"

#I "../../packages/docs/FSharp.Formatting/lib/net40/"

#r "System.Web.Razor.dll"
#r "RazorEngine.dll"
#r "FSharp.Literate.dll"
#r "FSharp.CodeFormat.dll"
#r "FSharp.Markdown.dll"
#r "FSharp.Formatting.Common.dll"
#r "FSharp.Literate.dll"
#r "FSharp.MetadataFormat.dll"

open Fake
open System.IO
open Fake.FileHelper
Expand All@@ -48,7 +54,7 @@ let content = __SOURCE_DIRECTORY__ @@ "../content"
let output = __SOURCE_DIRECTORY__ @@ "../output"
let files = __SOURCE_DIRECTORY__ @@ "../files"
let templates = __SOURCE_DIRECTORY__ @@ "templates"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/FSharp.Formatting.2.1.6/"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/docs/FSharp.Formatting/"
let docTemplate = formatting @@ "templates/docpage.cshtml"

// Where to look for *.csproj templates (in this order)
Expand All@@ -60,7 +66,7 @@ let layoutRoots =
let copyFiles () =
CopyRecursive files output true |> Log "Copying file: "
ensureDirectory (output @@ "content")
CopyRecursive (formatting @@ "content") (output @@ "content") true
CopyRecursive (formatting @@ "styles") (output @@ "content") true
|> Log "Copying styles and scripts: "

// Build API reference from XML comments
Expand Down
1 change: 0 additions & 1 deletion docs/tools/templates/template.cshtml
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,7 +44,6 @@
<li><a href="@Root/globals.html">Globals</a></li>
<li><a href="@Root/utils.html">Utils</a></li>
<li><a href="@Root/customPrinters.html">Custom Printers</a></li>
<li><a href="@Root/nuget.html">NuGet Integration</a></li>
<li class="divider"></li>
<li><a href="@Properties["project-github"]">Source Code on GitHub</a></li>
<li><a href="@Properties["project-github"]blob/master/LICENSE.txt">License</a></li>
Expand Down
21 changes: 14 additions & 7 deletions paket.dependencies
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
framework: >= net451
source https://www.nuget.org/api/v2

nuget FSharp.Compiler.Service 6.0.2 framework: >= net451
nuget NetMQ 3.3.3.1
nuget Newtonsoft.Json ~> 9.0.1 framework: >= net451
nuget FSharp.Compiler.Service
nuget NetMQ
nuget Newtonsoft.Json
nuget FAKE
nuget xUnit >= 2.1 framework: >= net451
nuget xunit.runner.console >= 2.1 framework: >= net451
nuget Paket.Core >= 3.17.2
nuget Chessie ~> 0.6
nuget xUnit
nuget xunit.runner.console
nuget Paket.Core

group Docs

framework: >= net451
source https://www.nuget.org/api/v2

nuget FSharp.Formatting
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
Expand Up@@ -175,3 +175,5 @@ temp/
# Test results produced by build
TestResults.xml
.paket/paket.exe
paket.lock

2 changes: 1 addition & 1 deletion build.cmd
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ if errorlevel 1 (
exit /b %errorlevel%
)

.paket\paket.exe restore
.paket\paket.exe install
if errorlevel 1 (
exit /b %errorlevel%
)
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@ if [ ! -f packages/FAKE/tools/FAKE.exe ]; then
exit $exit_code
fi
fi
${EXE} ${PREFIX}/.paket/paket.exe restore
${EXE} ${PREFIX}/.paket/paket.exe install
exit_code=$?
if [ $exit_code -ne 0 ]; then
exit $exit_code
Expand Down
9 changes: 4 additions & 5 deletions docs/content/customPrinters.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,13 +3,12 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
// #r "System.Data.dll"
// #r "System.Windows.Forms.DataVisualization.dll"
// #r "FSharp.Data.TypeProviders.dll"
// #r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

Expand Down
10 changes: 6 additions & 4 deletions docs/content/globals.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,8 +3,6 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"
Expand All@@ -16,22 +14,26 @@ open IfSharp.Kernel.Globals
(**
The Display global
==================
The `Display` function is a 'global' function that can be accessed anywhere throughout
The `Display` function is a global function that can be accessed anywhere throughout
the notebook. It will take any object and attempt to display it to the user. Built-in
supported types are:

* `FSharp.Charting.ChartTypes.GenericChart`
* `IfSharp.Kernel.GenericChartWithSize`
* `IfSharp.Kernel.TableOutput`
* `IfSharp.Kernel.HtmlOutput`
* `IfSharp.Kernel.BinaryOutput`

Additional `Display` printers are provided via helper scripts.

<hr />

FSharp.Charting.ChartTypes.GenericChart
---------------------------------------
*)

#load "FSharp.Charting.Paket.fsx"
#load "FSharp.Charting.fsx"

let fruitData = [| ("Cherries", 100); ("Apples", 200); ("Bananas", 150); ("Peaches", 10) |]
Chart.Bar(fruitData) |> Display

Expand Down
46 changes: 35 additions & 11 deletions docs/content/index.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,25 +38,49 @@ Startup script
is executed on startup. The script automatically references the following assemblies:

* IfSharp.Kernel.dll
* System.Data.dll
* System.Windows.Forms.DataVisualization.dll
* FSharp.Data.TypeProviders.dll
* FSharp.Charting.dll
* NetMQ.dll

And automatically opens the following namespaces:

* FSharp.Charting
* IfSharp.Kernel
* IfSharp.Kernel.Global

Integrated NuGet support
Paket support
------------------------
To automatically download NuGet package, use the #N directive: `#N "Newtonsoft.Json"`.
This will download the package and automatically reference assemblies within the package.
[More NuGet integration documentation](nuget.html).
To download [Paket](https://fsprojects.github.io/Paket/) packages, start with:
*)

#load "Paket.fsx"

(**
This will allow you to specify Paket dependencies with a declarative syntax.
*)

Paket.Package ["Newtonsoft.Json"]

(**
You will need to load any assemblies you require from those packages using `#r` directives.

If you need to specify a version, you can use an alternate form:
*)

![NuGet Example](img/NuGet-1.png "NuGet example")
Paket.Version ["Newtonsoft.Json", "~> 9.0.1"]

(**
Some helper scripts are provided to handle Paket package installation, assembly dependency, and custom `Display` printers for commonly used packages. Each helper script is divided into a script that installs Paket dependencies, and another that loads assemblies and sets up extension functions and `Display` printers.
*)

#load "Angara.Charting.Paket.fsx"
#load "Angara.Charting.fsx"

#load "XPlot.Plotly.Paket.fsx"
#load "XPlot.Plotly.fsx"

#load "FSharp.Charting.Paket.fsx"
#load "FSharp.Charting.fsx"

(**
[`Angara.Charting`](http://predictionmachines.github.io/Angara.Chart/) and [`XPlot.Plotly`](https://tahahachana.github.io/XPlot/plotly.html) are both feature-rich, cross-platform charting packages. [`FSharp.Charting`](https://fslab.org/FSharp.Charting/) is a Windows-only charting package.

Sin chart wave example
----------------------
Expand DownExpand Up@@ -85,4 +109,4 @@ Util.Math("f(x) = sin(x)") |> Display

(**
<img src="img/chart-1.png" alt="sin function" />
*)
*)
50 changes: 30 additions & 20 deletions docs/content/installation.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,37 +3,47 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

(**
# Automatic Installation
1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
# Windows Installation

3. Download the latest version of IfSharp from the [release repository](https://github.com/BayardRock/IfSharp/releases).
Run the setup wizard and execute the icon that is placed on the desktop.
## Automatic Installation

Running the executable after it is installed will automatically generate the files necessary
for starting up (if the file structure does not exist) and then execute the `ipython notebook --profile ifsharp` command.
1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
3. Download the latest version of IfSharp from the [release repository](https://github.com/BayardRock/IfSharp/releases)
4. Run the setup wizard and execute the icon that is placed on the desktop

If the file structure does exist, only the command `ipython notebook --profile ifsharp` is executed.
Running the executable after it is installed will automatically generate the files necessary for starting up (if the file structure does not exist) and then execute the `ipython notebook --profile ifsharp` command.

To overwrite the file structure again, invoke ifsharp.exe with the install parameter: `ifsharp.exe --install`.

# Manual Installation
## Manual Installation

1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
3. Run: "ipython profile create ifsharp" in your user directory
4. Open the iF# solution file, restore nuget packages, and compile it
5. Copy the files from IfSharp\ipython-profile to the iFSharp profile directory
6. Open up the copied "ipython_config.py" file and replace "%s" with the path of your compiled ifsharp executable. E.g. "C:\\git\\ifsharp\\bin\\Release\\ifsharp.exe"
7. Run: "ipython notebook --profile ifsharp" to launch the notebook process with the F# kernel.
*)
3. Either open the iF# solution file, restore nuget packages, and compile it
4. Or run `./build.cmd` from the command line
5. Run `isharp.exe --install` to set up the F# kernel
6. `jupyter notebook`

# Linux Installation

1. Use your package manager to install `mono`, `fsharp`, and `python3`
2. `pip3 install jupyter`
3. Download IfSharp and build it with `./build.sh`
4. Install IfSharp with `mono ./bin/ifsharp.exe --install`
5. `jupyter notebook`

# OSX Installation

1. `brew install mono fsharp python3`
2. `pip3 install jupyter`
3. Download IfSharp and build it with `./build.sh`
4. Install IfSharp with `mono ./bin/ifsharp.exe --install`
5. `jupyter notebook`
*)
39 changes: 0 additions & 39 deletions docs/content/nuget.fsx

This file was deleted.

3 changes: 0 additions & 3 deletions docs/content/utils.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,11 +5,8 @@
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

Expand Down
22 changes: 14 additions & 8 deletions docs/tools/generate.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,22 +12,28 @@ let website = "/IfSharp"
let info =
[ "project-name", "IfSharp"
"project-author", "Bayard Rock (Peter Rosconi)"
"project-summary", "F# implementation of iPython"
"project-github", "http://github.com/BayardRock/IfSharp/"
"project-summary", "F# kernel for Jupyter"
"project-github", "http://github.com/fsprojects/IfSharp/"
"project-nuget", "http://nuget.com/packages/IfSharp/" ]

// --------------------------------------------------------------------------------------
// For typical project, no changes are needed below
// --------------------------------------------------------------------------------------

#I "../../packages/FSharp.Formatting.2.1.6/lib/net40"
#I "../../packages/RazorEngine.3.3.0/lib/net40/"
#r "../../packages/Microsoft.AspNet.Razor.2.0.30506.0/lib/net40/System.Web.Razor.dll"
#r "../../packages/FAKE/tools/FakeLib.dll"
#r "../../packages/docs/FSharp.Compiler.Service/lib/net45/FSharp.Compiler.Service.dll"
#r "../../packages/docs/FSharpVSPowerTools.Core/lib/net45/FSharpVSPowerTools.Core.dll"

#I "../../packages/docs/FSharp.Formatting/lib/net40/"

#r "System.Web.Razor.dll"
#r "RazorEngine.dll"
#r "FSharp.Literate.dll"
#r "FSharp.CodeFormat.dll"
#r "FSharp.Markdown.dll"
#r "FSharp.Formatting.Common.dll"
#r "FSharp.Literate.dll"
#r "FSharp.MetadataFormat.dll"

open Fake
open System.IO
open Fake.FileHelper
Expand All@@ -48,7 +54,7 @@ let content = __SOURCE_DIRECTORY__ @@ "../content"
let output = __SOURCE_DIRECTORY__ @@ "../output"
let files = __SOURCE_DIRECTORY__ @@ "../files"
let templates = __SOURCE_DIRECTORY__ @@ "templates"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/FSharp.Formatting.2.1.6/"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/docs/FSharp.Formatting/"
let docTemplate = formatting @@ "templates/docpage.cshtml"

// Where to look for *.csproj templates (in this order)
Expand All@@ -60,7 +66,7 @@ let layoutRoots =
let copyFiles () =
CopyRecursive files output true |> Log "Copying file: "
ensureDirectory (output @@ "content")
CopyRecursive (formatting @@ "content") (output @@ "content") true
CopyRecursive (formatting @@ "styles") (output @@ "content") true
|> Log "Copying styles and scripts: "

// Build API reference from XML comments
Expand Down
1 change: 0 additions & 1 deletion docs/tools/templates/template.cshtml
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,7 +44,6 @@
<li><a href="@Root/globals.html">Globals</a></li>
<li><a href="@Root/utils.html">Utils</a></li>
<li><a href="@Root/customPrinters.html">Custom Printers</a></li>
<li><a href="@Root/nuget.html">NuGet Integration</a></li>
<li class="divider"></li>
<li><a href="@Properties["project-github"]">Source Code on GitHub</a></li>
<li><a href="@Properties["project-github"]blob/master/LICENSE.txt">License</a></li>
Expand Down
21 changes: 14 additions & 7 deletions paket.dependencies
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
framework: >= net451
source https://www.nuget.org/api/v2

nuget FSharp.Compiler.Service 6.0.2 framework: >= net451
nuget NetMQ 3.3.3.1
nuget Newtonsoft.Json ~> 9.0.1 framework: >= net451
nuget FSharp.Compiler.Service
nuget NetMQ
nuget Newtonsoft.Json
nuget FAKE
nuget xUnit >= 2.1 framework: >= net451
nuget xunit.runner.console >= 2.1 framework: >= net451
nuget Paket.Core >= 3.17.2
nuget Chessie ~> 0.6
nuget xUnit
nuget xunit.runner.console
nuget Paket.Core

group Docs

framework: >= net451
source https://www.nuget.org/api/v2

nuget FSharp.Formatting
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
Expand Up@@ -175,3 +175,5 @@ temp/
# Test results produced by build
TestResults.xml
.paket/paket.exe
paket.lock

2 changes: 1 addition & 1 deletion build.cmd
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ if errorlevel 1 (
exit /b %errorlevel%
)

.paket\paket.exe restore
.paket\paket.exe install
if errorlevel 1 (
exit /b %errorlevel%
)
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@ if [ ! -f packages/FAKE/tools/FAKE.exe ]; then
exit $exit_code
fi
fi
${EXE} ${PREFIX}/.paket/paket.exe restore
${EXE} ${PREFIX}/.paket/paket.exe install
exit_code=$?
if [ $exit_code -ne 0 ]; then
exit $exit_code
Expand Down
9 changes: 4 additions & 5 deletions docs/content/customPrinters.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,13 +3,12 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
// #r "System.Data.dll"
// #r "System.Windows.Forms.DataVisualization.dll"
// #r "FSharp.Data.TypeProviders.dll"
// #r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

Expand Down
10 changes: 6 additions & 4 deletions docs/content/globals.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,8 +3,6 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"
Expand All@@ -16,22 +14,26 @@ open IfSharp.Kernel.Globals
(**
The Display global
==================
The `Display` function is a 'global' function that can be accessed anywhere throughout
The `Display` function is a global function that can be accessed anywhere throughout
the notebook. It will take any object and attempt to display it to the user. Built-in
supported types are:

* `FSharp.Charting.ChartTypes.GenericChart`
* `IfSharp.Kernel.GenericChartWithSize`
* `IfSharp.Kernel.TableOutput`
* `IfSharp.Kernel.HtmlOutput`
* `IfSharp.Kernel.BinaryOutput`

Additional `Display` printers are provided via helper scripts.

<hr />

FSharp.Charting.ChartTypes.GenericChart
---------------------------------------
*)

#load "FSharp.Charting.Paket.fsx"
#load "FSharp.Charting.fsx"

let fruitData = [| ("Cherries", 100); ("Apples", 200); ("Bananas", 150); ("Peaches", 10) |]
Chart.Bar(fruitData) |> Display

Expand Down
46 changes: 35 additions & 11 deletions docs/content/index.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,25 +38,49 @@ Startup script
is executed on startup. The script automatically references the following assemblies:

* IfSharp.Kernel.dll
* System.Data.dll
* System.Windows.Forms.DataVisualization.dll
* FSharp.Data.TypeProviders.dll
* FSharp.Charting.dll
* NetMQ.dll

And automatically opens the following namespaces:

* FSharp.Charting
* IfSharp.Kernel
* IfSharp.Kernel.Global

Integrated NuGet support
Paket support
------------------------
To automatically download NuGet package, use the #N directive: `#N "Newtonsoft.Json"`.
This will download the package and automatically reference assemblies within the package.
[More NuGet integration documentation](nuget.html).
To download [Paket](https://fsprojects.github.io/Paket/) packages, start with:
*)

#load "Paket.fsx"

(**
This will allow you to specify Paket dependencies with a declarative syntax.
*)

Paket.Package ["Newtonsoft.Json"]

(**
You will need to load any assemblies you require from those packages using `#r` directives.

If you need to specify a version, you can use an alternate form:
*)

![NuGet Example](img/NuGet-1.png "NuGet example")
Paket.Version ["Newtonsoft.Json", "~> 9.0.1"]

(**
Some helper scripts are provided to handle Paket package installation, assembly dependency, and custom `Display` printers for commonly used packages. Each helper script is divided into a script that installs Paket dependencies, and another that loads assemblies and sets up extension functions and `Display` printers.
*)

#load "Angara.Charting.Paket.fsx"
#load "Angara.Charting.fsx"

#load "XPlot.Plotly.Paket.fsx"
#load "XPlot.Plotly.fsx"

#load "FSharp.Charting.Paket.fsx"
#load "FSharp.Charting.fsx"

(**
[`Angara.Charting`](http://predictionmachines.github.io/Angara.Chart/) and [`XPlot.Plotly`](https://tahahachana.github.io/XPlot/plotly.html) are both feature-rich, cross-platform charting packages. [`FSharp.Charting`](https://fslab.org/FSharp.Charting/) is a Windows-only charting package.

Sin chart wave example
----------------------
Expand DownExpand Up@@ -85,4 +109,4 @@ Util.Math("f(x) = sin(x)") |> Display

(**
<img src="img/chart-1.png" alt="sin function" />
*)
*)
50 changes: 30 additions & 20 deletions docs/content/installation.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,37 +3,47 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

(**
# Automatic Installation
1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
# Windows Installation

3. Download the latest version of IfSharp from the [release repository](https://github.com/BayardRock/IfSharp/releases).
Run the setup wizard and execute the icon that is placed on the desktop.
## Automatic Installation

Running the executable after it is installed will automatically generate the files necessary
for starting up (if the file structure does not exist) and then execute the `ipython notebook --profile ifsharp` command.
1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
3. Download the latest version of IfSharp from the [release repository](https://github.com/BayardRock/IfSharp/releases)
4. Run the setup wizard and execute the icon that is placed on the desktop

If the file structure does exist, only the command `ipython notebook --profile ifsharp` is executed.
Running the executable after it is installed will automatically generate the files necessary for starting up (if the file structure does not exist) and then execute the `ipython notebook --profile ifsharp` command.

To overwrite the file structure again, invoke ifsharp.exe with the install parameter: `ifsharp.exe --install`.

# Manual Installation
## Manual Installation

1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
3. Run: "ipython profile create ifsharp" in your user directory
4. Open the iF# solution file, restore nuget packages, and compile it
5. Copy the files from IfSharp\ipython-profile to the iFSharp profile directory
6. Open up the copied "ipython_config.py" file and replace "%s" with the path of your compiled ifsharp executable. E.g. "C:\\git\\ifsharp\\bin\\Release\\ifsharp.exe"
7. Run: "ipython notebook --profile ifsharp" to launch the notebook process with the F# kernel.
*)
3. Either open the iF# solution file, restore nuget packages, and compile it
4. Or run `./build.cmd` from the command line
5. Run `isharp.exe --install` to set up the F# kernel
6. `jupyter notebook`

# Linux Installation

1. Use your package manager to install `mono`, `fsharp`, and `python3`
2. `pip3 install jupyter`
3. Download IfSharp and build it with `./build.sh`
4. Install IfSharp with `mono ./bin/ifsharp.exe --install`
5. `jupyter notebook`

# OSX Installation

1. `brew install mono fsharp python3`
2. `pip3 install jupyter`
3. Download IfSharp and build it with `./build.sh`
4. Install IfSharp with `mono ./bin/ifsharp.exe --install`
5. `jupyter notebook`
*)
39 changes: 0 additions & 39 deletions docs/content/nuget.fsx

This file was deleted.

3 changes: 0 additions & 3 deletions docs/content/utils.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,11 +5,8 @@
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

Expand Down
22 changes: 14 additions & 8 deletions docs/tools/generate.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,22 +12,28 @@ let website = "/IfSharp"
let info =
[ "project-name", "IfSharp"
"project-author", "Bayard Rock (Peter Rosconi)"
"project-summary", "F# implementation of iPython"
"project-github", "http://github.com/BayardRock/IfSharp/"
"project-summary", "F# kernel for Jupyter"
"project-github", "http://github.com/fsprojects/IfSharp/"
"project-nuget", "http://nuget.com/packages/IfSharp/" ]

// --------------------------------------------------------------------------------------
// For typical project, no changes are needed below
// --------------------------------------------------------------------------------------

#I "../../packages/FSharp.Formatting.2.1.6/lib/net40"
#I "../../packages/RazorEngine.3.3.0/lib/net40/"
#r "../../packages/Microsoft.AspNet.Razor.2.0.30506.0/lib/net40/System.Web.Razor.dll"
#r "../../packages/FAKE/tools/FakeLib.dll"
#r "../../packages/docs/FSharp.Compiler.Service/lib/net45/FSharp.Compiler.Service.dll"
#r "../../packages/docs/FSharpVSPowerTools.Core/lib/net45/FSharpVSPowerTools.Core.dll"

#I "../../packages/docs/FSharp.Formatting/lib/net40/"

#r "System.Web.Razor.dll"
#r "RazorEngine.dll"
#r "FSharp.Literate.dll"
#r "FSharp.CodeFormat.dll"
#r "FSharp.Markdown.dll"
#r "FSharp.Formatting.Common.dll"
#r "FSharp.Literate.dll"
#r "FSharp.MetadataFormat.dll"

open Fake
open System.IO
open Fake.FileHelper
Expand All@@ -48,7 +54,7 @@ let content = __SOURCE_DIRECTORY__ @@ "../content"
let output = __SOURCE_DIRECTORY__ @@ "../output"
let files = __SOURCE_DIRECTORY__ @@ "../files"
let templates = __SOURCE_DIRECTORY__ @@ "templates"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/FSharp.Formatting.2.1.6/"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/docs/FSharp.Formatting/"
let docTemplate = formatting @@ "templates/docpage.cshtml"

// Where to look for *.csproj templates (in this order)
Expand All@@ -60,7 +66,7 @@ let layoutRoots =
let copyFiles () =
CopyRecursive files output true |> Log "Copying file: "
ensureDirectory (output @@ "content")
CopyRecursive (formatting @@ "content") (output @@ "content") true
CopyRecursive (formatting @@ "styles") (output @@ "content") true
|> Log "Copying styles and scripts: "

// Build API reference from XML comments
Expand Down
1 change: 0 additions & 1 deletion docs/tools/templates/template.cshtml
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,7 +44,6 @@
<li><a href="@Root/globals.html">Globals</a></li>
<li><a href="@Root/utils.html">Utils</a></li>
<li><a href="@Root/customPrinters.html">Custom Printers</a></li>
<li><a href="@Root/nuget.html">NuGet Integration</a></li>
<li class="divider"></li>
<li><a href="@Properties["project-github"]">Source Code on GitHub</a></li>
<li><a href="@Properties["project-github"]blob/master/LICENSE.txt">License</a></li>
Expand Down
21 changes: 14 additions & 7 deletions paket.dependencies
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
framework: >= net451
source https://www.nuget.org/api/v2

nuget FSharp.Compiler.Service 6.0.2 framework: >= net451
nuget NetMQ 3.3.3.1
nuget Newtonsoft.Json ~> 9.0.1 framework: >= net451
nuget FSharp.Compiler.Service
nuget NetMQ
nuget Newtonsoft.Json
nuget FAKE
nuget xUnit >= 2.1 framework: >= net451
nuget xunit.runner.console >= 2.1 framework: >= net451
nuget Paket.Core >= 3.17.2
nuget Chessie ~> 0.6
nuget xUnit
nuget xunit.runner.console
nuget Paket.Core

group Docs

framework: >= net451
source https://www.nuget.org/api/v2

nuget FSharp.Formatting
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
Expand Up@@ -175,3 +175,5 @@ temp/
# Test results produced by build
TestResults.xml
.paket/paket.exe
paket.lock

2 changes: 1 addition & 1 deletion build.cmd
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ if errorlevel 1 (
exit /b %errorlevel%
)

.paket\paket.exe restore
.paket\paket.exe install
if errorlevel 1 (
exit /b %errorlevel%
)
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@ if [ ! -f packages/FAKE/tools/FAKE.exe ]; then
exit $exit_code
fi
fi
${EXE} ${PREFIX}/.paket/paket.exe restore
${EXE} ${PREFIX}/.paket/paket.exe install
exit_code=$?
if [ $exit_code -ne 0 ]; then
exit $exit_code
Expand Down
9 changes: 4 additions & 5 deletions docs/content/customPrinters.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,13 +3,12 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
// #r "System.Data.dll"
// #r "System.Windows.Forms.DataVisualization.dll"
// #r "FSharp.Data.TypeProviders.dll"
// #r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

Expand Down
10 changes: 6 additions & 4 deletions docs/content/globals.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,8 +3,6 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"
Expand All@@ -16,22 +14,26 @@ open IfSharp.Kernel.Globals
(**
The Display global
==================
The `Display` function is a 'global' function that can be accessed anywhere throughout
The `Display` function is a global function that can be accessed anywhere throughout
the notebook. It will take any object and attempt to display it to the user. Built-in
supported types are:

* `FSharp.Charting.ChartTypes.GenericChart`
* `IfSharp.Kernel.GenericChartWithSize`
* `IfSharp.Kernel.TableOutput`
* `IfSharp.Kernel.HtmlOutput`
* `IfSharp.Kernel.BinaryOutput`

Additional `Display` printers are provided via helper scripts.

<hr />

FSharp.Charting.ChartTypes.GenericChart
---------------------------------------
*)

#load "FSharp.Charting.Paket.fsx"
#load "FSharp.Charting.fsx"

let fruitData = [| ("Cherries", 100); ("Apples", 200); ("Bananas", 150); ("Peaches", 10) |]
Chart.Bar(fruitData) |> Display

Expand Down
46 changes: 35 additions & 11 deletions docs/content/index.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,25 +38,49 @@ Startup script
is executed on startup. The script automatically references the following assemblies:

* IfSharp.Kernel.dll
* System.Data.dll
* System.Windows.Forms.DataVisualization.dll
* FSharp.Data.TypeProviders.dll
* FSharp.Charting.dll
* NetMQ.dll

And automatically opens the following namespaces:

* FSharp.Charting
* IfSharp.Kernel
* IfSharp.Kernel.Global

Integrated NuGet support
Paket support
------------------------
To automatically download NuGet package, use the #N directive: `#N "Newtonsoft.Json"`.
This will download the package and automatically reference assemblies within the package.
[More NuGet integration documentation](nuget.html).
To download [Paket](https://fsprojects.github.io/Paket/) packages, start with:
*)

#load "Paket.fsx"

(**
This will allow you to specify Paket dependencies with a declarative syntax.
*)

Paket.Package ["Newtonsoft.Json"]

(**
You will need to load any assemblies you require from those packages using `#r` directives.

If you need to specify a version, you can use an alternate form:
*)

![NuGet Example](img/NuGet-1.png "NuGet example")
Paket.Version ["Newtonsoft.Json", "~> 9.0.1"]

(**
Some helper scripts are provided to handle Paket package installation, assembly dependency, and custom `Display` printers for commonly used packages. Each helper script is divided into a script that installs Paket dependencies, and another that loads assemblies and sets up extension functions and `Display` printers.
*)

#load "Angara.Charting.Paket.fsx"
#load "Angara.Charting.fsx"

#load "XPlot.Plotly.Paket.fsx"
#load "XPlot.Plotly.fsx"

#load "FSharp.Charting.Paket.fsx"
#load "FSharp.Charting.fsx"

(**
[`Angara.Charting`](http://predictionmachines.github.io/Angara.Chart/) and [`XPlot.Plotly`](https://tahahachana.github.io/XPlot/plotly.html) are both feature-rich, cross-platform charting packages. [`FSharp.Charting`](https://fslab.org/FSharp.Charting/) is a Windows-only charting package.

Sin chart wave example
----------------------
Expand DownExpand Up@@ -85,4 +109,4 @@ Util.Math("f(x) = sin(x)") |> Display

(**
<img src="img/chart-1.png" alt="sin function" />
*)
*)
50 changes: 30 additions & 20 deletions docs/content/installation.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,37 +3,47 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

(**
# Automatic Installation
1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
# Windows Installation

3. Download the latest version of IfSharp from the [release repository](https://github.com/BayardRock/IfSharp/releases).
Run the setup wizard and execute the icon that is placed on the desktop.
## Automatic Installation

Running the executable after it is installed will automatically generate the files necessary
for starting up (if the file structure does not exist) and then execute the `ipython notebook --profile ifsharp` command.
1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
3. Download the latest version of IfSharp from the [release repository](https://github.com/BayardRock/IfSharp/releases)
4. Run the setup wizard and execute the icon that is placed on the desktop

If the file structure does exist, only the command `ipython notebook --profile ifsharp` is executed.
Running the executable after it is installed will automatically generate the files necessary for starting up (if the file structure does not exist) and then execute the `ipython notebook --profile ifsharp` command.

To overwrite the file structure again, invoke ifsharp.exe with the install parameter: `ifsharp.exe --install`.

# Manual Installation
## Manual Installation

1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
3. Run: "ipython profile create ifsharp" in your user directory
4. Open the iF# solution file, restore nuget packages, and compile it
5. Copy the files from IfSharp\ipython-profile to the iFSharp profile directory
6. Open up the copied "ipython_config.py" file and replace "%s" with the path of your compiled ifsharp executable. E.g. "C:\\git\\ifsharp\\bin\\Release\\ifsharp.exe"
7. Run: "ipython notebook --profile ifsharp" to launch the notebook process with the F# kernel.
*)
3. Either open the iF# solution file, restore nuget packages, and compile it
4. Or run `./build.cmd` from the command line
5. Run `isharp.exe --install` to set up the F# kernel
6. `jupyter notebook`

# Linux Installation

1. Use your package manager to install `mono`, `fsharp`, and `python3`
2. `pip3 install jupyter`
3. Download IfSharp and build it with `./build.sh`
4. Install IfSharp with `mono ./bin/ifsharp.exe --install`
5. `jupyter notebook`

# OSX Installation

1. `brew install mono fsharp python3`
2. `pip3 install jupyter`
3. Download IfSharp and build it with `./build.sh`
4. Install IfSharp with `mono ./bin/ifsharp.exe --install`
5. `jupyter notebook`
*)
39 changes: 0 additions & 39 deletions docs/content/nuget.fsx

This file was deleted.

3 changes: 0 additions & 3 deletions docs/content/utils.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,11 +5,8 @@
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

Expand Down
22 changes: 14 additions & 8 deletions docs/tools/generate.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,22 +12,28 @@ let website = "/IfSharp"
let info =
[ "project-name", "IfSharp"
"project-author", "Bayard Rock (Peter Rosconi)"
"project-summary", "F# implementation of iPython"
"project-github", "http://github.com/BayardRock/IfSharp/"
"project-summary", "F# kernel for Jupyter"
"project-github", "http://github.com/fsprojects/IfSharp/"
"project-nuget", "http://nuget.com/packages/IfSharp/" ]

// --------------------------------------------------------------------------------------
// For typical project, no changes are needed below
// --------------------------------------------------------------------------------------

#I "../../packages/FSharp.Formatting.2.1.6/lib/net40"
#I "../../packages/RazorEngine.3.3.0/lib/net40/"
#r "../../packages/Microsoft.AspNet.Razor.2.0.30506.0/lib/net40/System.Web.Razor.dll"
#r "../../packages/FAKE/tools/FakeLib.dll"
#r "../../packages/docs/FSharp.Compiler.Service/lib/net45/FSharp.Compiler.Service.dll"
#r "../../packages/docs/FSharpVSPowerTools.Core/lib/net45/FSharpVSPowerTools.Core.dll"

#I "../../packages/docs/FSharp.Formatting/lib/net40/"

#r "System.Web.Razor.dll"
#r "RazorEngine.dll"
#r "FSharp.Literate.dll"
#r "FSharp.CodeFormat.dll"
#r "FSharp.Markdown.dll"
#r "FSharp.Formatting.Common.dll"
#r "FSharp.Literate.dll"
#r "FSharp.MetadataFormat.dll"

open Fake
open System.IO
open Fake.FileHelper
Expand All@@ -48,7 +54,7 @@ let content = __SOURCE_DIRECTORY__ @@ "../content"
let output = __SOURCE_DIRECTORY__ @@ "../output"
let files = __SOURCE_DIRECTORY__ @@ "../files"
let templates = __SOURCE_DIRECTORY__ @@ "templates"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/FSharp.Formatting.2.1.6/"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/docs/FSharp.Formatting/"
let docTemplate = formatting @@ "templates/docpage.cshtml"

// Where to look for *.csproj templates (in this order)
Expand All@@ -60,7 +66,7 @@ let layoutRoots =
let copyFiles () =
CopyRecursive files output true |> Log "Copying file: "
ensureDirectory (output @@ "content")
CopyRecursive (formatting @@ "content") (output @@ "content") true
CopyRecursive (formatting @@ "styles") (output @@ "content") true
|> Log "Copying styles and scripts: "

// Build API reference from XML comments
Expand Down
1 change: 0 additions & 1 deletion docs/tools/templates/template.cshtml
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,7 +44,6 @@
<li><a href="@Root/globals.html">Globals</a></li>
<li><a href="@Root/utils.html">Utils</a></li>
<li><a href="@Root/customPrinters.html">Custom Printers</a></li>
<li><a href="@Root/nuget.html">NuGet Integration</a></li>
<li class="divider"></li>
<li><a href="@Properties["project-github"]">Source Code on GitHub</a></li>
<li><a href="@Properties["project-github"]blob/master/LICENSE.txt">License</a></li>
Expand Down
21 changes: 14 additions & 7 deletions paket.dependencies
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
framework: >= net451
source https://www.nuget.org/api/v2

nuget FSharp.Compiler.Service 6.0.2 framework: >= net451
nuget NetMQ 3.3.3.1
nuget Newtonsoft.Json ~> 9.0.1 framework: >= net451
nuget FSharp.Compiler.Service
nuget NetMQ
nuget Newtonsoft.Json
nuget FAKE
nuget xUnit >= 2.1 framework: >= net451
nuget xunit.runner.console >= 2.1 framework: >= net451
nuget Paket.Core >= 3.17.2
nuget Chessie ~> 0.6
nuget xUnit
nuget xunit.runner.console
nuget Paket.Core

group Docs

framework: >= net451
source https://www.nuget.org/api/v2

nuget FSharp.Formatting
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
Expand Up@@ -175,3 +175,5 @@ temp/
# Test results produced by build
TestResults.xml
.paket/paket.exe
paket.lock

2 changes: 1 addition & 1 deletion build.cmd
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ if errorlevel 1 (
exit /b %errorlevel%
)

.paket\paket.exe restore
.paket\paket.exe install
if errorlevel 1 (
exit /b %errorlevel%
)
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@ if [ ! -f packages/FAKE/tools/FAKE.exe ]; then
exit $exit_code
fi
fi
${EXE} ${PREFIX}/.paket/paket.exe restore
${EXE} ${PREFIX}/.paket/paket.exe install
exit_code=$?
if [ $exit_code -ne 0 ]; then
exit $exit_code
Expand Down
9 changes: 4 additions & 5 deletions docs/content/customPrinters.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,13 +3,12 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
// #r "System.Data.dll"
// #r "System.Windows.Forms.DataVisualization.dll"
// #r "FSharp.Data.TypeProviders.dll"
// #r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

Expand Down
10 changes: 6 additions & 4 deletions docs/content/globals.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,8 +3,6 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"
Expand All@@ -16,22 +14,26 @@ open IfSharp.Kernel.Globals
(**
The Display global
==================
The `Display` function is a 'global' function that can be accessed anywhere throughout
The `Display` function is a global function that can be accessed anywhere throughout
the notebook. It will take any object and attempt to display it to the user. Built-in
supported types are:

* `FSharp.Charting.ChartTypes.GenericChart`
* `IfSharp.Kernel.GenericChartWithSize`
* `IfSharp.Kernel.TableOutput`
* `IfSharp.Kernel.HtmlOutput`
* `IfSharp.Kernel.BinaryOutput`

Additional `Display` printers are provided via helper scripts.

<hr />

FSharp.Charting.ChartTypes.GenericChart
---------------------------------------
*)

#load "FSharp.Charting.Paket.fsx"
#load "FSharp.Charting.fsx"

let fruitData = [| ("Cherries", 100); ("Apples", 200); ("Bananas", 150); ("Peaches", 10) |]
Chart.Bar(fruitData) |> Display

Expand Down
46 changes: 35 additions & 11 deletions docs/content/index.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,25 +38,49 @@ Startup script
is executed on startup. The script automatically references the following assemblies:

* IfSharp.Kernel.dll
* System.Data.dll
* System.Windows.Forms.DataVisualization.dll
* FSharp.Data.TypeProviders.dll
* FSharp.Charting.dll
* NetMQ.dll

And automatically opens the following namespaces:

* FSharp.Charting
* IfSharp.Kernel
* IfSharp.Kernel.Global

Integrated NuGet support
Paket support
------------------------
To automatically download NuGet package, use the #N directive: `#N "Newtonsoft.Json"`.
This will download the package and automatically reference assemblies within the package.
[More NuGet integration documentation](nuget.html).
To download [Paket](https://fsprojects.github.io/Paket/) packages, start with:
*)

#load "Paket.fsx"

(**
This will allow you to specify Paket dependencies with a declarative syntax.
*)

Paket.Package ["Newtonsoft.Json"]

(**
You will need to load any assemblies you require from those packages using `#r` directives.

If you need to specify a version, you can use an alternate form:
*)

![NuGet Example](img/NuGet-1.png "NuGet example")
Paket.Version ["Newtonsoft.Json", "~> 9.0.1"]

(**
Some helper scripts are provided to handle Paket package installation, assembly dependency, and custom `Display` printers for commonly used packages. Each helper script is divided into a script that installs Paket dependencies, and another that loads assemblies and sets up extension functions and `Display` printers.
*)

#load "Angara.Charting.Paket.fsx"
#load "Angara.Charting.fsx"

#load "XPlot.Plotly.Paket.fsx"
#load "XPlot.Plotly.fsx"

#load "FSharp.Charting.Paket.fsx"
#load "FSharp.Charting.fsx"

(**
[`Angara.Charting`](http://predictionmachines.github.io/Angara.Chart/) and [`XPlot.Plotly`](https://tahahachana.github.io/XPlot/plotly.html) are both feature-rich, cross-platform charting packages. [`FSharp.Charting`](https://fslab.org/FSharp.Charting/) is a Windows-only charting package.

Sin chart wave example
----------------------
Expand DownExpand Up@@ -85,4 +109,4 @@ Util.Math("f(x) = sin(x)") |> Display

(**
<img src="img/chart-1.png" alt="sin function" />
*)
*)
50 changes: 30 additions & 20 deletions docs/content/installation.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,37 +3,47 @@
// it to define helpers that you do not want to show in the documentation.
#I "../../bin"
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

(**
# Automatic Installation
1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
# Windows Installation

3. Download the latest version of IfSharp from the [release repository](https://github.com/BayardRock/IfSharp/releases).
Run the setup wizard and execute the icon that is placed on the desktop.
## Automatic Installation

Running the executable after it is installed will automatically generate the files necessary
for starting up (if the file structure does not exist) and then execute the `ipython notebook --profile ifsharp` command.
1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
3. Download the latest version of IfSharp from the [release repository](https://github.com/BayardRock/IfSharp/releases)
4. Run the setup wizard and execute the icon that is placed on the desktop

If the file structure does exist, only the command `ipython notebook --profile ifsharp` is executed.
Running the executable after it is installed will automatically generate the files necessary for starting up (if the file structure does not exist) and then execute the `ipython notebook --profile ifsharp` command.

To overwrite the file structure again, invoke ifsharp.exe with the install parameter: `ifsharp.exe --install`.

# Manual Installation
## Manual Installation

1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
3. Run: "ipython profile create ifsharp" in your user directory
4. Open the iF# solution file, restore nuget packages, and compile it
5. Copy the files from IfSharp\ipython-profile to the iFSharp profile directory
6. Open up the copied "ipython_config.py" file and replace "%s" with the path of your compiled ifsharp executable. E.g. "C:\\git\\ifsharp\\bin\\Release\\ifsharp.exe"
7. Run: "ipython notebook --profile ifsharp" to launch the notebook process with the F# kernel.
*)
3. Either open the iF# solution file, restore nuget packages, and compile it
4. Or run `./build.cmd` from the command line
5. Run `isharp.exe --install` to set up the F# kernel
6. `jupyter notebook`

# Linux Installation

1. Use your package manager to install `mono`, `fsharp`, and `python3`
2. `pip3 install jupyter`
3. Download IfSharp and build it with `./build.sh`
4. Install IfSharp with `mono ./bin/ifsharp.exe --install`
5. `jupyter notebook`

# OSX Installation

1. `brew install mono fsharp python3`
2. `pip3 install jupyter`
3. Download IfSharp and build it with `./build.sh`
4. Install IfSharp with `mono ./bin/ifsharp.exe --install`
5. `jupyter notebook`
*)
39 changes: 0 additions & 39 deletions docs/content/nuget.fsx

This file was deleted.

3 changes: 0 additions & 3 deletions docs/content/utils.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,11 +5,8 @@
#r "IFSharp.Kernel"
#r "System.Data.dll"
#r "System.Windows.Forms.DataVisualization.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "FSharp.Charting.dll"
#r "NetMQ.dll"

open FSharp.Charting
open IfSharp.Kernel
open IfSharp.Kernel.Globals

Expand Down
22 changes: 14 additions & 8 deletions docs/tools/generate.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,22 +12,28 @@ let website = "/IfSharp"
let info =
[ "project-name", "IfSharp"
"project-author", "Bayard Rock (Peter Rosconi)"
"project-summary", "F# implementation of iPython"
"project-github", "http://github.com/BayardRock/IfSharp/"
"project-summary", "F# kernel for Jupyter"
"project-github", "http://github.com/fsprojects/IfSharp/"
"project-nuget", "http://nuget.com/packages/IfSharp/" ]

// --------------------------------------------------------------------------------------
// For typical project, no changes are needed below
// --------------------------------------------------------------------------------------

#I "../../packages/FSharp.Formatting.2.1.6/lib/net40"
#I "../../packages/RazorEngine.3.3.0/lib/net40/"
#r "../../packages/Microsoft.AspNet.Razor.2.0.30506.0/lib/net40/System.Web.Razor.dll"
#r "../../packages/FAKE/tools/FakeLib.dll"
#r "../../packages/docs/FSharp.Compiler.Service/lib/net45/FSharp.Compiler.Service.dll"
#r "../../packages/docs/FSharpVSPowerTools.Core/lib/net45/FSharpVSPowerTools.Core.dll"

#I "../../packages/docs/FSharp.Formatting/lib/net40/"

#r "System.Web.Razor.dll"
#r "RazorEngine.dll"
#r "FSharp.Literate.dll"
#r "FSharp.CodeFormat.dll"
#r "FSharp.Markdown.dll"
#r "FSharp.Formatting.Common.dll"
#r "FSharp.Literate.dll"
#r "FSharp.MetadataFormat.dll"

open Fake
open System.IO
open Fake.FileHelper
Expand All@@ -48,7 +54,7 @@ let content = __SOURCE_DIRECTORY__ @@ "../content"
let output = __SOURCE_DIRECTORY__ @@ "../output"
let files = __SOURCE_DIRECTORY__ @@ "../files"
let templates = __SOURCE_DIRECTORY__ @@ "templates"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/FSharp.Formatting.2.1.6/"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/docs/FSharp.Formatting/"
let docTemplate = formatting @@ "templates/docpage.cshtml"

// Where to look for *.csproj templates (in this order)
Expand All@@ -60,7 +66,7 @@ let layoutRoots =
let copyFiles () =
CopyRecursive files output true |> Log "Copying file: "
ensureDirectory (output @@ "content")
CopyRecursive (formatting @@ "content") (output @@ "content") true
CopyRecursive (formatting @@ "styles") (output @@ "content") true
|> Log "Copying styles and scripts: "

// Build API reference from XML comments
Expand Down
1 change: 0 additions & 1 deletion docs/tools/templates/template.cshtml
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,7 +44,6 @@
<li><a href="@Root/globals.html">Globals</a></li>
<li><a href="@Root/utils.html">Utils</a></li>
<li><a href="@Root/customPrinters.html">Custom Printers</a></li>
<li><a href="@Root/nuget.html">NuGet Integration</a></li>
<li class="divider"></li>
<li><a href="@Properties["project-github"]">Source Code on GitHub</a></li>
<li><a href="@Properties["project-github"]blob/master/LICENSE.txt">License</a></li>
Expand Down
21 changes: 14 additions & 7 deletions paket.dependencies
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
framework: >= net451
source https://www.nuget.org/api/v2

nuget FSharp.Compiler.Service 6.0.2 framework: >= net451
nuget NetMQ 3.3.3.1
nuget Newtonsoft.Json ~> 9.0.1 framework: >= net451
nuget FSharp.Compiler.Service
nuget NetMQ
nuget Newtonsoft.Json
nuget FAKE
nuget xUnit >= 2.1 framework: >= net451
nuget xunit.runner.console >= 2.1 framework: >= net451
nuget Paket.Core >= 3.17.2
nuget Chessie ~> 0.6
nuget xUnit
nuget xunit.runner.console
nuget Paket.Core

group Docs

framework: >= net451
source https://www.nuget.org/api/v2

nuget FSharp.Formatting
Loading