Commit e0a81bd4 by PLN (Algolia)

404: NASA star textures glitched through hydra; projects index trimmed

31 public-domain NASA/ESA classics (1920px, 5.7M total, attribution
manifest beside them) become the 404's fond: one random texture per
visit, glitched through four composed scenes — breathing scale, kaleid
double exposure, generative eclipse, and a pure-voronoi fallback — in
HSL-harmony colors, mouse-reactive, blend amounts drifting with time.
Sources have no .layer(): compositing is .blend/.mask chains into the
single output. Projects index drops its tagline (heading, tags,
timeline); the devname FR post gets the same project card as EN (its
image-syntax CTA could only render as alt text); home bio updated.
parent 273f464c
......@@ -2,40 +2,36 @@ import Link from 'next/link';
import NotFoundHydra from '@/components/not-found-hydra';
export const metadata = {
title: '404 — perdu·e',
title: '404 | Vous êtes dans l’espace entre les pages',
robots: { index: false, follow: false },
};
/** The void: a fullscreen hydra sketch (different every visit) behind a
* single honest line. Copy rule: no slop — say the thing, link the door. */
/** The void: a composed hydra scene (different every visit, mouse-reactive)
* behind one line. Click anywhere — the whole page is the door home. */
export default function NotFound() {
return (
<div className="relative min-h-[100dvh] flex items-center justify-center px-6">
<Link
href="/"
aria-label="Retour à l’accueil"
className="block relative min-h-[100dvh] cursor-pointer"
>
<NotFoundHydra />
<div
aria-hidden="true"
className="absolute inset-0 bg-[var(--surface)] opacity-60"
style={{ zIndex: 0 }}
className="bg-[var(--surface)] opacity-50"
style={{ position: 'fixed', inset: 0, zIndex: 0 }}
/>
<main className="relative text-center" style={{ zIndex: 1 }}>
<main
className="relative min-h-[100dvh] flex flex-col items-center justify-center px-6 text-center"
style={{ zIndex: 1 }}
>
<h1 className="text-7xl font-bold tracking-tight text-[var(--text-primary)]">
404
</h1>
<p className="mt-6 text-lg text-[var(--text-primary)] text-balance">
Rien ici — mais tout le reste existe, par là.
</p>
<p className="mt-1 text-sm text-[var(--text-muted)]">
Nothing here. Everything else, that way.
</p>
<p className="mt-8">
<Link
href="/"
className="inline-block rounded-xl border border-[var(--border)] bg-[var(--surface)] px-5 py-2.5 text-[var(--text-primary)] hover:bg-[var(--surface-raised)] transition-colors"
>
← l&apos;accueil
</Link>
Vous êtes dans l’espace entre les pages.
</p>
</main>
</div>
</Link>
);
}
......@@ -111,7 +111,7 @@ export default function Home() {
show them your world
</HoverTooltip>.<br />
<div className="divider" />
Nowadays, I create GenAI tools for builders of{" "}
Nowadays, I work on an <b>agentic harness</b> and APIs for builders of{" "}
<HoverTooltip
content="Blending state-of-the-art LLMs with a distributed search engine to create a new kind of content discovery experiences."
links={[
......@@ -123,7 +123,7 @@ export default function Home() {
>
generative experiences
</HoverTooltip><br />{" "}
blending search engines and language models together.
.
</div>
</section>
<section className={`${utilStyles.headingMd} ${utilStyles.padding1px}`}>
......
......@@ -20,9 +20,6 @@ export default function Projects() {
<div className="max-w-4xl mx-auto">
<section className="mb-10">
<h1 className="text-3xl font-semibold text-[var(--text-primary)]">Projects</h1>
<p className="mt-2 text-[var(--text-muted)]">
Tools and experiments, newest first.
</p>
{tags.length > 0 && (
<p className="mt-3 flex flex-wrap gap-2">
{tags.map(({ tag, count }) => (
......
......@@ -2,44 +2,83 @@
import React, { useEffect, useRef } from 'react';
/** The 404 backdrop: a hydra sketch that never repeats. The source string is
* composed fresh on every mount — random family, palette, frequencies — so
* the void looks different each time you fall into it. Client-only; the
* sketch runs on a fullscreen canvas behind the page copy. */
/** The 404 backdrop: one random NASA star picture (public domain, 31 in
* /images/404/, attribution in manifest.json) glitched through hydra.
* Sources have no .layer() — only outputs do — so compositing here is
* .blend/.mask chains into the single default output (render() would tile
* a 2x2 grid). Colors: HSL harmony around a seeded base hue; every scene
* reads the mouse; blend amounts drift with time. */
const PALETTES = [
[0.29, 0.0, 0.58],
[0.95, 0.3, 0.15],
[0.0, 0.65, 0.85],
[0.6, 0.1, 0.1],
[0.1, 0.5, 0.2],
[0.8, 0.7, 0.0],
];
function mulberry32(seed) {
let a = seed >>> 0;
return () => {
a |= 0;
a = (a + 0x6d2b79f5) | 0;
let t = Math.imul(a ^ (a >>> 15), 1 | a);
t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
};
}
/** h in [0,1) → [r,g,b] triple hydra's color() can eat. */
function hslToRgb(h, s = 0.7, l = 0.5) {
const f = (n) => {
const k = (n + h * 12) % 12;
const a = s * Math.min(l, 1 - l);
return +(l - a * Math.max(-1, Math.min(k - 3, 9 - k, 1))).toFixed(3);
};
return [f(0), f(8), f(4)];
}
const r = (a, b) => +(a + Math.random() * (b - a)).toFixed(3);
const pick = (arr) => arr[Math.floor(Math.random() * arr.length)];
const rgb = (c) => c.map((v) => v.toFixed(3)).join(', ');
function composeSource() {
const [r0, r1] = PALETTES.sort(() => Math.random() - 0.5);
const P = [r(r0[0], 1), r(0, r0[1] + 0.15), r(0, r0[2] + 0.2)];
const Q = [r1[0], r1[1], r1[2]];
const k = Math.floor(r(2, 6));
const f1 = r(30, 140);
const f2 = r(5, 40);
const s1 = r(0.02, 0.09);
const s2 = r(0.05, 0.2);
const rot = r(0, Math.PI);
const families = [
`osc(${f1}, ${s1}).kaleid(${k}).color(P[0], P[1], P[2]).modulate(osc(${f2}, ${s2}).rotate(${rot}), 0.4).out()`,
`voronoi(${f2}, ${s2}, ${r(0, 1)}).color(P[0], P[1], P[2]).brightness(${r(0.03, 0.12)}).out()`,
`noise(${f2}, ${s1}).colorama(${r(0.002, 0.01)}).kaleid(${k}).brightness(${r(0.05, 0.15)}).out()`,
`shape(${Math.floor(r(3, 8))}, ${r(0.15, 0.45)}).mult(osc(${f1}, ${s1})).kaleid(${k}).color(P[0], P[1], P[2]).out()`,
`osc(${f1}, ${s1}, 1.7).diff(osc(${f2}, ${s2}).rotate(${rot})).color(P[0], P[1], P[2]).hue(${r(0, 0.4)}).out()`,
function composeSource(seed) {
const rnd = mulberry32(seed);
const base = rnd();
const [C0, C1, C2] = [base, (base + 0.5) % 1, (base + 0.083) % 1].map((h) => hslToRgb(h));
const f1 = 30 + rnd() * 90;
const f2 = 4 + rnd() * 22;
const s1 = 0.015 + rnd() * 0.04;
const s2 = 0.04 + rnd() * 0.1;
const k = 2 + Math.floor(rnd() * 5);
const c0 = rgb(C0);
const c1 = rgb(C1);
const c2 = rgb(C2);
const star = `/images/404/star-${String(1 + Math.floor(rnd() * 31)).padStart(2, '0')}.jpg`;
const scenes = [
// the sky breathed: scaled by the cursor, a traveling generative veil
`s0.initImage('${star}')
s0.scale(1.1, () => 1.05 + mouse.y * 0.2).rotate(() => time * 0.01 + mouse.x * 0.5)
.modulate(osc(${f2}, ${s2}), () => 0.1 + mouse.x * 0.25)
.blend(osc(${f1}, ${s1}).color(${c1})
.mask(shape(${k}, 0.35).rotate(() => time * 0.08)), 0.8)
.out()`,
// double exposure: the sky diffed against its kaleid ghost
`s0.initImage('${star}')
s0.kaleid(${k}).color(${c0})
.diff(s0.rotate(() => time * 0.02 + mouse.x).hue(() => ${base} + 0.15))
.modulate(voronoi(${f2}, ${s2}), () => 0.08 + mouse.y * 0.2)
.out()`,
// eclipse: a generative disc eating the stars, blend drifting over minutes
`s0.initImage('${star}')
s0.hue(() => ${base} + mouse.x * 0.25)
.mult(shape(2, 0.9, () => 0.4 + mouse.y * 0.3).scale(2).repeat(${k}, ${k}).rotate(() => time * 0.05))
.blend(osc(${f2}, ${s2} * 2).color(${c2})
.mask(shape(${k + 1}, 0.4).scale(() => 0.6 + 0.3 * Math.sin(time * 0.05 + mouse.x))), 0.7)
.blend(osc(${f1}, ${s1}).color(${c1}), () => 0.15 + 0.15 * Math.sin(time * 0.04))
.out()`,
// purely generative fallback — the field without the sky
`voronoi(${f2}, ${s2}, ${rnd()}).colorama(0.004).color(${c0})
.hue(() => ${base} + mouse.x * 0.3)
.blend(osc(${f1}, ${s1}).color(${c1})
.diff(shape(${k}, 0.3).repeat(${k}, ${k}).rotate(() => -time * 0.04 + mouse.y)), 0.8)
.out()`,
];
return `speed = ${r(0.35, 1.1)}
P = [${P.join(', ')}]
Q = [${Q.join(', ')}]
${pick(families)}`;
const speed = 0.35 + rnd() * 0.4;
return `speed = ${speed.toFixed(2)}
${scenes[Math.floor(rnd() * scenes.length)]}`;
}
export default function NotFoundHydra() {
......@@ -48,7 +87,8 @@ export default function NotFoundHydra() {
useEffect(() => {
if (!canvasRef.current) return;
let instance = null;
import('hydra-synth').then((HydraModule) => {
import('hydra-synth')
.then((HydraModule) => {
const canvas = canvasRef.current;
if (!canvas) return;
canvas.width = window.innerWidth;
......@@ -59,12 +99,11 @@ export default function NotFoundHydra() {
width: canvas.width,
height: canvas.height,
});
try {
instance.eval(composeSource());
} catch {
// a bad roll of the dice should never break the page: the sketch
// simply stays abstract noise (which hydra shows anyway)
}
instance.eval(composeSource(Date.now()));
})
.catch((ex) => {
// visible in console: a 404 must never fail silently
console.error('devname 404 sketch:', ex);
});
return () => {
if (instance && typeof instance.close === 'function') instance.close();
......
......@@ -2,7 +2,7 @@
title: Devname
---
J'en ai marre des localhosts:1234 cryptiques dans tous les sens.
J'avais trop d'onglets ouverts _localhosts:1234_ cryptiques dans tous les sens.
C'est cool d'avoir plein de projets en local !
Des 127.0.0.1:1234, et des localhost:8888, et des tas de serveurs de tests et des hot-reloads et des bases de données et... un sacré fouillis :')
......@@ -26,4 +26,7 @@ devname ls # l'état actuel
Dites-m'en des nouvelles ;)
![_devname_](https://git.nech.pl/pln/devname)
:::projet[devname — libre, GPL-3.0]
Un fichier Python, un agent launchd. Le code et la fiche projet :
[git.nech.pl/pln/devname](https://git.nech.pl/pln/devname) · [me.nech.pl/projects/devname](/projects/devname)
:::
{
"star-01.jpg": {
"nasa_id": "0203043",
"source": "images.nasa.gov (public domain)"
},
"star-02.jpg": {
"nasa_id": "carina_nebula",
"source": "images.nasa.gov (public domain)"
},
"star-03.jpg": {
"nasa_id": "GSFC_20171208_Archive_e000053",
"source": "images.nasa.gov (public domain)"
},
"star-04.jpg": {
"nasa_id": "GSFC_20171208_Archive_e000191",
"source": "images.nasa.gov (public domain)"
},
"star-05.jpg": {
"nasa_id": "GSFC_20171208_Archive_e000732",
"source": "images.nasa.gov (public domain)"
},
"star-06.jpg": {
"nasa_id": "GSFC_20171208_Archive_e000742",
"source": "images.nasa.gov (public domain)"
},
"star-07.jpg": {
"nasa_id": "GSFC_20171208_Archive_e000743",
"source": "images.nasa.gov (public domain)"
},
"star-08.jpg": {
"nasa_id": "GSFC_20171208_Archive_e000842",
"source": "images.nasa.gov (public domain)"
},
"star-09.jpg": {
"nasa_id": "GSFC_20171208_Archive_e000846",
"source": "images.nasa.gov (public domain)"
},
"star-10.jpg": {
"nasa_id": "GSFC_20171208_Archive_e001017",
"source": "images.nasa.gov (public domain)"
},
"star-11.jpg": {
"nasa_id": "GSFC_20171208_Archive_e001518",
"source": "images.nasa.gov (public domain)"
},
"star-12.jpg": {
"nasa_id": "GSFC_20171208_Archive_e001677",
"source": "images.nasa.gov (public domain)"
},
"star-13.jpg": {
"nasa_id": "GSFC_20171208_Archive_e001896",
"source": "images.nasa.gov (public domain)"
},
"star-14.jpg": {
"nasa_id": "GSFC_20171208_Archive_e001935",
"source": "images.nasa.gov (public domain)"
},
"star-15.jpg": {
"nasa_id": "GSFC_20171208_Archive_e001955",
"source": "images.nasa.gov (public domain)"
},
"star-16.jpg": {
"nasa_id": "GSFC_20171208_Archive_e002093",
"source": "images.nasa.gov (public domain)"
},
"star-17.jpg": {
"nasa_id": "PIA03515",
"source": "images.nasa.gov (public domain)"
},
"star-18.jpg": {
"nasa_id": "PIA03606",
"source": "images.nasa.gov (public domain)"
},
"star-19.jpg": {
"nasa_id": "PIA03653",
"source": "images.nasa.gov (public domain)"
},
"star-20.jpg": {
"nasa_id": "PIA04215",
"source": "images.nasa.gov (public domain)"
},
"star-21.jpg": {
"nasa_id": "PIA04223",
"source": "images.nasa.gov (public domain)"
},
"star-22.jpg": {
"nasa_id": "PIA04227",
"source": "images.nasa.gov (public domain)"
},
"star-23.jpg": {
"nasa_id": "PIA04230",
"source": "images.nasa.gov (public domain)"
},
"star-24.jpg": {
"nasa_id": "PIA04921",
"source": "images.nasa.gov (public domain)"
},
"star-25.jpg": {
"nasa_id": "PIA05062",
"source": "images.nasa.gov (public domain)"
},
"star-26.jpg": {
"nasa_id": "PIA06339",
"source": "images.nasa.gov (public domain)"
},
"star-27.jpg": {
"nasa_id": "PIA09108",
"source": "images.nasa.gov (public domain)"
},
"star-28.jpg": {
"nasa_id": "PIA09178",
"source": "images.nasa.gov (public domain)"
},
"star-29.jpg": {
"nasa_id": "PIA09262",
"source": "images.nasa.gov (public domain)"
},
"star-30.jpg": {
"nasa_id": "PIA09266",
"source": "images.nasa.gov (public domain)"
},
"star-31.jpg": {
"nasa_id": "PIA09268",
"source": "images.nasa.gov (public domain)"
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment