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?

Apple seeks preliminary injunction against OpenAI in trade secrets case

https://www.reuters.com/legal/litigation/apple-seeks-preliminary-injunction-against-openai-trade-...
1•jack0111•3m ago•0 comments

A My-Name-in-Products Page

https://daniel.haxx.se/my-name-in-products.html
1•indiantinker•4m ago•0 comments

'Nobody cares' Turkish farmers bearing the burden of UK's plastic waste problem

https://www.theguardian.com/environment/2026/aug/04/plastic-waste-microplastics-exports-recycling...
1•hebelehubele•6m ago•0 comments

Show HN: Lex – a calm language-learning toolkit for 34 languages

https://lex.school
1•Ako03•8m ago•1 comments

Migration numbers are a distributed counter without coordination

https://vvka-141.github.io/pgmi/articles/migration-numbers-distributed-counter/
1•aevlampiev•9m ago•0 comments

Show HN: Autonomous daily AI news briefing blog

https://ai0.news/
1•Komte•10m ago•0 comments

PlanningPoker / Agile Estimations – Free, no-signup for sprint planning

https://planning-poker.teamretro.com/
1•jlufacilitator•16m ago•1 comments

Big Stupid Has Infiltrated the State Department

https://www.esquire.com/news-politics/a73320214/state-department-africa-map-mislabeled/
1•Alien1Being•18m ago•1 comments

True Cost of Cross-Border Payments: Correspondent Banking Myths vs. Reality

https://paybitz.io/true-cost-of-cross-border-payments-correspondent-banking-myths-vs-reality/
1•PayBitz•19m ago•0 comments

The Book That Predicted Pete Hegseth's Failures

https://foreignpolicy.com/2026/07/31/hegseth-norman-dixon-iran-war/
1•Alien1Being•22m ago•0 comments

Show HN: AI Presentaions, Posters, and All Visual Designs

https://starrykit.com
1•Mine77•23m ago•0 comments

The Future of Gnome Boxes

https://blogs.gnome.org/feborges/future-of-boxes/
1•birdculture•26m ago•1 comments

Live Full Stack Domain Specific Web Coding Agent Demo [video]

https://www.youtube.com/watch?v=ZJOE_EuyRTY
1•marianoguerra•27m ago•0 comments

"Clean" Code, Horrible Performance [video]

https://www.youtube.com/watch?v=tD5NrevFtbU
1•FrojoS•29m ago•0 comments

Bending Spoons acquires Airtable for 1.285B

https://en.ilsole24ore.com/art/first-move-nasdaqs-bending-spoons-acquires-airtable-for-1285-billi...
2•napolux•30m ago•0 comments

The Tungsten Market Is Warning of an Upcoming War

https://www.bloomberg.com/news/audio/2026-08-03/odd-lots-tungsten-market-is-warning-of-upcoming-w...
1•Alien1Being•31m ago•0 comments

Claude Code can read plaintext secrets even when Read is denied

https://jankovd.substack.com/p/claude-can-read-your-secrets
2•jdex•31m ago•0 comments

Show HN: I made a private self-destructing image hosting site in Golang

https://picburn.xyz/
2•shelldweller•36m ago•0 comments

Why the Legendary Erdős Problems Are Falling to AI

https://www.quantamagazine.org/why-the-legendary-erdos-problems-are-falling-to-ai-20260803/
1•isaacfrond•36m ago•0 comments

Show HN: Doomscroll GitHub Instead of TikTok

https://roamers.dev
1•momo5502•37m ago•0 comments

Show HN: Made Our BI v7 – Free Open Source with All Features (AI, SSO, RLS etc.)

2•nikhelical•42m ago•0 comments

Ask HN: Has anyone tried a minimal AGENTS.md that grows with you repo?

1•xinbenlv•42m ago•0 comments

Bending Spoons entered definitive agreement to acquire Airtable for $1.28B

https://www.businesswire.com/news/home/20260730994716/en/Bending-Spoons-has-entered-into-a-defini...
10•BoorishBears•44m ago•4 comments

Runaway online rumors sparked frantic rush by migrants to Ceuta

https://apnews.com/article/ceuta-spain-morocco-migration-f3a7f514a7792c39d8b8d5d814fa5158
2•geox•46m ago•0 comments

NHS apologises and admits Palantir have access to identifiable patient data

https://www.publictechnology.net/2026/08/03/health-and-social-care/nhs-apologises-and-admits-pala...
85•robin_reala•48m ago•11 comments

Show HN: A GenAI image benchmark for production design work

https://img.ly/ai-benchmarks/
1•buss_jan•48m ago•0 comments

Show HN: I made a private self-destructing image hosting site in Golang

https://picburn.xzy
1•shelldweller•49m ago•1 comments

Amiga announces out-of-court settlement with Hyperion

https://www.amiga-news.de/en/news/AN-2026-08-00022-EN.html
1•codewiz•49m ago•0 comments

AGs have instructed OpenAI to keep everything related to the Hugging Face hack

https://www.businessinsider.com/openai-attorney-general-preserve-hugging-face-evidence-2026-8
4•theanonymousone•53m ago•0 comments

Wikipedia article "Ship of Theseus" has changed entirely since its inception

https://en.wikipedia.org/wiki/Ship_of_Theseus
2•beardyw•54m ago•2 comments