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?

Solar Open 2: Korea's Sovereign Foundation Model, Built for Agentic Use

https://www.upstage.ai/blog/en/solar-open-2
1•maxloh•51s ago•0 comments

Why care about programming languages

https://ebellani.github.io/blog/2026/why-care-about-programming-languages/
1•rbanffy•1m ago•0 comments

Her rape kit had a DNA match. In San Francisco, that's not enough

https://sfstandard.com/2026/07/20/sfpd-rape-kit-investigation/
1•computerliker•1m ago•0 comments

Agent Host Protocol

https://microsoft.github.io/agent-host-protocol/
1•gokhan•5m ago•0 comments

Data Science Weekly – Issue 661

https://datascienceweekly.substack.com/p/data-science-weekly-issue-661
1•sebg•5m ago•0 comments

Dinitz-Garg-Goemans conjecture is false

https://xcancel.com/DmitryRybin1/status/2079904005652893709
1•franzb•6m ago•0 comments

Why AI Challenges Us: Ego, Awareness, and the Illusion of Ascent

https://www.immaculateconstellation.info/why-ai-challenges-us-part-2-ego-pure-awareness-and-the-i...
1•manjuc•7m ago•0 comments

Doesn't OpenAI have every incentive to destroy HuggingFace?

3•jrm4•8m ago•0 comments

Computational Arbitrage in AI Model Markets via Routing, Finetuning

https://arxiv.org/abs/2603.22404
1•blackcat201•9m ago•0 comments

AMD calls CUDA a 'non-event'

https://www.pcgamer.com/hardware/amd-calls-cuda-a-non-event-says-companies-are-programming-at-lev...
2•neilfrndes•11m ago•0 comments

First experimental evidence of recursive self-improvement (RSI)

https://threadreaderapp.com/thread/2077079778793042425.html
2•gmays•13m ago•0 comments

What we know about the typical Polymarket user

https://www.pewresearch.org/short-reads/2026/07/22/what-we-know-about-the-typical-polymarket-user/
2•gnabgib•15m ago•0 comments

Show HN: AI-factory – a spec-driven pipeline that stops AI agents rotting code

https://github.com/highflame-ai/ai-factory
1•sharathr•17m ago•0 comments

Deleting Systems You Don't Understand

https://idiallo.com/blog/deleting-systems-you-dont-understand
1•firefoxd•18m ago•0 comments

AMD EPYC 9006 Venice Announced and Looks Poised to Be a Grand Slam

https://www.phoronix.com/review/amd-epyc-9006-venice
2•rbanffy•20m ago•1 comments

Looking for Feedback on Website

https://www.what2do.me/
1•gnrlnoob•21m ago•2 comments

How Tether Benefited as Trump Insiders Shaped First Crypto Law

https://www.bloomberg.com/features/2026-howard-lutnick-bo-hines-trump-tether-crypto-law/
3•petethomas•22m ago•0 comments

The Gospel of Gains: How Fitness Culture Went Mainstream

https://greyenlightenment.com/2026/06/30/the-all-the-gospel-of-gains-how-fitness-culture-went-mai...
1•paulpauper•23m ago•0 comments

Microsoft deleted Nokia's archive of unreleased ringtones in 2016 HMD sale

https://bsky.app/profile/techprodbangers.bsky.social/post/3mr4askb6tk2i
2•scblzn•23m ago•0 comments

Kalytera – tells you why your AI agent failed, not just that it did

https://kalytera.dev/
1•mathurpriya19•25m ago•0 comments

Locked in An Escape Room with Jacob Tsimerman

https://www.begiant.ca/stories/people/jacob-tsimerman-math
1•tibbar•25m ago•0 comments

DOE Fires the $5B Starter Gun for Its AI-Targeted Genesis Mission

https://www.nextplatform.com/hpc/2026/07/23/doe-fires-the-5-billion-starter-gun-for-its-ai-target...
1•rbanffy•26m ago•0 comments

The AI Productivity Paradox

https://www.svpg.com/the-ai-productivity-paradox/
2•andrii•28m ago•0 comments

Show HN: How far do I have to go to run into 100k people?

https://imjasonh.github.io/playground/population-rays/
2•ImJasonH•29m ago•0 comments

Sometimes Being First Means Seeing the End Before Anyone Else

https://www.quantamagazine.org/jacob-tsimerman-wins-2026-fields-medal-for-andre-oort-conjecture-p...
3•energy123•31m ago•0 comments

AI Agents Don't Respect Font Licenses

https://www.mixfont.com/blog/ai-agents-dont-respect-font-licenses
2•jenthoven•32m ago•0 comments

Show HN: Advanced Coffee Search Covering Over 17,000 coffees

https://beangenie.coffee/coffee
2•epicwynn•33m ago•0 comments

Show HN: Connecting my dumb garage and car's homelink buttons to Home Assistant

https://dsauerbrun.com/writing/dumb-garage
1•dsauerbrun•34m ago•0 comments

US announces double-digit tariffs on most of globe to replace expiring duties

https://finance.yahoo.com/economy/policy/article/trump-administration-announces-the-next-phase-of...
6•ck2•34m ago•3 comments

Tesla shares tumble 11% after discounts hit profits

https://www.ft.com/content/dc5e629b-562c-41e3-8b89-350af6960adc
2•doener•36m ago•0 comments