Skip to content

Instantly share code, notes, and snippets.

View tjaskula's full-sized avatar
🎸
C++

Tomasz Jaskula tjaskula

🎸
C++
View GitHub Profile
@Horusiath
Horusiath / CASPaxos.fs
Last active May 7, 2020 14:45
CASPaxos implementation
/// Toy implementation of CAS Paxos (see: https://github.com/rystsov/caspaxos/blob/master/latex/caspaxos.pdf).
module DemoFs.CASPaxos
open Akka.Actor
open Akkling
open System
type NodeId = string
[<Struct>]
namespace Fsion
open System.Threading
[<Struct;NoEquality;NoComparison>]
type Cancel =
private
| Cancel of bool ref * children: Cancel list ref
module internal Cancel =
@Horusiath
Horusiath / Program.fs
Last active April 9, 2020 13:19
Toy implementation of SWIM protocol in Akkling (Akka.NET F#)
open System
open System.Threading
open Akkling
open DemoFs
[<EntryPoint>]
let main argv =
let config = """
akka.loglevel = DEBUG
@Horusiath
Horusiath / Fibers.cs
Created November 24, 2019 22:09
Minimal example of working async method builder
using System;
using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
using System.Threading;
namespace Fibers
{
public struct AsyncFiberMethodBuilder<T>
{
private Fiber<T>? fiber;
@Horusiath
Horusiath / Fiber.fs
Last active May 17, 2024 15:09
Custom fibers implementation in F#
/// MIT License
///
/// Copyright (c) 2024 Bartosz Sypytkowski
///
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
/// copies of the Software, and to permit persons to whom the Software is
/// furnished to do so, subject to the following conditions:
@mpraglowski
mpraglowski / iddd_polish.md
Last active November 3, 2019 14:34 — forked from tjaskula/iddd_polish.md
Description of IDDD Workshop in Polish

Translated from https://kalele.io/live-training/iddd/

Jak Twój zespół może wykorzystać DDD

Intensywne, 3-dniowe, warsztaty IDDD autorstwa Vaughna Vernona, prowadzone przez Tomasz Jaskułę

Wyjdź poza teorię DDD i zobacz jak Twój zespół może w pełni wykorzystać DDD do realizacji Twoich strategicznych inicjatyw w sposób, który pomoże Twojej firmie zdobyć przewagę konkurencyjną. W trakcie warsztatu kładziemy nacisk na tworzenie oprogramowania zgodnie z najlepszymi praktykami (Software Craftmanship) oraz odzwierciedlenie modelu domenowego w kodzie źródłowym zgodnie z metodami Agile. Pokazujemy przewagę tego podejścia nad rozwiązywaniem realnych problemów biznesowych używając wyłącznie technologii. Szkolenie przeznaczone jest dla zaawansowanych i średnio zaawansowanych programistów oraz architektów zainteresowanych tworzeniem oprogramowania i nauką modelowania domen przy użyciu Domain-Driven Design (DDD). W ramach warsztatu nauczymy niezbędnych podstaw, które wykorzystasz, jeśli Twoja organizacja rozważa impl

@Horusiath
Horusiath / Program.cs
Last active November 24, 2020 05:45
An interfaced generic-aware Akka.NET actor implementation
using System;
using System.Threading.Tasks;
using Akka.Actor;
using Akka.Configuration;
namespace AkkaDemos
{
public interface IGreeter
{
Task<string> Greet(IGreeter who);
@mrange
mrange / pipeline_performance.md
Last active May 10, 2021 13:34
Performance comparison of different data pipelines in .NET

Performance comparison of different data pipelines in .NET

Full source code can be found here

Changelog

  1. 2016-12-20
  2. New performance test - Paul Westcott (@manofstick) made me aware that SeqComposer has a more performant API. SeqComposer2 uses this API.
  3. 2016-12-23
@mrange
mrange / fsharp_advent_2016_12_10.md
Last active December 14, 2019 21:44
F# Advent 2016 (English) - December 10 - Implementing a persistent hash map.
@eamelink
eamelink / recursion-and-trampolines-in-scala.md
Last active April 10, 2024 15:57
Recursion and Trampolines in Scala

Recursion and Trampolines in Scala

Recursion is beautiful. As an example, let's consider this perfectly acceptable example of defining the functions even and odd in Scala, whose semantics you can guess:

def even(i: Int): Boolean = i match {
  case 0 => true
  case _ => odd(i - 1)
}

def odd(i: Int): Boolean = i match {