frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Packed Data Support in Haskell

https://arthi-chaud.github.io/posts/packed/
77•matt_d•12mo ago

Comments

nine_k•12mo ago
> Introducing the ‘packed’ data format, a binary format that allows using data as it is, without the need for a deserialisation step. A notable perk of this format is that traversals on packed trees is proven to be faster than on ‘unpacked’ trees: as the fields of data structures are inlines, there are no pointer jumps, thus making the most of the L1 cache.

That is, a "memory dump -> zero-copy memory read" of a subgraph of Haskell objects, allowing to pass such trees / subgraphs directly over a network. Slightly reminiscent of Cap'n Proto.

90s_dev•12mo ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•12mo ago
They mention this in the article.
spockz•12mo ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•11mo ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•12mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•12mo ago
> the serialised version of the data is usually bigger than its in-memory representation

I don’t think this is common. Perhaps for arrays of floats serialized as JSON or something. But I can’t think of a case where binary serialization is bigger. Data types like maps are necessarily larger in memory to support fast lookup and mutability.

nine_k•12mo ago
I suppose all self-describing formats, like protobuf, or thrift or, well, JSON are bigger than the efficient machine representation, because they carry the schema in every message, one way or another.
IsTom•12mo ago
If you use a lot of sharing in immutable data it can grow a lot when serializing. A simple pathological example would be a tree that has all left subtrees same as the right ones. It takes O(height) space in memory, but O(2^height) when serialized.
gitroom•12mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•12mo ago
This was very well written. Excellent article!
NetOpWibby•12mo ago
Is this like MessagePack for Haskell?

TurboBird – Firebird Database Tool

https://github.com/mdadali/TurboBird
1•mariuz•40s ago•0 comments

Google Plans to Invest Up to $40B in Anthropic

https://www.bloomberg.com/news/articles/2026-04-24/google-plans-to-invest-up-to-40-billion-in-ant...
3•elffjs•2m ago•0 comments

Show HN: Kadō, an open source habit tracker app for iOS

https://github.com/scastiel/kado
3•scastiel•4m ago•0 comments

Visual-base is a second brain from your eyes

https://github.com/oilbeater/visual-base
1•recrush•5m ago•0 comments

I Cancelled Claude: Token Issues, Declining Quality, and Poor Support

https://nickyreinert.de/en/2026/2026-04-24-claude-critics/
3•y42•7m ago•0 comments

Is the Novelty Budget Dead?

https://simonshine.dk/articles/is-the-novelty-budget-dead/
1•sshine•10m ago•0 comments

PGO Build TPC-C Analysis MariaDB v11.8.6 TideSQL

https://tidesdb.com/articles/pgo-build-tpc-c-analysis-mariadb-v11-8-6-tidesql/
1•alexpadula•11m ago•0 comments

LLMs – What Experienced Practitioners See

https://dr-knz.net/llms-in-practice.html
1•knz42•12m ago•1 comments

Ask HN: How does Google crawls x.com website?

1•iaziz786•13m ago•0 comments

Games for Change

https://www.gamesforchange.org/
1•csmillie•15m ago•0 comments

What Anthropic's Mythos Means for the Future of Cybersecurity

https://spectrum.ieee.org/ai-cybersecurity-mythos
2•Brajeshwar•17m ago•0 comments

Refuse to let your doctor record you

https://buttondown.com/maiht3k/archive/why-you-should-refuse-to-let-your-doctor-record/
10•speckx•18m ago•1 comments

Space Reactor 1

https://en.wikipedia.org/wiki/Space_Reactor%E2%80%911_Freedom
1•hansmayer•20m ago•0 comments

Intel stock hits new all-time highs for first time since 2000

https://cryptobriefing.com/intel-stock-all-time-high-since-2000/
2•mgh2•20m ago•1 comments

Content credentials – hardware signing of photo and video cameras

https://contentcredentials.org/
1•sveme•20m ago•0 comments

Why I'm Done Making Desktop Applications

https://www.kalzumeus.com/2009/09/05/desktop-aps-versus-web-apps/
11•claxo•22m ago•2 comments

Six things I'll remember when I think about Tim Cook's version of Apple

https://arstechnica.com/gadgets/2026/04/six-things-ill-remember-when-i-think-about-tim-cooks-vers...
1•01-_-•27m ago•0 comments

UK Biobank health data listed for sale in China, government confirms

https://www.bbc.com/news/articles/cpvxgl3n138o
1•01-_-•27m ago•1 comments

What I learned asking 11 AI models to grade each other's AI predictions

https://shimin.io/journal/what-i-learned-asking-11-ai-models-to-grade-each-other/
1•recurrence•28m ago•0 comments

Why High-Testosterone Men Don't Perform for the Crowd

https://www.nature.com/articles/s41386-023-01570-y
1•bilsbie•28m ago•0 comments

El Salvador Adds New Tools in National Health App to Track and Treat (DoctorSV)

https://ticotimes.net/2026/04/19/el-salvador-adds-new-tools-in-national-health-app-to-track-and-t...
1•catlikesshrimp•29m ago•1 comments

Asia's Billionaires Are Bankrolling a Push for More Babies

https://www.bloomberg.com/news/articles/2026-04-24/asia-s-billionaires-offer-cash-incentives-to-b...
1•snidane•29m ago•0 comments

Rubbing testosterone gel on men's upper arms eliminates the audience effect

https://www.psypost.org/rubbing-testosterone-gel-on-mens-upper-arms-eliminates-the-audience-effec...
1•bilsbie•30m ago•0 comments

Show HN: Tarot Down Detector – a status page as a tarot reading

https://down.artemistarot.app/tarot-down-detector
3•suzgoldblatt•34m ago•0 comments

The Design of Design – Gordon L. Glegg(1969)

https://annas-archive.gl/md5/ea8f706c8ba56aaa741d5b45245ba25d
1•num42•34m ago•0 comments

You know what consciousness is: you live in soul land

https://aeon.co/essays/you-know-what-consciousness-is-you-live-in-soul-land
1•speckx•35m ago•0 comments

Unfounded Health Concerns Are Powering a Solar Backlash

https://www.propublica.org/article/michigan-solar-farms-health-concerns-st-clair-county
2•Brajeshwar•35m ago•0 comments

Printing a Check for Free

https://www.check.supply/check-printer
1•pfista•36m ago•0 comments

Ask HN: Anyone else get fatigued by interaction with LLMs?

3•yesitcan•37m ago•4 comments

Show HN: PrivateClaw – AI agents running in confidential VMs you can verify

https://privateclaw.dev
5•lambence•40m ago•0 comments