authorgravatar for git@paperclover.netclover caruso <git@paperclover.net> 2026-01-14 00:56:09-08:00
committergravatar for git@paperclover.netclover caruso <git@paperclover.net> 2026-01-14 01:08:18-08:00
log18181e597db8b1d2a90e8676958e8fe5ce544fda
treeffbcace3d8e95a76265db62cb9c03102d0186578
parent3d5576a112f56848e5f3600a7101d9a4bbc9574f
signature Commit is signed but in an unrecognized format.

chore: update log and some other files


4 files changed, 14 insertions(+), 121 deletions(-)

repl.js deleted-117
......@@ -1,117 +0,0 @@
1// In contrast to `node run <file>`, this opens a shell-like
2// environment that allows faster execution of code since it
3// doesn't have to reload the plugin system. This is mostly
4// done since Clover's primary dev-env is a Windows 7 laptop;
5// It takes her machine 600ms to load the plugin file on it's own.
6//
7// TODO: as of 2025-10-03, this file is not maintained
8import process from "node:process";
9import * as util from "node:util";
10const exts = [".tsx", ".ts", ".js", ".marko"];
11
12process.stderr.write("Loading...");
13const { hot } = await import("./run.js"); // get plugins ready
14process.stderr.write("\r" + " ".repeat("Loading...".length) + "\r");
15const repl = hot.load("node:repl").start({
16 prompt: "% ",
17 eval(code, _global, _id, done) {
18 evaluate(code)
19 .catch((err) => {
20 console.error(util.inspect(err, false, 10, true));
21 })
22 .then((result) => done(null, result));
23 },
24 ignoreUndefined: true,
25 //completer,
26});
27repl.setupHistory(".clover/repl-history.txt", () => {});
28
29setTimeout(() => {
30 hot.reloadRecursive("./framework/generate.ts");
31}, 100);
32
33async function evaluate(code) {
34 code = code.trim();
35
36 if (code === "clear" || code === "cls") {
37 return console.clear();
38 }
39
40 if (code[0] === "=") {
41 try {
42 const result = await eval(code[1]);
43 console.info(inspect(result));
44 } catch (err) {
45 if (err instanceof SyntaxError) {
46 const result = await eval("(async() => { return " + code + " })()");
47 console.info(inspect(result));
48 } else {
49 throw err;
50 }
51 }
52 }
53
54 let split = code.split(/\s+/);
55 if (split.length === 0) return;
56
57 // Shell commands
58 const cliPassthrough = [
59 "deno",
60 "explorer",
61 "git",
62 "iexplore",
63 "node",
64 "npm",
65 "open",
66 "rg",
67 "start",
68 "vi",
69 ];
70 if (cliPassthrough.includes(split[0]) || split[0].startsWith("$")) {
71 if (split[0].startsWith("$")) {
72 if ((split[0] = split[0].slice(1)).trim() === "") split.shift();
73 }
74 if (process.platform === "win32" && split[0] === "open") split[0] = "start";
75 if (split[0] === "explorer" || split[0] === "start") {
76 split[1] = split[1]?.replaceAll("/", "\\");
77 }
78 try {
79 child_process.execSync(split.join(" "), {
80 stdio: "inherit",
81 env: { EDITOR: "vi", ...process.env },
82 });
83 } catch (err) {
84 const { status, signalCode } = err;
85 console.error(
86 `Exited with ${status ? "code " + status : "signal " + signalCode}`,
87 );
88 }
89 return;
90 }
91
92 let found;
93 for (const base of [".", "framework"]) {
94 for (const e of exts) {
95 const file = path.join(base, split[0] + e);
96 if (fs.existsSync(file)) {
97 found = file;
98 break;
99 }
100 }
101 }
102
103 if (!found) {
104 console.error("\x1b[33mNo file matches: " + split[0] + "\x1b[0m");
105 return;
106 }
107
108 const m = hot.reloadRecursive(found);
109 await m.main?.();
110 errorAllWidgets(
111 path.basename(found, path.extname(found)) + ".main() returning",
112 );
113}
114
115import * as fs from "node:fs";
116import * as path from "node:path";
117import * as child_process from "node:child_process";
run.js-1
......@@ -4,7 +4,6 @@ import * as zlib from "node:zlib";
44import * as url from "node:url";
55import * as fs from "node:fs";
66import * as os from "node:os";
7import assert from "node:assert";
87import process from "node:process";
98
109// Disable experimental warnings (Type Stripping, etc)
src/blog/pages/community-translations.mdx+4-2
......@@ -5,8 +5,10 @@ export const layout = { default: ({ content }) => <main>{content}</main> };
55
66# blog community translations
77
8if you natively speak a language that i don't have a blog page translated into,
9and would like to help spread my words to more readers, please get in touch.
8clover blog posts are translated into other languages by my friends or other
9members of the (world's) community. if you natively speak a language that i
10don't have a blog page translated into, and would like to help spread my words
11to more readers, please get in touch.
1012
1113<code><a href="mailto:me@paperclover.net">me@paperclover.net</a></code>
1214
src/pages/log.mdx+10-1
......@@ -7,12 +7,21 @@ export const meta = { title: 'clover\'s log' };
77[git]: https://git.paperclover.net/
88[home infra]: https://git.paperclover.net/clo/home-infra
99[name paint bot]: https://git.paperclover.net/clo/discord-name-painter
10[next.js blog post]: /blog/webdev/one-year-next-app-router
11[progress.ts]: https://jsr.io/@clo/lib/doc/progress.ts
12[this site]: https://paperclover.net/
1013[todo tracker]: https://git.paperclover.net/clo/todo-tracker
1114[ts lie detector]: https://git.paperclover.net/clo/ts-lie-detector
12[progress.ts]: https://jsr.io/@clo/lib/doc/progress.ts
1315
1416# clover's log
1517
18## 2026-01-14
19
20tags: [next.js blog post], [this site]
21
22general housekeeping. getting this activity page up. getting the spanish
23translation by my good friend trubiso up. things are looking really cozy.
24
1625## 2026-01-12
1726
1827tags: [album]