This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXTENDS Integers, TLC, Sequences | |
CONSTANTS Devices | |
(* --algorithm BatchInstall | |
variables | |
AppScope \in [Devices -> {0, 1}]; | |
Installs \in [Devices -> BOOLEAN]; | |
batch_pool = {}; | |
lock = FALSE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Reading out bindings | |
*) | |
type Direction = | |
| Trigger | |
| In | |
| Out | |
type Properties = Map<string,string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module AlgorithmW | |
// HINDLEY-MILNER TYPE INFERENCE | |
// Based on http://catamorph.de/documents/AlgorithmW.pdf | |
type Lit = | |
| LInt of int | |
| LBool of bool | |
type Exp = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open Microsoft.ServiceFabric.Services | |
open Suave | |
open Suave.Http.Successful | |
open Suave.Web | |
open System.Fabric | |
open System.Threading | |
open System.Threading.Tasks | |
type SuaveService() = | |
inherit StatelessService() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Insert code here to change to directory where you wish to download videos if you so desire | |
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath | |
$a = ([xml](new-object net.webclient).downloadstring("http://s.ch9.ms/Events/dotnetConf/2015/RSS/mp4high")) | |
$a.rss.channel.item | foreach{ | |
$url = New-Object System.Uri($_.enclosure.url) | |
$file = "- " + $_.creator + " - " + $_.title.Replace(":", "-").Replace("?", "").Replace("/", "-").Replace("<", "").Replace("|", "").Replace('"',"").Replace("*","") | |
$file = $file.substring(0, [System.Math]::Min(120, $file.Length)) | |
$file = $file.trim() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'll try to illustrate the process for doing this by describing what I do. | |
First, you get your fork of Akka.NET - everything is cool. | |
Next, you clone it to your machine. Right now your "origin" is set to your local fork. | |
If Github for Windows doesn't do this for you automatically, you'll need to add a second remote to your local copy of your Akka.NET repository - one that points to the main repository (akkadotnet/akka.net) | |
git remote add upstream git@github.com:akkadotnet/akka.net.git | |
Now let's say you want to add a new feature - first thing you need to do is create a new feature branch. Don't work directly off of dev. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cinst 1password | |
cinst 7zip | |
cinst 7zip.install | |
cinst AdobeAIR | |
cinst adobereader | |
cinst Atom | |
cinst markdownpad2 | |
cinst autohotkey.portable | |
cinst beyondcompare | |
cinst curl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#time "on" | |
#load "Bootstrap.fsx" | |
open System | |
open Akka.Actor | |
open Akka.Configuration | |
open Akka.FSharp | |
open Akka.TestKit | |
// #Using Actor |
There is a great purely functional streaming/IO library in Scala called scalaz-stream. It is itself based upon a Haskell library called machines. They provide powerful abstractions to express compositional effectful computations. These libraries rely on certain type system features in both Scala and Haskell which are unavailable in F# - namely existential types and higher kinds. Higher kinds allow the monad representing the side-effects to be abstracted over. If however we specialize this to a specific monad, we can get around the lack of existentials as well.
Tomas Petricek created a type called asynchronous sequence which provides similar capabilities. The F# AsyncSeq
type is declared as follows:
type AsyncSeq<'a> = Async<AsyncSeqInner<'a>>
and AsyncSeqInner<'a> =
| Nil
| Cons of 'a * AsyncSeq<'a>
NewerOlder