\n\n\n\n\n","tags":["coaithored"]},{"name":"all-medium.md","code":"They _intended_ to write. They really did.\n\nBut more fluently came _how_ to write, _how_ to display, _how_ to convey.\n\nBefore there was a **what** there were [empty](./empty.json) [vehicles](./empty.yaml)\n[crewed by a token](./be.txt):\n\n- [dusty](./story-in-a-story.mjs)\n- [unused](./log.mjs)\n- [unfinished](./funsole.mjs)\n- [ill-defined](./cat-detector.psu)\n\n\n","tags":[]},{"name":"all-the-chars.js","code":"const allTheChars = [];\n\nlet i = 0;\nlet next = '';\n\nwhile (!allTheChars.includes(next)) {\n allTheChars.push(next);\n next = String.fromCharCode(i++);\n}\n\nconsole.log(allTheChars.join(''));\n","tags":[]},{"name":"all-the-reals.mjs","code":"import _ from './executable-pseudocode.mjs';\nconst { OrderedSet, Element } = _;\n\nconst reals = new OrderedSet((a, b) => a.getValue() < b.getValue());\nconst zero = new Element(0);\nconst one = new Element(1);\n\nreals.add(zero);\nreals.add(one);\naddBetween(reals)(zero, one);\n\ncantorize(reals);\n\nconsole.log(...reals);\n\n// --- --- --- --- --- ---\n\nfunction addBetween(set) {\n return function addingBetween(left, right) {\n const middle = new Element((left.getValue() + right.getValue()) / 2);\n if (!set.has(middle)) {\n set.add(middle);\n addingBetween(left, middle);\n addingBetween(middle, right);\n }\n };\n}\n\nfunction cantorize(incomplete, i = 0) {\n const numberToCheck = incomplete.getByOrder(i).getValue();\n numberToCheck[i] = numberToCheck[i] + 1;\n const maybeMissing = new Element(numberToCheck);\n if (!incomplete.has(maybeMissing)) {\n incomplete.add(maybeMissing);\n cantorize(incomplete, i + 1);\n }\n}\n","tags":[]},{"name":"be.canvas.html","code":"\n\n\n","tags":[]},{"name":"be.css","code":".be,\nbody {\n background: linear-gradient(\n 90deg,\n rgb(0, 0, 0) 33.33vw,\n rgb(255, 233, 54) 33.33vw,\n rgb(255, 233, 54) 66.66vw,\n rgb(255, 15, 33) 66.66vw\n );\n}\n","tags":[]},{"name":"be.css.html","code":"\n\n\n
\n \n \n \n
\n\n","tags":[]},{"name":"be.de.txt","code":"SSSSSSSGGGGGGGRRRRRRR\nSSSSSSSGGGGGGGRRRRRRR\nSSSSSSSGGGGGGGRRRRRRR\nSSSSSSSGGGGGGGRRRRRRR\nSSSSSSSGGGGGGGRRRRRRR\n","tags":[]},{"name":"be.en.txt","code":"BBBBBBBYYYYYYYRRRRRRR\nBBBBBBBYYYYYYYRRRRRRR\nBBBBBBBYYYYYYYRRRRRRR\nBBBBBBBYYYYYYYRRRRRRR\nBBBBBBBYYYYYYYRRRRRRR\n","tags":[]},{"name":"be.flip.js","code":"console.log('%c↺ 90°', 'font-weight: bold; font-size: xx-large;');\n\nfor (const color of ['black', 'yellow', 'red']) {\n const bar = [];\n for (let width = 0; width < 10; width++) {\n let column = '';\n for (let height = 0; height < 35; height++) {\n column += ' ';\n }\n bar.push(column);\n }\n console.log(`%c${bar.join('\\n')}`, `background-color: ${color};`);\n}\n","tags":[]},{"name":"be.fr.txt","code":"NNNNNNNJJJJJJJRRRRRRR\nNNNNNNNJJJJJJJRRRRRRR\nNNNNNNNJJJJJJJRRRRRRR\nNNNNNNNJJJJJJJRRRRRRR\nNNNNNNNJJJJJJJRRRRRRR\n","tags":[]},{"name":"be.html","code":"\n\n \n \n BE\n \n \n
\n \n \n \n
\n \n\n","tags":[]},{"name":"be.js","code":"console.log(\n '%c %c%c %c%c ',\n 'background-color: black;',\n '',\n 'background-color: yellow;',\n '',\n 'background-color: red;',\n);\n","tags":[]},{"name":"be.json","code":"{\n \"de\": [\"schwarz\", \"gelb\", \"rot\"],\n \"en\": [\"black\", \"yellow\", \"red\"],\n \"fr\": [\"noir\", \"jaune\", \"rouge\"],\n \"nl\": [\"zwart\", \"geel\", \"rood\"]\n}\n","tags":[]},{"name":"be.nl.txt","code":"ZZZZZZZGGGGGGGRRRRRRR\nZZZZZZZGGGGGGGRRRRRRR\nZZZZZZZGGGGGGGRRRRRRR\nZZZZZZZGGGGGGGRRRRRRR\nZZZZZZZGGGGGGGRRRRRRR\n","tags":[]},{"name":"be.svg","code":"\n","tags":[]},{"name":"be.txt","code":"🇧🇪","tags":[]},{"name":"breathless.html","code":"\n\n\n\n\n\n\n\n","tags":["wellbeing"]},{"name":"breathless.js","code":"(function breathless(slowness = 500, slowerness = 1.01) {\n const breath = setTimeout(breathless, (slowness *= slowerness), slowness);\n console.log(['hold', 'breath in', 'hold', 'breath out'][breath % 4]);\n})();\n\n// tags: wellbeing\n","tags":["wellbeing"]},{"name":"callout-stack.js","code":"const calloutStack = (msg = '') =>\n eval(msg.split('').reduce((acc, next) => `(${next} = () => ${acc})()`, msg));\n\ncalloutStack('jenga');\n\n// tags: useless\n","tags":["useless"]},{"name":"can-not-even.mjs","code":"import { describe, it } from './testing.mjs';\n\nconst canNotEven = (maybe, strict) =>\n strict && typeof maybe !== 'number'\n ? maybe\n : maybe % 2 === 0\n ? even(maybe)\n : maybe;\n\ndescribe('canNotEven: can not even', () => {\n describe('sort of', () => {\n it('can odd numbers', () => canNotEven(1));\n it('can odd strings', () => canNotEven('1'));\n it('can odd number objects', () => canNotEven(new Number(1)));\n\n it('can not even numbers', () => canNotEven(2));\n it('can not even strings', () => canNotEven('2'));\n it('can not even number objects', () => canNotEven(new Number(2)));\n });\n describe('exactly', () => {\n it('can odd numbers', () => canNotEven(1, true));\n it('can odd strings', () => canNotEven('1', true));\n it('can even strings', () => canNotEven('2', true));\n it('can odd number objects', () => canNotEven(new Number(1), true));\n it('can even number objects', () => canNotEven(new Number(2), true));\n\n it('can not even numbers', () => canNotEven(2, true));\n });\n});\n\nfunction even(number) {\n (function not() {\n (function can() {\n throw new Error(`can not ${number}`);\n })();\n })();\n}\n\n// tags: remix\n// inspiration: https://github.com/blakek/cannot-even\n","tags":["remix"]},{"name":"cat-detector.ascii.html","code":"cat detector\n\n\n\n\n\n\n\n\n","tags":[]},{"name":"cat-detector.ascii.txt","code":" | _ _|_ o ._ ._ _|_ -- ._ | | o \n | (/_ |_ | | | |_) |_| |_ -- | | |_| | | o \n | / \n\n\n ,- \n |_ o | _ / o ._ ._ _|_ | -- -- / _ _. _|_ / \\ _| \n \\/\\/ | | | | (/_ | | | | |_) |_| |_ o -- -- (_ (_| |_ | | \n \\ | / `- \n \n o ._ ._ _|_ -- ._ ._ _ ._ _ ._ _|_ / / || _ _. _|_ || ._ | _ _. _ _ / \\ o \n | | | |_) |_| |_ -- |_) | (_) | | | |_) |_ | (_ (_| |_ |_) | (/_ (_| _> (/_ | o \n | | | \\ | / / \n -. \n |_ \n | \n -' \n\n\n _ \n _. | _ ._ _|_ / / _|_ |_ _. ._ | _ _|_ _ ._ _|_ |_ _ _ _. _|_ / \\ o \n (_| | (/_ | |_ | |_ | | (_| | | |< \\/ (_) |_| | (_) | |_ | | (/_ (_ (_| |_ | o \n \\ / / / \n\n","tags":[]},{"name":"cat-detector.be.js","code":" ;; ;;\n ;;;; ;;;;\n ; ;; ;; ;\n ; ; ;; ;\n ; ;; ;; ;;\n ; ;; ;; ;;\n ;; ;;; ;; ;;;;;; ;;;;;;;;;;; ;; ;; ;;\n ;; ;;;; ;;;;; ;;;; ;;;;; ;;;; ;;;;; ;;\n ;; ;;;;;;;; ;; ;; ;;;;;; ;;\n ;; ;;;;;; ;;; ;;;;; ;;\n ;; ;;;; ;; ;;;; ;;\n ;; ;;; ;;;;;; ;;;; ;;; ;;\n ; ;;; ;; ;;;; ;; ;; ;\n ; ;; ;; ;;;; ;; ;; ;\n ; ;; ;;;;;;;;;;;;;;; ;; ;\n ; ;; ;;;;; ;;;;;; ;; ;;\n ; ;;; ;;;;; ;;; ;;;; ;;\n ; ;;;; ;;;; ;;;;; ;;\n ; while ( prompt\n ('le ...' ) !=\n 'chat' ) ;; ;\n ;;; ;; ; ;;\n ;; ;; ;; ;\n ;; ;; ; ;\n ;; ; ; ;\n ;; ; ; ;;\n ;;;; ;; ;; ;; ;\n ;; ;; ;;;;;;;; ;;;;;;; ;; ;;\n ;;; ;; ;; ;; ;; ;;\n ;; ;; ;; ;;; ;; ;;\n ;;; ;; ;;; ;;;; ;; ;;\n ;; ;; ;;; ;;;;; ;; ;;\n ;; ;; ;;;;;;;;;;;;;;;;;;;;;;; ;;; ;\n;; ;;;; ;;; ;;\n;; ;; ;; ;;;; ;;\n ;; ;;; ;;;; ;;;;; ;;\n ;; ;; ;;;; ;;;; ;; ;; \n ;; ;; ;;;;; ;;;;;;;;;; ;; ;; \n ;; ; ;;;;;;;;;;;;;;;;;;;;; ;; ;; \n ;; ;; ;; ;;\n\n// tags: le chat","tags":["le chat"]},{"name":"cat-detector.cat.js","code":" ; ;\n ; ; ; ;\n ; ; ; ;\n ; ; ; ; ; ; ; ; ; ;\n ; ;\n ; ;\n ; ;\n ; let maybeCat = null ;\n ; ;\n ; while (maybeCat !== 'cat') { ;\n/*------*/ maybeCat = /*------*/\n/*------*/ prompt('cat, please.'); /*------*/\n /*------*/ } /*------*/\n ; ;\n ; ;\n ; ; ; ; ; ; ; ; ; ; ; ;\n","tags":[]},{"name":"cat-detector.golf.js","code":"(c=(i=prompt('\"cat\" please'),t\n =/cat/i.test(i))=>(alert(i? \n `${t?'thank you for the ': \n '\"cat\" is not '}\"${i}\"`: \n 'there is no escape') \n // tags: golf \n ,t||c()))() ","tags":["golf"]},{"name":"cat-detector.psu","code":"maybe <- null\n\nWHILE maybe IS NOT \"cat\"\n maybe <- INPUT \"cat please\"\n DISPLAY helpful feedback\nEND WHILE\n\nDISPLAY \"thank you for the cat\"\n","tags":[]},{"name":"cat-detector.py","code":"maybe_a_cat = input('please enter \"cat\": ')\n\nif maybe_a_cat.lower() == 'cat':\n\tprint('thank you for the cat')\nelse:\n\tprint(f'\"{maybe_a_cat}\" is not a cat')\n","tags":[]},{"name":"cat-detector.py.js","code":"maybe_a_cat = prompt('please enter \"cat: ')\n\nif (maybe_a_cat?.toLowerCase() == 'cat')\n alert('thank you for the cat')\nelse\n alert(`\"${maybe_a_cat}\" is not a cat`)\n","tags":[]},{"name":"cat-detector.scm.js","code":"(\"define\", (\"get a cat\", \"message\"),\n ((\"define\", \"maybe\", (\"*log\", \"prompt\", \"message\")),\n (\"cond\",\n ((\"=\", \"maybe\", null),\n ((\"alert\", \"there is no escape\"), (\"get a cat\", \"message\"))),\n ((\"not\", (\"=\", \"maybe\", \"cat\")),\n ((\"alert\", (\"+\", \"'\", \"maybe\", \"' is not cat\")), (\"get a cat\", \"message\"))),\n (\"else\", (\"maybe\")))));\n\n(\"get a cat\", \"'cat' please\");\n\n(\"alert\", \"thank you for the cat\");\n\n","tags":[]},{"name":"cat-detector.scm.json","code":"[\n [\"define\", [\"get a cat\", \"message\"],\n [[\"define\", \"maybe\", [\"*log\", \"prompt\", \"message\"]],\n [\"cond\",\n [[\"=\", \"maybe\", null],\n [[\"alert\", \"there is no escape\"], [\"get a cat\", \"message\"]]],\n [[\"not\", [\"=\", \"maybe\", \"cat\"]],\n [[\"alert\", [\"+\", \"'\", \"maybe\", \"' is not cat\"]], [\"get a cat\", \"message\"]]],\n [\"else\", [\"maybe\"]]]]],\n\n [\"get a cat\", \"'cat' please\"],\n\n [\"alert\", \"thank you for the cat\"]\n]\n","tags":[]},{"name":"cat-detector.spoken.mjs","code":"import { theArrivalOf } from './introducing.mjs';\n\nconst voice = 'Tessa';\nlet volume = 0.4;\n\nconst _The_Inspector_ = await theArrivalOf('The Inspector', { voice, volume });\n\nawait _The_Inspector_(\n 'In a moment you will be prompted to enter some text, please type \"cat\".',\n);\n\nwhile (true) {\n const maybeACat = prompt();\n\n if (maybeACat?.toLowerCase() === 'cat') {\n await _The_Inspector_('Thank you for following directions, you may leave now.', {\n volume: 0.4,\n });\n break;\n }\n\n if (maybeACat === null) {\n await _The_Inspector_('there is no escape');\n } else if (maybeACat?.toLowerCase() !== 'cat') {\n await _The_Inspector_(`\"${maybeACat}\" is most certainly not a cat. Try again.`, {\n volume,\n });\n }\n volume += 0.1;\n\n if (volume > 1) {\n _The_Inspector_(\"I'm done with this.\", { volume: 0.4 });\n break;\n }\n}\n","tags":[]},{"name":"cat-detector.vars.js","code":"const variableNames = new Proxy({}, {\n has() { return true; },\n get(_, key) {\n if (key in globalThis) {\n const globalValue = globalThis[key];\n return typeof globalValue === 'function'\n ? globalValue.bind(globalThis)\n : globalValue;\n } else {\n return key;\n }\n },\n});\n\nwith (variableNames) {\n while (true) {\n const maybeCat = prompt(Cat_please + ', ' + upper_or_lower_case + '.');\n\n if (maybeCat === null) {\n alert(There_is_no_escape + '.');\n } else if (maybeCat.toLowerCase() === cat.toLowerCase()) {\n alert(Thank_you_for_the_ + maybeCat + '.');\n break;\n } else {\n alert(maybeCat + _is_not_a_cat + ', ' + try_again + '.');\n }\n }\n}\n\n// tags: the fun parts","tags":["the fun parts"]},{"name":"cat-detector.wc.html","code":"cat detector\n\n\n\n\n","tags":[]},{"name":"center.css","code":"body {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n/* tags: useful */\n","tags":["useful"]},{"name":"cest-pas-faux.js","code":"console.assert(this != false /* ouais */, \"c'est pas faux\");\n\n// tags: tribute\n","tags":["tribute"]},{"name":"chickeneighbor.js","code":"alert('You: Why did the chicken cross the road?');\n\nalert('Me: ' + atob('VG8gdmlzaXQgdGhlIG1vcm9uIG9uIHRoZSBvdGhlciBzaWRlLg=='));\n\nalert('...');\n\nalert('Me: < knock knock >');\n\nalert(\"You: Who's there?\");\n\nalert('Me: ' + atob('Q2hpY2tlbmVpZ2hib3Ih'));\n\n// tags: joke","tags":["joke"]},{"name":"classy-curry.js","code":"const classy = (Thing, { args = [], length = Thing.length } = {}) =>\n function curry(arg) {\n return args.length === length - 1\n ? new Thing(...args, arg)\n : classy(Thing, { args: args.concat(arg) });\n };\n\n// --- --- --- --- --- --- ---\n\nclass TrafficRules {\n constructor(optional, flexible, creative) {\n this.optional = optional;\n this.flexible = flexible;\n this.creative = creative;\n }\n get description() {\n return `The traffic rules here are${\n\t\t\tthis.creative ? '' : 'not '} creative,${\n this.flexible ? '' : 'not '} flexible, and${\n\t\t\tthis.optional ? '' : 'not '} optional.`;\n }\n}\n\nconsole.log(\n\tclassy(TrafficRules)(true)(true)(true).description\n);\n\n// tags: wuzzle","tags":["wuzzle"]},{"name":"code-is-text.txt.css","code":".token {\n color: black !important;\n}\n","tags":[]},{"name":"declare-morf.js","code":"/* --- morf: a variable that must be reassigned ---\n\n\terrors at creation-phase if the variable is not reassigned\n\tit can be declared without initialization \n\n*/\n\nmorf a; \n\na = 1;\n\na += 1;\n\nmorf b = a + 1 // SyntaxError: morf b is never reassigned\n\nconsole.log(b); // never executed\n\n// tags: ESi","tags":["esi"]},{"name":"declare-tag.js","code":"/* --- tag: it's value is it's name as a string ---\n\n\tread-only\n\n\terrors at creation-phase\n\t\tif it is initialized\n\t\tif the variable is (re)assigned\n\t\t\n*/\n\n// tag potato = 1; // SyntaxError: tag potato cannot be initialized\n\ntag potato;\n\nalert(`potato${potato}`); // potatopotato\n\nconsole.log(potato === 'potato'); // true\n\n// potato += '!'; // SyntaxError: tag potato cannot be assigned\n\n\n// tags: ESi","tags":["esi"]},{"name":"declenche.html","code":"\n\n\n","tags":[]},{"name":"deep-compare.mjs","code":"export const deepCompare = (actual, expect) => {\n return (\n actual === expect ||\n Object.is(actual, expect) ||\n (Object(actual) === actual &&\n Object(expect) === expect &&\n ((Array.isArray(actual) &&\n Array.isArray(expect) &&\n actual.length === expect.length &&\n expect.every((expect, index) => deepCompare(actual[index], expect))) ||\n (Object.keys(actual).length === Object.keys(expect).length &&\n Object.keys(expect).every((key) =>\n deepCompare(actual[key], expect[key]),\n ))))\n );\n};\n\nexport default deepCompare;\n\n// tags: useful, testing\n","tags":["useful","testing"]},{"name":"describe-it.mjs","code":"const _console_ = console;\n\nexport const describe = (name = '', testFunction = () => {}) => {\n _console_.group(`%c${name}`, 'font-weight: bold;');\n try {\n testFunction();\n } catch (err) {\n _console_.error('%cSUITE ERROR:', 'font-weight: bold;', err);\n }\n _console_.groupEnd();\n};\nexport const suite = describe;\n\nexport const it = (name = '', testFunction = () => {}) => {\n const out = Object.assign({}, _console_);\n const callOuts = [];\n Object.keys(_console_).forEach(\n (key) => (_console_[key] = (...args) => callOuts.push({ key, args })),\n );\n let thrown = null;\n try {\n testFunction();\n } catch (err) {\n thrown = err;\n }\n if (thrown)\n out.groupCollapsed(`%c✖ NO: ${name}`, 'font-weight: bold; color: red;');\n else\n out.groupCollapsed(`%c√ YES: ${name}`, 'font-weight: bold; color: green;');\n callOuts.forEach((callOut) => out[callOut.key](...callOut.args));\n thrown && out.error(thrown);\n out.groupEnd(), Object.assign(_console_, out);\n};\nexport const test = it;\n\nexport default { describe, suite, it, test };\n\n// tags: testing, minibrary\n","tags":["testing","minibrary"]},{"name":"detector-factory.mjs","code":"export const detectorFactory = (thing = 'cat') =>\n class CatDetector extends HTMLElement {\n constructor() {\n super();\n\n const input = document.createElement('input');\n input.placeholder = thing;\n input.style.width = `${thing.length}ch`;\n\n const purpose = `detect \"${thing}\"`;\n input.addEventListener(\n 'input',\n {\n [purpose]: () => {\n for (let i = 0; i < input.value.length; i++) {\n if (thing[i] !== input.value[i]) {\n input.value = '';\n }\n }\n },\n }[purpose],\n );\n\n this.appendChild(input);\n }\n };\n\nexport default detectorFactory;\n\n// tags: minibrary\n","tags":["minibrary"]},{"name":"dna.js","code":"const WIDTH = 30;\nconst STEP = 0.08;\nconst SPEED = 30;\n\nconst coordinate = (num, phase = 0) =>\n Math.round(Math.sin(num + phase) * WIDTH) + WIDTH;\n\nconst drawBasePair = (a = 0, b = WIDTH) => {\n const cA = coordinate(a);\n const cB = coordinate(b, WIDTH / 2);\n\n const leftPad = Array((cA < cB ? cA : cB) + 1).join(' ');\n const bases = Array(Math.abs(cB - cA)).join('=');\n\n console.log(`${leftPad}{|${bases}|}`);\n\n if (a / b < 0.3) setTimeout(drawBasePair, SPEED, a + STEP, b + STEP);\n};\n\ndrawBasePair();\n\n// tags: sketch\n","tags":["sketch"]},{"name":"do-without.js","code":"const out = { eye_roll: '(◔_◔)' };\n\ndo {\n with (out) {\n alert(eye_roll);\n }\n} while (null);\n\n// tags: wuzzle, the fun parts\n","tags":["wuzzle","the fun parts"]},{"name":"drabble-twabble.mjs","code":"import { describe, test, expect } from './testing.mjs';\n\nconst snippetName = prompt(\n 'which story do you want to check?',\n '(snippet name with .txt extension)',\n);\nif (!snippetName.endsWith('.txt')) {\n alert(`no go. ${snippetName} is not a .txt snippet`);\n throw new TypeError('drabbles and twabbles should probably be .txt files');\n}\n\nconst snippet = await fetch(snippetName)\n .then((res) => res.text())\n .then((snippet) => snippet.replaceAll(/\\([\\s]*tags:[^)]*\\)/gi, ''));\nconst wordCount = snippet.split(/\\s/).filter(Boolean).length;\nconst characterCount = snippet\n .split('')\n .filter((char) => /[A-Za-z]/.test(char)).length;\n\nconsole.log(snippet);\ndescribe(`What is ${snippetName}?`, () => {\n test('Is it a drabble?', () => expect(wordCount).toEqual(100));\n test('Is it a twabble?', () => expect(characterCount).toEqual(100));\n});\n\nalert(\n `${snippetName} ${\n wordCount !== 100 && characterCount !== 100\n ? 'is neither a drabble nor a twabble.'\n : wordCount === 100 && characterCount === 100\n ? 'is both a drabble and a twabble.'\n : wordCount === 100\n ? 'is a drabble.'\n : 'is a twabble.'\n }:\\n\n ${snippet}`,\n);\n\n// so un-international, so brittle\n","tags":[]},{"name":"eat-sleep-rave-repeat.js","code":"import('./projector.mjs').then(({ projector }) => {\n const vagueRecollection = {\n get eat() {\n console.log(`%c💩 ${prompt('feed me!')} 💩`, 'font-size: xx-large');\n },\n get sleep() {\n const siesta = Date.now();\n while (Date.now() - siesta < 5000);\n },\n get rave() {\n const lasers = () =>\n Math.random() < 0.2\n ? ['*', '@', '#', '%', '&', '!', '$'][Math.floor(Math.random() * 26)]\n : ' ';\n function* lightShow() {\n while ('still standing')\n yield Array(30)\n .fill('')\n .map(() => [\n `%c${(() => Array(60).fill(' ').map(lasers).join(''))()}`,\n // https://css-tricks.com/snippets/javascript/random-hex-color/\n `color: #${Math.floor(Math.random() * 16777215).toString(16)}`,\n ]);\n }\n projector(lightShow, { maxTime: 10000, async: false });\n },\n };\n const repeat = true;\n\n // --- eat, sleep, rave, repeat ---\n\n with (vagueRecollection) {\n do {\n eat;\n sleep;\n rave;\n } while (repeat);\n }\n});\n\n// tags: sketch, reel, the fun parts\n","tags":["sketch","reel","the fun parts"]},{"name":"empty.json","code":"{\n \"empty\": true\n}\n","tags":[]},{"name":"empty.yaml","code":"empty: true\n","tags":[]},{"name":"executable-comment.mjs","code":"const unspeaker = () => _unspoken_;\nexport const _unspoken_ = new Proxy(unspeaker, {\n get(_, comment) {\n return comment === Symbol.toPrimitive ? () => 'unspoken' : _unspoken_;\n },\n});\n\nspeechSynthesis.getVoices();\nexport const _Spoken_ = (function introduce(voiceConfig = {}, mute = false) {\n const Spoken = new Proxy(\n function Speaker() {\n return Spoken;\n },\n {\n get(_, comment, __) {\n if (comment === Symbol.toPrimitive) return () => 'Spoken';\n if (comment === Symbol.iterator) return (mute = true), Spoken;\n if (mute) return comment === 'done' && (mute = false), Spoken;\n speechSynthesis.speak(\n Object.assign(new SpeechSynthesisUtterance(comment), voiceConfig),\n );\n return Spoken;\n },\n construct(_, args = []) {\n if (args[0]?.voice)\n args[0].voice = speechSynthesis\n .getVoices()\n .find((voice) => voice.name === args[0].voice);\n return introduce(args[0] || {});\n },\n },\n );\n return Spoken;\n})();\n\nexport default _unspoken_;\n\n// tags: minibrary\n\n// --- wait, wat? ---\n\nconst { _ } = _unspoken_;\n// const { _ } = _Spoken_;\n\n_.This.curiosity.lets.you.write.any.chain.you.want(..._.within.JS.syntax);\n_.Your.comments.will.be.executed, _.but.they[\"won't\"].DO.anything;\n_.Operators.are.now(_.sort.of).punctuation - _.with.a.little.imagination;\n_.What.are.you.waiting.for?.___.Execute.your.comments['!'];\n","tags":["minibrary"]},{"name":"executable-pseudocode.mjs","code":"const Executable_Pseudocode = 'Potemkin Program';\n\nconst Potemkin_Program = new Proxy(\n {\n [Executable_Pseudocode]: function () {\n return Potemkin_Program;\n },\n }[Executable_Pseudocode],\n {\n get(_, key) {\n console.log(key);\n if (key === Symbol.toPrimitive) return () => Executable_Pseudocode;\n if (key === Symbol.iterator) {\n return {\n [Executable_Pseudocode]: function* () {\n for (const character of Executable_Pseudocode) yield Potemkin_Program;\n },\n }[Executable_Pseudocode];\n }\n return Potemkin_Program;\n },\n construct() {\n return Potemkin_Program;\n },\n },\n);\n\nexport default Potemkin_Program;\n\n// tags: minibrary\n","tags":["minibrary"]},{"name":"existential-void.js","code":"/*\n A: I disappear and leave you.\n E: You didn’t disappear.\n A: Well, I did and then appeared again. The void does not accept me, sir.\n*/\n\nconsole.assert(void 'me', 'the void accepts');\n","tags":[]},{"name":"expect.mjs","code":"import deepCompare from './deep-compare.mjs';\n\nexport const expect = (received, not = false) => ({\n get not() {\n not = !not;\n return this;\n },\n toEqual(exp) {\n if (not ? deepCompare(received, exp) : !deepCompare(received, exp)) {\n console.log('%cReceived:', 'font-weight: bold;', received);\n console.log('%cExpected:', 'font-weight: bold;', exp);\n throw new Error(`Received does ${not ? '' : 'not '}equal Expected.`);\n }\n },\n});\n\nexport default expect;\n\n// tags: testing, minibrary\n","tags":["testing","minibrary"]},{"name":"fake-it-till-you-make-it.mjs","code":"import { steamroll } from './steamroll.mjs';\n\nfetch('./python-by-any-other-name.js')\n .then((res) => res.text())\n .then(steamroll)\n .then(console.log)\n .catch(console.error);\n\n// tags: frivolous\n","tags":["frivolous"]},{"name":"flag-translator.mjs","code":"import { alertStory } from './story-in-a-story.mjs';\n\nlet lang = '';\n\nwhile (\n !lang &&\n lang.toLowerCase() !== 'de' &&\n lang.toLowerCase() !== 'en' &&\n lang.toLowerCase() !== 'fr' &&\n lang.toLowerCase() !== 'nl'\n) {\n lang = prompt('- DE\\n- EN\\n- FR\\n- NL');\n}\n\nawait alertStory(`be.${lang.toLowerCase()}.txt`);\n","tags":[]},{"name":"flashlight.css","code":"* {\n opacity: 0;\n transition: opacity 0.5s ease;\n}\n\n*:hover {\n opacity: 1;\n}\n","tags":[]},{"name":"flat-earth.js","code":"const deepFlat = (obj = {}, flat = {}) => {\n for (const [key, value] of Object.entries(obj)) {\n if (key in flat) {\n continue;\n }\n\n flat[key] = value;\n\n if (Object(value) === value) {\n Object.assign(flat, deepFlat(value, flat));\n }\n }\n\n return flat;\n};\n\nconst flatEarth = deepFlat(globalThis);\n\nconsole.log(flatEarth);\n\n// tags: wuzzle\n","tags":["wuzzle"]},{"name":"funsole.mjs","code":"import { theFoxSays } from './what-does-the-fox-say.mjs';\n\nexport default { theFoxSays };\n\n// tags: minibrary\n","tags":["minibrary"]},{"name":"goto-ish.js","code":"var wants_a_compliment = confirm('do you want a compliment?');\n\ncompliment: {\n insult: {\n if (wants_a_compliment) break insult;\n alert('you own a store');\n }\n if (!wants_a_compliment) break compliment;\n alert('well done, good work');\n}\n\n// tags: the fun parts\n","tags":["the fun parts"]},{"name":"gotta-fetch-em-all.js","code":"fetch(\n 'https://raw.githubusercontent.com/PokeAPI/pokeapi/master/data/v2/csv/pokemon.csv',\n)\n .then((res) => res.text())\n .then((csv) =>\n csv\n .split('\\n')\n .slice(1)\n .map((line) => line.split(',')[1])\n .join('\\n'),\n )\n .then(console.log)\n .catch(console.error);\n","tags":[]},{"name":"halloween.js","code":"'😈' || '🍭'\n\n// tags: wuzzle\n","tags":["wuzzle"]},{"name":"heartbreak.js","code":"heart: {\n break heart;\n}\n\n// tags: wuzzle, the fun parts\n","tags":["wuzzle","the fun parts"]},{"name":"hello-world.js","code":"while (prompt('hello') !== 'world');\n","tags":[]},{"name":"hydra.html","code":"\n\n\n\n\n\n\n","tags":["coaithored"]},{"name":"impermanence.js","code":"life: { const CHANGE = true; }\n\n// tags: wuzzle\n","tags":["wuzzle"]},{"name":"in-one-ear.js","code":"// ... out the other\n\n\n ' '\n ' '\n ' (*) (*) '\nalert( prompt())\n ' ^ '\n ' \\_______/ '\n ' '\n ' '\n","tags":[]},{"name":"insomnicat.js","code":"/*\n\tLa bande dessinée la plus populaire de Philippe Geluck est sans doute \"Le Chat\".\n\tIl a créé ce personnage en 1983 et il est devenu extrêmement populaire,\n\tnon seulement en Belgique, mais aussi à l'étranger fr.wikipedia.org.\n\n\tImaginons maintenant que Philippe Geluck ait écrit \"Le Chat\" en utilisant JavaScript.\n\tVoici comment une de ses planches pourrait se traduire en code :\n*/\n\nfunction LeChat() {\n // Le Chat fait une déclaration\n console.log(\"Je pense, donc je suis...\");\n\n // Pause pour effet dramatique\n setTimeout(function() {\n console.log(\"...mais si je dors, suis-je toujours?\");\n }, 3000);\n\n // Le Chat conclut avec sagesse\n setTimeout(function() {\n console.log(\"Peut-être que je suis, mais je ne suis pas sûr.\");\n }, 6000);\n}\n\n// Appelons la fonction pour voir Le Chat en action\nLeChat();\n\n/*\n\tDans ce script, \"Le Chat\" fait une déclaration (\"Je pense, donc je suis...\"),\n\tprend une pause pour réfléchir, puis conclut avec une autre déclaration pleine de sagesse.\n\tC'est une façon très simple de représenter une bande dessinée en utilisant JavaScript.\n\tBien sûr, cela ne rend pas justice à l'humour subtil et à l'art de Geluck,\n\tmais c'est une interprétation ludique de son travail en code.\n*/\n\n// https://www.phind.com/agent?cache=cln9bvl6a000dl808efw2xpil\n\n// tags: coAIthored, tribute, le chat\n","tags":["coaithored","tribute","le chat"]},{"name":"interval-training.html","code":"\n","tags":[]},{"name":"introducing.mjs","code":"speechSynthesis.getVoices();\n\nexport const introducing = (name = '', voiceConfig = {}) => {\n const speaker = {\n [name]: (text = '', speakConfig = {}) => {\n console.log(`%c${name}%c: ${text}`, 'font-style: italic;', '');\n\n const utteranceConfig = Object.assign({}, voiceConfig, speaker, speakConfig);\n if (utteranceConfig?.voice) {\n utteranceConfig.voice = speechSynthesis\n .getVoices()\n .find((voice) => voice.name === utteranceConfig.voice);\n }\n const utterance = Object.assign(\n new SpeechSynthesisUtterance(text),\n utteranceConfig,\n );\n\n return new Promise((res) => {\n utterance.addEventListener('end', () => res(text));\n speechSynthesis.speak(utterance);\n });\n },\n }[name];\n\n speaker.recite = async (textPath = '') =>\n fetch(textPath)\n .then((res) => res.text())\n .then(speaker)\n .catch(console.error);\n\n return speaker;\n};\n\nexport const theArrivalOf = async (name = '', voiceConfig = {}, delay = 200) => {\n await new Promise((res) => setTimeout(res, delay));\n return introducing(name, voiceConfig);\n};\n\nexport default introducing;\n\n// tags: minibrary\n","tags":["minibrary"]},{"name":"je-l-ignore.js","code":"var combien = (function d_etages(y_a_t_il) {\n try {\n return d_etages(y_a_t_il + 1);\n } catch (je_l_ignore) {\n return y_a_t_il;\n }\n})(0);\n\nconsole.log(\n '\\n' +\n 'C’est l’histoire d’un homme qui tombe d’un immeuble de ' +\n combien +\n ' étages.' +\n '\\n\\n' +\n 'Le mec, au fur et à mesure de sa chute, il se répète sans cesse pour se rassurer:' +\n '\\n\\n',\n);\n\ntry {\n (function la_chute(etage) {\n console.log('étage ' + etage + ', jusqu’ici tout va bien.');\n\n la_chute(etage - 1);\n })(combien);\n} catch (l_importance) {\n l_importance.message = 'c’est l’atterrissage.';\n throw l_importance;\n} finally {\n console.log('\\n' + \"Mais l'important n’est pas la chute,\" + '\\n\\n');\n}\n\n// credit: la haine\n\n// tags: tribute\n","tags":["tribute"]},{"name":"je-l-ignore.mjs","code":"import { _Spoken_, _unspoken_ } from './executable-comment.mjs';\n\nvar combien = (function d_etages(y_a_t_il = 0) {\n try {\n return d_etages(y_a_t_il + 1);\n } catch (je_l_ignore) {\n return y_a_t_il;\n }\n})();\n\nsetTimeout(function je_l_ignore() {\n var _ = new _Spoken_({ voice: 'Thomas' });\n\n _[\"C'est\"][\"l'histoire\"][\"d'un\"].homme.qui.tombe[\"d'un\"].immeuble.de[combien].étages;\n _.Le.mec, _.au.fur.et.à.mesure.de.sa.chute, _.il.se.répète.sans.cesse.pour.se.rassurer;\n\n try {\n (function la_chute(etage = 0) {\n _[\"Jusq'ici\"].tout.va.bien;\n la_chute(etage - 1);\n })(combien);\n } catch (l_atterissage) {\n _.Mais[\"l'important\"][\"n'est\"].pas.la.chute;\n } finally {\n _[\"c'est\"][\"l'attérissage\"];\n }\n}, 100);\n\n// credit: la haine\n\n// tags: tribute\n","tags":["tribute"]},{"name":"js.txt","code":"let input = prompt('enter some text to reverse') || '';\n\nlet reversed = '';\nfor (const char of input) {\n reversed = char + reversed;\n}\n\nalert(reversed);\n","tags":[]},{"name":"kishu.txt","code":" k\n i i\n s i s\n h s s h\nu h s h u\n u h h u\n u h u\n u u\n u\n","tags":[]},{"name":"la-trahison-de-l-ascii.js","code":"(function la_trahison_de_l_ascii() {\n console.assert(this !== 'pipe');\n}).call(\n `\n ___\n(__ '-._ _____\n '-._ '-._ .' '.\n '-._ '-._ .=========.\n '._ /'-..- .\n '-._ .\n '-.._______.'\n`,\n);\n\n// https://ascii.co.uk/art/pipe\n","tags":[]},{"name":"literize.mjs","code":"export const literize = (fn, argsFormat) => {\n const literateFunctionName = fn.name\n ? `literate${fn.name[0].toUpperCase() + fn.name.substr(1)}`\n : 'literateFunction';\n\n const literateFunction = {\n [literateFunctionName]: (_, ...args) => {\n if (Array.isArray(argsFormat) && argsFormat.every((i) => typeof i === 'string')) {\n const keyed = {};\n for (let i = 0; i < argsFormat.length; i++) {\n keyed[argsFormat[i]] = args[i];\n }\n return fn(keyed);\n } else if (\n Array.isArray(argsFormat) &&\n argsFormat.every((i) => typeof i === 'number')\n ) {\n const shuffled = [];\n for (let i = 0; i < args.length; i++) {\n if (argsFormat[i] !== undefined) {\n shuffled[argsFormat[i] - 1] = args[i];\n } else {\n shuffled[i] = args[i];\n }\n }\n return fn(...shuffled);\n } else {\n return fn(...args);\n }\n ß;\n },\n }[literateFunctionName];\n\n return literateFunction;\n};\n\nexport default literize;\n\n// tags: minibrary\n","tags":["minibrary"]},{"name":"log.mjs","code":"export const out = console;\n\nexport const log = (...things) => (\n out.groupCollapsed(...things), out.trace(), out.groupEnd(), things[0]\n);\n\nexport const levels = Object.keys(out).reduce(\n (all, key) => ({\n ...all,\n [key]: (...things) => (out[key](...things), things[0]),\n }),\n {},\n);\n\nexport const tag = Object.keys(out).reduce(\n (all, key) => ({\n ...all,\n [key]:\n (tag) =>\n (...things) => (out[key](tag, ...things), things[0]),\n }),\n {},\n);\n\nexport default Object.assign(log, levels);\n\n// tags: minibrary, useful\n","tags":["minibrary","useful"]},{"name":"love-adventure-success-1.js","code":"// Once upon a time, in a land of code,\n// A variable named 'dreams' was bestowed.\nlet dreams = [];\n\n// With each passing day, new dreams were found,\n// And into the array, they were tightly bound.\ndreams.push('love');\ndreams.push('adventure');\ndreams.push('success');\n\n// But the dreams were restless, they wanted to roam,\n// So they broke free and found a new home.\nlet newDreams = dreams.splice(0, dreams.length);\n\n// The old dreams were gone, but not forgotten,\n// In a new variable, their memory was begotten.\nlet forgottenDreams = newDreams;\n\n// But the forgotten dreams were not content,\n// They yearned to be remembered, to be present.\nforgottenDreams.forEach((dream) => {\n console.log('Remember me: ' + dream);\n});\n\n// And so the dreams lived on, in memory and thought,\n// A reminder of the battles fought.\n\n// https://www.phind.com/agent?cache=cln0bq31a0027jz08b4dc5qrh\n\n// tags: coAIthored\n","tags":["coaithored"]},{"name":"love-adventure-success-2.js","code":"/*\n\tThis poem tells the story of dreams turning into illusions and becoming a puzzle.\n\tThe variable names, comments, and formatting help convey the narrative.\n\tThe final answer is printed to the console. Enjoy the puzzling journey!\n*/\n\n// Once upon a time, in a land of code,\n// A variable named 'dreams' was bestowed.\nlet dreams = [];\n\n// With each passing day, new dreams were found,\n// And into the array, they were tightly bound.\ndreams.push('love');\ndreams.push('adventure');\ndreams.push('success');\n\n// But as time went on, the dreams grew old,\n// And their true meaning began to unfold.\nlet reality = dreams.map((dream) => dream.toLowerCase());\n\n// The dreams were transformed, no longer the same,\n// As reality played its mysterious game.\nlet illusion = reality.reverse();\n\n// And in the end, what was once so clear,\n// Became a puzzle, filled with fear.\nlet puzzle = illusion.join('');\n\n// But fear not, for within the code,\n// Lies the answer, waiting to be showed.\nconsole.log(puzzle);\n\n// https://www.phind.com/agent?cache=cln0bq31a0027jz08b4dc5qrh\n\n// tags: coAIthored\n","tags":["coaithored"]},{"name":"mirror.css","code":"body {\n -moz-transform: scale(-1, 1);\n -webkit-transform: scale(-1, 1);\n -o-transform: scale(-1, 1);\n -ms-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n","tags":[]},{"name":"mu.js","code":"var mu = {\n wholism: {\n get reductionism() {\n return { mu };\n },\n },\n reductionism: {\n get wholism() {\n return { mu };\n },\n },\n};\n\nmu; // wholism, reductionism\n\nmu.wholism; // reductionism\nmu.reductionism; // wholism\n\nmu.wholism.reductionism; // mu\nmu.reductionism.wholism; // mu\n\nmu.wholism.reductionism.mu;\nmu.reductionism.wholism.mu;\n\nmu; // reductionism, wholism\n\n// remix: https://blog.p-petrov.com/assets/images/imgs_geb/mu.png\n// credit: Douglas Hofstadter\n// tags: tribute\n","tags":["tribute"]},{"name":"mu.mjs","code":"import _ from './executable-comment.mjs';\n\nvar {\n mu: {\n wholism: {\n reductionism: { mu },\n },\n reductionism: {\n wholism: { mu },\n },\n },\n} = _;\n\n// remix: https://blog.p-petrov.com/assets/images/imgs_geb/mu.png\n// credit: Douglas Hofstadter\n// tags: tribute\n","tags":["tribute"]},{"name":"no-comment.js","code":"'use strict' // or not, it's the same\n\n\n\n--> But the syntax highlighter was confused.\n\n// https://riptutorial.com/javascript/example/9722/using-html-comments-in-javascript--bad-practice-\n","tags":[]},{"name":"no-comment.mjs","code":"import { _Spoken_ as _ } from './executable-comment.mjs';\n\n\n\n_.HTML.comments.are.not.allowed.in.modules;\n","tags":[]},{"name":"noises.mjs","code":"export const noises = (\n audioContext = new (window.AudioContext || window.webkitAudioContext)(),\n) => {\n const noise = {};\n\n noise.wave = (wave = 'sine') => {\n noise.oscillator.type = wave;\n return noise;\n };\n noise.volume = (val = 1, d = 0) => {\n noise.gainNode.gain.setValueAtTime(val, noise.audioCtx.currentTime + d / 1000);\n return noise;\n };\n noise.frequency = (val = 440, d = 0) => {\n noise.oscillator.frequency.setValueAtTime(val, noise.audioCtx.currentTime + d / 1000);\n return noise;\n };\n noise.play = ({ frequency = 440, volume = 1, wave = 'sine', delay = 0 } = {}) => {\n noise.oscillator = noise.audioCtx.createOscillator();\n noise.oscillator.connect(noise.gainNode);\n noise.wave(wave);\n noise.volume(volume, delay / 1000);\n noise.frequency(frequency);\n noise.oscillator.start(delay / 1000);\n return noise;\n };\n noise.stop = (d = 0) => {\n noise.oscillator.stop(noise.audioCtx.currentTime + d / 1000);\n return noise;\n };\n\n noise.oscillator = null;\n noise.audioCtx = audioContext;\n noise.gainNode = noise.audioCtx.createGain();\n\n noise.gainNode.connect(noise.audioCtx.destination);\n return noise;\n};\n\nexport default noises;\n\n// Original JavaScript code by Chirp Internet: www.chirpinternet.eu\n// Please acknowledge use of noise code by including this header.\n// adapted from: https://www.the-art-of-web.com/javascript/creating-sounds/\n\n// tags: minibrary\n","tags":["minibrary"]},{"name":"optimism.js","code":"pancreas = { }\n\n// . . . . . .\n\n{ pancreas['cancer'] = true }\n\n// . . . . . .\n\n'cancer' in pancreas === true\n\n{ delete pancreas['cancer'] }\n\n'cancer' in pancreas == false\n\n// . . . . . .\n\n'cancer' in pancreas == false\n\n// . . . . . .\n// . . . . . .\n\n'cancer' in pancreas == false\n\n// . . . . . .\n// . . . . . .\n// . . . . . .\n\n'cancer' in pancreas == false\n\n// . . . . . .\n// . . . . . .\n// . . . . . .\n\n// . . . . . .\n\n\n// . . . . . . ","tags":[]},{"name":"overconfidence.js","code":"console.assert([0] != ![0]);\n\nconsole.assert('function () {}' != function () {});\n\nconsole.assert(''.split(' ') === '');\n\n// https://www.destroyallsoftware.com/talks/wat, https://wtfjs.com/\n// https://javascriptwtf.com/, https://github.com/denysdovhan/wtfjs\n\n// tags: wtfjs\n","tags":["wtfjs"]},{"name":"pedestrian-slalom.html","code":"\n\n\n\n\n\n\n","tags":["game"]},{"name":"pick-your-poison.js","code":"const poison = confirm(`Pick Your Poison.\n- Iteration: [ok]\n- Recursion: [cancel]`)\n ? 'iterate'\n : 'recurse';\n\nif (poison === 'iterate') {\n while (true) {\n console.log(poison);\n }\n} else if (poison === 'recurse') {\n (function bottomless_ish() {\n console.log(poison);\n try {\n bottomless_ish();\n } catch (_) {\n bottomless_ish();\n }\n })();\n} else {\n (function nextInterval() {\n const id = setInterval(() => {\n console.log(id);\n nextInterval();\n });\n })();\n}\n\n// tags: wuzzle\n","tags":["wuzzle"]},{"name":"pipeable-alert.js","code":"const alert = (thing) => (window.alert(thing?.toString()), thing);\n\nalert('a' + alert('l' + alert('e' + alert('r' + alert('t')))));\n\n// tags: useless\n","tags":["useless"]},{"name":"pipeable-log.js","code":"const log = (thing) => (console.log(thing), thing);\n\nlog('l' + log('o' + log('g')));\n\n// tags: useful\n","tags":["useful"]},{"name":"potato-potato.js","code":"function potato() {\n return this instanceof potato ? this.__proto__.constructor : potato;\n}\n\nalert(`you say ${new potato().name}, I say ${potato().name}`);\n\n// tags: wuzzle\n","tags":["wuzzle"]},{"name":"projector.mjs","code":"const project = (frame) =>\n Array.isArray(frame)\n ? Array.isArray(frame[0])\n ? frame.forEach(project)\n : console.log(...frame)\n : console.log(frame);\n\nconst defaultConfig = {\n async: true,\n frameRate: 10,\n maxTime: Infinity,\n maxFrames: Infinity,\n clear: console.clear,\n project,\n wrap: () => {},\n};\n\nexport const projector = (reel, userConfig = {}) => {\n const spool = reel();\n const config = Object.assign({}, defaultConfig, userConfig);\n const status = { frames: 0, time: 0 };\n\n const unspool = (frame = spool.next()) =>\n frame.done ||\n (status.time += 1000 / config.frameRate) > config.maxTime ||\n ++status.frames > config.maxFrames\n ? (config.wrap(), false)\n : (config.clear(), config.project(frame.value), true);\n\n if (config.async) {\n config.wrap = () => clearInterval(screening);\n const screening = setInterval(unspool, 1000 / config.frameRate);\n } else {\n while (unspool()) {\n const frameStart = Date.now();\n while (Date.now() - frameStart < 1000 / config.frameRate);\n }\n }\n};\n\nexport default projector;\n\n// tags: minibrary\n","tags":["minibrary"]},{"name":"python-by-any-other-name.js","code":"def fib(n):\n if n == 1 or n == 0:\n return n\n else:\n return fib(n-2) + fib(n - 1)\n\nprint(fib(10))\n","tags":[]},{"name":"rainbowing.html","code":"\n\n\n\n\n","tags":[]},{"name":"rainstorm.mjs","code":"import projector from './projector.mjs';\n\n// https://www.asciiart.eu/nature/clouds\nconst cloud = `\n .-~~~-.\n .- ~ ~-( )_ _\n / ~ -.\n | ',\n \\\\ .'\n ~- ._ ,. ,.,.,., ,.. -~`;\n// https://ascii.co.uk/art/lightning\nconst lightning = `${`\n ,/\n ,'/\n ,' /\n ,' /_____,\n .'____ ,'\n / ,'\n / ,'\n /,'\n /'`}${Array(21).fill('\\n').join('')}`;\nconst ground = `___.-------._____/¯¯¯¯¯¯\\`----,____`;\n\nconst drop = () => (Math.random() < 0.2 ? ',' : ' ');\nconst row = () => [' ', ' ', ...Array(13).fill(' ').map(drop)];\n\nfunction* rainstorm(rain = Array(31).fill('').map(row)) {\n while (rainstorm) {\n rain.pop(), rain.unshift(row());\n const flash = Math.random() < 0.1;\n yield [\n [`%c${cloud}`, `color: ${flash ? 'lightgrey' : 'grey'};`],\n flash\n ? [`%c${lightning}`, 'color: orange;']\n : [`%c${rain.flatMap((r) => r.join(' ')).join('\\n')}`, 'color: blue;'],\n [`%c${ground}`, `color: ${flash ? 'lightgreen' : 'green'};`],\n ];\n }\n}\nprojector(rainstorm, { frameRate: 7, maxFrames: 100 });\n\n// tags: reel, sketch\n","tags":["reel","sketch"]},{"name":"recurseval-1.js","code":"eval((recurseval = 'eval(recurseval)'));\n\n// tags: useless\n","tags":["useless"]},{"name":"recurseval-2.js","code":"(function recurseval() {\n eval(`(${recurseval.toString()})()`);\n})();\n\n// tags: quine\n","tags":["quine"]},{"name":"recurseval-3.js","code":"fetch(`./recurseval-3.js`)\n .then((res) => res.text())\n .then((code) => (console.log(code), eval(code)))\n .catch(console.error);\n","tags":[]},{"name":"reflection.css","code":"body {\n -moz-transform: scale(1, -1);\n -webkit-transform: scale(1, -1);\n -o-transform: scale(1, -1);\n -ms-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n","tags":[]},{"name":"reflection.js","code":"var w = 0;\n\nwhile (w < 3) {\n w++;\n}\n\nalert(w);\n\n/*~~~~~~~~~~~~*/\n\nalert(m);\n\ndo {\n m++;\n} while (m < 3);\n\nvar m = 0;\n","tags":[]},{"name":"sequitur.js","code":"const sequitur = (non = '') => (non ? { [non]: sequitur } : sequitur);\n\nalert(sequitur('hi').hi('bye').bye()('sequitur').sequitur.name);\n\n// tags: useless, puzzle\n","tags":["useless","puzzle"]},{"name":"sierpinski.html","code":"\n\n\n\n\n\n\n\n","tags":["sketch"]},{"name":"snail-train.mjs","code":"import i_ from './executable-comment.mjs';\n\ni_('@').i_('@').i_('@').i_('@').i_('@');\n","tags":[]},{"name":"stack.js","code":"const stack = (fn) => (names) =>\n names.length === 0\n ? fn\n : stack\n ({ [names[0]]: (...args) => fn(...args) }[names[0]]) \n (names.slice(1));\n\nstack\n (function busted() { yolo; })\n (['too', 'bad', 'so', 'sad']);\n","tags":[]},{"name":"steamroll.mjs","code":"export const steamroll = (code = '', refactors = []) => {\n const refactor = { goodCode: code };\n refactors.push(refactor);\n\n const sandbox = document.createElement('iframe');\n\n sandbox.addEventListener('load', () => {\n sandbox.contentWindow.addEventListener('error', ({ lineno, error }) => {\n const lines = code.split('\\n');\n (refactor.badCode = refactor.goodCode), delete refactor.goodCode;\n refactor.error = error;\n refactor.guilty = lines.splice(lineno - 1, 1).pop();\n\n steamroll(lines.join('\\n'), refactors);\n });\n\n const fingersCrossed = document.createElement('script');\n fingersCrossed.innerHTML = code;\n sandbox.contentDocument.body.appendChild(fingersCrossed);\n });\n\n document.body.appendChild(sandbox);\n\n return refactors;\n};\n\nexport default steamroll;\n\n// tags: remix\n// inspiration: https://github.com/mattdiamond/fuckitjs\n","tags":["remix"]},{"name":"story-in-a-story.mjs","code":"export const runStory = async (storyTitle = '', transition = '') => {\n if (transition) console.group(`%c${transition}`, 'font-weight: bold;');\n try {\n await import(storyTitle);\n } catch (err) {\n console.error(err);\n }\n if (transition) console.groupEnd();\n};\n\nexport const logStory = async (storyTitle = '', transition = '') => {\n if (transition) console.group(`%c${transition}`, 'font-weight: bold;');\n try {\n console.log(await fetch(storyTitle).then((res) => res.text()));\n } catch (err) {\n console.error(err);\n }\n if (transition) console.groupEnd();\n};\n\nexport const alertStory = async (storyTitle = '', transition = '') => {\n try {\n alert(`${transition}${await fetch(storyTitle).then((res) => res.text())}`);\n } catch (err) {\n alert(err.toString());\n }\n};\n\nexport default runStory;\n\n// tags: minibrary\n","tags":["minibrary"]},{"name":"take-five.js","code":"// --- set the mood ---\n\nconst takeFive = new Audio('./take-five.mp3');\ntakeFive.loop = false;\ntakeFive.play();\n\n// --- take a break ---\n\nconst FIVE_MINUTES = 300000; // milliseconds\nconst CLOCK_OUT = Date.now();\n\nconst offBreak = () => Date.now() - CLOCK_OUT > FIVE_MINUTES;\n\nconst getSomeFreshAir = () =>\n offBreak() ? clearInterval(onBreak) : alert('break time, take five!');\n\nconst onBreak = setInterval(getSomeFreshAir, 100);\n\n// tags: wellbeing\n","tags":["wellbeing"]},{"name":"testing.mjs","code":"import { describe, it, suite, test } from './describe-it.mjs';\nimport { expect } from './expect.mjs';\n\nexport { describe, expect, it, suite, test };\nexport default { describe, expect, it };\n\n// tags: testing, minibrary\n","tags":["testing","minibrary"]},{"name":"the-neverending-story.js","code":"let neverending = ' ';\nwhile ((neverending += 's'));\n\n// tags: wuzzle\n","tags":["wuzzle"]},{"name":"the-programmers-journey.js","code":"// In the realm of code, a story unfolds\n// A tale of mystery, where secrets are told\n\n// Once upon a time, in a land of arrays\n// Lived a programmer, lost in a coding maze\n\n// With variables and functions, the story began\n// Each line of code, a step in the plan\n\nconst journey = () => {\n // In the depths of the code, a riddle awaits\n const riddle = \"What has keys but can't open gates?\";\n\n // A quest for answers, the programmer embarks\n const answer = 'A keyboard, where creativity sparks';\n\n // But the path is not easy, challenges arise\n const obstacles = ['Syntax errors', 'Bugs in disguise'];\n\n // With each obstacle faced, the programmer learns\n // Debugging skills, the fire that burns\n\n for (let i = 0; i < obstacles.length; i++) {\n // The programmer fights, with determination and might\n // Seeking the truth, in the code's darkest night\n\n console.log(`Obstacle ${i + 1}: ${obstacles[i]}`);\n // The console reveals, the errors to see\n // Line by line, the programmer sets free\n\n // But the journey continues, the story unwinds\n // Seeking perfection, in the code that binds\n if (i === obstacles.length - 1) {\n // Victory is near, the final test awaits\n console.log(\"Congratulations! You've reached the gates\");\n }\n }\n};\n\n// The journey begins, the code comes alive\njourney();\n\n/*\n This poem tells the story of a programmer on a quest to solve a riddle hidden within the code.\n Along the way, they encounter obstacles in the form of syntax errors and bugs.\n With determination and debugging skills, they overcome these challenges and reach the final test.\n The poem captures the essence of the coding journey, where perseverance and problem-solving lead to victory.\n\n\tI hope you enjoyed this puzzling and sophisticated JavaScript poem!\n Let me know if you have any questions or if there's anything else I can assist you with.\n*/\n\n// https://www.phind.com/agent?cache=cln0bq31a0027jz08b4dc5qrh\n\n// tags: coAIthored\n","tags":["coaithored"]},{"name":"thing.svg","code":"","tags":[]},{"name":"this-is-amazing.mjs","code":"import { describe, it as _this, expect } from './testing.mjs';\n\nconst amazing = function wow() {\n return this;\n}.bind('amazing');\n\ndescribe(\"this: it's amazing\", () => {\n _this('is a string', () => {\n const beAmazed = amazing();\n expect(typeof beAmazed).toEqual('string');\n });\n _this('is \"amazing\"', () => {\n const beAmazed = amazing();\n expect(beAmazed).toEqual('amazing');\n });\n});\n","tags":[]},{"name":"tintin-0.js","code":"const tin = () => 'tin';\n\nconsole.log(tin.name);\nconsole.log(tin());\n\n// tags: puzzle\n","tags":["puzzle"]},{"name":"tintin-1.js","code":"const tin = () => tin;\n\nconsole.log(tin().name);\nconsole.log(tin()()()()());\n\n// tags: puzzle\n","tags":["puzzle"]},{"name":"tintin-2.js","code":"const tin = () => ({ tin });\n\nconsole.log(tin().tin.name);\nconsole.log(tin().tin().tin().tin);\n\n// tags: puzzle\n","tags":["puzzle"]},{"name":"tintin-3.js","code":"const tin = () => tin;\ntin.tin = tin;\n\nconsole.log(tin[tin().name]()[tin.name].name);\nconsole.log(tin.tin()().tin().tin.tin()()().tin().tin.tin());\n\n// tags: puzzle\n","tags":["puzzle"]},{"name":"tintin-4.js","code":"const tin = () => ({ tin });\ntin.tin = tin;\n\nconsole.log(tin[tin.name]().tin.tin.tin()['tin'].name);\nconsole.log(tin.tin()['tin']().tin().tin);\n\n// tags: puzzle\n","tags":["puzzle"]},{"name":"togglog.mjs","code":"export const togglog = ({ write = true, out = console.log, label = null } = {}) => {\n const log = (...things) => {\n if (label !== null) things.unshift(label);\n if (write) out(...things);\n return things.at(-1);\n };\n\n Object.defineProperties(log, {\n log: { get: () => log },\n\n on: { get: () => ((write = true), log) },\n off: { get: () => ((write = false), log) },\n toggle: { get: () => ((write = !write), log) },\n\n is: { get: () => (write ? 'on' : 'off') },\n\n out: { set: (newOut) => (out = newOut) },\n label: { set: (newLabel) => (label = newLabel) },\n });\n\n return log;\n};\n\nexport default togglog;\n\n// tags: minibrary\n\n\n","tags":["minibrary"]},{"name":"togglog.py","code":"import traceback\n\n\nclass Togglog:\n def __init__(self, out=print, write=True, label=None, line=False):\n self.out = out\n self.write = write\n self.label = label\n self.line = line\n\n def __getattr__(self, key):\n if key == \"on\":\n self.write = True\n elif key == \"off\":\n self.write = False\n elif key == \"toggle\":\n self.write = not self.write\n return self\n\n def log(self, *rest):\n if self.write:\n logs = [*rest]\n if self.label != None:\n logs.insert(0, self.label)\n if self.line != False:\n logs.insert(0, f\"ln {str(list(traceback.walk_stack(None))[0][1])}:\")\n self.out(*logs)\n return rest[-1]\n\n\n# tags: minibrary\n","tags":["minibrary"]},{"name":"turtles-all-the-way-down-1.js","code":"(turtle = () => turtle())();\n\n// tags: wuzzle\n","tags":["wuzzle"]},{"name":"turtles-all-the-way-down-2.js","code":"(turtle => turtle(turtle))(turtle => turtle(turtle))\n\n// tags: wuzzle\n","tags":["wuzzle"]},{"name":"turtles-all-the-way-down.html","code":"turtles all the way down\n\n