New

The latest blog posts to take off on Hacker News. 80,939 posts.

Any topic
Any year
27638

Sleep helps process emotions

Researchers at the Department of Neurology of the University of Bern and University Hospital Bern identified how the brain triages emotions during dream sleep to consolidate the storage of positive emotions while dampening the consolidation of negative ones. The work expands the importance of sleep in mental health…

27642

Golang Diaries: Generics

My coding time this year has been invested in Quamina , an event-filtering library implemented in Go. Just in the last couple of weeks I spotted an opportunity to bring Go’s shiny new generics to bear, and not just anywhere, but for a central data structure. I got good results, but the process was sort of painful; I…

27648

Wrong by Default

A few programming languages use a “defer” pattern for resource cleanup. This is a construct such as a defer keyword which schedules cleanup code to run at the end of the enclosing block (or function). This is available in Zig, Go and even in GCC C.