frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Packed Data Support in Haskell

https://arthi-chaud.github.io/posts/packed/
77•matt_d•1y ago

Comments

nine_k•1y 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•1y ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•1y ago
They mention this in the article.
spockz•1y ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•1y ago
No, one example of why being variable sized integers.

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

carterschonwald•1y ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•1y 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•1y 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•1y 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•1y ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•1y ago
This was very well written. Excellent article!
NetOpWibby•1y ago
Is this like MessagePack for Haskell?

Scrum Poker estimation no signup – free – gamification

https://jonathanlink.ch/poker
1•jlink•4m ago•1 comments

German Peasants' War

https://en.wikipedia.org/wiki/German_Peasants%27_War
1•constantius•7m ago•0 comments

The State of WebMCP in July 2026

https://www.spronta.com/blog/state-of-webmcp-july-2026/
1•seandotexe•8m ago•0 comments

What the New 100x Agentic Engineer Looks Like in the Era of Fable and GPT 5.6

https://twitter.com/systematicls/status/2074142558595207435
3•gmays•10m ago•1 comments

Creating your own RISC-V processor, SoC and board with Claude

https://cimons.com/article/developing-a-risc-v-processor-soc-and-board-with-claude
2•etcimon•10m ago•1 comments

Milky Way planetary system leaves scientists puzzled

https://www.reuters.com/science/strange-milky-way-planetary-system-leaves-scientists-puzzled-2026...
2•chrisaycock•12m ago•0 comments

MLPs Are Hebbian Memories: A Simple Recipe for Fact-Storing Transformers

https://hazyresearch.stanford.edu/blog/2026-07-22-mlps-are-hebbians
2•ayushpai•12m ago•0 comments

PenguinHarness, Open, Efficient, Self-Improving Harness

https://github.com/Prism-Shadow/penguin-harness
2•mountainview•13m ago•0 comments

Thoughts on the "Netflix Analogy"

https://www.science.org/content/blog-post/thoughts-netflix-analogy
2•maxall4•16m ago•0 comments

Microsoft Developer Changelog – Unified Changelog Azure, GitHub & MS Dev Updates

https://developer.microsoft.com/en-us/changelog
2•richardboegli•19m ago•0 comments

Substack's new tool tells you who's been writing their newsletters with AI

https://techcrunch.com/2026/07/22/substacks-new-tool-tells-you-whos-been-writing-their-newsletter...
4•justswim•20m ago•2 comments

Open Fan Engine to Be Tested on A380

https://www.cfmaeroengines.com/press-articles/photo-release----airbus-and-cfm-international-unvei...
2•r2sk5t•22m ago•3 comments

Requesting for a Review and Feedback

https://www.thebuildnation.com/login?next=%2Fhttp%3A%2Flocalhost%3A3000
2•Guru_Raj•23m ago•0 comments

Show HN: KageOps – An open-source, local-first alternative to Devin

https://github.com/hmanoor/kageops-core
2•hmanoor•23m ago•0 comments

A Top Mathematician's 9 Lessons for Anyone Who Feels Behind, by Ken Ono [video]

https://www.youtube.com/watch?v=MG0CPqjjOvk
2•binyu•24m ago•0 comments

You've Been Pressing That Button Your Whole Life

https://arram.substack.com/p/youve-been-pressing-that-button-your
2•paulpauper•25m ago•0 comments

What Happened When Flock Came to My Town

https://www.404media.co/what-happened-when-flock-came-to-my-town/
4•HotGarbage•25m ago•0 comments

Want to Bet on My Wedding?

https://www.nytimes.com/2026/07/19/style/want-to-bet-on-my-wedding.html
2•paulpauper•28m ago•0 comments

The Capture of a Country

https://dvorak.substack.com/p/the-capture-of-an-entire-country
4•paulpauper•28m ago•0 comments

The Acknowledgment Gap – How Event-Driven Systems Lose Messages Without Errors

https://sahansera.dev/the-acknowledgment-gap/
2•sahan•30m ago•0 comments

US Department of Energy: AI funding opportunities for small businesses

https://www.energy.gov/technologycommercialization/articles/doe-announces-10m-sbirsttr-funding-op...
2•glokta•35m ago•1 comments

GM Is Quietly Becoming a Subscriptions Company

https://www.businessinsider.com/general-motors-gm-earnings-subscriptions-revenue-business-2026-1
3•jnord•42m ago•2 comments

Samsung reveals Galaxy Z Fold 8 that will compete with the iPhone Ultra

https://mashable.com/tech/samsung-galaxy-z-fold-8-launch-price-specifications
3•teleforce•45m ago•0 comments

Judge rules Trump must hand over records sought by BBC in defamation case

https://www.bbc.co.uk/news/articles/c93487x97kyo
4•jjgreen•45m ago•0 comments

Did Trump Officials Rig High School Contest Against Sikh Finalist?

https://newrepublic.com/post/213389/did-trump-officials-rig-high-school-contest-sikh-finalist
11•petethomas•47m ago•1 comments

If Scrubs Hurt, Your ZFS Design Is Broken

https://klarasystems.com/articles/if-scrubs-hurt-your-zfs-design-is-broken/
3•assimpleaspossi•53m ago•1 comments

Google Lawsuit Against SerpApi over Scraping Search Results Has Been Dismissed

https://www.seroundtable.com/google-lawsuit-serpapi-dismissed-41731.html
5•freediver•1h ago•1 comments

You Opened a Credit Card. ICE Now Knows Where You Live

https://nonogra.ph/you-opened-a-credit-card-ice-now-knows-where-you-live-07-22-2026
7•arkhiver•1h ago•0 comments

Local agent first AI search optimization tooling

https://github.com/Canonry/canonry
3•arberx•1h ago•0 comments

Tesla says 'Robotaxi' is expanding – its own chart shows it's not

https://electrek.co/2026/07/22/tesla-robotaxi-growth-flat-own-chart-q2-2026/
7•TheAlchemist•1h ago•2 comments