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?

OVS and OVN Explained: The Networking Stack Behind OpenStack

https://www.openstack.org/blog/ovs-and-ovn-explained-the-networking-stack-behind-openstack/
1•ankitg12•2m ago•0 comments

Ransomware negotiator hired to represent victims was working for the attackers

https://arstechnica.com/tech-policy/2026/07/ransomware-negotiator-helped-attackers-extort-his-own...
1•LaSombra•5m ago•0 comments

Show HN: TokenDrift – find hardcoded colors/spacing hiding in your CSS

1•vedantyede•8m ago•0 comments

Pharmacology Simulation Game

https://pharmochi.app/
2•altilunium•8m ago•0 comments

Show HN: Made a website for downloading EU and US LiDAR scans and terrain models

https://hillsha.de
2•jonash54•11m ago•0 comments

Popnix – A Xonix-style land-grab played on 3D bubblewrap

https://playpopnix.com/
1•shauntrennery•11m ago•0 comments

The Winners of the AI Era

https://calcrecipe.com/en/workshop/7
1•wsdn•11m ago•0 comments

Show HN: AgentTransfer now lets agents self-sign-up and get web app hosting

https://agenttransfer.dev/#apps
1•tomatoes2026•15m ago•1 comments

Show HN: Level – a new demo for 8bit Atari XL/XE

https://ilmenit.github.io/level-by-agenda/
1•ilmenit•15m ago•0 comments

10 years of Pokémon Go and the millions still trying to catch 'em all

https://www.bbc.com/news/articles/cevlwk4nrm7o
1•1659447091•15m ago•1 comments

New NSF policy would ban almost all collaborations with Chinese scientists

https://www.science.org/content/article/new-nsf-policy-would-ban-almost-all-collaborations-chines...
1•eecc•16m ago•1 comments

Rumi's Masnavi

https://www.dar-al-masnavi.org/masnavi.html
1•andsoitis•20m ago•0 comments

Is reading others' experiences like a spoiler to life?

https://substack.com/profile/392328897-prakhar-agrawal/note/c-293492268
1•ghostrich•20m ago•1 comments

Rewisp – An ambient screen memory for macOS that never writes images to disk

https://yashmitb.github.io/Rewisp/
1•yashmitb•21m ago•0 comments

Backtrack-Free Cursive

https://mmapped.blog/posts/52-backtrack-free-cursive
2•dmit•25m ago•0 comments

Actor Sam Neill has died

https://www.stuff.co.nz/politics/361005656/actor-sam-neill-has-died
2•backlit4034•26m ago•0 comments

Show HN: Monitor any website, discuss outages, and post verified owner updates

https://anysite.live/site/news.ycombinator.com
1•joseph2024•27m ago•0 comments

Giving "AI slop" as feedback says as much about the commenter as the creator

https://thetruthasiseeitnow.com/using-ai-slop-as-feedback-tells-as-much-about-the-commenter-as-th...
2•cinooo•27m ago•0 comments

Show HN: Another terminal UI for stock, but with news sentiments

https://github.com/makeev/alphai-tui
1•mmakeev•28m ago•0 comments

Pg_re2: 9x faster regular expressions in Postgres

https://github.com/clickhouse/pg_re2/
1•saisrirampur•29m ago•0 comments

Telstra CEO 'deeply sorry' for outage, admits risk of time-keeping failure known

https://www.theguardian.com/business/2026/jul/10/telstra-ceo-deeply-sorry-for-outage-and-admits-r...
1•beardyw•29m ago•1 comments

Sam Neill Has Died

https://www.theguardian.com/film/2026/jul/13/sam-neill-death-actor-dies-aged-78
4•j4mie•31m ago•0 comments

BoardUI

https://www.boardui.com
1•handfuloflight•33m ago•0 comments

The Gran Turismo Magazine Beyond the Apex

https://www.gran-turismo.com/us/gt7/apex/
1•virissimo•38m ago•1 comments

The Reverse Information Paradox

https://twitter.com/satyanadella/status/2076323181154230284
1•taubek•42m ago•0 comments

Ask HN: What was the initial reaction to search engines?

2•hopa•44m ago•3 comments

SpaceX's near-term AI payoff seen tethered to Earth, not outer space

https://www.reuters.com/science/spacexs-near-term-ai-payoff-seen-tethered-earth-not-outer-space-2...
1•adithyaharish•48m ago•0 comments

The Unreasonable Effectiveness of LLMs in Mathematics

https://www.chrishayduk.com/p/the-unreasonable-effectiveness-of
2•rfv6723•55m ago•0 comments

Revisiting "The Great Mathematical Sputnik of 1979"

https://pubsonline.informs.org/do/10.1287/ORMS.2026.02.12
2•fforflo•57m ago•0 comments

The Graph That Should Be Front-Page News

https://www.lyrebirddreaming.com/post/the-graph-that-should-be-front-page-news
2•rakel_rakel•57m ago•2 comments