- CQRS Journey: Free ebook from Microsoft (Print book available for purchase)
- Functional and Reactive Domain Modeling: A high level overview of how to build up domain models using free monads and interpreters.
- Reactive Microservices Architecture: Free booklet from Lagom and O'Reilly
- Reactive Messaging Patterns with the Actor Model: Applications and Integration in Scala and Akka
- Domain-Driven Design: Tackling Complexity in the Heart of Software
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 | |
open System.Collections.Generic | |
type IMonoid<'T> = | |
abstract member mempty : unit -> 'T | |
abstract member mappend : 'T * 'T -> 'T | |
type MonoidAssociations private() = | |
static let associations = new Dictionary<Type, obj>() | |
static member Add<'T>(monoid : IMonoid<'T>) = associations.Add(typeof<'T>, monoid) |
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
// Worth noting that restrictions prevented me from accessing libraries like the Apache Commons Guid and others | |
// Also, not production code - needs some TLC & refactoring love | |
// If I get time will be moved to a proper home in GitHub | |
package semeosis.eventsourcing.infrastructure; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; |
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
// Based on the article 'Combinators for logic programming' by Michael Spivey and Silvija Seres. | |
let rec inf_seq n = seq { yield n; yield! inf_seq (n+1) } | |
let rec lzw f l1 l2 = | |
LazyList.delayed ( fun () -> | |
match l1,l2 with | |
|LazyList.Nil, _ -> l2 | |
|_, LazyList.Nil -> l1 | |
|LazyList.Cons(p1,tail1),LazyList.Cons(p2,tail2) |
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
/* | |
Contains the file manager implementation of ServiceStack's REST /files Web Service: | |
Demo: http://www.servicestack.net/RestFiles/ | |
GitHub: https://github.com/ServiceStack/ServiceStack.Examples/ | |
*/ | |
using System; | |
using System.IO; | |
using System.Net; | |
using RestFiles.ServiceInterface.Support; |
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
import { Predicate } from 'fp-ts/lib/function' | |
import { Prism } from 'monocle-ts' | |
import { Newtype, iso, prism, unsafeCoerce } from 'newtype-ts' | |
interface Optimistic<A extends string> | |
extends Newtype< | |
{ | |
readonly Optimistic: unique symbol | |
readonly phantom: A | |
}, |
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
"""Formats an sexpression for pretty printing.""" | |
def format_sexpression(s, indent_level=0, indent_size=4): | |
"""ChatGPT + TACIXAT""" | |
output = "" | |
i = 0 | |
# Initialize to False to avoid newline for the first token | |
need_newline = False | |
cdepth = [] # Track colons | |
while i < len(s): |
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
//! process input from mic with fundsp | |
use cpal::traits::{DeviceTrait, HostTrait, StreamTrait}; | |
use cpal::{FromSample, SizedSample}; | |
use fundsp::hacker32::*; | |
use crossbeam_channel::{bounded, Receiver, Sender}; | |
#[derive(Clone)] |