Skip to content

Instantly share code, notes, and snippets.

View cartermp's full-sized avatar
🦫
reject modernity, become a beaver

Phillip Carter cartermp

🦫
reject modernity, become a beaver
View GitHub Profile
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.8.0-3.final" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.0.0" PrivateAssets="all" />
@cartermp
cartermp / mixed-applicative-mondaic-result-ce.fsx
Last active March 19, 2020 23:07
Shows mixing of monadic and applicative CEs with a result builder
// First, define a 'zip' function
module Result =
let zip x1 x2 =
match x1,x2 with
| Ok x1res, Ok x2res -> Ok (x1res, x2res)
| Error e, _ -> Error e
| _, Error e -> Error e
type ResultBuilder() =
member _.MergeSources(t1: Result<'T,'U>, t2: Result<'T1,'U>) = Result.zip t1 t2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Priority-ordered list for an F# Europe conference

Aiming for 200+ attendees

Cost should be reasonable, but not free (200+ Euros equivalent)

  • Quality coffee and tea
  • Travel for speakers and family
  • Lodging for speakers and family
  • Speakers get a free ticket to give to someone (no travel/lodging for this person)

My LambdaConf experience

I just finished an incredible (and exhausting) week at LambdaConf in Boulder, Colorado. I can say with confidence that it's the best programming conference I've attended, and I'm anxious to be able to attend it again in the future.

Stepping outside my comfort zone

I wouldn't call myself terribly experienced - 28 years old and only 4 years out of college - but I have developed a professional comfort in a few areas:

  • Interacting with F# developers
  • Interacting with C# developers
open FSharp.Data.UnitSystems.SI.UnitSymbols
type float<[<Measure>] 'm> with
member a.Bind(f,x) = f x * a
member a.Return(x) = a * sqrt x
member a.Yield(x) = a / x
member a.Combine(b:float<'m1>, c:float<'m2>) = a * b * c
member a.Quote(x) = System.Runtime.Hosting.ApplicationActivator()
member a.Delay(f) = f() * a
member a.Run(f) = Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter.EvaluateQuotation f
private static void WriteWatermark(string watermarkContent, Stream originalImage, Stream newImage)
{
originalImage.Position = 0;
using (Image inputImage = Image.FromStream(originalImage, true))
using (Graphics graphic = Graphics.FromImage(inputImage))
{
Font font = new Font("Georgia", 12, FontStyle.Bold);
SizeF textSize = graphic.MeasureString(watermarkContent, font);

Welcome, family, friends and loved ones. We are gathered here today to celebrate the wedding of Na Hyung and Phillip. You have come here from all over the country - Georgia, California, Washington - to share in this commitment they now make to one another, to offer your love and support to their union, and to allow Na Hyung and Phillip to start their married life together surrounded by people dear and important to them.

Na Hyung and Phillip thank you for your presence here today. They ask for your blessing, encouragement, and lifelong support for their decision to be married. They also remember other loved ones who cannot be here to share this moment with them today. Those people too, they hold dear in their hearts.

Na Hyung and Phillip, marriage is the promise between two people who love each other, who trust that love, who honor one another as individuals in that togetherness, and who wish to spend the rest of their lives together. It enables you to share your desires, longings, dreams, memories, joys and

; Licensed to the Apache Software Foundation (ASF) under one or more
; contributor license agreements. See the NOTICE file distributed with
; this work for additional information regarding copyright ownership.
; The ASF licenses this file to You under the Apache License, Version 2.0
; (the "License"); you may not use this file except in compliance with
; the License. You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software