A developer platform of unhurried craft
lungi.dev
Code that wraps around you, comfortable and unpretentious.
— Fold I —
A Garment of Knowledge
The lungi is the most honest garment in the world. A single rectangle of cotton, knotted at the waist, that has clothed labourers, scholars, fishermen, and emperors alike for three thousand uninterrupted years. Its cleverness is not in its complexity but in its trust of geometry: a flat plane, when wrapped well, becomes a shelter. We build software the same way -- a long, plain, breathable surface of code that becomes useful only when you draw it close.
Around here we resist the temptation of the tailored suit. We do not stitch where a knot will do. We do not embroider where a margin of cotton will already keep you warm. The lungi never apologises for its lack of buttons; lungi.dev never apologises for its lack of dashboards.
What you find here is a small atelier of tools, articles, and patterns, each one woven from the same warp of simplicity and weft of function. Take what you need, fold the rest, return when the day is cooler.
— Fold II —
The Weave
Every fabric, no matter how flowing, is built from two stubborn ideas: a vertical thread that holds tension, and a horizontal thread that travels patiently across it. We call the first the warp, and the second the weft. Software is no different. Architectures are warps -- rigid, load-bearing, set up before any colour is added. Features are wefts -- they cross, they decorate, they make the garment a garment. lungi.dev pays attention to both.
Below is a small loom of our current threads. Hover any swatch to feel the colour breathe; click to read the corresponding journal entry. The pattern is deliberately uneven -- a hand-loom never makes a perfect plaid, and neither do we.
Pull a thread to read its journal entry. Each colour is a small essay folded into a swatch.
— Fold III —
A Knot in Code
The lungi has only one fastener and that fastener is a knot. No buckle, no zip, no adhesive. The knot is also not permanent -- it is loosened a dozen times a day, retied without ceremony, sometimes shifted from left hip to right when the breeze changes. The most important property of a knot is that it can be undone by the same hand that made it.
Here is the knot we tie most often. A folded function. Small. Reversible. Honest about what it holds.
export function drape(cloth, body) {
const length = cloth.length;
if (length < body.waist * 2) {
throw new TooShort('a lungi must round you twice');
}
return {
wrap: () => cloth.around(body),
tuck: () => cloth.fold(body.waist, 'inward'),
untie: () => cloth.release(), // always reversible
};
}
Notice what isn't there. There is no configure(). There is no factory, no provider, no abstract base wrapper. There is only a flat piece of cloth and a body, and the verbs that connect them. When in doubt, write the verb. When the verb starts demanding adjectives, walk into the courtyard for a while.
The dignity of the lungi is that it does not need a mirror to know it is doing its job.
— a weaver, Kanchipuram, c. 1974— Fold IV —
The Lower Hem
A garment is not finished when the weaving is done; it is finished when the hem is rolled, pressed, and stitched. A hem is the smallest, most patient part of a lungi -- a thin band of doubled-over cloth that protects every other thread from fraying. The hem is the engineer of the garment. We end every page here, with the small useful things.
- Letters A monthly post, sometimes longer than necessary. Sent on the night of the new moon. Subscribe with an email and a kind sentence.
- Patterns A small repository of code patterns, each named after a fabric pattern. Browse the loom.
- Open studio Wednesdays, late afternoon. Pull up a stool, ask a question, watch the shuttle move. Visit the studio.
If you find any of this useful, fold it and take it with you. If not, leave it on the bench for the next traveller. The cloth is plentiful, and woven slowly, and there is enough.