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?

Six humanoid robots worked a 24-hour shift at a convenience store

https://www.techspot.com/news/114445-six-humanoid-robots-worked-24-hour-shift-convenience.html
1•calme_toi•1m ago•1 comments

Tiger Management

https://newsletter.richardtoad.com/tiger-management/
1•gmays•3m ago•0 comments

An injured Ukrainian soldier was evacuated by drone

https://www.theguardian.com/world/ng-interactive/2026/nov/07/how-injured-ukrainian-soldier-rescue...
2•jimnotgym•6m ago•0 comments

Meta joins Microsoft and Google in offering employees voluntary exit packages

https://www.peoplematters.in/news/strategic-hr/meta-joins-microsoft-and-google-in-offering-employ...
1•vismit2000•6m ago•0 comments

I Wired a Whole Fly Brain into ARC-AGI-3. It Lost All Season, Then Won One Back

https://www.kaggle.com/competitions/arc-prize-2026-paper-track/writeups/flygi-connectome-attribut...
1•MegusAlexandrus•8m ago•0 comments

Linux for Your Mac

https://gravitylinux.org/
1•fulafel•9m ago•0 comments

Arete-27B: Qwen3.8-27B, post-trained to reinforce Western values

https://nousresearch.com/arete
2•pretext•9m ago•0 comments

Google extends voluntary buyout offers to employees in several countries

https://www.reuters.com/business/media-telecom/google-extends-voluntary-buyout-offers-employees-s...
1•vismit2000•12m ago•0 comments

Find hiphop class near you

1•florapeterpaul3•21m ago•0 comments

Apple to Drop the iPhone's Action Button Next Year

https://www.macrumors.com/2026/11/06/apple-rumored-to-drop-the-action-button/
1•mgh2•30m ago•0 comments

Galactica, a TypeScript codebase map for developers and agents

https://github.com/cognitap/galactica
1•holistio•41m ago•0 comments

The Components of Agent Memory

https://www.anthropic.com/research/components-of-agent-memory
4•geoffbp•45m ago•1 comments

A proof of the Aaronson‑Ambainis conjecture

https://psi.inc/research/aaronson-ambainis/
1•harporoeder•45m ago•0 comments

Slonbase – A PocketBase like back end built on PostgreSQL

https://github.com/ayeshrodz/slonbase
2•ayeshrodz•45m ago•0 comments

DailyCal Your Daily Calendar

https://apps.mjanssen.nl/dailycal/
1•marc0janssen•45m ago•1 comments

Cyber Crime Investigation Masterclass – Complete Course (14 Video Chapters)

https://www.youtube.com/playlist?list=PLXMaCa5cj96E
2•rakshanex•48m ago•0 comments

Stream generative UI with JSON-render

https://vercel.com/changelog/json-render-and-chat-sdk-agents
3•burnrate•49m ago•0 comments

Are You Ready for Superintelligence?

https://twitter.com/knowerofmarkets/status/2103138714050331089
2•gmays•52m ago•0 comments

Creating Logic Using Waves: Photonic Gates [video]

https://www.youtube.com/watch?v=ln0zZcQXv38
1•ot•54m ago•0 comments

Do Not Tread Lightly

https://www.palladiummag.com/2026/11/02/do-not-tread-lightly/
1•networked•55m ago•0 comments

Major strawberry grower for Driscoll's calls it quits in coastal California

https://www.sfgate.com/centralcoast/article/california-berry-grower-layoffs-22514855.php
3•madihaa•59m ago•1 comments

Daily game guess what old tech cost at launch (and where it was invented)

https://pricetimemachine.com/
2•chirk•1h ago•0 comments

Unix Won over the World [video]

https://www.youtube.com/watch?v=QpZTYUkYs3w
1•mughu12345•1h ago•0 comments

Cognitive Outsourcing and the Erosion of Collective Memory

https://medium.com/@smoking2man/cognitive-outsourcing-and-the-erosion-of-collective-memory-toward...
1•Aldus551•1h ago•0 comments

Church quits role at AI startup claims 'sleazy' behavior stole credit

https://endpoints.news/church-quits-role-at-ai-startup-radical-claims-sleazy-behavior-stole-credi...
4•gmays•1h ago•0 comments

Dark personality levels relate to people's job interests and chosen careers

https://psychology.ku.dk/news/2026/dark-personality-levels-relate-to-peoples-job-interests-and-ch...
1•rohanm93•1h ago•0 comments

Do not ask "Is A a B?": Inheritance and the Is-A Trap

https://denkstein.github.io/2026/11/05/do-not-ask-is-a-a-b/
1•signa11•1h ago•0 comments

Ask HN: What tech companies do you think have a good moral compass?

1•gehwartzen•1h ago•4 comments

Editing at the Speed of Thought in Emacs

https://joshblais.com/blog/editing-at-the-speed-of-thought-in-emacs/
1•signa11•1h ago•0 comments

Envelox: Private Email Client

https://apps.mjanssen.nl/envelox/
2•marc0janssen•1h ago•0 comments