Skip to content

Instantly share code, notes, and snippets.

View hasparus's full-sized avatar

Piotr Monwid-Olechnowicz hasparus

View GitHub Profile
@beerose
beerose / malleable-approaches.md
Last active January 31, 2025 10:24
Malleable software approaches
Solution Pros Cons
Plugins - Allow extending apps with various functionalities
- Widely adopted in many modern software ecosystems, enhancing versatility
- Allows forming community that creates and maintains plugins
- Non-programmers can use existing plugins that someone else created
- Only allows for a limited form of malleability; plugins are more of an outer layer of customization
- Usually can't modify core functionalities or deeply ingrained software behaviors
- A plugin created for one platform usually can't be used on another, leading to platform lock-in
- Can result in fragmented development, with popular features being redundantly developed for different environments
Black-box Interface Extensions - Allow for the modification of legacy software which doesn't have built-in plugin architectures- Can modify app interfaces without needing access to internal structure or source code, enabling adaptability
@VictorTaelin
VictorTaelin / collapse_monad.hs
Last active August 21, 2025 14:57
The Collapse Monad
import Control.Monad (ap, forM_)
import qualified Data.Map as M
-- The Collapse Monad
-- ------------------
-- The Collapse Monad allows collapsing a value with labelled superpositions
-- into a flat list of superposition-free values. It is like the List Monad,
-- except that, instead of always doing a cartesian product, it will perform
-- pairwise merges of distant parts of your program that are "entangled"
-- under the same label. Examples:
@dmmulroy
dmmulroy / coding-standards-draft.md
Created June 18, 2026 22:39
coding-standards-draft.md

TypeScript Coding Standards

These standards describe how to design and write TypeScript code in this codebase. They are especially intended for agents: before adding patterns, libraries, adapters, or abstractions, read the existing code and prefer the local convention unless it conflicts with the safety/correctness principles below.

Decision priority

When rules pull in different directions, use this order:

  1. Preserve correctness, safety, and debuggability.
  2. Follow established project architecture and conventions.