2025 2

Things I Learned - 28 Sep 2025

This week, I learned: selectolax is a fast, easy-to-use, modern HTML5 parser with CSS selectors. A good replacement for lxml.html. The most effective way to convert a blob (e.g. file input) to a data URL on the browser seems to be via the FileReader API. const blobToDataURL = (blob) => new Promise((res, rej) => { const r = new FileReader(); r.onload = () => res(r.result); r.onerror = () => rej(r.error); r.readAsDataURL(f); }); Tool calls in OpenAI support files and images. OpenAI ⭐ “Task parity is not the same thing as job parity There is a lot of complexity as many different tasks are bundled into jobs, and many jobs contribute to processes inside an organization The jagged frontier of AI ability means doing tasks well doesn’t translate to doing jobs well.” Ethan Mollick Adding // @ts-check to a JavaScript file and documenting types via JSDoc might be the simplest way to migrate phase-wise from JS to Typescript. envsubst < file.txt replaces file.txt with the environment variable, e.g. $HOME is replaced by the HOME environment variable. Clean shell-level templating. GitHub Copilot CLI is out. npx -y @github/copilot Compost is the cheapest thing per ton that I can buy on Amazon India. I can buy 1 ton of compost for Rs 13,500. ChatGPT yt-dlp requires Deno from now on. #14404 In meetings, make cameras optional by default – and judge engagement by contributions, not video – because a 4-week field experiment found camera-on increased fatigue and reduced voice, especially for women and newcomers. Camera on early for trust building is useful. PubMed wrkflw is a quick and light way to test GitHub actions before publishing. It runs GitHub actions locally. GPT-5-Codex is available as an API and on LLM. Simon Willison ⭐ I’m habit engineering, i.e. discovering and stacking habits on to existing ones. For example: ChatGPT suggested increasing observability based on code reviews. I’m including it in my weekly codecast. ChatGPT suggested defining closures inmeetings. I’mn now discussing objectives at meeting starts and effectiveness at the end. Since Anaconda cannot be used for free by organizations with 200+ people, Straive’s received legal notices from Anaconda. Since laptops are under central IT administration, they went ahead and deleted all Anaconda instances. Installing miniconda for use with conda-forge requires admin access that most developers do not have, however. That leads to an interesting “No Python” situation. This is where uv becomes the knight in shining armor. Perceptron is SOTA LLM for object bounding boxes. Just 2B parameters. Gall’s “law” says that complex systems that work evolved from simple systems that worked. But a complex system designed from scratch won’t ever work. This holds in uncertain environments. But where formal theory or regulations exists, it doesn’t. ChatGPT uvx --with visidata vd gives you a command-line Excel editor to edit / convert CSV, Excel, JSON, SQLite, directories, etc. uvx markitdown https://example.com/ fetches example.com as Markdown. I learnt this when I told Codex it could use uvx markitdown to convert PDFs and it figured this part out by itself. The Dropbox connector for ChatGPT is the little flaky – at least on Android. It could not identify a file that was clearly there in Dropbox and I had to upload it manually. ChatGPT’s output is too dense for me. I added this to my custom instructions: “Write in simple language. Explain non-obvious terms intuitively.” yt-dlp has a --download-sections option that downloads specific YouTube time ranges. For example --download-sections "*00:01:00-00:03:00" downloads roughly (not exactly) from 1 min to 3 min. Note the * at the beginning. My Lenovo laptop’s touchpad started scrolling instead of moving when I moved my finger. Many things could have caused it, but the solution was to click (not tap) the top middle of the trackpad. ChatGPT The India Entrance Exam database is a dataset collating Indian entrance exams.

Things I Learned - 21 Sep 2025

This week, I learned: When editing an image, ChatGPT’s non-thinking mode does a much better job of preserving the original image features than the thinking mode. When editing my photo, I found that the thinking mode creates images that looks quite different than me. A surprising effect of overthinking. ⭐ When evaluating model accuracy, compare with human accuracy rather than perfect accuracy. SMEs rarely agree among themselves, so it’s unlikely that they will agree with an LLM. Instead, measure how often the LLM agrees with the majority of SMEs and how often it disagrees with all SMEs. This gives a more realistic measure of accuracy. LLMs instead of Human Judges? and Judging LLM-as-a-Judge. ChatGPT I understand at least one mechanism of how costs are inflated in large organizations. Even people who want to keep costs low find that the process of tracking expenses, submitting receipts, answering questions around approval, adds transaction cost. So, rather than going for a $10 plus top up mechanism, I would rather go for and ask people to take a $500 top up. Better ask for more and waste than have to ask again. YouTube downloaders: yt-dlp for the CLI, Stacher for Windows/Mac/Linux, Cobalt for a web-based app. Ref VS Code a bunch of features I discovered: It can run a terminal in its own new window for over a year (via Ctrl+P > Terminal: Move Terminal into New Window). Now, Ctrl + Alt + Shift + ` does this directly. Terminal Intellisense shows completion suggestions in the UI. Very helpful. Ctrl+Space triggers the menu completion. ⭐ “We find that the per-step error rate itself rises as the task progresses”, i.e. once a conversation goes the wrong way, it’s really hard to correct it. The Illusion of Diminishing Returns Japonaise Cake is the name of the pastry that I had as a child and grew up longing for. I have spent several weeks searching for it in the roadside bakeries at Bangalore and Chennai but only one bakery seems to have it. systemd is the modern way to run scheduled jobs, instead of cron. It’s far more complex. But it can catch up on missed runs via a Persistent option. Working with systemd timers ⭐ Vice-chancellors of universities resist AI in education because (a) their faculty does not know AI and (b) AI is unreliable. But they are interested in (a) large-scale AI-evaluation and (b) AI-enabling entire campus. tldr.sh offers concise man pages, e.g. uvx tldr jq. cheat.sh offers detailed examples, e.g. curl cheat.sh/jq or curl cheat.sh/:help. ugrep is a fast drop-in replacement for grep. It supports fuzzy search with a customizable Levenshtein distance. Also ug -Q shows an interactive TUI searches like VS Code’s “Search in Files” feature. Very intuitive. Dagger lets you write CI/CD workflows in Python. I tried running it but after 7m of pulling large Docker containers, I gave up. Too heavy. dotslash lets you write scripts that downloads GitHub releases, caches, and runs them. Requires writing scripts. I prefer mise. ChatGPT has a quota for searches. I saw this phrase in the reasoning traces: “I’ll avoid overloading on citations since we only have a few calls left.” It doesn’t seem to be in ChatGPT’s system prompt from last month, so it’s either part of the tool response or a new prompt. Depending on the underlying chips that a model uses, the floating point multiplications may differ and model quality can vary. So Claude 4 Opus running on Anthropic’s GPUs can produce different results from when running on Google’s GPUs or Amazon’s GPUs.

2024 1

Things I Learned - 22 Dec 2024

This week, I learned: What to use for hosting: ChatGPT GitHub Pages: Static websites, medium files Cloudflare Pages: Static websites, global delivery Vercel: Frontend frameworks (e.g. Next.js) with high DX and ISR, small files Netlify: JAMstack projects, minimal back-end, moderate files Glitch: Small static projects Render: Full-stack apps requiring databases and server-side compute Firebase Hosting: Small sites, limited large files Archive.org: Public archival, large files Google Drive: File sharing, large files Dropbox: File sharing, moderate files Cloudflare R2: Static assets, large file delivery Anthropic defines agents. Building effective agents + Cookbook Augmented LLMs are LLMs enhanced with augmentations such as retrieval, tools, and memory. Workflows are systems where LLMs and tools are orchestrated through predefined code paths. Prompt chaining: Pipe each LLM output to the next LLM. A->B->C->Z. E.g. Write report, then translate. Extract results, then verify them. Successively ask follow-up questions. Routing: One LLMs decides which other LLM to call next. A->B|C|D->Z. E.g. Evaluate complexity, then pick the right model. Classify request time, then pick the right prompt. Parallelize: Sectioning (and Orchestrator-workers): Break tasks into independent subtasks, then aggregate. A->B+C+D->Z. E.g. Evaluate contracts against different clauses in parallel. Parallelize: Voting: Run same task multiple times, then vote. A->B+B+B->Z. E.g. Review code for prompt injection using different prompts. Evaluate content safety with different thresholds. Evaluator-optimizer: One model checks another in a loop. A->B->A->B->…->Z. E.g. Literary translation. Self-healing code. Policy violation checks. Human-in-the-loop Checkpoints: The workflow explicitly requests human review at certain stages. A->B->(Human)->C->Z. E.g. Sensitive content review. High-stakes decision making. Ambiguous tasks. Agents are LLMs that dynamically direct their own processes and tool usage, consulting tools or the user as needed. To download YouTube subtitles, use: yt-dlp -q --skip-download --convert-subs srt --write-sub --sub-langs "en" --write-auto-sub --print "requested_subtitles.en.url" "$url" Simon Willison o1-preview diagnoses better than doctors. Harvard OpenAI’s release of ephemeral tokens via sessions (valid for 1 minute) are a useful way of exposing apps for public demos. Currently it works only for the Realtime API, though. SpreadsheetLLM is a way of encoding spreadsheets in an LLM friendly format. It’s good for 1K+ rows. For lower, Markdown > XML > HTML. However, Table Meets LLM suggests that HTML > XML > Markdown, so this is unclear. #HARD prompt. Ask video generators like SORA to generate text in videos. It is of average quality. GPT 4o Mini Realtime was released. A realtime conversation will cost ~50c/hr. About 36c for input, 72c for output. (I extrapolated from the 6c/min audio input cost for GPT 4o Realtime when it was $100/MTok. GPT 4o Mini Realtime is $10/MTok input and $20/MTok output.) This is an interesting way to understand software. Generate a Mermaid sequence diagram showing interactions based on this code. Ref The King James Bible and all Harry Potters, each, are about $1M tokens (rounded off). markdown2 is the new de facto Markdown library for Python. Claude 3.5 Sonnet is way ahead of competition on the LMSYS Webdev Arena Raspberry Pi 5 has a faster CPU, more RAM and GPU, 4K support, multiple USB 3 ports Government websites like the official press releases cannot be crawled from outside India. Hence the need for server farms in India!