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?

The Last Quiet Thing

https://www.terrygodier.com/the-last-quiet-thing/ascii
1•HotGarbage•1m ago•0 comments

Disputing the Declaration of Independence

https://www.historytoday.com/archive/feature/disputing-declaration-independence
1•pepys•6m ago•0 comments

Cosmic Fireworks by Infant Stars

https://www.space.com/astronomy/galaxies/infant-stars-celebrate-their-independence-with-cosmic-fi...
1•cybermango•9m ago•0 comments

Archivegenocide.com 64k videos show evidence of Israeli genocide

https://archivegenocide.com/
1•Dig1t•9m ago•0 comments

Show HN: Reading Assistant Physical Books Meta RayBans

1•roshangill•15m ago•0 comments

AI Trade Is Losing One of Its Key Signals

https://www.bloomberg.com/news/articles/2026-07-03/the-ai-trade-is-losing-one-of-its-key-signals-...
3•cybermango•20m ago•0 comments

Why Vancouver is always a stand-in for San Francisco in movies and TV shows

https://www.sfgate.com/sf-culture/article/vancouver-stand-in-movie-tv-sf-16613821.php
2•amichail•25m ago•0 comments

The Demoralization of the White-Collar Worker

https://nooneshappy.com/article/the-demoralization-of-the-white-collar-worker/
5•njrc•30m ago•0 comments

Illegible Benefits

https://aeon.co/essays/what-we-cant-measure-about-ai-yet
2•m-hodges•32m ago•0 comments

GLM5.2 on AMD MI355X at 2626 tok/s/node at over 2x lower cost than Blackwell

https://www.wafer.ai/blog/glm52-amd
2•latchkey•34m ago•0 comments

The Termi Protocol: Watch AI Coding Agents Build in 3D

https://termiprotocol.com/
1•jonbaer•35m ago•1 comments

Show HN: Durable AI agents without the workflow engine

https://www.noworkflows.dev/
3•iacguy•36m ago•0 comments

EVE Online's Carbon engine is now open source: Fenris Creations explains why

https://www.gamesindustry.biz/eve-onlines-carbon-engine-is-now-open-source-fenris-creations-expla...
5•Stevvo•37m ago•0 comments

Goodbye, Forever, Probably

https://whitep4nth3r.com/blog/goodbye-forever-probably/
14•backlit4034•41m ago•4 comments

Global Ocean Science Report: most complete picture of ocean science

https://www.ioc.unesco.org/en/articles/global-ocean-science-report-worlds-most-complete-picture-o...
3•bryanrasmussen•43m ago•0 comments

Labor Market Tightens Despite Tepid Job Growth as Labor Force Declines Further

https://wolfstreet.com/2026/07/02/labor-market-tightens-despite-tepid-job-growth-as-labor-force-d...
3•toomuchtodo•46m ago•1 comments

Bought an expired domain. Then I inherited their AWS Root account

https://easydns.com/blog/2026/07/03/bought-an-expired-startup-domain-a-few-days-later-i-inherited...
7•StuntPope•47m ago•1 comments

How to migrate from Proxmox VE 8 to 9: step-by-step guide (2026)

https://lucasaguiar.xyz/en/posts/migracao-proxmox-8-9-2026/
2•isfttr•48m ago•1 comments

Show HN: Theta-spec harness agnostic config surface

https://github.com/tamarillo-ai/theta-spec
3•ivanbelenky•48m ago•0 comments

sf house sept 26

5•jadenfix123•50m ago•0 comments

Software, from First Principles

https://fazamhd.com/mental-models/software/
3•faza•54m ago•0 comments

Show HN: Updated my landing page with Fable (retro pixel style)

https://www.tryguildly.com/
7•spiken23•54m ago•11 comments

Cadreen – memory, governance, self-healing, and execution as one system

4•ope_john•55m ago•0 comments

Best 3D Modeling Apps for iPad and Android (2026)

https://bambu3design.com/best-3d-modeling-apps-for-ipad-android-2026-create-3d-models-anywhere/
2•ehsanamel•56m ago•0 comments

You don't need Electron to build native apps in TypeScript [video]

https://www.youtube.com/watch?v=o5RDfAmzE7s
2•arbayi•58m ago•0 comments

AI First: How the Federal Government Is Prioritizing AI over People and Planet

https://stopgreedbuildgreen.climateandcommunity.org/posts/ai-first
23•eatox•1h ago•17 comments

Gaza's Children

https://gazaschildren.com/
13•abdelhousni•1h ago•3 comments

The Lost World (1925) [video]

https://archive.org/details/the.-lost.-world.-1925.1080p.-blu-ray.x-264-sadpanda
2•petethomas•1h ago•0 comments

New serious vulnerabilities spiked around release of Claude Mythos Preview

https://epoch.ai/data-insights/cve-severity-spike
3•cubefox•1h ago•0 comments

Show HN: Pulse v0.2.0

3•xerrs•1h ago•1 comments