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?

Lessons from shipping a watch-only Apple Watch app, built with Claude

https://silentbell.app/lessons.html
1•jakublipinski•1m ago•0 comments

How to find an eclipse around another planet

https://signoregalilei.com/2026/08/24/how-to-find-an-eclipse-around-another-planet/
1•surprisetalk•2m ago•0 comments

Just Bury Your Trash

https://www.worksinprogress.news/p/just-bury-your-trash
1•eamag•2m ago•0 comments

Show HN: Thelemail, private email hosting for your own domain

https://thelemail.com/
1•Hexmere•4m ago•1 comments

The Duke of Moctezuma Is Alive and Runs a Marketing Agency

https://friedkielbasa.substack.com/p/the-duke-of-moctezuma-is-alive-and
1•fkozlowski•5m ago•0 comments

Even the oceans are struggling to keep their cool

https://europeancorrespondent.com/en/r/even-the-oceans-are-struggling-to-keep-their-cool
1•speckx•6m ago•0 comments

The Art of Leaping Out of Planes to Fight Wildfires

https://www.newyorker.com/magazine/2026/09/07/the-art-of-leaping-out-of-planes-to-fight-wildfires
1•fortran77•6m ago•0 comments

Right-Sizing Your Intelligence Spend

https://twitter.com/JayaGup10/status/2089924561441841152
1•gmays•6m ago•0 comments

A Note from LWN

https://lwn.net/Articles/1090585/
6•rwky•7m ago•0 comments

Elevating Antigravity agent skills, Part 2: Image generation

https://medium.com/google-cloud/agent-skills-part-2-image-generation-50099eee590e
1•irrationalnumbe•8m ago•0 comments

A Beginner's Deep Dive Guide to Entra Passkeys

https://emsroute.com/2026/03/19/passkeys-beginners-101/
2•speckx•10m ago•1 comments

Sourcerer – fast and lightweight Git GUI client written in C++

https://www.sourcererapp.com/
2•dezelin•10m ago•0 comments

Tell HN: Religion is dumb, especially Judaism

1•LoveMistral•11m ago•0 comments

Show HN: OpenClip – Instant popup actions for highlighted text on macOS

https://github.com/ganeshmshetty/openclip
1•ganeshmshetty•13m ago•1 comments

It turns out that Orion's much-maligned heat shield performed well

https://arstechnica.com/space/2026/09/it-turns-out-that-orions-much-maligned-heat-shield-performe...
3•RattlesnakeJake•14m ago•0 comments

A crash course in predicate logic

https://www.hillelwayne.com/post/predicate-logic/
1•rayhaanj•14m ago•0 comments

Global Bond Selloff Sends Yields to the Highest Level Since 2008

https://www.bloomberg.com/news/articles/2026-09-01/australian-benchmark-bond-yield-jumps-to-level...
1•geox•15m ago•0 comments

Watch the 'Eclipse of the Century' Next Year When Spain, Egypt and More Go Dark

https://www.nytimes.com/2026/08/13/travel/solar-eclipse-2027-morocco-egypt.html
3•bookofjoe•16m ago•1 comments

Maniquest Launch [Productivity]

https://www.maniquest.com
1•maniquest•20m ago•4 comments

HomeOS – A self-hosted family dashboard for a kitchen touchscreen

https://github.com/danialkhilji/HomeOS
14•danialkhilji•20m ago•7 comments

LLMs: Intelligence vs. Cost

https://openteams.com/intelligence-vs-cost/
1•theanonymousone•21m ago•0 comments

The Cables That Connect the World

https://xn--gckvb8fzb.com/the-cables-that-connect-the-world/
2•surprisetalk•22m ago•0 comments

Show HN: Subpool – Self-hosted AI subscription management for teams

https://github.com/gesta-run/subpool
1•jwcesign•23m ago•0 comments

Loudcloud

https://www.findhost.app/loudcloud/
1•esher•25m ago•0 comments

Aging Brains Blend Memories Together Instead of Just Forgetting Them

https://studyfinds.com/aging-brains-blend-memories-together-instead-of-forgetting-them-study-finds/
5•mdp2021•25m ago•1 comments

Open data institute solid open call

https://theodi.org/news-and-events/blog/solid-open-call/
2•fosco•27m ago•0 comments

(2) TBM 438: The Right but Early Club

https://cutlefish.substack.com/p/tbm-438-the-right-but-early-club
3•kiyanwang•27m ago•0 comments

Dutch central bank moves share of gold from U.S., Canada to London

https://nltimes.nl/2026/09/02/dutch-central-bank-moves-share-gold-us-canada-london-cites-instability
12•TechTechTech•29m ago•2 comments

GOV.UK Pay at 10: how it started and how it's going

https://gds.blog.gov.uk/2026/09/02/gov-uk-pay-at-10-how-it-started-and-how-its-going/
1•robin_reala•31m ago•0 comments

Chinese Shipper Cosco Collects Intel for Beijing with Concealed Equipment

https://gcaptain.com/chinese-shipper-cosco-collects-intel-for-beijing-with-concealed-equipment/
3•Anon84•31m ago•0 comments