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?

Postgres 19 Repack: Built-In Online Table Bloat Cleanup

https://www.snowflake.com/en/blog/engineering/postgres-19-repack-table-bloat/
1•craigkerstiens•5m ago•0 comments

Not Getting Paid

https://tomaszdziurko1.substack.com/p/not-getting-paid
5•madihaa•8m ago•0 comments

C++26 Disapproved

https://andreasfertig.com/blog/2026/11/cpp26-dis-failed-how-does-cpp-survive/
1•thatxliner•10m ago•0 comments

Recycler: Cost-Free Latent Reasoning via Hidden State Recycling [pdf]

https://lf3-static.bytednsdoc.com/obj/eden-cn/hyvsmeh7uhobf/recycler_arxiv%20%282%29.pdf
1•E-Reverance•10m ago•0 comments

IKEA Turned 8,500 Call Agents into Design Consultants

https://www.pymnts.com/news/artificial-intelligence/2026/ikea-turned-8500-call-agents-into-design...
1•duck•12m ago•0 comments

Caching at Scale in Django: Lessons from Production

https://johnnymetz.com/posts/caching-at-scale-in-django/
2•johnnymetz•12m ago•0 comments

Anti-Oligarchy Activists Plan to Dox Elon Musk and Billionaires

https://www.wired.com/story/anti-oligarchy-activists-plan-to-dox-elon-musk-and-hundreds-of-billio...
3•slowin•12m ago•0 comments

French blood storage facilities targeted in cyberattack

https://twitter.com/etnshow/status/2117728420477936043
3•pixel_popping•16m ago•0 comments

People Against Genocide Smash Military Satellites on Balfour Anniversary

https://aftershock.media/military-satellites-balfour/
2•slowin•17m ago•0 comments

Shay Locomotive

https://en.wikipedia.org/wiki/Shay_locomotive
1•thunderbong•19m ago•0 comments

Tesla allegedly misled South Korean customers about automated-driving tech

https://www.reuters.com/business/autos-transportation/tesla-misled-south-korean-customers-about-a...
1•EA-3167•23m ago•0 comments

Show HN: An interactive map of midterm ads

https://admap.org/
1•Eden09•26m ago•0 comments

Gist of Go: Concurrency

https://antonz.org/go-concurrency/
2•ibobev•26m ago•0 comments

Multi-Column Different-Speed Scrolling

https://blog.master.dev/multi-column-different-speed-scrolling/
1•ibobev•27m ago•0 comments

What Composing Music Could Look Like

https://reasonablypolymorphic.com/blog/musical-vision/index.html
1•ibobev•27m ago•0 comments

Warashi – a menu bar flight recorder for macOS

https://warashi.app/
1•Nintindo•27m ago•0 comments

Sandchest: Add a Hacker to Your Team

https://www.sandchest.com/
1•handfuloflight•30m ago•0 comments

When a Platform Hides the Civil Reply

https://realprosperity.org/blog/meta-hidden-reply
1•ruusvuu•32m ago•0 comments

Centralia's underground fire and the NIF record shot, by the numbers

https://anotherdoor.de/works/
1•zozo_drift•33m ago•0 comments

Criminial Complaint: USA vs. Cleveland Grover Meredith, Jr a.k.a. Cleve Meredith [pdf]

https://fingfx.thomsonreuters.com/gfx/legaldocs/egvbgxzxxpq/11032026meredith.pdf
1•petethomas•34m ago•0 comments

WayPointo – A directory for discovering and comparing AI and creative products

https://waypointo.com
1•dotcurio•37m ago•0 comments

Microsoft Gives Apple Something to Think About – Surface Laptop Ultra Teardown [video]

https://www.youtube.com/watch?v=tXn8MMaRhVU
1•Udo_Schmitz•38m ago•0 comments

Deirdre McDermott Obituary

https://www.theguardian.com/books/2026/nov/03/deirdre-mcdermott-obituary
3•petethomas•39m ago•0 comments

Show HN: Spooler – a simple, managed message queue

https://spooler.sh/
1•gobwas•41m ago•0 comments

Shotgun – Terminal Batch Web Search

https://bweller.me/terminal-batch-web-search/
1•bweller•41m ago•0 comments

Leave a comment if you need a product demo video then I will make one for you

1•loveTech•41m ago•0 comments

Humans accidentally canceled the next Ice Age, scientists say – CNN

https://www.cnn.com/2026/10/29/climate/how-humans-halted-the-next-ice-age
3•bilsbie•42m ago•0 comments

Hinted Scaling Laws

https://arxiv.org/abs/2611.02270
2•matt_d•43m ago•0 comments

Aito vehicles' manufacturer Seres patents hidden in-car toilet design

https://carnewschina.com/2026/04/14/aito-vehicles-manufacturer-seres-patents-hidden-in-car-toilet...
1•mtmail•43m ago•0 comments

Enclave Gateway – CLI, SSH, SOCKS5 and MCP over RDP-Only Bastions

https://github.com/pom6i4/enclave-gateway
1•pom6i4•49m ago•0 comments