Skip to content

Instantly share code, notes, and snippets.

View manofstick's full-sized avatar

Paul Westcott manofstick

  • Kaiser Trading Group
  • Melbourne, Australia
View GitHub Profile
module Program
open System.Diagnostics
open Perf
type Key1 =
struct
val A : int
new (a)= { A = a }
end
open Perf
open System
open System.Diagnostics
open System.IO
open System.Collections.Generic
let inline run<'key when 'key : equality> (comparer:IComparer<'key>) (createKey:int -> int -> 'key) =
let g_maxSize = 4480
let fileSizes = [ 1 .. 99 ]
@manofstick
manofstick / embedded_types.fs
Last active June 17, 2018 06:27
list<option<type>>
open System.Diagnostics
open Perf
type TestRecord = { A : int; B : float }
type TestGenericRecord<'a, 'b> = { AA : 'a; BB : 'b }
type TestUnion =
| Blah
| FloatThing of float
@manofstick
manofstick / stackoverflow.fs
Created June 12, 2018 07:25
Blow that stack...
module Program
open Perf
open System
open System.Diagnostics
type ICreator<'T> =
abstract Root : 'T
abstract Next : 'T -> 'T
module Program
open Perf
open System
open System.Diagnostics
module Tortoise =
let test () =
let today = DateTime.Now
let tomorrow = today.AddDays 1.0
module Program
open Perf
open System
open System.Diagnostics
[<EntryPoint>]
let main argv =
printfn "%s" Id.Name
module Program
open Perf
open System
open System.Diagnostics
open System.Collections.Generic
type StructureInt =
struct
type EnumA = A0 = 0 | A1 = 1 | A2 = 2 | A3 = 3 | A4 = 4 | A5 = 5 | A6 = 0x7
let getAnEnum i = match i &&& 7 with 0 -> EnumA.A0 | 1 -> EnumA.A1 | 2 -> EnumA.A2 | 3 -> EnumA.A3 | 4 -> EnumA.A4 | 5 -> EnumA.A5 | _ -> EnumA.A6
type R = {
GroupByKey : EnumA
OtherData : float
}
let data = [|
let r = System.Random 42
module Program
open System.Diagnostics
type Key1 =
struct
val A : int
new (a)= { A = a }
end
open System
open System.IO
type Test = {
Core : string
Bittage : string
Name : string
Time : float
}