Skip to content

Instantly share code, notes, and snippets.

cloudRoutine /
Created Dec 15, 2021 — forked from mrange/
# F# Advent 2021 Dec 08 - Fast data pipelines with F#6

F# Advent 2021 Dec 08 - Fast data pipelines with F#6

Thanks to Sergey Tihon for running F# Weekly and F# Advent.

Thanks to manofstick for trying out the code and coming with invaluable feedback. Cistern.ValueLinq is very impressive.

TLDR; F#6 enables data pipelines with up to 15x less overhead than LINQ

There were many interesting improvements in F#6 but one in particular caught my eye, the attribute InlineIfLambda.

cloudRoutine /
Created Dec 18, 2018 — forked from mrange/
F# Advent 2016 (English) - December 10 - Implementing a persistent hash map.
cloudRoutine /
Created Oct 12, 2016 — forked from mrange/
Optimizing a simple problem in F# and C++

Optimizing a simple problem

I was introduced to a simple optimization problem by one of my interns last week. He was about to participate in a friendly competition where they were asked to find a performant solution to the problem:

The problem

cloudRoutine / logo_turtle.fsx
Created Aug 7, 2016
Logo Turtle Computation Expression
View logo_turtle.fsx
namespace CExprs
module LogoTurtle =
type Distance_Unit = STEPS
type Rotation_Unit = GRADATIONS
type Rotation_Direction = | LEFT | RIGHT
cloudRoutine / github-downloader.fsx
Created Aug 5, 2016
Download Github release files even from behind a proxy
View github-downloader.fsx
open System
open System.IO
open System.Web
open System.Net
open System.Collections.Generic
Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
cloudRoutine / user-profile.ps1
Last active May 13, 2022
Posh Profile for Portable Cmder with Vim Config Instructions
View user-profile.ps1
# NOTE - If there are weird character errors when trying to load this profile
# resave the file with the encoding `UTF-8 with BOM`
# ┌ ┐
# Setup Environment
# └ ┘
# change to codepage to display symbols properly
chcp 65001 | out-null
View countby performance.fsx
open System.Diagnostics
open System.Reflection
open Microsoft.FSharp.Core
open Microsoft.FSharp.Core.Operators
open Microsoft.FSharp.Core.LanguagePrimitives
open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
open Microsoft.FSharp.Collections
open Microsoft.FSharp.Primitives.Basics
open System.Collections.Generic
cloudRoutine / foldparser.fsx
Created Mar 9, 2016
Parser that folds over stream with a state record
View foldparser.fsx
#r "../../../packages/fparsec/lib/net40-client/fparseccs.dll"
#r "../../../packages/fparsec/lib/net40-client/fparsec.dll"
open System
Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
open FParsec
open FParsec.Primitives
let (^) = (<|)
cloudRoutine / getUnionFields.fsx
Created Mar 6, 2016
netcore compatible `GetUnionFields`
View getUnionFields.fsx
open System
open System.Reflection
type CLIArguments =
| Working_Directory of string
| Listener of host:string * port:int
| Data of byte []
| Port of int
| Log_Level of int
| Detach