frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Spec-Driven Development: The Waterfall Strikes Back

https://marmelab.com/blog/2025/11/12/spec-driven-development-waterfall-strikes-back.html
22•vinhnx•46m ago•10 comments

So, you want to design your own language? (2017)

https://cs.lmu.edu/~ray/notes/languagedesignnotes/
50•veqq•2h ago•29 comments

AI World Clocks

https://clocks.brianmoore.com/
975•waxpancake•13h ago•306 comments

The Internet Is Cool. Thank You, TCP

https://cefboud.com/posts/tcp-deep-dive-internals/
23•signa11•1h ago•2 comments

AMD GPUs Go Brrr

https://hazyresearch.stanford.edu/blog/2025-11-09-amd-brr
87•vinhnx•6h ago•9 comments

Löb and Möb: Loops in Haskell

https://github.com/quchen/articles/blob/master/loeb-moeb.md
27•fanf2•1w ago•4 comments

SSL Configuration Generator

https://ssl-config.mozilla.org/
149•smartmic•10h ago•43 comments

A new Google model is nearly perfect on automated handwriting recognition

https://generativehistory.substack.com/p/has-google-quietly-solved-two-of
309•scrlk•3d ago•176 comments

Unofficial Microsoft Teams client for Linux

https://github.com/IsmaelMartinez/teams-for-linux
110•basemi•1w ago•79 comments

Messing with Scraper Bots

https://herman.bearblog.dev/messing-with-bots/
3•HermanMartinus•57m ago•0 comments

HipKittens: Fast and furious AMD kernels

https://hazyresearch.stanford.edu/blog/2025-11-09-hk
155•dataminer•1d ago•56 comments

'No One Lives Forever' turns 25 and you still can't buy it legitimately

https://www.techdirt.com/2025/11/13/no-one-lives-forever-turns-25-you-still-cant-buy-it-legitimat...
243•speckx•16h ago•118 comments

Random Font – a typographic experiment exploring randomness [pdf]

https://www.ilcovile.it/scritti/COVILE_834_Reprint_Random_Font.pdf
6•misone•1w ago•2 comments

No Leak, No Problem – Bypassing ASLR with a ROP Chain to Gain RCE

https://modzero.com/en/blog/no-leak-no-problem/
70•todsacerdoti•8h ago•4 comments

Structured outputs on the Claude Developer Platform

https://www.claude.com/blog/structured-outputs-on-the-claude-developer-platform
137•adocomplete•13h ago•58 comments

Ohm Editor

https://ohmjs.org/editor/
13•andsoitis•2h ago•2 comments

All praise to the lunch ladies

https://bittersoutherner.com/issue-no-12/all-praise-to-the-lunch-ladies
178•gmays•12h ago•98 comments

A race condition in Aurora RDS

https://hightouch.com/blog/uncovering-a-race-condition-in-aurora-rds
218•theanomaly•14h ago•68 comments

Async Mutexes

https://matklad.github.io/2025/11/04/on-async-mutexes.html
35•ingve•1w ago•7 comments

Lawmakers want to ban VPNs and have no idea what they're doing

https://www.eff.org/deeplinks/2025/11/lawmakers-want-ban-vpns-and-they-have-no-idea-what-theyre-d...
188•gslin•1d ago•88 comments

Ucs-Detect

https://ucs-detect.readthedocs.io/intro.html
11•djoldman•1w ago•1 comments

Meet Reservoir – The World's Smartest Water Heater

https://www.reservoirhome.com/
17•flakespancakes•4h ago•13 comments

Winamp clone in Swift for macOS

https://github.com/mgreenwood1001/winamp
223•hyperbole•19h ago•136 comments

I can't recommend Grafana anymore

https://henrikgerdes.me/blog/2025-11-grafana-mess/
152•gpi•4h ago•54 comments

Hiring the Joker

https://quarter--mile.com/hiring-the-joker
19•surprisetalk•1w ago•15 comments

GEN-0 / Embodied Foundation Models That Scale with Physical Interaction

https://generalistai.com/blog/nov-04-2025-GEN-0
51•jackdoe•1w ago•5 comments

Mentra (YC W25) Is Hiring: Head of Growth to Make Smart Glasses Mainstream

https://www.ycombinator.com/companies/mentra/jobs/2YbQCRw-make-smart-glasses-mainstream-head-of-g...
1•caydenpiercehax•11h ago

Show HN: Tiny Diffusion – A character-level text diffusion model from scratch

https://github.com/nathan-barry/tiny-diffusion
125•nathan-barry•4d ago•15 comments

Manganese is Lyme disease's double-edge sword

https://news.northwestern.edu/stories/2025/11/manganese-is-lyme-diseases-double-edge-sword
138•gmays•15h ago•77 comments

The disguised return of EU Chat Control

https://reclaimthenet.org/the-disguised-return-of-the-eus-private-message-scanning-plot
638•egorfine•14h ago•259 comments
Open in hackernews

Optimizing Heap Allocations in Go: A Case Study

https://www.dolthub.com/blog/2025-04-18-optimizing-heap-allocations/
54•ingve•7mo ago

Comments

returningfory2•6mo ago
> It's possible that this is a compiler bug. It's also possible that there's some fringe case where the reference actually can escape via that method call, and the compiler doesn't have enough context to rule it out.

Here's an example, I think: suppose the method spawns a new goroutine that contains a reference to `chunkStore`. This goroutine can outlive the `ReadBytes` function call, and thus Go has to heap allocate the thing being referenced.

In general, this kind of example makes me suspect that Go's escape analysis algorithm treats any method call as a black box and heap allocates anything being passed to it by reference.

athorax•6mo ago

  The notion of stack vs heap allocation isn't something that even exists in the language. Users are expected to not worry about it... until, of course, until you're optimizing performance and you need to worry about it.
This is one of the best and worst aspects with Go. Anyone can write pretty performant code without having to understand the underlying memory model. If you get to the point where you are trying to optimize at this level, the benefits of using a more approachable language start to fall apart and you spend more time chasing implementation details.
nu11ptr•6mo ago
In general, it is a win, since it lets you code faster and 80-90% the performance doesn't matter. Over time, you learn generally what leads to heap allocs and what doesn't. In rare hot spot, using -m will show you the allocations and you can optimize.
athorax•6mo ago
I would generally agree. It's good enough performance for most applications. For those that it isn't fast enough for (even with optimizations like these), it still allows for rapid prototyping to arrive at that conclusion.
Ygg2•6mo ago
I think same applies to any GC language. Ride is fun until GC starts either taking too much time, too much memory or taking too much of CPU.
Thaxll•6mo ago
At least you have the tools to understand where things get allocated.
38•6mo ago
instead of this:

    t.Buf = []byte{}
you can just do:

    t.Buf = nil
rsc•6mo ago
Those are semantically different (one is nil and one is not) but neither allocates.
virexene•6mo ago
I wonder if the reason the escape analysis fails could be that, for small enough types, the concrete value is directly inlined inside the interface value, instead of the latter being "a smart pointer" as the author said. So when the compiler needs to take a reference to the concrete value in `vs.chunkStore`, that ends up as an internal pointer inside the `vs` allocation, requiring it to be on the heap.

Either that or the escape analysis just isn't smart enough; taking a pointer to an internal component of an interface value seems like a bit of a stretch.

Snawoot•6mo ago
I had an attempt to improve performance of memory allocation with the use of arenas in Go and I chose freelist datastructure[1]

It almost doesn't use unsafe except one line to cast pointer types. I measured practical performance boost with "container/list" implementation hooked to my allocator. All in all it performs 2-5 times faster or up to 10 times faster if we can get rid[2] of any and allocations implied by the use of it.

All in all, heap allocations can be not that bad at all if you approach them from another angle.

[1]: https://github.com/Snawoot/freelist

[2]: https://github.com/Snawoot/list