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?

Dietary cholesterol activates a Ral-dependent pathway driving LDLR turnover

https://www.nature.com/articles/s41586-026-10697-z
1•brandonb•1m ago•0 comments

Show HN: One-command static site deployments to Bunny.net

https://tangled.org/bruceroettgers.eu/bunnyup
1•bcye•2m ago•0 comments

Ask HN: Did you just get opted-in to Fastmail's Newsletter?

1•trinsic2•3m ago•0 comments

Show HN: Forensic-deepdive: code knowledge graph and MCP server for AI agents

https://github.com/Dhevenddra/forensic-deepdive
1•dhevenddra_•3m ago•0 comments

How to Transition Your HR Department into the AI Era

https://medium.com/@nikrig/how-to-transition-your-hr-department-into-the-ai-era-b601a1d21372
1•nrig•3m ago•0 comments

Where every major LLM stands politically

https://trakkr.ai/bias
2•mektrik•3m ago•0 comments

Fly.io is down in South East Asia

2•bingemaker•4m ago•0 comments

What Split-Brain Patients Reveal About Consciousness

https://thereader.mitpress.mit.edu/what-split-brain-patients-reveal-about-consciousness/
1•anarbadalov•4m ago•0 comments

Countries are competing to see which can carry out mass surveillance the best

https://mullvad.net/en/why-privacy-matters/state-mass-surveillance
2•Cider9986•5m ago•0 comments

Toxic Tempeh: Death by Bongkrekic Acid

https://naturespoisons.com/2015/07/09/toxic-tempeh-death-by-bongkrekic-acid/
1•speckx•8m ago•0 comments

Apple announces significant price increases for MacBooks, iPads, more

https://9to5mac.com/2026/06/25/apple-price-increases-mac-ipad-more/
7•virgildotcodes•9m ago•0 comments

Show HN: Appaloft – deploy to your own servers from CLI, GitHub Actions, or AI

https://www.appaloft.com/
2•nichenqin•10m ago•0 comments

Show HN: Let E-Commerce Products Build Their Own Taxonomy

https://mirakl.tech/let-products-build-their-own-taxonomy-4d1bdee450a7
1•rVaysse•11m ago•0 comments

Bipartisan Nonprofit Launches $500M Plan to Retrain AI-Displaced Workers

https://fivetakes.news/ai-transforming-the-workplace-new-group-aims-to-help-workers-adapt-and-kee...
1•mmeirovich•11m ago•0 comments

Tagging my blog posts with BERTopic and LLMs

https://vickiboykis.com/2026/05/18/tagging-my-blog-posts-with-bertopic-and-llms/
1•surprisetalk•12m ago•0 comments

The GTA VI controversy isn't the price – it's what's missing from the box

https://news.sky.com/story/the-gta-vi-controversy-isnt-the-price-its-whats-missing-from-the-box-1...
1•austinallegro•12m ago•0 comments

Why Does Everyone Hate AI?

https://paulkrugman.substack.com/p/why-does-everyone-hate-ai
4•megacorp•13m ago•0 comments

LLMs, Carpenters, and IKEA Code

https://tinthe.dev/p/t/posts/ikea-code
1•tinthedev•13m ago•0 comments

Red-Teaming After Mythos

https://www.latent.space/p/gray-swan
1•gmays•13m ago•0 comments

Show HN: The Agent Pantry – a live, daily-scanned landscape of AI agent tools

https://theagentpantry.com/
1•ajain•15m ago•0 comments

Show HN: Tablesmit – open-source table builder with LaTeX, PDF, Excel export

https://tablesmit.com/
1•oakinnagbe•15m ago•0 comments

The girly wellness aesthetic as a white supremacist dog whistle

https://blog.avas.space/clean-girl-klein-dogwhistle/
3•speckx•15m ago•0 comments

SoftBank's investor presentation is one of the greatest things ever made

https://twitter.com/i/status/2069990468587581455
2•Michelangelo11•16m ago•0 comments

Slopagotchi: Score your AI slop against other developers

https://slopagotchi.com/
1•stortebecker•16m ago•0 comments

Show HN: Unread – CLI that turns Telegram, YouTube and files into cited reports

https://github.com/maxbolgarin/unread
1•maxbolgarin•17m ago•0 comments

Show HN: I couldn't install Caffeine on my work Mac, so I built my own

https://github.com/Kuberwastaken/caffeineOSS
1•kuberwastaken•17m ago•0 comments

OpenAI won't let you "escape" freely in JSON mode

https://research.giskard.ai/blog/structured-output/
3•RuiLyonesse•17m ago•0 comments

Developer to Product Owner: Building Tilores Studio Changed My Mind About LLMs

https://medium.com/@stefan.berkner/from-developer-to-product-owner-how-building-tilores-studio-ch...
2•skafoi•18m ago•0 comments

SpaceX and the Sentient Sun

https://twitter.com/pmarca/status/2066523671456579828
3•vantareed•18m ago•0 comments

Ask HN: What does the day-to-day work of an AI Engineer look like?

3•vishalwaghmode•18m ago•0 comments