A place for programmers 程序员自留地

Joined December 2011
Zomato cut Go GC CPU from about 25% to under 2% by setting GOMEMLIMIT to 90% of each container's memory ceiling, saving roughly $30K monthly. Go Weekly, 2026-10-12 ~ 2026-10-19: 32 posts. 5 worth your time: 1. A Go save function using defer f.Close() and defer w.Flush() returned nil while leaving 8 KiB of a 20 KB file. The post explains why the Close error matters and what to write instead. 2. errors.As and errors.Is return false when you wrap &MyErr{} but check for MyErr. Go 1.27 adds a vet check that catches it, and the post covers the fix. 3. Go 1.27 includes an HTTP client change that can make programs sending many sequential HTTP/1 requests significantly faster. This is useful for connection-reuse-heavy workloads. 4. Go 1.27 drains an unread HTTP/1 response body on Close. Tests cover chunked streams, slow bodies, json.Decoder and forced closes to see which connections get reused. 5. gopls adds interactive LSP refactoring for struct tags, interfaces, and declaration moves. That gives Go developers more automated refactors directly in the editor. All 32 links, grouped by topic: substack.com/home/post/p-221…
1
50
Python 3.15 enables UTF-8 mode by default via PEP 686, so bare open() calls, stdio, pipes, command-line arguments, environment variables, and filenames use UTF-8 instead of the locale encoding. The change mostly breaks Windows code that wrote files with the ANSI code page, since those files may now raise UnicodeDecodeError or decode as mojibake when read back. Developers can preview the behavior on Python 3.14 with -X utf8 or PYTHONUTF8=1 and find implicit encoding sites using -X warn_default_encoding, PYTHONWARNDEFAULTENCODING, or Ruff's PLW1514 rule. Fix flagged calls by passing encoding="utf-8" for new or exchanged data, the correct legacy encoding such as cp1252 for existing Windows files, or encoding="locale" when system settings are truly required, and remember to set encodings on subprocess pipes when using text=True. PYTHONUTF8=0 or -X utf8=0 can temporarily restore old behavior, but explicit encoding arguments are the durable cross-version fix.
1
2
58
Anthropic's new Scion does every commit on the server, which sounds like Subversion again. Google's Piper was already taking 60,000 to 70,000 commits a workday; Anthropic is at 30,000 a day.
1
21
Good news, our smart redact PDF tool now supports in-browser AI processing to better find information to redact. Give a try. pixelstech.net/application/p…
1
2
34
Upgrading to Go 1.27 made default gzip 3 to 12x faster, and its output up to 13% bigger. That's 1 of 11 behaviors that changed in code nobody touched. Go Weekly, Oct 5–12: 58 posts. Five worth your time: 1. Go 1.27.2 fixes a compiler bug that the race detector hides: a pointer that reads garbage. The same patch also fixes three JSON regressions and inflated coverage numbers. 2. In tests with t.Parallel subtests, defer can run before the subtests finish. Use t.Cleanup instead: it runs in LIFO order and respects the test lifecycle. 3. Go 1.27 adds a uuid package to the standard library, covering v4, v7 and parsing. You may be able to drop google/uuid, though it still does a few things the stdlib version doesn't. 4. Still choosing an HTTP router? Ben Hoyt compared the approaches and concludes the Go 1.22 stdlib router is now the recommended choice. 5. connect-go v2 is out: simpler APIs, pluggable transports, and v1 and v2 can coexist during migration. All 58 links, grouped by topic: substack.com/home/post/p-219…
1
30
SQLite 3.54.0: updating a JSON document without touching its two json_extract-indexed fields wrote 1 WAL page per UPDATE, down from 3. Plain-column and STORED-column indexes still get rewritten.
1
15
sql.Null[[]int64] still fails with pgx 5.11 on Go 1.27. sql.Null is a sql.Scanner, so the array never reaches pgx and we got the old "unsupported Scan" error. A NULL array passes, real data doesn't. Scan into a plain []int64 (nil for NULL) instead.
1
117
PixelsTech retweeted
We ran 21 access checks under six macOS sandbox profiles. Blocking writes and all network left ~/.ssh readable in every one, and a five-entry credential deny list still missed the GitHub CLI token. importstatic.com/ai/sandbox-…
1
7
If you maintain a widely used open-source project, Anthropic will now scan it for vulnerabilities for free. Reports include a reproducer and sometimes a patch, but no human review, so treat the severity rating as a first guess. pixelstech.net/feed/link/832…
18
PixelsTech retweeted
Go 1.27 on an M4 Pro: new() of a 16-byte struct went from 11.1 ns to 5.5 ns. A 96-byte struct: 20.1 ns before, 21.3 ns after. The allocator's new fast path stops dead at 80 bytes. importstatic.com/go/go-1-27-…
1
2
118
PixelsTech retweeted
We are glad to announce that we now support generating table of contents of the webpage in Reader Mode PDF. You can enable the settings at PageSaver -> Settings page.
2
1
3
49
PixelsTech retweeted
How Go maps work internally, explained simply. This time it's a video, not a blog post. youtube.com/watch?v=TdtNViWk… Enjoy, and let me know what you think :)
6
34
2
304
9,482
Go Weekly: range-over-func, conc, PGO pixelstech.substack.com/p/go…
2
213
PixelsTech retweeted
A full-page screenshot is not just a very tall screenshot. The page may lazy-load images, pin headers, animate sections, or recycle off-screen content. Good capture means scrolling deliberately, waiting for the page, and stitching without repeating fixed elements.
2
2
89
The core distinction between these two PDF tools is architectural: iLovePDF uploads your file to its servers for processing and then deletes it within two hours under a GDPR- and ISO 27001-backed policy, while PixelPDF runs open-source engines like pdf-lib, PDF.js, and Tesseract compiled into the browser, so the document never becomes a network request. That difference is directly verifiable rather than a matter of trust — open the DevTools Network tab, run a tool, and observe that no request carries the file, which is a stronger guarantee than any retention promise. The trade-off is capability: client-side processing is bounded by device memory (50 MB per file, 100 MB total), so large scanned archives, slow hardware, and OCR on weak tablets still favor the server model, as do high-fidelity Office conversions, a REST API, Zapier, mobile apps, and 4 GB Premium limits. PixelPDF counters with a free, account-less workflow builder that chains up to 20 steps across 2–50 files with ZIP output, plus tools like Smart Redact and hidden-structure inspection that make more sense locally than they ever would on a remote server. The practical rule is to route anything sensitive — ID scans, medical records, payslips, contracts — through local processing and everything else through whichever tool is already open. pixelstech.net/article/17903…
1
1
4
97