frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Hosting a website on a disposable vape

https://bogdanthegeek.github.io/blog/projects/vapeserver/
690•BogdanTheGeek•8h ago•375 comments

The awe keeps dropping

https://morrick.me/archives/10137
53•mgrayson•1h ago•31 comments

William Gibson Reads Neuromancer (2004)

http://bearcave.com/bookrev/neuromancer/neuromancer_audio.html
140•exvi•4h ago•27 comments

React is winning by default and slowing innovation

https://www.lorenstew.art/blog/react-won-by-default/
268•dbushell•8h ago•282 comments

macOS Tahoe

https://www.apple.com/os/macos/
283•Wingy•8h ago•384 comments

Linux phones are more important now than ever

https://feddit.org/post/18353777
119•wicket•1h ago•52 comments

Wanted to spy on my dog, ended up spying on TP-Link

https://kennedn.com/blog/posts/tapo/
319•kennedn•9h ago•115 comments

Addendum to GPT-5 system card: GPT-5-Codex

https://openai.com/index/gpt-5-system-card-addendum-gpt-5-codex/
178•wertyk•7h ago•107 comments

PayPal to support Ethereum and Bitcoin

https://newsroom.paypal-corp.com/2025-09-15-PayPal-Ushers-in-a-New-Era-of-Peer-to-Peer-Payments,-...
370•DocFeind•11h ago•289 comments

GPT-5-Codex

https://openai.com/index/introducing-upgrades-to-codex/
217•meetpateltech•8h ago•67 comments

How big a solar battery do I need to store all my home's electricity?

https://shkspr.mobi/blog/2025/09/how-big-a-solar-battery-do-i-need-to-store-all-my-homes-electric...
250•FromTheArchives•13h ago•372 comments

Massive Attack turns concert into facial recognition surveillance experiment

https://www.gadgetreview.com/massive-attack-turns-concert-into-facial-recognition-surveillance-ex...
146•loteck•4h ago•67 comments

The Rising Sea: Foundations of Algebraic Geometry Notes

https://math.stanford.edu/~vakil/216blog/
25•ibobev•3d ago•2 comments

From unit tests to whole universe tests (with will wilson of antithesis) [video]

https://www.youtube.com/watch?v=_xJ4maWhSNU
6•zdw•2d ago•1 comments

Launch HN: Trigger.dev (YC W23) – Open-source platform to build reliable AI apps

124•eallam•10h ago•51 comments

Debian Upgrade Marathon: 3.1 Sarge

https://wrongthink.link/posts/debian-upgrade-marathon-sarge/
14•zdw•3d ago•2 comments

Show HN: Pooshit – Sync local code to remote Docker containers

39•marktolson•4h ago•32 comments

I wish my web server were in the corner of my room (2022)

https://interconnected.org/home/2022/10/10/servers
32•jonassaid•3d ago•13 comments

CubeSats are fascinating learning tools for space

https://www.jeffgeerling.com/blog/2025/cubesats-are-fascinating-learning-tools-space
165•warrenm•11h ago•71 comments

When Your Father Is a Magician, What Do You Believe?

https://thereader.mitpress.mit.edu/when-your-father-is-a-magician-what-do-you-believe/
39•pseudolus•3d ago•10 comments

GPT‑5-Codex and upgrades to Codex

https://simonwillison.net/2025/Sep/15/gpt-5-codex/
41•amrrs•6h ago•4 comments

How to self-host a web font from Google Fonts

https://blog.velocifyer.com/Posts/3,0,0,2025-8-13,+how+to+self+host+a+font+from+google+fonts.html
117•Velocifyer•11h ago•100 comments

The Revised Report on Scheme or An UnCommon Lisp (1985) [pdf]

https://dspace.mit.edu/bitstream/handle/1721.1/5600/AIM-848.pdf
34•swatson741•4h ago•2 comments

GuitarPie: Electric Guitar Fretboard Pie Menus

https://andreasfender.com/publications.php
27•DonHopkins•11h ago•3 comments

Boring work needs tension

https://iaziz786.com/blog/boring-work-needs-tension/
96•iaziz786•10h ago•53 comments

The Mac App Flea Market

https://blog.jim-nielsen.com/2025/mac-app-flea-market/
346•ingve•18h ago•130 comments

Scryer Prolog Meetup 2025

https://hsd-pbsa.de/veranstaltung/scryer-prolog-meetup-2025/
36•aarroyoc•5h ago•1 comments

Removing newlines in FASTA file increases ZSTD compression ratio by 10x

https://log.bede.im/2025/09/12/zstandard-long-range-genomes.html
238•bede•3d ago•94 comments

Ghost Kitchens Are Dying. Here's the $15B Lesson Every Restaurateur Must Learn

https://davidrmann3.substack.com/p/ghost-kitchens-are-dying-heres-the
51•mooreds•5h ago•28 comments

RustGPT: A pure-Rust transformer LLM built from scratch

https://github.com/tekaratzas/RustGPT
333•amazonhut•16h ago•162 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•5mo ago

Comments

returningfory2•4mo 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•4mo 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•4mo 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•4mo 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•4mo 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•4mo ago
At least you have the tools to understand where things get allocated.
38•4mo ago
instead of this:

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

    t.Buf = nil
rsc•4mo ago
Those are semantically different (one is nil and one is not) but neither allocates.
virexene•4mo 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•4mo 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