Bookmarks for 2023-10-21

2 bookmarks were saved this day.

banging errors in go

Reposted flak.tedunangst.com/post/bango

Tedu wrote a tool that lets you handle errors in Go like this:

func decomp(filename string) ([]byte, error) {
        fd := ^os.Open(filename)
        defer fd.Close()
        zd := ^gzip.NewReader(fd)
        data := ^io.ReadAll(zd)
        return data, nil
}

Funky!

go

Text Rendering Hates You

faultlore.com/blah/text-hates-you

Rendering text, how hard could it be? As it turns out, incredibly hard! To my knowledge, literally no system renders text “perfectly”. It’s all best-effort, although some efforts are more important than others.

text