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?

Almost always look on the bright side of life

https://www.economist.com/business/2026/05/21/why-you-should-almost-always-look-on-the-bright-sid...
1•andsoitis•3m ago•0 comments

After 80 Years, Mathematicians Give Famed 'Erdős Method' an Upgrade

https://www.quantamagazine.org/after-80-years-mathematicians-give-famed-erdos-method-an-upgrade-2...
1•signa11•6m ago•0 comments

Grantham Warns U.S. Stocks Could Plunge 70% / Most Expensive Market in History

https://247wallst.com/investing/2026/06/26/jeremy-grantham-warns-u-s-stocks-could-plunge-70-in-th...
1•andsoitis•12m ago•0 comments

Feds Killed Polestar and Spared Volvo. That Should Terrify You

https://www.thedrive.com/news/feds-killed-polestar-and-spared-volvo-that-should-terrify-you
2•mraniki•18m ago•3 comments

I built a 100% local network privacy appliance to stop smart home spying

https://www.edgedefenseai.com/
1•arundass•20m ago•1 comments

China Has Matched Anthropic in Cybersecurity, Resetting AI Race

https://www.wsj.com/tech/ai/chinese-ai-anthropic-mythos-cybersecurity-574b02c2
2•madars•21m ago•2 comments

What Happens When You Run 10k Concurrent Lambda Functions Against DynamoDB

https://medium.com/@yalovoy/what-happens-when-you-run-10-000-concurrent-lambda-functions-against-...
1•zero-ground-445•22m ago•0 comments

Amble One

https://driveamble.com/pages/amble-one
2•dnw•25m ago•0 comments

Show HN: FSM – an advanced system monitor for Linux

https://github.com/mskrasnov/FSM
1•mskrasnov•26m ago•0 comments

The AI "Super Bubble" Warning Is a Filter, Not a Funeral

https://www.pentesty.co/blog/ai-super-bubble-cybersecurity-filter-2026
2•johnzoro107•30m ago•0 comments

Show HN: SpinnerRecruit – targeted job ads in CLI for AI wait states

https://www.spinnerrecruit.dev/
1•jamessmu•32m ago•2 comments

Response to AI slop is from Robin Williams

https://jayacunzo.com/blog/your-move-chief
12•herbertl•45m ago•1 comments

Chrome Extension to Bypass Paywalls

https://gitflic.ru/project/magnolia1234/bypass-paywalls-chrome-clean
1•thunderbong•45m ago•1 comments

Turning music into a chore is how I became a musician

https://the.scapegoat.dev/turning-music-into-a-chore-is-what-made-me-an-artist/
2•herbertl•50m ago•0 comments

Microchip June 2026: AVR LA Family [pdf]

https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/Brochures/AVR-L...
2•dragontamer•51m ago•1 comments

Show HN: Decomp Academy – Learn to decompile GameCube games into matching C

https://decomp-academy.dev
20•jackpriceburns•52m ago•7 comments

Show HN: Shopify UCP is insanely powerful

https://stack412.com/
2•westche2222•1h ago•3 comments

I designed and synthesized PAC-832 in a chemistry lab I built in my garage

https://twitter.com/DouglasYaoDY/status/2070904914050797582
3•gasull•1h ago•1 comments

People and Blogs Interview: David Cain, Raptitude

https://manuelmoreale.com/interview/david-cain
3•Curiositry•1h ago•0 comments

From Prompting Agents to Loop Engineering

https://twitter.com/omarsar0/status/2068008743153832264
5•gmays•1h ago•1 comments

Slop, trust, and a three-line patch

https://klez.me/2026/06/28/slop-trust-and-a-three-line-patch/
2•the_kLeZ•1h ago•1 comments

Google Patent Reveals Satellite Messages May Carry Device Tracking Data

https://patentlyze.com/patent/google-stuffing-device-data-satellite-messages/
3•Dfol•1h ago•2 comments

Show HN: Moumantai – self-hosted, agent-driven apps you can use on any device

https://github.com/xiang-deng/moumantai
2•no_0044•1h ago•0 comments

AMD Strix Halo RDMA Cluster Setup Guide

https://github.com/kyuz0/amd-strix-halo-vllm-toolboxes/blob/main/rdma_cluster/setup_guide.md
23•jakogut•1h ago•1 comments

GTA 3 on a Volumetric Display (2025) [video]

https://www.youtube.com/watch?v=onYH5gvlnzE
2•Tiberium•1h ago•0 comments

Australia to double maximum penalty for platforms in breach of social media ban

https://www.bbc.co.uk/news/articles/c78yv5g74e9o
2•bbg2401•1h ago•1 comments

Never before have so many been trapped in place

https://kindofvoiceless.substack.com/p/there-will-be-nowhere-to-go
5•OgsyedIE•1h ago•0 comments

Why American data centers can't plug in

https://worksinprogress.co/issue/why-american-data-centers-cant-plug-in/
5•Gaishan•1h ago•0 comments

The Lost Discipline of the Alarm: What Notification Design Forgot [video]

https://www.youtube.com/watch?v=Ira28fgSF7M
3•jumpocelot•1h ago•0 comments

Nix Taco Sprint 2026

https://jrdsgl.com/nix-taco-sprint-2026/
6•alurm•1h ago•0 comments