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

Towards a Perfect Notes App

https://kvnd.me/2026/04/22/now-onto-ruin/
1•kvnd•37s ago•0 comments

SSD Price Tracking 2026

https://www.tomshardware.com/pc-components/ssds/ssd-price-tracking-2026-lowest-price-on-every-m-2...
1•WarOnPrivacy•58s ago•0 comments

I've Covered Robots for Years. This One Is Different

https://www.wired.com/story/when-robots-have-their-chatgpt-moment-remember-these-pincers/
1•zdw•5m ago•0 comments

"Transaction Denied": What Happens When Financial Companies Act Like Censors

https://www.eff.org/deeplinks/2026/04/former-eff-activism-directors-new-book-transaction-denied-e...
1•hn_acker•5m ago•1 comments

Setup an Agent in MS Teams within seconds with the new CLI

https://devblogs.microsoft.com/microsoft365dev/from-prompt-to-production-teams-agent-setup-simpli...
1•umangsehgal93•9m ago•0 comments

CVE-2026-3854

https://nvd.nist.gov/vuln/detail/CVE-2026-3854
1•_aleph2c_•12m ago•0 comments

Our doc-driven engineering playbook

https://productnow.ai/blogs/engineering-playbook
1•kadhirvelm•13m ago•1 comments

Business and Enterprise Codex plans now default to Fast Mode (2.5x usage)

https://github.com/openai/codex/issues/19230
1•ladon86•16m ago•0 comments

8647 Is a Prime Number

https://www.numberempire.com/8647
1•bryan0•18m ago•0 comments

View transactions sent to a Monero address

https://localmonero.co/blocks/search/47xmhbRuYpSYSrVZx2RsPBhaAQByZq3ucAT6ULxHvDAu8c853ErpLHqBdDmp...
7•Cider9986•19m ago•2 comments

Vehicle-to-Everything

https://en.wikipedia.org/wiki/Vehicle-to-everything
2•colinprince•20m ago•1 comments

Creating a Dashboard with Claude Design

https://theautomatedoperator.substack.com/p/creating-a-dashboard-with-claude
1•idopmstuff•20m ago•0 comments

> Be Alexandra Elbakyan

https://nitter.space/MushtaqBilalPhD/status/2049057344013881523#m
3•DanielleMolloy•21m ago•0 comments

'New Einstein' vows to find 'source code of universe' and change everything

https://www.themirror.com/news/us-news/new-einstein-vows-find-source-1805568
2•harambae•22m ago•0 comments

Google Translate now lets you practice pronunciation

https://techcrunch.com/2026/04/29/google-translate-now-lets-you-practice-pronunciation/
1•jnord•25m ago•0 comments

United flight from SFO disrupted by 'possible drone strike'

https://www.sfgate.com/travel/article/united-flight-sfo-22232671.php
2•turtlegrids•31m ago•1 comments

KDE's 30th Anniversary

https://kde.org/anniversaries/30/
3•birdculture•34m ago•0 comments

Ask HN: Anyone feel like they're just opting out of tech these days?

5•moomoo11•34m ago•1 comments

Show HN: MAItion – Open-source RAG with pluggable connectors and chat UI

https://github.com/WikiTeq/mAItion
1•vedmaka•35m ago•0 comments

The Most Important Charts in the World

https://thezvi.substack.com/p/the-most-important-charts-in-the
2•paulpauper•36m ago•0 comments

What Anemoia Tells Us About Human Psychology and Culture

https://www.samwoolfe.com/2026/04/nostalgia-for-past-unlived-anemoia-human-psychology-culture.html
1•paulpauper•37m ago•0 comments

Capitalism and Modernity

https://marginalrevolution.com/marginalrevolution/2026/04/capitalism-and-modernity.html
2•paulpauper•38m ago•0 comments

Jet Beetle

https://www.ronpatrickstuff.com/
4•brk•38m ago•0 comments

The People and the Machine

https://www.therage.co/the-people-and-the-machine/
2•Cider9986•39m ago•0 comments

Vegas 2026: The DOJ's Developer Exemptions

https://www.therage.co/blanche-vegas/
2•Cider9986•39m ago•0 comments

Charging for APIs by blocking execution instead of usage tracking

https://buy.stripe.com/eVq7sK6Qd1SCgwp0RgcMM00
2•inri•40m ago•0 comments

Python Packaging Council Approved

https://lwn.net/SubscriberLink/1068704/8130b6ceb2531354/
3•chmaynard•41m ago•0 comments

Zwift Acquires Rouvy

https://rouvy.com/press/zwift-has-completed-the-acquisition-of-ROUVY
1•cabanis•42m ago•0 comments

Wing's homecoming: Bringing drone delivery to the Bay Area

https://wing.com/news/wing-drone-delivery-bay-area
2•xnx•42m ago•0 comments

Photoshop's challenges with focus, pt. 2

https://unsung.aresluna.org/photoshops-challenges-with-focus-pt-2/
1•robenkleene•43m ago•0 comments