Skip to content

Instantly share code, notes, and snippets.

View jindraivanek's full-sized avatar

Jindřich Ivánek jindraivanek

View GitHub Profile
@atacratic
atacratic / ability-tutorial.output.md
Last active April 16, 2024 12:06
Unison abilities - unofficial alternative tutorial

This tutorial explains how Unison handles 'effectful' computations, like storing state or performing I/O, using abilities. It assumes you haven't come across abilities before, and covers everything from the ground up.

This is an unofficial tutorial, written before the one on unisonweb.org/docs. The approach taken here is slow and methodical. Your first stop should be the official tutorial, if you haven't seen it already.

This doc is a Unison transcript - the source is here.

Terminology note: other languages with ability systems typically call them 'effect handlers' or 'algebraic effects', but many of the ideas are the same.

Introducing abilities

@realvictorprm
realvictorprm / PaketDependencyManagementMadeEasy.fsx
Last active June 12, 2018 19:41
A must have for your script file to ease spreading a small proof of concept with dependencies!
open System
open System.IO
open System.Diagnostics
let downloadDependencies deps =
Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
if not (File.Exists "paket.exe") then
async {
let url = "http://fsprojects.github.io/Paket/stable"
type Result<'result, 'message> =
| Success of 'result
| Failure of 'message list
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
module Result =
let inline succeed v =
Success v
@petedavis
petedavis / SetupFakeDeploy.cmd
Created March 11, 2016 03:46
Setup Fake.Deploy
@echo on
cd %~dp0
SETLOCAL
SET NUGET_VERSION=latest
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe
IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet