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?

Subquadratic 3SUM and Subcubic APSP

https://arxiv.org/abs/2610.06783
1•procedurecall•26s ago•0 comments

Open Source as We Know It Is Dead

https://jross.me/open-source-as-we-know-it-is-dead/
1•vinhnx•3m ago•0 comments

Mythos 5 Transcript Release [pdf]

https://cdn.sanity.io/files/4zrzovbb/website/8359003bfb12a2f01ce84ad3df1d3a3e2f15a8eb.pdf
1•NicoJuicy•5m ago•0 comments

Async Rust: Where does the scheduler live?

https://herecomesthemoon.net/2026/10/async-rust-where-does-the-scheduler-live/
1•vinhnx•5m ago•0 comments

Mallet Head Angle

http://www.timberframe-tools.com/tools/mallet-head-angle/
1•frogulis•5m ago•0 comments

A single license fee of £100k.00

https://dbushell.com/copyright/
2•corvad•7m ago•0 comments

Contemporary Humanities and the Spectre of the "Canon"

https://www.theprincetontory.com/contemporary-humanities-and-the-spectre-of-the-canon/
2•frogulis•8m ago•1 comments

Show HN: Counterbranch – See how your PR changes access control

https://github.com/marketplace/actions/counterbranch-access-control-change-review
1•boorad•10m ago•0 comments

E2B Embed

https://e2b.dev/resources/introducing-e2b-embed
1•gmays•12m ago•0 comments

"Told Apart"

https://frogulis.net/writing/micro/told-apart
1•frogulis•13m ago•0 comments

Drones buzz overhead, troops hunker underground in Ukraine's hellish kill zone

https://www.npr.org/2026/10/05/nx-s1-5925803/drones-buzz-overhead-troops-hunker-underground-in-uk...
3•balderdash•18m ago•0 comments

Show HN: Launch Your N8n Integration

https://www.nativeship.io
1•bhavyshekhaliya•31m ago•2 comments

Show HN: I built an application to work with multiple coding agents

https://crowsnest.app/
2•teivz•33m ago•1 comments

LLMs may have immensely helped my RSI

https://vaughanhilts.me/2026/10/05/llms-immensely-helped-my-rsi.html
2•vaughands•34m ago•1 comments

Iseberg – The PowerShell ISE Reimagined with Avalonia and PowerShell 7

https://github.com/adamdriscoll/iseberg
2•l33t_d0nut•34m ago•1 comments

The Return of the Cutting-Off Way

https://www.liberalcurrents.com/the-return-of-the-cutting-off-way/
1•Analemma_•40m ago•0 comments

Why Common Lisp Is Now the Best Programming Language

https://www.vivienhenz.com/common-lisp
3•misterchocolat•43m ago•1 comments

T-2 month: August, 1957, Magazine "Radio" №8, USSR

https://twitter.com/PicoSputnik/status/2107300923701674356
1•Ontolorg•45m ago•1 comments

Even If It's Real, It's Fake

https://www.todayintabs.com/p/even-if-it-s-real-it-s-fake
1•mooreds•46m ago•0 comments

Edit Documents in ChatGPT

https://revise.io/articles/edit-documents-in-chatgpt
1•artursapek•47m ago•0 comments

T-2 month: August, 1957, Magazine "Radio" №8, USSR

https://twitter.com/PicoSputnik/status/2107299066027585673
1•Ontolorg•48m ago•1 comments

AI Opportunity Scan

https://msa-mail.com/ai-scan/
1•mainstreetai•49m ago•0 comments

I got a project to 27 GitHub stars, one burst of motivation at a time

https://quickthoughts.ca/posts/listenr-from-idea-to-27-stars/
1•quickthoughts•49m ago•0 comments

Don't Publish with Oxford University Press

https://buymeacoffee.com/ayjay/the-last-word-all-this
1•barry-cotter•51m ago•0 comments

VeloGB10 – A GB10-specific inference engine

https://github.com/sf-stav/veloGB10
1•colingauvin•54m ago•1 comments

A hacker's guide to bending the universe (2016)

https://aresluna.org/a-hackers-guide-to-bending-the-universe/
1•colinprince•54m ago•0 comments

Wiki Time Machine

https://timemachine.carbonadoks.com
1•kinduff•56m ago•0 comments

SovereignLab, a Public-Source Intel Digest

https://github.com/paulpdelancy-spec/SovereignLab-Intake-Registry-Public/blob/main/README.md
1•Pcumberbatch•56m ago•0 comments

Ask HN: Why does Astra compact context so frequently vs. Fable?

1•yesitcan•56m ago•0 comments

Pages with the Most Revisions

https://en.wikipedia.org/wiki/Special:MostRevisions
2•imwally•1h ago•0 comments