Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@DamianReeves
DamianReeves / .gitignore
Created March 14, 2026 18:05
Scala 3 + GraalVM 25 native image example (Mill & Scala CLI)
.metals/
.bsp/
target/
.idea/
out/
.vscode/
.scala-build/
dist/
@DamianReeves
DamianReeves / self-guided-learning.md
Created January 17, 2026 11:27
Morphir & WebAssembly

AGENTS.md

Morphir x WebAssembly Component Model Interactive Guide (Working Agreement)

Date: 2026-01-17

Audience: Damian (Morphir maintainer), engineer

Style: concise, creative, progressive, interactive

Goal

Build an interactive, self-guided tutorial that explains the WebAssembly Component Model ABI (with emphasis on canonical ABI, lifting/lowering) while being extremely aware of Morphir IR.

@DamianReeves
DamianReeves / ReadMe.adoc
Last active August 25, 2025 18:07
Directory Synchronizer

sync.sh — Fast directory sync with .syncignore, unignore, whitelist, and optional .gitignore import

sync.sh is a small, dependency-light Bash wrapper around rsync that provides:

  • One-way or two-way directory synchronization

  • Gitignore-style .syncignore files (source and destination)

  • Optional import of SOURCE/.gitignore patterns

  • Per-side ignore files and inline patterns (with ! unignore)

@DamianReeves
DamianReeves / Actor.scala
Created November 13, 2024 17:01
Actors with Kyo
package kyo
import kyo.Actor.Service
import kyo.kernel.Boundary
import kyo.kernel.Reducible
/** An actor prototype not considering aspects like identity and supervision. I think we could initially go with a minimal approach similar
* to this one providing local isolated actors.
*
* Instead of leaving the decision to handle the result of an actor message to the caller, this prototype separates actors into two kinds:
@DamianReeves
DamianReeves / morphir-ir.json
Created May 21, 2024 22:38
Morphir IR - Parent
{"formatVersion":3,"distribution":["Library",[["parent"],["one"]],[],{"modules":[[[["module","1"]],{"access":"Public","value":{"types":[[["type","1"],{"access":"Public","value":{"doc":"","value":["TypeAliasDefinition",[],["Record",{},[{"name":["foo"],"tpe":["Reference",{},[[["morphir"],["s","d","k"]],[["basics"]],["int"]],[]]},{"name":["bar"],"tpe":["Reference",{},[[["morphir"],["s","d","k"]],[["basics"]],["bool"]],[]]}]]]}}]],"values":[],"doc":null}}]]}]}
@DamianReeves
DamianReeves / BreadthFirst.scala
Created May 16, 2023 19:57
ZIO Breadth first
sealed trait State
case object PullOuter extends State
case class PullInner(
stream: ZIO[R1, Option[Nothing], Chunk[Option[B]]],
chunk: Chunk[Option[B]],
index: Int,
finalizer: Exit[Any, Any] => UIO[Any]
) extends State
@DamianReeves
DamianReeves / RestrictionAnalyzer.fs
Created May 12, 2023 15:45
F# Analyzer to Restrict language
module RestrictionAnalyzer
open FSharp.Analyzers.SDK
open FSharp.Compiler.Text
open FSharp.Compiler.Syntax
let hasTypeInNamespace (target:SynModuleOrNamespace): Message option =
match target with
| SynModuleOrNamespace(kind = SynModuleOrNamespaceKind.DeclaredNamespace; decls = decls) ->
let hasTypes =
@DamianReeves
DamianReeves / Idea01.scala
Last active January 4, 2023 19:38
Morphir Macro ideas
trait PersonModule {
trait Person { def name: String; def age: Int }
}
trait ModuleDef[T] {
val value: T
}
// val myModule: ModuleDef[PersonModule] =
❯ scala-cli package . --native-image --graalvm-jvm-id system

Downloading: Component catalog from www.graalvm.org
Processing Component: Native Image
Downloading: Component native-image: Native Image from github.com
I/O error occurred: Remote host terminated the handshake
Error: os.SubprocessException: CommandResult 2