Skip to content

Instantly share code, notes, and snippets.

View rogeralsing's full-sized avatar
😈
Feeling Awesome

Roger Johansson rogeralsing

😈
Feeling Awesome
View GitHub Profile
"C:\Program Files\Java\jdk1.8.0_144\bin\java" -XX:+PrintSafepointStatistics -XX:PrintSafepointStatisticsCount=1 -XX:+TraceBiasedLocking "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2017.2\lib\idea_rt.jar=60129:C:\Program Files\JetBrains\IntelliJ IDEA 2017.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_144\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_144\jre\lib\ext\sunmscapi.jar;C:
open System
open System.Threading.Tasks
open Proto
open Proto.Mailbox
type Actor with
static member SpawnFromFunc handler =
let wrapper = fun c ->
handler(c)
Task.FromResult(0)
package proto
open class LocalContext : IMessageInvoker, IContext, ISupervisor {
companion object {
private val logger : ILogger = Log.createLogger<LocalContext>()
internal fun defaultReceive (context : IContext) : Task {
var c : LocalContext = LocalContextcontext
if (c.message is PoisonPill) {
c.self.stop()
Msbuild failed when processing the file 'C:\git\ProjectExodus\democode\Proto.Mailbox\Proto.Mailbox.csproj' with message: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Roslyn\Microsoft.CSharp.Core.targets: (71, 5): The "Csc" task could not be instantiated from the assembly "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Roslyn\Microsoft.Build.Tasks.CodeAnalysis.dll". Please verify the task assembly has been built using the same version of the Microsoft.Build.Framework assembly as the one installed on your computer and that your host application is not missing a binding redirect for Microsoft.Build.Framework. Unable to cast object of type 'Microsoft.CodeAnalysis.BuildTasks.Csc' to type 'Microsoft.Build.Framework.ITask'.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Roslyn\Microsoft.CSharp.Core.targets: (71, 5): The "Csc" task has been declared or used incorrectly, or failed during construction. Check the s
-module(router).
-author("ROJO01").
-export([start/2]).
start(N, F) ->
Workers = spawn_workers(N, [], F),
spawn(fun() -> round_robin_router(Workers, 0) end).
round_robin_router(Workers, Next) ->
receive
-module(pingpong).
-author("ROJO01").
-export([run/0, ping/3, pong/1]).
-define(BATCH, 100).
-define(CONCURRENCY, 20).
-define(MESSAGES, 1000000).
ping(Pong, Num, ReplyTo) ->
receive
{start, NewPong} ->
-module(pingpong).
-author("ROJO01").
-export([run/0, ping/2, pong/0]).
ping(Num, ReplyTo) ->
receive
{msg, Pong} ->
case Num of
0 -> ReplyTo ! done;
N when N rem 100 == 0 ->

My experiences with writing high performance .NET vs Go code.

Generally, writing fast Go code is easier. This comes down to two reasons:

The Go scheduler will yield on sys and function calls. You simply write "normal" sequential code and it will perform really well under high concurrent load.

In .NET, we have the TPL and async await. .NET is capable of high performance concurrent code, using Tasks works well for this.

protoc -I=. -I=%GOPATH%\src\github.com\gogo\protobuf\protobuf -I=%GOPATH%\src --gogoslick_out=Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,plugins=grpc:. protos.proto
REM do not that %GOPATH%\src\github.com\gogo\protobuf\protobuf is mapped as a root path
At Asynkron, we manage a lot of open source projects and we’re required to have agreements with everyone who takes part in them.
It’s the easiest way for you to give us permission to use your contributions.
In effect, you’re giving us a licence, but you still own the copyright — so you retain the right to modify your code and use it in other projects.