frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Global hack on Microsoft Sharepoint hits U.S., state agencies, researchers say

https://www.washingtonpost.com/technology/2025/07/20/microsoft-sharepoint-hack/
449•spenvo•1d ago•207 comments

Uv: Running a script with dependencies

https://docs.astral.sh/uv/guides/scripts/#running-a-script-with-dependencies
138•Bluestein•3h ago•44 comments

AI comes up with bizarre physics experiments, but they work

https://www.quantamagazine.org/ai-comes-up-with-bizarre-physics-experiments-but-they-work-20250721/
49•pseudolus•1h ago•12 comments

If writing is thinking then what happens if AI is doing the writing and reading?

https://hardcoresoftware.learningbyshipping.com/p/234-if-writing-is-thinking
76•whobre•3h ago•53 comments

What went wrong inside recalled Anker PowerCore 10000 power banks?

https://www.lumafield.com/article/what-went-wrong-inside-these-recalled-power-banks
311•walterbell•8h ago•155 comments

AccountingBench: Evaluating LLMs on real long-horizon business tasks

https://accounting.penrose.com/
404•rickcarlino•10h ago•109 comments

Don't bother parsing: Just use images for RAG

https://www.morphik.ai/blog/stop-parsing-docs
192•Adityav369•10h ago•57 comments

TrackWeight: Turn your MacBook's trackpad into a digital weighing scale

https://github.com/KrishKrosh/TrackWeight
476•wtcactus•12h ago•122 comments

The surprising geography of American left-handedness (2015)

https://www.washingtonpost.com/news/wonk/wp/2015/09/22/the-surprising-geography-of-american-left-handedness/
9•roktonos•6h ago•1 comments

Losing language features: some stories about disjoint unions

https://graydon2.dreamwidth.org/318788.html
38•Bogdanp•3d ago•4 comments

A brief history of primary coding languages

https://eclecticlight.co/2025/07/19/a-brief-history-of-primary-coding-languages/
20•ingve•2d ago•7 comments

New records on Wendelstein 7-X

https://www.iter.org/node/20687/new-records-wendelstein-7-x
195•greesil•11h ago•84 comments

Erlang 28 on GRiSP Nano using only 16 MB

https://www.grisp.org/blog/posts/2025-06-11-grisp-nano-codebeam-sto
115•plainOldText•7h ago•7 comments

Scarcity, Inventory, and Inequity: A Deep Dive into Airline Fare Buckets

https://blog.getjetback.com/scarcity-inventory-and-inequity-a-deep-dive-into-airline-fare-buckets/
82•bdev12345•7h ago•30 comments

FCC to eliminate gigabit speed goal and scrap analysis of broadband prices

https://arstechnica.com/civis/threads/fcc-to-eliminate-gigabit-speed-goal-and-scrap-analysis-of-broadband-prices.1508451/page-2
111•Bluestein•3h ago•50 comments

NASA's X-59 Quiet Supersonic Aircraft Begins Taxi Tests

https://www.nasa.gov/image-article/nasas-x-59-quiet-supersonic-aircraft-begins-taxi-tests/
9•rbanffy•2d ago•0 comments

Occasionally USPS sends me pictures of other people's mail

https://the418.substack.com/p/a-bug-in-the-mail
159•shayneo•12h ago•157 comments

Spice Data (YC S19) Is Hiring a Product Associate (New Grad)

https://www.ycombinator.com/companies/spice-data/jobs/RJz1peY-product-associate-new-grad
1•richard_pepper•5h ago

My favourite German word

https://vurt.org/articles/my-favourite-german-word/
19•taubek•2d ago•17 comments

The Fundamentals of Asyncio

https://github.com/anordin95/a-conceptual-overview-of-asyncio/blob/main/readme.md
113•anordin95•8h ago•21 comments

UK backing down on Apple encryption backdoor after pressure from US

https://arstechnica.com/tech-policy/2025/07/uk-backing-down-on-apple-encryption-backdoor-after-pressure-from-us/
451•azalemeth•12h ago•314 comments

Yoni Appelbaum on the real villians behind our housing and mobility problems

https://www.riskgaming.com/p/how-jane-jacobs-got-americans-stuck
50•serviette•6h ago•47 comments

The daily life of a medieval king

https://www.medievalists.net/2025/07/medieval-king-daily-life/
273•diodorus•4d ago•156 comments

I've launched 37 products in 5 years and not doing that again

https://www.indiehackers.com/post/ive-launched-37-products-in-5-years-and-not-doing-that-again-0b66e6e8b3
105•AlexandrBel•14h ago•88 comments

Jqfmt like gofmt, but for jq

https://github.com/noperator/jqfmt
137•Bluestein•10h ago•42 comments

What Will Become of the CIA?

https://www.newyorker.com/magazine/2025/07/28/the-mission-the-cia-in-the-21st-century-tim-weiner-book-review
69•Michelangelo11•9h ago•98 comments

Sutton SignWriting is a writing system for sign languages

https://en.m.wikipedia.org/wiki/SignWriting
23•janpot•2d ago•6 comments

Show HN: Lotas – Cursor for RStudio

https://www.lotas.ai/
60•jorgeoguerra•9h ago•26 comments

In a major reversal, the world bank is backing mega dams (2024)

https://e360.yale.edu/features/world-bank-hydro-dams
37•prmph•6h ago•52 comments

Gemini with Deep Think achieves gold-medal standard at the IMO

https://deepmind.google/discover/blog/advanced-version-of-gemini-with-deep-think-officially-achieves-gold-medal-standard-at-the-international-mathematical-olympiad/
461•meetpateltech•10h ago•211 comments
Open in hackernews

Memory Efficiency in iOS: Reducing footprint and beyond

https://antongubarenko.substack.com/p/memory-efficiency-in-ios-reducing
57•CharlesW•11h ago

Comments

ksec•9h ago
iOS used to be hyper memory efficient. Somewhere along the line, that is no longer the case. The same with App responsiveness as well. With Apps size increasing every year.
Someone•9h ago
For developers, the choice used to be between a memory efficient application or no application at all. Nowadays, there’s a third option “not as memory efficient as possible, but tomorrow instead of next month/quarter, and you won’t have to hire and pay experts to tune things”

For many developers, the choice between those three is easy.

stalfosknight•7h ago
Gross.
epistasis•8h ago
The idea of showing a splash screen with the last app contents while the app loaded was a good idea on slower hardware.

Now that we have faster hardware with more memory, developers use frameworks which no longer load fast enough, so we have the splash screen with the last app state, followed by a complete load of up of UI from the ground up with something else.

And the splash screen becomes actively deceptive.

JamesSwift•8h ago
In many ways, images are a big reason why things naturally become inefficient. We are up to a 3x scale factor now and so just by virtue of the higher resolution display we are at 3x the pixels for a given image at a given display size.

And apps are much more image heavy now with network/cpu speeds improving to support real time image loading/decoding.

supertrope•5h ago
At least with storage bloated apps show at the top of the "iPhone Storage" list and are at greater risk of the user tapping [Delete App]. There's no UI interface highlighting memory hogs.
conradev•8h ago

  Load images lazily — only when needed — to avoid wasting memory upfront. AsyncImage or Kingfisher are the options.
Kingfisher and AsyncImage decompress images into dirty memory, and images are big. They're fairly CPU and memory inefficient from that perspective.

FastImageCache uses memory mapping and is very efficient, but it's 10 years old: https://github.com/path/FastImageCache

If anyone wants to build a modern rkyv + FastImageCache hybrid…

jamil7•8h ago
Is Nuke any different? I know it’s author wrote a lot about performance but I’ve never looked into it.
conradev•8h ago
Nuke also uses a simple filesystem cache, so its the same: https://github.com/kean/Nuke/blob/main/Sources/Nuke/Caching/...

  The framework is lean and compiles in under 2 seconds
It compiles fast, though!
ethan_smith•8h ago
Nuke (https://github.com/kean/Nuke) is a modern alternative that handles efficient memory management with features like progressive decoding and intelligent prefetching.
conradev•8h ago
It does progressive CGImage decoding right, I do remember looking at that! Efficient for network to pixels. But it stores PNGs on disk.
JamesSwift•7h ago
So does FastImageCache as far as I can tell? But it also maps it to a packed sprite sheet before writing
JamesSwift•8h ago
The two approaches seem to serve different use cases. Mapping to a sprite-sheet (how FastImageCache describes itself) doesnt matter if images arent actually reused often (eg doom scrolling). But if you do tend to either reuse the same image or scroll up/down on the same content then yes it will come out ahead.

Ive seen a lot of async image loaders over the years on ios and for the most part they were all fine. The async offload and pushing remote url loading to the background is the most important part of what was historically missing from the first party ios api.

conradev•7h ago
I largely agree. The other thing that happened is that phones got faster: it just doesn't matter as much anymore. A slow disk cache is fine, but if it does anything on the main thread: straight to jail.

The article is about memory efficiency, though! In order to get equivalent memory behavior the buffers would need to be marked as purgeable (from the article) so that kernel can empty the cache if needed. Not sure if any of these libraries do that.

The main situation where cache speed is tested is app launch: load every image for the current viewport simultaneously. It can take some time if your images are slow to decode.

saagarjha•5h ago
I feel like there’s this misconception that mapping data from disk is free (this is also mentioned in the README you linked). It’s not. If the pages are clean then you do get the benefit of being able to discard them when pressure is high, but if you need them again they have to be paged in. And for most apps there is no sharing of this data, so loading it will be accounted for against your process rather than being amortized across several like system libraries might be. Sure, it’s definitely better than dirty anonymous pages, but it’s not free.
frumplestlatz•4h ago
Back on the iPhone 3G, PNG decoding alone was slow enough that I had to cache pre-rendered bitmap representations into SQLite blobs to achieve "glassy" scrolling of image-heavy grids; I'd do the SQLite loading on a worker thread and dump the pre-rendered bitmap representation right back into a CGImage wrapper. I recall there being some inline NEON assembly involved as well.

Within 1-2 years, those optimizations were totally unnecessary.

nfriedly•8h ago
I've noticed that iOS 18+ seems to issue low-memory warnings more frequently than older iOS versions (at least on devices with <=4GB RAM). It can now happen with the app is using less than half the device's RAM, which I don't recall seeing before. I assume this is because the OS is using more RAM for AI and such.
heliographe•5h ago
Yes, that matches my observations. I develop photography software and in early versions of iOS 18, sometimes saving a large image to the camera roll would fail because the daemon in charge of carrying out the photo library transactions would get killed due to low memory. This only happened on devices that ran Apple intelligence. Fortunately they seemed to have fixed that bug around 18.1 or 18.2 if I recall.
nfriedly•2h ago
I think you're right, it hasn't been as bad as it was right after 18.0, but it still seems a bit more aggressive than I remember from 17 and earlier.
tomovo•7h ago
> This dramatically reduces memory usage for lists or grids with many items

I'd love to see a specific example with before/after numbers.

> Lottie [...] ends up loading every frame as a raw bitmap.

Isn't Lottie rendering the vector data directly to screen?

JamesSwift•7h ago
> Isn't Lottie rendering the vector data directly to screen?

It has to rasterize if theres not native vector support, unless its converting the vector to GL calls. Maybe it targets lowest common denominator for the platforms it supports in order to have a stable output.

iOS also didnt support native vector display until fairly recently, and Im not sure if its limited to baked assets in an image atlas or not. It also had limitations in that it only allowed pdf vectors rather than SVG directly. I haven't kept up to know what current state is.

potatolicious•5h ago
A key tip that wasn't in the blog post: be extremely judicious about taking on new code dependencies.

For many apps the main source of memory usage isn't stack or heap memory consumed during runtime, it's the loading of the binary itself into memory. I've seen some wild app binary sizes (200MB+ for relatively modest apps without that much functionality).

One thing that's endlessly frustrating about mobile dev is that the vast majority of devs are thoughtless about dependencies, how they are built/linked, and how that impacts memory use. Far and away the dominant mode of dependencies in mobile-land is just "statically link it and forget about it".

This is the singular biggest contributor to app size bloat, and pretty up there for runtime memory consumption as well.

A double whammy here is that modern iOS apps are actually multiple binaries (main app, watch extensions, widget extensions, etc.), and if you heavily use static linking you're carrying multiple copies of the bloat.

A few actionable things:

- Be very, very judicious about taking on new dependencies. Is a library offering enough value and marginal functionality to be worth the weight? (e.g., I don't think AFNetworking in 2025 meets the bar for the vast majority of people, but yet it's still everywhere?)

- Dynamically link, especially if you're a complex app with multiple targets.

- Deadstrip aggressively. I cannot emphasize this enough. The default compiler settings will not deadstrip unused public symbols in static libraries. Fix this.