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 Like Things

https://asteriskmag.com/issues/15/why-we-like-things
1•surprisetalk•19s ago•0 comments

IBM builds a better fridge for its quantum computers

https://thenewstack.io/ibm-modular-quantum-refrigerator/
1•Brajeshwar•1m ago•0 comments

Show HN: A design skill that turn your feelings into UI and remembers it

https://github.com/MonkeyUI-dev/vibe-to-ui
1•LeonTung•2m ago•0 comments

Show HN: Synchroize, control, and orachstrate any angets on any device

https://github.com/cosyncing/cosyncing
1•howardme1•2m ago•0 comments

Commenting no longer works on old.reddit.com

https://old.reddit.com/r/help/comments/1vson02/comments_do_not_submit_on_oldreddit_or_res_but_do/
2•OgsyedIE•3m ago•0 comments

Alexander Vampilov

https://en.wikipedia.org/wiki/Alexander_Vampilov
1•petethomas•4m ago•0 comments

Prediction Market Cheating Gets Creative

https://www.wsj.com/opinion/prediction-market-cheating-gets-creative-3068365e
1•Anon84•4m ago•0 comments

Show HN: MandarinClips – Learn conversational Chinese from 130k+ TV drama clips

https://www.mandarinclips.com/en
1•mandarinclips•4m ago•0 comments

The science behind Pixel Watch's insulin resistance feature

https://www.empirical.health/blog/wearable-insulin-resistance/
2•brandonb•5m ago•0 comments

Study Finds Narwhal Tusks Have 2 Spirals – Not 1–Twisting in Opposite Directions

https://arstechnica.com/science/2026/08/x-rays-add-new-twist-to-narwhals-spiral-tusk/
1•bookofjoe•7m ago•0 comments

A Doctor Who Became Afraid of Death

https://drped.substack.com/p/a-doctor-who-became-afraid-of-death
5•jamarna•7m ago•0 comments

I built a courtroom for the internet. Verdicts stay sealed until you vote

https://courtofstrangers.com
1•briancohen•7m ago•0 comments

Old-School Electronics Repair Man Vows to Be the Last in Chicago

https://blockclubchicago.org/2026/08/19/old-school-electronics-repair-man-vows-to-be-the-last-in-...
1•toomuchtodo•8m ago•1 comments

Mojo is now open source

https://simonwillison.net/2026/Aug/18/mojo-is-now-open-source/
2•jonathandeamer•10m ago•0 comments

Show HN: Tech / AI / Product super aggregator – SudoReport

https://sudoreport.com/
3•ataturkle•10m ago•0 comments

Testtospeech.com – New leaderboard adds balance and removes bias

https://texttospeech.com/
2•imemily•11m ago•0 comments

Show HN: Zmina – clipboard with per-app paste transforms

https://zmina.app/
3•0-3•12m ago•0 comments

Product.now

https://product.now
1•luispa•12m ago•0 comments

Life finds a way OpenAI claims partial pause and rolls out ChatGPT for Teens

https://aistop.watch/p/life-finds-a-way
1•Bluestein•12m ago•0 comments

Landing the Plane

https://www.theengineeringmanager.com/growth/landing-the-plane/
1•LaSombra•13m ago•0 comments

Show HN: Store Front For Vibe coded apps

https://yaadops.com/explore
2•ShamarWebster•13m ago•0 comments

Algorithms + Data Structures = Programs

https://en.wikipedia.org/wiki/Algorithms_%2B_Data_Structures_%3D_Programs
1•tosh•13m ago•0 comments

The Data Center Capital of the World [video]

https://www.nytimes.com/video/us/100000011066777/inside-the-data-center-capital-of-the-world.html
1•donohoe•13m ago•0 comments

Ask HN: Calorie Trackers

2•solsane•13m ago•0 comments

What is inference engineering? Deepdive

https://newsletter.pragmaticengineer.com/p/what-is-inference-engineering
1•luispa•13m ago•0 comments

The Hermès heist: how an heir to the dynasty was swindled out of $15B of shares

https://www.economist.com/1843/2025/12/11/the-hermes-heist-how-an-heir-to-the-luxury-dynasty-was-...
1•geneticdrifts•13m ago•0 comments

Ornith-1.5: From Self-Scaffolding to Self-Improvement

https://ornith.ai/ornith_1_5.html
2•CommonGuy•14m ago•0 comments

X262: X264 with MPEG-2 Support

https://github.com/kierank/x262
1•ksec•14m ago•0 comments

The two largest reservoirs in the US have hit record-low levels

https://www.carbonbrief.org/analysis-the-two-largest-reservoirs-in-the-us-have-hit-record-low-levels
1•speckx•15m ago•0 comments

Does daycare damage children's brains?

https://www.worksinprogress.news/p/daycare-barely-matters
1•momentmaker•17m ago•0 comments