Better HN
topnewbestaskshowjobs
Log inSign up

alingse

1 karma · joined Jun 23, 2019 (7y ago) · 7 submissions

a student
Submissions

1.

Show HN: AI-CLI-Log – Seamlessly Log Your AI CLI Conversations to Markdown(github.com ↗)

2 points · by alingse · 1y ago · discuss

comment 1y ago · link · parent

While debugging why our golangci-lint runs in CI were getting randomly killed, I discovered a surprising memory issue in Go's error handling.

The problem occurs when combining many errors using `errors.Join()` and wrapping them with `fmt.Errorf()`. Here's a minimal reproduction

3.

A simple Go error handling pattern led to 54GB memory usage with 65535 errors(gist.github.com ↗)

3 points · by alingse · 1y ago · 1 comment

comment 4y ago · link · parent

we have already do this in prod.

type HandlerFuncErr func(w http.ResponseWriter, r http.Request) error

func HandleErr(h HandlerFuncErr) http.HandlerFunc { return func(w http.ResponseWriter, r

http.Request) { ... } }

comment 4y ago · link · parent

The smart to stupid is a smooth curve, so everyone have a point in the line.

6.

Show HN: A Thrift Formatter VSCode extenstion(github.com ↗)

1 points · by alingse · 4y ago · discuss

7.

Show HN: A Formatter for Thrift Files(github.com ↗)

1 points · by alingse · 4y ago · discuss