Skip to content

Instantly share code, notes, and snippets.

@cloudRoutine
cloudRoutine / README.md
Created December 15, 2021 01:28 — forked from mrange/README.md
# 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
cloudRoutine / fsharp_advent_2016_12_10.md
Created December 18, 2018 10:31 — forked from mrange/fsharp_advent_2016_12_10.md
F# Advent 2016 (English) - December 10 - Implementing a persistent hash map.
@cloudRoutine
cloudRoutine / optimizing_performance.md
Created October 12, 2016 07:09 — forked from mrange/optimizing_performance.md
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
cloudRoutine / logo_turtle.fsx
Created August 7, 2016 09:24
Logo Turtle Computation Expression
namespace CExprs
module LogoTurtle =
type Distance_Unit = STEPS
type Rotation_Unit = GRADATIONS
type Rotation_Direction = | LEFT | RIGHT
let STEP = STEPS
let GRADATION = GRADATIONS
@cloudRoutine
cloudRoutine / github-downloader.fsx
Created August 5, 2016 06:31
Download Github release files even from behind a proxy
open System
open System.IO
open System.Web
open System.Net
open System.Collections.Generic
Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
@cloudRoutine
cloudRoutine / user-profile.ps1
Last active May 13, 2022 15:11
Posh Profile for Portable Cmder with Vim Config Instructions
# 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
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
cloudRoutine / foldparser.fsx
Created March 9, 2016 08:18
Parser that folds over stream with a state record
#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
cloudRoutine / getUnionFields.fsx
Created March 6, 2016 07:13
netcore compatible `GetUnionFields`
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