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•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?

Kairos: The ancient Greek art of knowing when to act

https://bigthink.com/mini-philosophy/kairos-the-ancient-greek-art-of-knowing-when-to-act/
1•lschueller•3m ago•0 comments

Waymo recalls 3,800 robotaxis after they drive into flood waters

https://www.cnbc.com/2026/05/12/waymo-recalls-3800-robotaxis-after-able-drive-into-standing-water...
2•drob518•4m ago•0 comments

Building a UMatrix Replacement

https://lock.cmpxchg8b.com/umatrix.html
1•taviso•5m ago•0 comments

Ghost of long-extinct ancestor lives on in people today

https://www.science.org/content/article/ghost-long-extinct-ancestor-lives-people-today
1•gmays•6m ago•0 comments

Build a Full-Featured Text Editor from Scratch (Rust)

https://0xkiire.com/build-text-editor-from-scratch/
1•jabits•9m ago•0 comments

Apple Sold Out of Mac Minis and Mac Studios

https://www.apple.com/shop/buy-mac/mac-mini
1•adgjlsfhk1•12m ago•1 comments

Git Is Not Fine

https://www.billjings.com/posts/title/git-is-not-fine/
2•steveklabnik•14m ago•0 comments

What Is Code?

https://martinfowler.com/articles/what-is-code.html
1•BerislavLopac•23m ago•0 comments

Bidirectional typechecking that does not stop

https://semantic-domain.blogspot.com/2026/05/bidirectional-typechecking-that-does.html
1•fanf2•23m ago•0 comments

Why Gemma-4 26B MoE works in HuggingFace but breaks in prod inference engines

https://github.com/maeddesg/vulkanforge/blob/main/docs/gemma4_26b_moe_solution.md
1•maeddesg•23m ago•0 comments

Ask HN: Can I take Meta to court for banning business Insta or FB account?

5•milanspeaks•29m ago•3 comments

Linus Torvalds declares AI-fueled code surges as the new normal

https://www.neowin.net/news/linus-torvalds-declares-massive-ai-fueled-code-surges-as-the-new-norm...
2•ell1e•31m ago•0 comments

Goodgallery: WebGL sprite engine that can load 100k thumbnails in 1 second

https://ggdemo.s80.me/demo-100000/#fit
2•thunderbong•31m ago•0 comments

OpenAI's KOSA Endorsement Is Regulatory Capture with a Smiley Face

https://www.techdirt.com/2026/05/14/openais-kosa-endorsement-is-regulatory-capture-with-a-smiley-...
2•repelsteeltje•31m ago•0 comments

Elephants Still Don't Play Chess

https://whattotelltherobot.com/p/elephants-still-dont-play-chess
1•stefie10•31m ago•1 comments

EY retracts study after researchers discover AI hallucinations

https://www.ft.com/content/a61cbcae-95e4-4449-86e1-ef40fb306f4e
2•JumpCrisscross•32m ago•0 comments

Anatomy of a WooCommerce Skimmer: A Technical Deep-Dive

https://scotthelme.co.uk/anatomy-of-a-woocommerce-skimmer-a-technical-deep-dive/
1•speckx•33m ago•0 comments

Magnus the wandering walrus swaps Scotland for Norway

https://www.bbc.com/news/articles/cy82j0q383no
1•speckx•34m ago•0 comments

Long Live Qt for HarmonyOS

https://lists.qt-project.org/pipermail/development/2026-May/047126.html
2•molinwow•35m ago•1 comments

Trending on Amazon: Cancer books by synthetic authors

https://danielmay.co.uk/posts/cheap-agents-alumni-shirts-and-elias-thorne/
2•danielrmay•36m ago•1 comments

U.S. DOJ demands Apple and Google unmask over 100k users of car-tinkering app

https://macdailynews.com/2026/05/15/u-s-doj-demands-apple-and-google-unmask-over-100000-users-of-...
38•tencentshill•37m ago•10 comments

Rich Guy Quote Journalism

https://stringinamaze.net/p/rich-guy-quote-journalism
1•Tomte•37m ago•0 comments

Ask HN: Has Google Deprecated Inurl:?

2•kuba-orlik•38m ago•0 comments

From PDFs to AI-ready structured data: a deep dive (2024)

https://explosion.ai/blog/pdfs-nlp-structured-data
2•Tomte•38m ago•0 comments

Subumbra – Attempting to keep API keys safe – Alpha Release

https://github.com/polysemic/Subumbra
2•polysemic•40m ago•1 comments

Feedr v0.8.0 – a TUI RSS reader, now read the full article from your terminal

https://github.com/bahdotsh/feedr
2•bahdotshxx•42m ago•0 comments

Greg Brockman Officially Takes Control of OpenAI's Products in Latest Shakeup

https://www.wired.com/story/openai-reorg-greg-brockman-product/
2•ent101•42m ago•0 comments

Show HN: Check for CVE-2026-31431 (copy.fail) without overwriting su

https://github.com/bddap/supertee
1•bddap•44m ago•0 comments

Show HN: Burn, baby, burn (those tokens)

https://github.com/dtnewman/burn-baby-burn
5•dtnewman•45m ago•1 comments

Vanguard succeeded because it is owned by customers

https://www.wsj.com/finance/vanguard-costco-acquired-podcast-hosts-bogle-96d97c7d
1•marojejian•45m ago•1 comments