Skip to content

Instantly share code, notes, and snippets.

View goswinr's full-sized avatar

Goswin Rothenthal goswinr

View GitHub Profile
@goswinr
goswinr / on-tail-recursion.md
Created March 21, 2019 07:50 — forked from mrange/on-tail-recursion.md
On the topic of tail calls in .NET

On the topic of tail calls in .NET

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 =
@goswinr
goswinr / GhFsharpTest.fs
Created June 12, 2019 07:09 — forked from jesterKing/GhFsharpTest.fs
F# sample component for testing on Mac Rhino Grasshopper (v6, aka WIP)
namespace GhFsharpTest
open Grasshopper.Kernel
open Grasshopper.Kernel.Types
type Priority() =
inherit GH_AssemblyPriority()
override u.PriorityLoad() =
GH_LoadingInstruction.Proceed
@goswinr
goswinr / Dat.fs
Last active August 23, 2022 12:20 — forked from OnurGumus/Dat.fs
three.js fable
// 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
@goswinr
goswinr / Rpc.fs
Created August 23, 2022 15:04 — forked from deviousasti/Rpc.fs
Fast inter-process RPC using shared memory
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>) =
@goswinr
goswinr / RTree.fs
Created October 26, 2022 13:55 — forked from Horusiath/RTree.fs
RTree implementation for 2D spatial data
(*
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