I hereby claim:
- I am Porges on github.
- I am porges (https://keybase.io/porges) on keybase.
- I have a public key whose fingerprint is 93E2 9078 0396 A546 0EE4 B579 54D0 F8E2 3B5B 567D
To claim this, I am signing this object:
module Life | |
open System | |
// A cell is either alive or dead | |
type Cell = Dead | Alive | |
// A board is an array of arrays of cells | |
type Board = Cell[][] |
using System; | |
using System.CodeDom; | |
using System.Runtime.CompilerServices; | |
using System.Runtime.InteropServices; | |
using System.Runtime.Remoting.Messaging; | |
using System.Runtime.Serialization; | |
using System.Threading; | |
// The situation: |
{-# LANGUAGE TypeFamilies, ImplicitParams, OverloadedStrings, ConstraintKinds, ExistentialQuantification, RankNTypes, TypeOperators #-} | |
import GHC.Prim (Constraint) | |
import Data.String (IsString) | |
import qualified Data.Text as T | |
type family XString m | |
type family XDouble m |
using System; | |
using System.Runtime.InteropServices; | |
public static class Program | |
{ | |
[DllImport("fact.dll")] | |
private static extern ulong fact(ulong x); | |
public static void Main() | |
{ |
open System | |
open System.Runtime.InteropServices | |
open Microsoft.Win32.SafeHandles | |
// Wrapping the fact.rs module... | |
[<DllImport("fact.dll")>] | |
extern uint64 fact(uint64) | |
[<DllImport("point.dll")>] | |
extern void free_point(IntPtr) |
open System | |
open System.Linq.Expressions | |
open Microsoft.FSharp.Quotations | |
open FSharp.Quotations.Evaluator | |
let toLinq (expr : Expr<bool>) = | |
let linq = expr.ToLinqExpressionUntyped() | |
let call = linq :?> Expression<Func<unit, bool>> | |
Expression.Lambda(call.Body) :?> Expression<Func<bool>> |
public static void SafeDispose<T>(ref T disposable) | |
where T : class, IDisposable | |
{ | |
Interlocked.Exchange(ref disposable, null)?.Dispose(); | |
} |
public struct Owned<T> : IDisposable | |
where T : class, IDisposable | |
{ | |
private T _value; | |
public Owned(T value) | |
{ | |
_value = value; | |
} |
module Resourceful | |
open System | |
open System.Net.Sockets | |
open System.Text | |
open System.Threading | |
open System.Threading.Tasks | |
let response = "HTTP/1.1 200 OK\r\nConnection: Keep-Alive\r\nContent-Length: 5\r\n\r\nhello" | |
let responseBytes = Encoding.ASCII.GetBytes(response) |
I hereby claim:
To claim this, I am signing this object: