Skip to content

Instantly share code, notes, and snippets.

View FERMAT?.fsx
let rot n (s:string) = (s + s).Substring(n, s.Length)
let tonum (c:char) = ((int c - int 'A') * 5 + 15) % 26
let conv s = s |> rot 2 |> tonum |> Seq.fold (fun a c -> a + (sprintf "%02d" c)) ""
let test s =
printfn "%s -> %s" s (conv s)
test "CAT"
test "DOG"
test "EULER"
yukitos / result.txt
Last active Apr 3, 2017
FSC 12.0.2 test
View result.txt
View gist:8f86c63c69640228a5391433a2f33b27

Computation Expression Problems

1. The translation rule of do! e;

In the language specification, the translation rule of do! e; is defined as follows:

T(do! e;, V, C, q) = T(let! () = src(e) in b.Return(), V, C, q)

And the signature of Return is 'a -> M<'a>, so the type of do! e; results M<unit>.

.assembly extern mscorlib { auto }
.assembly YDD { }
.module YDD.dll
.corflags 0x00000002
.vtfixup [1] int32 fromunmanaged at VT_01 // First v-table fixup
.vtfixup [1] int32 fromunmanaged at VT_02 // Second v-table fixup
.vtfixup [1] int32 fromunmanaged at VT_03 // Third v-table fixup
.data VT_01 = int32(0) // First v-table entry
.data VT_02 = int32(0) // Second v-table entry
.data VT_03 = int32(0) // Third v-table entry

FSDN: F# API Search Engine Web Application

FSDN is a web application that uses F# API Search library. F# API Search library supports the standard signature of F# with some extentions as its criteria. This document describes the F# API Search library specific formats.

Query format specifications

Supported API signatures

yukitos / gist:55f79eafcd7bce84e68b
Created Dec 2, 2015
VS2015 Update1 installation failed.
View gist:55f79eafcd7bce84e68b
[4B2C:2DC8][2015-12-01T21:40:22]i338: Acquiring package: netfx_46mtpacklp_enu, payload: cab7896C7D6E9FB44EFA16EB57DED6BDB85, download from: bits://
[4980:4198][2015-12-01T21:40:30]i304: Verified existing payload: cab7896C7D6E9FB44EFA16EB57DED6BDB85 at path: C:\ProgramData\Package Cache\.unverified\cab7896C7D6E9FB44EFA16EB57DED6BDB85.
[4980:4198][2015-12-01T21:40:30]i305: Verified acquired payload: cab7896C7D6E9FB44EFA16EB57DED6BDB85 at path: C:\ProgramData\Package Cache\.unverified\cab7896C7D6E9FB44EFA16EB57DED6BDB85, moving to: C:\ProgramData\Package Cache\{034547E9-D8FA-49E7-8B9C-4C9861FB9146}v4.6.00127\packages\netfx_46mtpack\enu\
[4B2C:2DC8][2015-12-01T21:40:30]i000: MUX: Source confirmed
[4980:3D44][2015-12-02T07:34:01]i400: Received system request to shut down the process: critical: No, elevated: Yes, allowed: No
View FizzBuzz.fs
type IFizzBuzz =
abstract member check : int -> bool
abstract member getVal : unit -> string
type Fizz() =
interface IFizzBuzz with
member x.check n = (n % 3 = 0)
member x.getVal() = "Fizz"
type Buzz() =
View IfThenElseExprs.cs
class Program
static void Main()
var result =
Expr.If(DateTime.Now.Second % 2 == 0)
.Then(() =>
Console.WriteLine("Then clause handled.");
return 0;
View LintTagger.fs
// (snip)
let endCol =
if r.StartLine = r.EndLine then
yukitos / Collector.fs
Last active Oct 3, 2015
WIP: Trying to fix MissingMethodException of Persimmon.VisualStudio.TestExplorer.
View Collector.fs
namespace Persimmon.Runner.Wrapper
open Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging
open System
open System.Collections.Generic
open System.Reflection
module private TestCollectorImpl =
open Persimmon