This file contains hidden or 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
// class inheritance - C# | |
public abstract class Ancestor {} | |
public class Descendant: Ancestor, IDisposable | |
{ | |
public void Dispose() {} | |
public virtual void MyVirt() {} | |
} | |
// class inheritance - F# |
This file contains hidden or 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
import akka.persistence.AtLeastOnceDelivery.AtLeastOnceDeliverySnapshot | |
import akka.persistence.{SnapshotOffer, PersistentActor, AtLeastOnceDelivery} | |
import akka.actor.{Props, ActorSystem, ActorPath, Actor} | |
case class Message(data: String) | |
case class Confirmable(deliveryId: Long, data: String) | |
case class Confirmation(deliveryId: Long) | |
case class Snap(snapshot: AtLeastOnceDeliverySnapshot) | |
class ExampleAtLeastOnceDeliveryActor(val deliveryPath: ActorPath) extends PersistentActor with AtLeastOnceDelivery { |
This file contains hidden or 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 State = { X: int; Y: int } | |
let system = ConfigurationFactory.Default() |> System.create "FSharpActors" | |
let aref = | |
spawn system "actor" | |
<| fun mailbox -> | |
let rec loop state = | |
actor { |
This file contains hidden or 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 Guest : ReceiveActor | |
{ | |
public Guest() | |
{ | |
Receive<Badge>(badge => | |
{ | |
// ... do something with received badge | |
}); |
This file contains hidden or 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 | |
open System.Threading | |
open Akkling | |
open Akkling.Persistence | |
let system = System.create "persistent-system" (Configuration.defaultConfig()) | |
type Event = | |
| Added of int | |
| Removed of int |
This file contains hidden or 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 Akka.FSharp | |
open Akka.Actor | |
// return Deploy instance able to operate in remote scope | |
let deployRemotely address = Deploy(RemoteScope (Address.Parse address)) | |
let spawnRemote systemOrContext remoteSystemAddress actorName expr = | |
spawne systemOrContext actorName expr [SpawnOption.Deploy (deployRemotely remoteSystemAddress)] | |
let config = | |
Configuration.parse | |
@"akka { |
This file contains hidden or 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 aref = | |
spawn system "actor" | |
<| fun mailbox -> | |
printf "pre-start" // this section works like pre-start | |
mailbox.Defer (fun () -> printf "post-stop") // this registers a function to be called on PostStop | |
let rec loop () = | |
actor { | |
let! msg = mailbox.Receive () | |
// do some work | |
return! loop () |
This file contains hidden or 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
//----------------------------------------------------------------------- | |
// <copyright file="TaskExtensions.cs" company="Akka.NET Project"> | |
// Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com> | |
// Copyright (C) 2013-2015 Akka.NET project <https://github.com/akkadotnet/akka.net> | |
// </copyright> | |
//----------------------------------------------------------------------- | |
using System; | |
using System.Collections.Generic; | |
using System.Net.Mime; |
This file contains hidden or 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
Starting Target: GenerateReferenceDocs (==> RunTests, GenerateHelp) | |
FSharp.Formatting Information: 0 : FSharp.Formatting Logging setup! | |
Yaaf.FSharp.Scriping Information: 0 : Yaaf.FSharp.Scripting Logging setup! | |
Copying file: D:\projects\dev\Akkling\docs\output\img\logo-template.pdn | |
Copying file: D:\projects\dev\Akkling\docs\output\img\logo.png | |
Copying styles and scripts: D:\projects\dev\Akkling\docs\output\content\style.css | |
Copying styles and scripts: D:\projects\dev\Akkling\docs\output\content\style_light.css | |
Copying styles and scripts: D:\projects\dev\Akkling\docs\output\content\tips.js | |
Copying styles and scripts: D:\projects\dev\Akkling\docs\output\content\img\github-blue.png | |
Copying styles and scripts: D:\projects\dev\Akkling\docs\output\content\img\github.png |
This file contains hidden or 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
# output line format: <added+removed> <added> <removed> <author> | |
git log <past_last_release_tag_here>..HEAD --oneline --numstat --pretty=format:%an --no-merges --abbrev-commit | gawk 'author == "" { author = $0; next } /^$/ { author = ""; next} {added[author] += $1; removed[author] +=$2 } END { for(author in added) { printf "%s\t%s\t%s\t%s\n", added[author]+removed[author], added[author], removed[author], author } }' | sort -n -k1 -r |
OlderNewer