frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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?

I tracked down the thief who stole $200k of Lego [video]

https://www.youtube.com/watch?v=wscQpkcwgNU
1•pinkmuffinere•34s ago•0 comments

Limerick

https://www.worldwidewords.org/surprise.html
1•jruohonen•6m ago•0 comments

We Were Wrong About Fasting Study Finds

https://www.sciencealert.com/we-were-wrong-about-fasting-massive-study-finds
2•mikhael•11m ago•0 comments

C Constructs That Still Don't Work in C++ – and a Few That Changed

https://lospino.so/blog/c-constructs-that-still-dont-work-in-cpp/
1•jandeboevrie•13m ago•0 comments

A Data Mining Adventure into the World of Lichess Puzzle Database

https://lichess.org/@/heroku/blog/how-many-different-backrank-mates-are-there/gSUlcRkl
2•heroku•15m ago•0 comments

The Verification Problem (On OpenAI's Erdős Disproof)

https://korbonits.com/blog/2026-05-23-the-verification-problem/
1•korbonits•17m ago•0 comments

AI Can Do Anything

https://clawdcursor.com
2•AmDab•18m ago•0 comments

Does bulk memmove speed up std:remove_if? (No.)

https://quuxplusone.github.io/blog/2026/05/23/chunked-remove/
1•jandeboevrie•18m ago•0 comments

European Data Centers Reuse Waste Heat to Heat Homes

https://letsdatascience.com/news/european-data-centers-reuse-waste-heat-to-heat-homes-48086eeb
1•GeorgeWoff25•19m ago•0 comments

How to Call an API from an Email

https://redo.com/eng-blog/how-to-call-an-api-from-an-email/
3•crcastle•20m ago•0 comments

"Long-Term Support" doesn't mean what you think

https://pointieststick.com/2026/05/23/long-term-support-doesnt-mean-what-you-think/
3•jandeboevrie•23m ago•0 comments

2of3: Enter a secret. Get 3 cards

https://2of3.ente.com
2•anandbaburajan•24m ago•0 comments

SpaceX, OpenAI and Anthropic IPOs set to test limits of AI boom

https://www.ft.com/content/ae9bb47d-bd1d-473c-b4c5-abae0420cc12
1•1vuio0pswjnm7•28m ago•1 comments

Dark trades' risk destroying London's stock markets

https://www.thetimes.com/business/companies-markets/article/dark-trades-risk-destroying-stock-mar...
3•petethomas•28m ago•0 comments

BNoise – The Easiest Music Maker

https://bnoise.pages.dev/
2•telui•29m ago•1 comments

Hacker Typer – Hacker Screen

https://startuplaunchpage.com/hacker-typer
2•vnyarongi•31m ago•0 comments

Reddit stock drops almost 6%, Meta launches standalone app for online forums

https://www.cnbc.com/2026/05/22/reddit-stock-drops-after-meta-launches-forum-app.html
8•1vuio0pswjnm7•36m ago•0 comments

Cleaning Station

https://en.wikipedia.org/wiki/Cleaning_station
3•pvillano•38m ago•1 comments

The phrase "taste is the differentiator" is not beneficial

https://hazn.com/please-stop-repeating-is-the-differentiator
2•hazn•39m ago•0 comments

Fauxx – Data poisoning for your everyday tracking

https://github.com/digital-grease/fauxx
1•vidyesh•42m ago•0 comments

Amazon Web Services – Four Years and Out

https://www.adventuresinoss.com/aws-four-years/
29•RyeCombinator•44m ago•4 comments

What does grep stand for, and the 75 year history of the regular expression

https://mart.traagel.dev/blog/what-does-grep-stand-for/
1•sonabinu•46m ago•0 comments

Commodity Intelligence

https://contraptions.venkateshrao.com/p/commodity-intelligence
2•swolpers•46m ago•0 comments

British power prices are increasingly independent from gas

https://ember-energy.org/latest-insights/british-power-prices-are-increasingly-independent-from-gas/
1•helsinkiandrew•54m ago•0 comments

Show HN: Qavvali Wiki

https://www.qavvali.com/
3•vishkk•55m ago•0 comments

Show HN: Panorama – Review Code, Faster

https://panorama.stagas.deno.net/
1•stagas•56m ago•0 comments

The C++ Standard Library Has Been Walking Itself Back for Fifteen Years

https://hftuniversity.com/post/the-c-standard-library-has-been-walking-itself-back-for-fifteen-ye...
2•alexjurkiewicz•1h ago•0 comments

Their Phones Were Stolen in London. Then the Threats Started

https://www.nytimes.com/2026/05/23/world/europe/phone-theft-threats-london.html
2•0in•1h ago•0 comments

Easier bets to get early customer validation and VC attention

1•Notional_ID•1h ago•0 comments

Pre-ASI Society

https://lifearchitect.ai/wiki/
2•adt•1h ago•0 comments