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•9mo ago

Comments

nine_k•9mo 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•9mo ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•9mo ago
They mention this in the article.
spockz•9mo ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•9mo ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•9mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•9mo 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•9mo 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•9mo 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•9mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•9mo ago
This was very well written. Excellent article!
NetOpWibby•9mo ago
Is this like MessagePack for Haskell?

A Defector Explains the Remote-Work Scam Helping North Korea Pay for Nukes

https://www.wsj.com/world/asia/a-defector-explains-the-remote-work-scam-helping-north-korea-pay-f...
1•sam345•25s ago•0 comments

Top non-ad google result for "polymarket" in Australia is a crypto scam

1•rtrgrd•2m ago•0 comments

Show HN: I gave my AI agent $50 and let it trade on Kalshi

https://twitter.com/JackDavis720/status/2023243630492746062
2•JackDavis720•3m ago•0 comments

The heavy reality of Venezuela's oil

https://www.reuters.com/graphics/USA-VENEZUELA/OIL-RESERVES/mypmqearlpr/
2•gmays•12m ago•0 comments

Minnesota Bathrobe Lady Sam Stroozas of MPR News

https://www.mpr.org/stories/2026/02/13/meet-bathrobe-lady-sam-stroozas-mpr-news
2•jmward01•12m ago•1 comments

We are in the "gentleman scientist" era of AI research

https://www.seangoedecke.com/ai-and-informal-science/
1•gfysfm•13m ago•0 comments

I got tired of babysitting Claude,so I built AI agent that run on my laptop 24/7

3•bagula_ai•14m ago•0 comments

Terry Tao – Machine assistance and the future of research mathematics [video]

https://www.youtube.com/watch?v=zJvuaRVc8Bg
1•breve•15m ago•0 comments

Your pet's microchip may now be useless after chip company goes out of business

https://local12.com/news/local/cincinnati-animal-care-shelter-warns-microchips-may-fail-after-maj...
2•cpeterso•16m ago•1 comments

The great software stock meltdown

https://www.ft.com/content/9e5742e4-adae-4178-9951-7372adeb7ffc
1•petethomas•17m ago•0 comments

Intermittent fasting no better than dieting, study finds

https://www.ft.com/content/788e6852-8acc-44df-acbc-ecff3afe6459
3•petethomas•19m ago•0 comments

Is there a true alternative to Discord?

https://medium.com/@mycahp/is-there-a-true-alternative-to-discord-7faf052ef28e
2•hacym•22m ago•0 comments

Intermittent fasting no better than typical weight loss diets, study finds

https://www.theguardian.com/science/2026/feb/16/intermittent-fasting-no-better-than-typical-weigh...
3•uxhacker•23m ago•0 comments

Developers, Factory Workers, and the AI Replacement Myth

https://emma.has-a.blog/articles/developers-factory-workers-ai-replacement-myth.html
1•srijan4•25m ago•1 comments

The Origins of One of the Most Beloved Video Games of All Time

https://lithub.com/the-origins-of-one-of-the-most-beloved-video-games-of-all-time/
2•vinhnx•31m ago•1 comments

Contra "Grandmaster-Level Chess Without Search"

https://cosmo.tardis.ac/files/2024-02-13-searchless.html
1•luu•32m ago•0 comments

Personal Business

https://www.are.na/editorial/personal-business
1•marcorentap•33m ago•0 comments

DHS pushes social media giants to dox anonymous accounts critical of ICE

https://mashable.com/article/ai-hard-drive-hdd-shortages-western-digital-sold-out
5•jmward01•35m ago•4 comments

A Love Letter to Plastic Junk: Nintendo's Weirdest Inventions

https://www.itstheorbit.com/p/nintendos-beautifully-unnecessary
1•myth_drannon•42m ago•0 comments

Standard Notes – End-to-End Encrypted Notes App from Proton

https://standardnotes.com
2•throwoutway•54m ago•2 comments

The Rediscovery of 103 Hokusai Lost Sketches (2021)

https://japan-forward.com/eternal-hokusai-the-rediscovery-of-103-hokusai-lost-sketches/
1•debo_•56m ago•0 comments

Show HN: Katipo is a minimal alternative internet with a Vulkan based browser

https://github.com/mjdave/katipo
3•majicDave•57m ago•2 comments

Palo Alto Networks Expands Identity Security with CyberArk Deal and TASE Listing

https://finance.yahoo.com/news/palo-alto-networks-expands-identity-091230669.html
1•Khaine•58m ago•0 comments

India's pollution is becoming an economic roadblock

https://www.economist.com/asia/2026/02/15/indias-pollution-is-becoming-an-economic-roadblock
1•andsoitis•59m ago•0 comments

Show HN: OpenSlimedit – Cut AI coding token usage by 21-45% with zero config

https://github.com/ASidorenkoCode/openslimedit
2•aSidorenkoCode•1h ago•7 comments

Why do I not use "AI" at OSNews?

https://www.osnews.com/story/144405/why-do-i-not-use-ai-at-osnews/
3•cdvonstinkpot•1h ago•0 comments

Show HN: Image to Photo

https://imagetophoto.com
1•wangmao•1h ago•1 comments

A NEW Windows‑native SSH agent

https://github.com/Sanmilie/PKCS11SSHAgent
1•Sanmilie•1h ago•1 comments

EPA ends credits for automatic start-stop vehicle ignition

https://apnews.com/article/climate-zeldin-automakers-vehicles-consumers-dca74900298e45485987b87c3...
2•geox•1h ago•1 comments

ASUKA.md – The SOUL.md for Eva Asuka

https://asuka.md
1•jetsquirrel•1h ago•1 comments