frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Abstraction boundaries are optimization boundaries

https://blog.snork.dev/posts/abstraction-boundaries-are-optimization-boundaries.html
25•delifue•2d ago

Comments

discarded1023•5h ago
The author is right to note that Haskell can optimise across module (abstraction) boundaries. However I remember that in my childhood that Debray [1] did a lot of work on link-time optimisations (late 1980s). And of course there's the classic self work that fed into the JVM [2], and the whole-of-program compilers that are receiving renewed attention now; mlton [3] being a classic of the genre, "supercompiler" being the active area of research AIUI. So at least sometimes abstraction boundaries are transparent to optimisers.

On the other hand the classic data abstraction story (signatures/interfaces for structures/modules) naturally allows for selecting or optimising implementations depending on uses. There was some great work done in the early 2000s on that (see [4]) and I'm sure the state-of-the-art has moved on since [5].

[1] https://dblp.org/pid/d/SKDebray.html

[2] https://en.wikipedia.org/wiki/Self_(programming_language)

[3] http://mlton.org/

[4] https://dblp.org/pid/59/4501.html

[5] https://en.wikipedia.org/wiki/Interprocedural_optimization

mrkeen•4h ago
They are consistency boundaries too.

> This problem is usually caused by a leaky abstraction; the ORM, or whatever database abstraction you are using, can’t anticipate that it would need to send N queries, so it can’t automatically optimize this down to a single query.

If you do an if-statement with an ORM before doing an update-statement, the result of the if-statement is already stale before the update occurs. If you skipped the ORM and put your if-statement as a where-clause, it's less of a problem.

> However, this only works since Haskell is declarative / pure; the low-level operational semantics (like evaluation order) are abstracted away from the programmer, and as such are amenable to optimization.

What else is declarative / pure? SQL. Not ORMS.

sgarland•43s ago
> What else is declarative / pure? SQL.

Thank you. People so often forget (or don’t realize) that their RDBMS is also doing a ton of optimization on their query, and a primary reason it’s able to do so in real-time is because SQL is declarative.

I built something that changed my friend group's social fabric

https://blog.danpetrolito.xyz/i-built-something-that-changed-my-friend-gro-social-fabric/
180•dandano•3d ago•73 comments

OpenFLOW – Quickly make beautiful infrastructure diagrams local to your machine

https://github.com/stan-smith/OpenFLOW
89•x0z•6h ago•20 comments

The average chess players of Bletchley Park and AI research in Britain

https://blogs.bl.uk/science/2025/06/the-average-chess-players-of-bletchley-park-and-ai-research-in-britain.html
21•salonium_•2h ago•6 comments

Genetic code enables zebrafish to mend damaged organs

https://www.caltech.edu/about/news/genetic-code-enables-zebrafish-to-mend-damaged-organs
68•bookofjoe•2d ago•3 comments

I write type-safe generic data structures in C

https://danielchasehooper.com/posts/typechecked-generic-c-data-structures/
347•todsacerdoti•20h ago•134 comments

Show HN: Spegel, a Terminal Browser That Uses LLMs to Rewrite Webpages

https://simedw.com/2025/06/23/introducing-spegel/
16•simedw•30m ago•3 comments

The new skill in AI is not prompting, it's context engineering

https://www.philschmid.de/context-engineering
688•robotswantdata•16h ago•387 comments

The hidden JTAG in a Qualcomm/Snapdragon device’s USB port

https://www.linaro.org/blog/hidden-jtag-qualcomm-snapdragon-usb/
199•denysvitali•18h ago•29 comments

Researchers Uncover Hidden Ingredients Behind AI Creativity

https://www.quantamagazine.org/researchers-uncover-hidden-ingredients-behind-ai-creativity-20250630/
14•isaacfrond•4h ago•10 comments

Cloudflare to introduce pay-per-crawl for AI bots

https://blog.cloudflare.com/introducing-pay-per-crawl/
220•scotchmi_st•2h ago•100 comments

Show HN: ToplingDB - A Persistent Key-Value Store for External Storage

https://github.com/topling/toplingdb
8•rockeetterark•3h ago•2 comments

Noloco (YC S21) Is Hiring a Founders Associate in Barcelona

https://www.ycombinator.com/companies/noloco/jobs/K7q02eV-founders-associate
1•darraghmckay•6h ago

Donkey Kong Country 2 and Open Bus

https://jsgroth.dev/blog/posts/dkc2-open-bus/
238•colejohnson66•22h ago•60 comments

Proton joins suit against Apple for practices that harm developers and consumers

https://proton.me/blog/apple-lawsuit
449•moose44•19h ago•464 comments

Ask HN: What Are You Working On? (June 2025)

404•david927•1d ago•1263 comments

Pluto is a unique dialect of Lua with a focus on general-purpose programming

https://github.com/PlutoLang/Pluto
52•90s_dev•12h ago•30 comments

Abstraction boundaries are optimization boundaries

https://blog.snork.dev/posts/abstraction-boundaries-are-optimization-boundaries.html
25•delifue•2d ago•3 comments

Claude Code now supports hooks

https://docs.anthropic.com/en/docs/claude-code/hooks
259•ramoz•13h ago•109 comments

First-Class Models: The Missing Productivity Revolution

https://frest.substack.com/p/first-class-models-the-missing-productivity
6•surprisetalk•2d ago•1 comments

GPEmu: A GPU emulator for rapid, low-cost deep learning prototyping [pdf]

https://vldb.org/pvldb/vol18/p1919-wang.pdf
58•matt_d•14h ago•10 comments

Xfinity using WiFi signals in your house to detect motion

https://www.xfinity.com/support/articles/wifi-motion
571•bearsyankees•18h ago•384 comments

Show HN: A continuation of IRS Direct File that can be self-hosted

https://github.com/openfiletax/openfile
92•elijahwright_•15h ago•7 comments

End of an Era

https://www.erasmatazz.com/personal/self/end-of-an-era.html
162•marcusestes•18h ago•44 comments

Aging-related inflammation is not universal across human populations

https://www.publichealth.columbia.edu/news/aging-related-inflammation-not-universal-across-human-populations
83•XzetaU8•7h ago•36 comments

People Keep Inventing Prolly Trees

https://www.dolthub.com/blog/2025-06-03-people-keep-inventing-prolly-trees/
147•lifty•2d ago•33 comments

There are no new ideas in AI, only new datasets

https://blog.jxmo.io/p/there-are-no-new-ideas-in-ai-only
441•bilsbie•22h ago•236 comments

Melbourne man discovers extensive model train network underneath house

https://www.sbs.com.au/news/article/i-was-shocked-melbourne-mans-unbelievable-find-after-buying-house/m4sksfer8
315•cfcfcf•13h ago•116 comments

Sony DTC-700 audio DAT player/recorder

https://kevinboone.me/dtc-700.html
102•naves•19h ago•81 comments

Small language models are the future of agentic AI

https://arxiv.org/abs/2506.02153
80•favoboa•9h ago•32 comments

YouTube No Translation

https://addons.mozilla.org/en-GB/firefox/addon/youtube-no-translation/
378•doener•1d ago•283 comments