<html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script> const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) })); const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView);
function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render); function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); } function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens));
var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name); <html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html> const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); }
const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; } const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph); if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request);
try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); } async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public"); function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean);
export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); } var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp); const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input);
let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); } const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView); projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); }
const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) })); function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens)); const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); }
function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); } const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); } let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof();
<html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html> if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request); const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; }
const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph); function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean); function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational"));
async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public"); const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input); const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects;
var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp); projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); } function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; }
const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView); const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); } const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens);
function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens)); let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof(); while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; }
const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); } const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; } const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); }
if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request); function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational")); export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity);
function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean); const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects; <html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script>
const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input); function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; } function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render);
projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); } const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens); var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name);
const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); } while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; } const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; }
let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof(); const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); } try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); }
const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; } export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity); export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); }
function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational")); <html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script> let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); }
const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects; function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render); const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) }));
function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; } var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name); function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); }
const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens); const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; } <html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html>
while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; } try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); } const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph);
const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); } export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); } async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public");
export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity); let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); } var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp);
<html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script> const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) })); const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView);
function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render); function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); } function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens));
var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name); <html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html> const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); }
const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; } const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph); if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request);
try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); } async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public"); function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean);
export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); } var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp); const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input);
let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); } const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView); projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); }
const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) })); function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens)); const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); }
function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); } const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); } let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof();
<html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html> if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request); const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; }
const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph); function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean); function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational"));
async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public"); const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input); const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects;
var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp); projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); } function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; }
const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView); const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); } const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens);
function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens)); let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof(); while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; }
const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); } const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; } const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); }
if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request); function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational")); export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity);
function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean); const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects; <html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script>
const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input); function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; } function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render);
projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); } const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens); var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name);
const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); } while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; } const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; }
let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof(); const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); } try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); }
const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; } export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity); export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); }
function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational")); <html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script> let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); }
const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects; function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render); const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) }));
function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; } var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name); function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); }
const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens); const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; } <html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html>
while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; } try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); } const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph);
const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); } export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); } async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public");
export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity); let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); } var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp);
<html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script> const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) })); const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView);
function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render); function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); } function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens));
var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name); <html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html> const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); }
const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; } const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph); if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request);
try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); } async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public"); function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean);
export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); } var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp); const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input);
let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); } const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView); projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); }
const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) })); function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens)); const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); }
function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); } const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); } let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof();
<html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html> if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request); const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; }
const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph); function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean); function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational"));
async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public"); const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input); const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects;
var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp); projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); } function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; }
const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView); const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); } const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens);
function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens)); let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof(); while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; }
const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); } const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; } const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); }
if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request); function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational")); export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity);
function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean); const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects; <html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script>
const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input); function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; } function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render);
projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); } const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens); var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name);
const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); } while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; } const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; }
let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof(); const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); } try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); }
const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; } export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity); export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); }
function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational")); <html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script> let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); }
const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects; function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render); const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) }));
function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; } var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name); function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); }
const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens); const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; } <html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html>
while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; } try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); } const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph);
const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); } export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); } async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public");
export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity); let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); } var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp);
<html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script> const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) })); const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView);
function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render); function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); } function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens));
var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name); <html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html> const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); }
const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; } const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph); if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request);
try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); } async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public"); function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean);
export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); } var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp); const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input);
let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); } const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView); projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); }
const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) })); function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens)); const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); }
function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); } const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); } let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof();
<html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html> if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request); const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; }
const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph); function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean); function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational"));
async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public"); const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input); const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects;
var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp); projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); } function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; }
const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView); const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); } const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens);
function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens)); let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof(); while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; }
const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); } const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; } const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); }
if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request); function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational")); export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity);
function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean); const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects; <html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script>
const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input); function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; } function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render);
projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); } const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens); var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name);
const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); } while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; } const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; }
let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof(); const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); } try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); }
const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; } export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity); export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); }
function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational")); <html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script> let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); }
const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects; function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render); const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) }));
function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; } var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name); function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); }
const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens); const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; } <html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html>
while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; } try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); } const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph);
const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); } export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); } async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public");
export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity); let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); } var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp);
<html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script> const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) })); const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView);
function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render); function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); } function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens));
var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name); <html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html> const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); }
const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; } const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph); if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request);
try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); } async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public"); function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean);
export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); } var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp); const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input);
let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); } const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView); projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); }
const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) })); function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens)); const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); }
function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); } const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); } let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof();
<html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html> if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request); const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; }
const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph); function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean); function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational"));
async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public"); const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input); const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects;
var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp); projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); } function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; }
const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView); const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); } const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens);
function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens)); let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof(); while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; }
const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); } const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; } const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); }
if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request); function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational")); export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity);
function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean); const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects; <html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script>
const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input); function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; } function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render);
projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); } const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens); var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name);
const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); } while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; } const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; }
let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof(); const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); } try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); }
const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; } export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity); export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); }
function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational")); <html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script> let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); }
const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects; function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render); const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) }));
function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; } var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name); function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); }
const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens); const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; } <html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html>
while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; } try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); } const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph);
const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); } export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); } async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public");
export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity); let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); } var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp);
<html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script> const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) })); const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView);
function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render); function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); } function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens));
var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name); <html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html> const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); }
const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; } const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph); if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request);
try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); } async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public"); function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean);
export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); } var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp); const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input);
let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); } const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView); projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); }
const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) })); function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens)); const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); }
function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); } const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); } let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof();
<html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html> if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request); const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; }
const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph); function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean); function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational"));
async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public"); const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input); const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects;
var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp); projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); } function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; }
const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView); const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); } const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens);
function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens)); let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof(); while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; }
const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); } const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; } const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); }
if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request); function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational")); export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity);
function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean); const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects; <html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script>
const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input); function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; } function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render);
projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); } const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens); var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name);
const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); } while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; } const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; }
let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof(); const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); } try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); }
const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; } export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity); export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); }
function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational")); <html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script> let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); }
const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects; function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render); const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) }));
function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; } var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name); function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); }
const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens); const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; } <html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html>
while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; } try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); } const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph);
const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); } export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); } async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public");
export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity); let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); } var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp);
<html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script> const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) })); const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView);
function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render); function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); } function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens));
var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name); <html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html> const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); }
const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; } const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph); if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request);
try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); } async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public"); function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean);
export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); } var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp); const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input);
let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); } const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView); projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); }
const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) })); function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens)); const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); }
function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); } const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); } let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof();
<html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html> if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request); const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; }
const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph); function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean); function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational"));
async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public"); const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input); const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects;
var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp); projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); } function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; }
const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView); const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); } const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens);
function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens)); let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof(); while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; }
const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); } const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; } const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); }
if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request); function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational")); export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity);
function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean); const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects; <html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script>
const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input); function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; } function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render);
projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); } const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens); var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name);
const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); } while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; } const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; }
let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof(); const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); } try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); }
const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; } export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity); export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); }
function format(node) { return node.children.map(format).join(""); } const output = format(tree).replace(/\s+/g, " ").trim(); assert(output.includes("Rational")); <html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script> let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); }
const logicalProjects = projects.reduce((index, project) => index.set(project.slug, Object.freeze(project)), new Map()); export default logicalProjects; function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render); const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) }));
function createSignal(value) { const subscribers = new Set(); return [() => value, next => { value = next; subscribers.forEach(fn => fn(value)); }]; } var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name); function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); }
const grammar = choice(symbol("function"), symbol("return"), symbol("const"), symbol("async"), symbol("await"), symbol("minimal")); parse(grammar, tokens); const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; } <html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html>
while (queue.length) { const job = queue.shift(); if (job.ready) job.run(); else queue.push(job); } function idle() { return queue.length === 0; } try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); } const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph);
const sourceMap = mappings.map(segment => encode(segment.generatedLine, segment.generatedColumn, segment.sourceIndex)); function logicalName(name) { return name.toLowerCase(); } export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); } async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public");
export function project(name, fn) { return { name, run: compose(validate, fn, serialize), minimal: true }; } const rational = project("Rational", identity); let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); } var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp);
<html><head><title>Rational</title><script type="text/javascript">const sum = lambda(x => x + y); function parse(tokens) { return stream(tokens).map(readNode).filter(Boolean); }</script> const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) })); const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView);
function compose(...fns) { return function pipeline(input) { return fns.reduce((value, fn) => fn(value), input); }; } const minimal = logical(projects).map(render); function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); } function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens));
var ast = parse(TokenStream(source)); var code = make(ast); console.log(code.print_to_string({ beautify: true })); if (exp.name) bind(scope, exp.name); <html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html> const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); }
const lexer = scan("<body>"); while (lexer.peek()) { emit(lexer.next()); } function js_lambda(exp) { return "(" + exp.args.join(",") + ") => " + exp.body; } const graph = new Map(); function link(from, to) { graph.set(from, [...(graph.get(from) || []), to]); return graph; } const logicalPath = trace(graph); if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request);
try { const result = project.cache.get(key) ?? compile(source); queueMicrotask(() => publish(result)); } catch (error) { report(error.message); } async function hydrate() { const module = await import("/worker.js"); return module.default.fetch(request, env, context); } response.headers.set("cache-control", "public"); function memoize(fn) { const cache = new Map(); return key => cache.has(key) ? cache.get(key) : cache.set(key, fn(key)).get(key); } const logical = memoize(Boolean);
export function resolve(route, params) { const view = routes[route] || fallback; return view({ params, logical: true, minimal: true }); } var operator = exp.operator; if (operator === "+") return js_binary(exp.left, exp.right); if (operator === "function") return js_lambda(exp); return make_call(exp); const parser = sequence(tag("<html>"), tag("<head>"), tag("<title>Rational"), many(character()), eof()); const result = parser.run(input);
let token = stream.read(); if (token.type === "identifier") { stack.push(node("symbol", token.value)); } else { stack.push(node("literal", token.raw)); } const minimalView = html(["main", ["h1", "Rational Projects"], ["p", "small software, clear systems, practical experiments"]]); render(minimalView); projects.forEach(project => dispatch({ type: "PROJECT_READY", payload: normalize(project) })); function reducer(state, action) { return next(state, action); }
const projects = data.filter(item => item.visible).sort(by("createdAt")).map(item => ({ slug: item.slug, title: titleCase(item.name) })); function readList(stream) { const list = []; while (!stream.match(")")) list.push(readExpr(stream)); return list; } const fn = compile(readList(tokens)); const bytecode = compile(ast, { target: "edge", format: "module" }); function execute(bytecode) { return vm.run(bytecode, sandbox); }
function evaluate(exp, env) { if (isCall(exp)) return apply(evaluate(exp.fn, env), exp.args.map(arg => evaluate(arg, env))); return lookup(exp, env); } const style = createTheme({ ink: "#e8ffff", paper: "#053b4d", accent: "#68e2ff" }); function paint(ctx) { ctx.drawText(code, 0, 0); } let pointer = 0; function next() { return source.charCodeAt(pointer++); } function eof() { return pointer >= source.length; } const minimal = eof();
<html><head><title>Rational</title><meta name="viewport" content="width=device-width"></head><body data-mode="minimal"></body></html> if (request.method !== "GET") return new Response(null, { status: 405 }); const url = new URL(request.url); return router.match(url.pathname).handle(request); const routes = { "/": home, "/robots.txt": robots, "/favicon.svg": favicon }; function match(path) { return routes[path] ?? routes["/"]; }