2025-11-07 09:20:08
Tags are sets. Many apps support tagging of content, but most of them (incl. Mastodon) treat tags only as singular/isolated topic filters, akin to a flat folder-based approach. But tagging can be so, so much more powerful when treating tags as sets and offering users the possibility to combine and query tagged content as sets (think Venn diagrams), i.e. allowing tags to be combined using AND/OR/NOT aka intersection/union/difference operations...
Below is a simple query engine to do jus…




![Syntax color highlighted TypeScript source code:
```
import {
cycle,
map,
normRange,
permutations,
str,
take,
transduce,
} from "@thi.ng/transducers";
// LUT size (number of samples per axis)
const N = 9;
// example curve of N samples in [0,1] range
// (the curve here is y = x^1.2, i.e. a basic darken effect)
const curve = [...map((x) => (x ** 1.2).toFixed(4), normRange(N - 1))];
// compute cartesian product to produce RGB tuples
const lut = permutations(curve, curve, curve);
// alt…](https://mastothing.files.fedi.monster/media_attachments/files/115/645/234/959/322/403/small/b9dc6bcea2fe1257.png)





