I am indexing a table with 2,000,000 vectors (1,536 dimensions, OpenAI text-embedding-3-small) in PostgreSQL 16 using the pgvector extension. When executing: CREATE INDEX ON documents USING hnsw (embedding vector_cosine_ops) WITH (m = 16, ...Read more
I wrote the following modern C++20 pipeline to filter records returned by a database query helper function: #include <iostream> #include <vector> #include <ranges>std::vector<int> getTemperatures() { return {18, 25, 32, 14, 29, 36}; }int ...Read more
During deep learning training in PyTorch 2.x, my script crashed midway through an epoch with the error: RuntimeError: CUDA out of memory. Tried to allocate 512.00 MiB (GPU 0; 23.69 GiB total capacity; ...Read more
After upgrading my application to Next.js 15 (Release Candidate / Stable) and React 19, my dynamic routing pages crashed with the runtime error: Error: Route "/blog/[slug]" used `params.slug`. `params` should be awaited before ...Read more
We are building a distributed task build engine (similar to Bazel or Make) that resolves dependency trees across 500,000 code packages. Textbooks teach both Kahn’s algorithm (indegree BFS) and DFS post-order reversal. Why do production build systems almost universally prefer Kahn’s ...Read more
We need dynamic prefix sums and range sum queries over a stream of financial ledger transactions where numbers are constantly updated. A standard array has O(1) update but O(N) range sum. A prefix sum array has O(1) range sum but O(N) ...Read more
When elements in an array appear twice except one, we can simply XOR all numbers together. But what if every element appears three times, except for a single number that appears once? The standard hash-map solution uses O(N) space. How can ...Read more
