Skip to content

Instantly share code, notes, and snippets.

View sergey-tihon's full-sized avatar
🦀

Sergey Tihon sergey-tihon

🦀
View GitHub Profile

A response to http://ayende.com/blog/170849/why-ravendb-isnt-written-in-f-or-the-cost-of-the-esoteric-choice

Why my F# projects don't use RavenDB, or the cost of the esoteric choice

As you know, I generally recommend using SqlServer for data storage.

But many people have suggested that using RavenDB rather than SqlServer would dramatically reduce the development effort.

My reply to that was that using RavenDB would also lead to a lot more complexity, reduced support by other teams, harder to find DBAs and increased costs all around.

@theburningmonk
theburningmonk / FSharpSerialization.fsx
Created March 18, 2012 12:54
Serializing/Deserializing F# Record and DU types
#r "System.Xml.dll"
#r "System.Runtime.Serialization.dll"
open Microsoft.FSharp.Reflection
open System.IO
open System.Reflection
open System.Runtime.Serialization
open System.Runtime.Serialization.Formatters.Binary
open System.Runtime.Serialization.Json
open System.Text
@swlaschin
swlaschin / type-dependency-graph.fsx
Last active March 4, 2021 19:24
This script analyzes the dependencies between top level types in a .NET Assembly. It is then used to compare the dependency relationships in some F# projects with those in some C# projects.
(*
This script analyzes the dependencies between top level types in a .NET Assembly.
It is then used to compare the dependency relationships in some F# projects with those in some C# projects.
Note that no attempt has been made to optimize the code yet!
REQUIRES:
* Mono.Cecil for code analysis
From http://www.mono-project.com/Cecil#Download
@mrange
mrange / lazy_performance.md
Last active June 11, 2020 21:21
On the cost of being lazy

On the cost of being lazy

Full source code can be found here

Changelog

  1. 2017-01-04
  2. New performance test - Paul Westcott (@manofstick) provided his implementation of Lazy semantics (called Lazzzy) which I included in the graphs. This implementation is intended to be equivalent to Lazy<'T> in .NET with regards to functionality.
  3. 2017-01-17
  4. New performance test - is working on a PR for .NET Core. I wanted to include performance numbers for the updated Lazy<'T> class.
asnp *SharePoint* -ErrorAction SilentlyContinue
// URL of the Web App to change the Application Pool of.
$WebAppURL = "http://WebApp"
// name of the name Application Pool that will be created.
$NewAppPoolName = "NewAppPool"
//the user account that the Application Pool will run under the context of.
$NewAppPoolUserName = "contoso\apppool"
// have no idea what exact type should look like
type Node = { Reference : int }
let mkArgs0 (target : Node) (source : Node) = dict ["n", box target.Reference; "m", box source.Reference]
// symbolic operators FTW
let (=>) (a : string) b = a, box b
let mkArgs1_1 (target : Node) (source : Node) = dict ["n" => target.Reference; "m" => source.Reference]
let (!) = box
@forki
forki / gist:2161552
Created March 22, 2012 18:43
Starting the WPF app
open System
open System.Windows
open System.Windows.Controls
open FSharpx
type MainWindow = XAML<"Window.xaml">
let loadWindow() =
let window = MainWindow()
window.Button1.Click.Add(fun _ ->