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
Failed to install trifecta-1.5 | |
Build log ( /Users/karlnilsson/.cabal/logs/trifecta-1.5.log ): | |
[1 of 1] Compiling Main ( /var/folders/0_/18mv6y610d39ql2lyl5gtr_80000gn/T/trifecta-1.5-12709/trifecta-1.5/dist/setup/setup.hs, /var/folders/0_/18mv6y610d39ql2lyl5gtr_80000gn/T/trifecta-1.5-12709/trifecta-1.5/dist/setup/Main.o ) | |
Linking /var/folders/0_/18mv6y610d39ql2lyl5gtr_80000gn/T/trifecta-1.5-12709/trifecta-1.5/dist/setup/setup ... | |
Configuring trifecta-1.5... | |
Building trifecta-1.5... | |
Preprocessing library trifecta-1.5... | |
[ 1 of 13] Compiling Text.Trifecta.Util.Array ( src/Text/Trifecta/Util/Array.hs, dist/build/Text/Trifecta/Util/Array.o ) | |
[ 2 of 13] Compiling Text.Trifecta.Util.Combinators ( src/Text/Trifecta/Util/Combinators.hs, dist/build/Text/Trifecta/Util/Combinators.o ) | |
[ 3 of 13] Compiling Text.Trifecta.Util.IntervalMap ( src/Text/Trifecta/Util/IntervalMap.hs, dist/build/Text/Trifecta/Util/IntervalMap.o ) |
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
ryx:~ karlnilsson$ cabal install trifecta | |
Resolving dependencies... | |
cabal: Could not resolve dependencies: | |
trying: trifecta-1.5.1 (user goal) | |
trying: semigroups-0.16.0.1/installed-742... (dependency of trifecta-1.5.1) | |
next goal: parsers (dependency of trifecta-1.5.1) | |
rejecting: parsers-0.11.0.2/installed-82a... (conflict: trifecta => | |
parsers>=0.12.1 && <1) | |
trying: parsers-0.12.1.1 | |
next goal: attoparsec (dependency of parsers-0.12.1.1) |
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
public class CodeListElement | |
{ | |
private readonly int codeContext; | |
private readonly string value; | |
public CodeListElement(int codeContext, string value) | |
{ | |
this.codeContext = codeContext; | |
this.value = value; | |
} |
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
type CodeListElement = CodeListElement of int * 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
using(var pub = new ChangeReceiver("tcp://*:5555")) | |
{ | |
Console.WriteLine("Listening..."); | |
var staffSender = new NotificationSender("tcp://localhost:5556"); | |
var customerSender = new NotificationSender("tcp://localhost:5557"); | |
var obs = Observable.FromEventPattern<Tuple<Guid, string>>(pub, "ChangeRecieved").Select(ep => ep.EventArgs); | |
obs.GroupBy(x => x.Item2) |
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
let countChar (c:char) (s:string) = | |
let mutable length = s.Length | |
let mutable k = 0 | |
while (length <- length - 1; length >= 0) do | |
if s.[length] = c then k <- k + 1 | |
k |
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
[<EntryPoint>] | |
let main argv = | |
let rec loop () = async { | |
do! Async.Sleep 10 | |
return! loop () } | |
Async.Start <| loop () | |
System.Console.ReadLine() |> ignore | |
0 | |
(* compled representations of loop |
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
[<EntryPoint>] | |
let main argv = | |
let rec loop () = async { | |
do! Async.Sleep 10 | |
return! loop () | |
return! loop () } | |
Async.Start <| loop () | |
System.Console.ReadLine() |> ignore | |
0 | |
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 System | |
[<EntryPoint>] | |
let main argv = | |
let create wait = | |
let agent = new MailboxProcessor<_>(fun inbox -> | |
let rec loop () = async { | |
let! msg = inbox.TryReceive wait | |
match msg with | |
| Some _ -> | |
() //no return |
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
#r "libgit2sharp/Build/LibGit2Sharp.dll" | |
open System | |
open System.IO | |
open LibGit2Sharp | |
let stores = (Path.GetTempPath() + "local") |> Directory.CreateDirectory | |
let remote = (Path.GetTempPath() + "remote") |> Directory.CreateDirectory | |
let repoName = string (Guid.NewGuid()) | |
let first = (remote.FullName + "//" + repoName) |> Directory.CreateDirectory |