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?

We Reduced Development Time by 50%, Users Didn't Notice

1•Semi_hayat•25s ago•0 comments

The Secret Life of Computers – The Chip Letter

https://thechipletter.substack.com/p/the-secret-life-of-computers
1•rbanffy•36s ago•0 comments

NASA races to save Swift telescope

https://www.latimes.com/world-nation/story/2026-06-28/nasa-races-to-save-swift-telescope-with-dar...
1•mrhappyhappy•1m ago•0 comments

Cognitive Bias

https://en.wikipedia.org/wiki/Cognitive_bias
1•abixb•1m ago•0 comments

SQL Alerting in Cloud Monitoring Observability

https://cloud.google.com/blog/products/management-tools/alert-with-sql-in-cloud-monitoring-observ...
1•mjs06•3m ago•0 comments

The Humanoid That Runs Until Someone Steps In

https://atomsfrontier.substack.com/p/the-humanoid-that-runs-until-someone
2•jpatel3•3m ago•0 comments

ePulz.io

https://epulz.io/
3•tiptech•6m ago•0 comments

Making a Meal of the Family Meal: Cooking Dinner [audio]

https://abundance.institute/our-work/everyday-abundance-making-a-meal-of-the-family-meal-cooking-...
1•mooreds•7m ago•0 comments

A Beginner's Guide to Reopening the Strait (Of Hormuz)

https://www.commoditycontext.com/p/a-beginners-guide-to-reopening-the-strait
1•mooreds•7m ago•0 comments

AI-Enhanced Writing

https://enocc.com/blog/2026-04-09-on-ai-enhanced-writing.html
1•speckx•7m ago•0 comments

Pizza wheels are bad, Japanese toilets are great

https://www.noahpinion.blog/p/pizza-wheels-are-bad-japanese-toilets
1•mooreds•7m ago•0 comments

Ask HN: AI robbed my joy of reading books?

3•hasudon7171•10m ago•3 comments

Search, Discovery, Pills, and Portals

https://contraptions.venkateshrao.com/p/search-discovery-pills-and-portals
1•surprisetalk•11m ago•0 comments

Route Phone Calls to an AI Agent with the Telnyx Voice API

https://telnyx.com/resources/route-phone-calls-ai-agent
1•harpreetseehra•11m ago•0 comments

Dragon's Egg: a formally verified, distributed object-capability OS

https://github.com/emberian/dregg
1•iamthebesthere•11m ago•0 comments

Ask HN: Building a minimal to-do app based on Signal vs. Noise

1•simonhansson•13m ago•0 comments

Migratrom: Schema migrations you can trust your agent to write

https://migratrom.org/
1•alloysmila•15m ago•0 comments

Rocket Lab Buys Satellite Operator Iridium in Bid to Challenge SpaceX

https://www.wsj.com/business/telecom/rocket-lab-buys-satellite-operator-iridium-in-bid-to-challen...
2•JumpCrisscross•15m ago•0 comments

Tesla FSD v14 Lite

https://twitter.com/elonmusk/status/2071538306039357838
1•lucamark•17m ago•0 comments

Has anyone here used the AI trading bot "Zentriq"? Looking for honest feedback

https://qafstudio.gumroad.com/l/zentriq
1•klegolas•18m ago•0 comments

Turning Risk Appetite into Impact – By Eric Gilliam

https://www.freaktakes.com/p/turning-risk-appetite-into-impact
1•rbanffy•20m ago•0 comments

Anatomy of an Agent – By Stephen Gruppetta

https://www.thepythoncodingstack.com/p/2-anatomy-of-an-agent
1•rbanffy•20m ago•0 comments

CRISPR's next act: the companies editing the epigenome to treat disease

https://www.nature.com/articles/d41586-026-01976-w
1•bookofjoe•21m ago•1 comments

Fame, an external memory and tool-safety gateway for local coding agents

https://github.com/superalp1985/fame-knowledge-agent-gateway
1•superalp•22m ago•0 comments

The Science of Play

https://www.unicef.org/parenting/child-care/science-of-play
1•the-mitr•22m ago•1 comments

Comcast Plans Company Split, Sending Shares Soaring 20%

https://www.wsj.com/business/media/comcast-to-split-media-and-tech-businesses-into-two-separate-c...
1•JumpCrisscross•22m ago•0 comments

Ask HN: Favorite Online Magazines?

1•m-hodges•24m ago•0 comments

The Black Holes That Burp Years After They Eat

https://www.universetoday.com/articles/the-black-holes-that-burp-years-after-they-eat
1•rbanffy•24m ago•0 comments

A Simulated Attack Story on React Server Components to Exploit React2Shell

https://mate.security/blog/a-simulated-attack-story-on-react-server-components-to-exploit-react2s...
1•noisysoc•25m ago•0 comments

Aerial Photographs (2017)

https://www.toronto.ca/city-government/accountability-operations-customer-service/access-city-inf...
1•surprisetalk•25m ago•0 comments