Skip to content

Instantly share code, notes, and snippets.

View wallymathieu's full-sized avatar

Oskar Gewalli wallymathieu

View GitHub Profile
@wallymathieu
wallymathieu / fsharp_codeformat.txt
Created January 29, 2018 19:12
V2 vs V3 of FSharp Formatting assemblies
* FSharp.CodeFormat.Constants
Added: FSharp.CodeFormat.Constants (.NET type: Module and base: System.Object)
+ (Instance/Inheritance of FSharp.CodeFormat.Constants).Equals :
obj:System.Object
-> System.Boolean
@wallymathieu
wallymathieu / build.log
Created January 28, 2018 16:17
building a .net core solution / project in Visual Studio for Mac
Building Solution: SynVer (Debug)
Build started 1/28/2018 5:03:07 PM.
__________________________________________________
Project "/Users/mathieu/src/SyntacticVersioning/src/SynVer.Lib/SynVer.Lib.fsproj" (Build target(s)):
Target GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
Target CoreCompile:
/usr/local/share/dotnet/sdk/2.1.4/FSharp/RunFsc.sh -o:obj/Debug/netstandard2.0/SynVer.Lib.dll
+--------------------+--------------------+-------------------------+--------------------+
|Operation           | F#+ / F#           |F#+ Haskell Compatibility|Haskell             |
+====================+====================+=========================+====================+
|List.append         | @                  |                         | ++                 |
+--------------------+--------------------+-------------------------+--------------------+
|Function composition| f << g             | f . (g)                 | f . g              |
+--------------------+--------------------+-------------------------+--------------------+
|                    | <|                 | $                       | $                  |
+--------------------+--------------------+-------------------------+--------------------+
@wallymathieu
wallymathieu / fsharpplus_haskell_compatibility.md
Last active August 25, 2019 10:25
F#+ Haskell Compatibility
+--------------------+--------------------+-------------------------+--------------------+
|Operation           | F#+ / F#           |F#+ Haskell Compatibility|Haskell             |
+====================+====================+=========================+====================+
|List.append         | @                  |                         | ++                 |
+--------------------+--------------------+-------------------------+--------------------+
|Function composition| f << g             | f . (g)                 | f . g              |
+--------------------+--------------------+-------------------------+--------------------+
|                    | <|                 | $                       | $                  |
+--------------------+--------------------+-------------------------+--------------------+
@wallymathieu
wallymathieu / Validation.fsx
Last active February 14, 2021 22:18 — forked from gusty/Validation.fsx
Applicative Validation easy with F#+
#r @"c:/packages/FSharpPlus.1.0.0-CI00099/lib/net45/FSharpPlus.dll"
open System
open FSharpPlus
// Validation definition
type Validation<'a,'e> = Success of 'a | Failure of 'e
with
// Validation is an instance of Applicative
static member inline Return x = Success x
@wallymathieu
wallymathieu / SomeWebProject.csproj
Last active March 5, 2021 11:17
Recursive include of c# files in a project
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<!-- ...
based on https://stackoverflow.com/questions/7643615/how-can-i-get-msbuild-to-copy-all-files-marked-as-content-to-a-folder-preservin
-->
<WWWRoot>$(ProjectDir)wwwroot</WWWRoot>
</PropertyGroup>
<ItemGroup>
<!-- Specify a file collection WWWRootFiles: -->
<WWWRootFiles Include="..\wwwroot\**\*.*"></WWWRootFiles>
@wallymathieu
wallymathieu / us-states.xml
Created December 14, 2017 09:02 — forked from bzerangue/us-states.xml
List of States in the United States of America (with dates of when they became as state)
<?xml version="1.0" encoding="UTF-8"?>
<states nation="United States of America" nation-abbreviation="USA" nation-capital="Washington, D.C.">
<state name="Alabama" abbreviation="AL" capital="Montgomery" date="1819-12-14" most-populous-city="Birmingham" population="4708708" square-miles="52423" time-zone-1="CST (UTC-06)" time-zone-2="EST (UTC-05)" dst="Yes"/>
<state name="Alaska" abbreviation="AK" capital="Juneau" date="1959-01-03" most-populous-city="Anchorage" population="698473" square-miles="656425" time-zone-1="AKST (UTC-09)" time-zone-2="HST (UTC-10)" dst="Yes"/>
<state name="Arizona" abbreviation="AZ" capital="Phoenix" date="1912-02-14" most-populous-city="Phoenix" population="6595778" square-miles="114006" time-zone-1="MT (UTC-07)" dst="No"/>
<state name="Arkansas" abbreviation="AR" capital="Little Rock" date="1836-06-15" most-populous-city="Little Rock" population="2889450" square-miles="53182" time-zone-1="CST (UTC-06)" dst="Yes"/>
<state name="California" abbreviation="CA" capital="Sacrame
@wallymathieu
wallymathieu / CpsTests.fs
Created November 4, 2017 21:58
ExtCore Cps tests
module Tests
open System
open Xunit
open System
open ExtCore.Control.Cps
open ExtCore.Control.Collections.Cps
//https://github.com/fabriceleal/Continuations/blob/master/Continuations/Program.fs
@wallymathieu
wallymathieu / AsyncResult.fs
Created October 25, 2017 10:13
Async result f#
[<AutoOpen>]
module AsyncResult
//from https://github.com/SuaveIO/suave/blob/master/src/Suave/WebPart.fs
type AsyncResult<'a,'e> = Async<Result< 'a,'e>>
let inline succeed x = async.Return (Ok x)
let bind (f: 'a -> AsyncResult<'b,'e>) (a: AsyncResult<'a,'e>) = async {
let! p = a
match p with
@wallymathieu
wallymathieu / Uris.cs
Created September 21, 2017 07:45
Sample combine URI in c#
using System;
namespace Namespace
{
/// <summary>
/// Uri helpers
/// </summary>
public static class Uris
{
/// <summary>