Let's say you have implemented a small data pipeline library to replace LINQ.
module TrivialStream =
type Receiver<'T> = 'T -> unit
type Stream<'T> = Receiver<'T> -> unit
module Details =
(* | |
An immutable R-Tree implementation in F#. | |
Based on: https://github.com/swimos/swim-rust/tree/main/swim_utilities/swim_rtree (licensed on Apache 2.0) | |
Author: Bartosz Sypytkowski <b.sypytkowski at gmail.com> | |
*) | |
namespace Demos.RTree |
open SharedMemory | |
open MBrace.FsPickler | |
module Rpc = | |
type RpcContext<'command, 'message> = | |
{ name: string; buffer: RpcBuffer; post: 'command -> Async<'message>} with | |
interface IDisposable with | |
member this.Dispose() = this.buffer.Dispose() | |
let createHost name (handler : 'command -> Async<'message>) = |
// You need to add missing types manually to IExport in Three.fs if you need. | |
// https://twitter.com/OnurGumusDev/status/1548282140806115330 | |
module rec Dat | |
open Browser.Types | |
open Fable.Core | |
open System |
namespace GhFsharpTest | |
open Grasshopper.Kernel | |
open Grasshopper.Kernel.Types | |
type Priority() = | |
inherit GH_AssemblyPriority() | |
override u.PriorityLoad() = | |
GH_LoadingInstruction.Proceed |
Last week I spent a lot of time trying to deploy an F# ASP.NET Core app (a Giraffe app, specifically) to Azure because the information to complete all the steps was scattered in several places. So I'm writing this hopefully it will save the pain to others :)
The following steps are mostly taken from this guide and it's only necessary to do them once:
(* | |
Simulation of the Lorentz attractor, using Fable. | |
If you want to see this code in action, just copy this code into the Fable REPL: | |
https://fable.io/repl/ | |
*) | |
module App | |
open Elmish | |
open Elmish.React |
//========================================== | |
// Working fully self-contained getting-started example for Suave Web Server scripting | |
// | |
// Note you don't need to have _anything_ installed before starting with this script. Nothing | |
// but F# Interactive and this script. | |
// | |
// This script fetches the Paket.exe component which is referenced later in the script. | |
// Initially the #r "paket.exe" reference is shown as unresolved. Once it has been | |
// downloaded by the user (by executing the first part of the script) the reference | |
// shows as resolved and can be used. |
#I __SOURCE_DIRECTORY__ | |
#r "libs/NuGet.Core.dll" | |
#r "System.Xml.Linq" | |
open NuGet | |
open System | |
open System.IO | |
module NuGet = |
// Generating the full model using my custom DLLs for geometry input | |
// F# editor: https://gist.github.com/moloneymb/5e5608c129337cfefa40 | |
#r @"C:\Program Files\Autodesk\Revit 2016\RevitAPI.dll" | |
#r @"C:\Program Files\Autodesk\Revit 2016\RevitDBAPI.dll" | |
#r @"C:\Program Files\Autodesk\Revit 2016\RevitAPIUI.dll" | |
#r @"C:\Program Files\Mantis\Tsunami.IDEDesktop.dll" | |
#r @"C:\work\goswin\30_F#\16-135_LAD\LAD\GosLib\bin\Release\GosLib.dll" | |
#r @"C:\work\goswin\30_F#\16-135_LAD\LAD\LAD\bin\Release\LAD.dll" | |
open Autodesk.Revit.DB |