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?

The Sign-Off Layer Is Becoming the Real Engineering System

https://newsletter.thelongcommit.com/p/the-sign-off-layer-is-becoming-the
1•jason_s•1m ago•0 comments

AI is code – and can't be prompted into being smarter

https://www.theregister.com/ai-and-ml/2026/06/14/ai-is-code-and-cant-be-prompted-into-being-smart...
1•wglb•2m ago•0 comments

Why Linux Still Feels Unstable

https://www.whileforloop.com/blog/2026/06/14/why-linux-still-feels-unstable/
1•wook__•4m ago•1 comments

Holy Git! Microsoft code-sharing site suffers downtime, despite move to Azure

https://www.theregister.com/software/2026/06/12/github-outages-persist-as-ai-coding-drives-traffi...
1•Bender•4m ago•0 comments

NHS patients can't opt out of Palantir's data platform – but their hospital can

https://www.theregister.com/databases/2026/06/13/nhs-patients-cant-opt-out-of-palantirs-data-plat...
1•Bender•5m ago•0 comments

Federal Network Agency vs. Steam: Investigation into "Plantation Simulator"

https://www.heise.de/en/news/Federal-Network-Agency-vs-Steam-Investigation-into-Plantation-Simula...
1•mschuster91•6m ago•0 comments

The Minecraft community so nostalgia blinded

1•letlearnbasic•6m ago•0 comments

How to Become an AI-Native Software Engineer? What an AI-Native Team Looks Like

https://medium.com/vibecodingpub/how-to-become-an-ai-native-software-engineer-8f4bda05e7dc
1•SaeedZF•7m ago•0 comments

Why pushback is growing against New Jersey's crazy e-bike law

https://electrek.co/2026/06/13/why-pushback-is-growing-against-new-jerseys-crazy-e-bike-law/
1•Bender•7m ago•0 comments

Vibe Coder vs. Software Engineer

https://yusufaytas.com/vibe-coder-vs-software-engineer
10•yusufaytas•7m ago•0 comments

Why can't I type and scroll at the same time?

https://scrollpods.app/blog/why-cant-i-type-and-scroll-at-the-same-time
1•tippa123•8m ago•0 comments

Researchers uncovering ADHD links to other health conditions

https://www.washingtonpost.com/wellness/2026/06/14/adhd-is-linked-chronic-pain-other-health-condi...
1•bookofjoe•10m ago•1 comments

Commanded, Meet EventSourcingDB

https://docs.eventsourcingdb.io/blog/2026/06/15/commanded-meet-eventsourcingdb/
1•goloroden•10m ago•0 comments

The Leading Deepfake Expert No Longer Trusts His Own Eyes

https://www.nytimes.com/2026/06/14/us/ai-deepfake-hany-farid.html
1•nhyun•13m ago•0 comments

How Are You Feelin.today?

https://feelin.today/
3•michalwarda•13m ago•1 comments

Show HN: Ray Hosting – Topology-aware game server orchestrator made from scratch

https://ray-hosting.com/en-US
2•bardhyliis•16m ago•0 comments

Why All the PRs?

https://idiallo.com/blog/why-all-the-prs
1•firefoxd•17m ago•0 comments

Bring Siri AI to EU iPhone Users Safely

https://siri4eu.com
6•peterspath•20m ago•1 comments

The Fertile Void

https://d.glezos.com/the-fertile-void/
1•gtzi•23m ago•0 comments

Companies are scrambling to curtail soaring AI costs

https://www.economist.com/business/2026/06/14/companies-are-scrambling-to-curtail-soaring-ai-costs
1•andsoitis•23m ago•0 comments

UK to announce Australia-style social media ban for teenagers

https://www.ft.com/content/e3b7be6f-99e7-42d2-a3bb-e400690c7bc0
1•mmarian•23m ago•1 comments

The Aeneid by Virgil (19B.C.E)

https://classics.mit.edu/Virgil/aeneid.html
1•andsoitis•25m ago•0 comments

Show HN: Pg-status – lightweight HTTP sidecar for PG master/replica discovery

https://github.com/krylosov-aa/pg-status
2•krylosov-aa•25m ago•0 comments

Claude Code Is Dead

https://claude-code-is-dead.vercel.app/
2•gidellav•26m ago•0 comments

Webxdc – Secure mini apps for chats

https://webxdc.org/
1•birdculture•33m ago•0 comments

Paul Krugman breaks down problems with SpaceX valuation [video]

https://www.youtube.com/watch?v=jqjcOs-N6a8
3•jethronethro•33m ago•0 comments

Is Musk the richest American ever now? No, except as a consumer

1•dfps•34m ago•0 comments

CoreAI_HTCE

https://github.com/miroaleksej/CoreAI_HTCE
1•CoreAi_HTCE•36m ago•0 comments

From AGI to ASI

https://arxiv.org/abs/2606.12683
1•artninja1988•39m ago•0 comments

Pilot and 11 skydiving passengers killed in Missouri plane crash

https://www.theguardian.com/us-news/2026/jun/14/butler-missouri-plane-crash
2•sva_•44m ago•0 comments