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?

Post Quantum Liveness, Identity, Provenance. No Biometric Identification

https://github.com/Clockwork-Tree-Inc/atlas-poc-v1/tree/clockwork-tree-atlas-update-v1.2
1•clockworktree•1m ago•1 comments

1

https://api.luoluocoder.com/
1•siofeng•1m ago•0 comments

Why Are Many GitHub Issues Nonsensical for Visual Studio Code Edge Dev Tools?

https://github.com/microsoft/vscode-edge-devtools/issues
1•resolute-dev•1m ago•0 comments

Spared execution eight times, oldest inmate in US dies at 101

https://www.bbc.com/news/articles/c98vr7ql2vdo
1•Teever•5m ago•0 comments

How Big Tech's A.I. Borrowing Binge Is Driving Up Bond Yields

https://www.nytimes.com/2026/08/20/business/bond-yields-tech-ai-debt.html
1•mikhael•6m ago•0 comments

Turning on airplane mode was never about keeping the plane in the air

https://spacedaily.com/k-turning-on-airplane-mode-was-never-really-about-keeping-the-plane-in-the...
1•dxs•6m ago•0 comments

Show HN: Getfkd – adults-only dating (swipe, match, meet tonight)

https://getfkd.sentineldefensetechnologies.co.za/app
1•Viper117•7m ago•0 comments

Sing-song: a speakable encoding for long numbers and keys

https://blog.vrypan.net/2026/08/19/260819-sing-song/
1•birdculture•11m ago•0 comments

Founder sues YC over idea in rejected 2018 application

https://runtimewire.com/article/founder-sues-yc-over-idea-in-rejected-2018-application
2•babelfish•11m ago•1 comments

We replaced our 223-node agent graph with a single open-source LLM

https://www.netic.ai/replacing-node-agent-graph-with-open-source-llm
1•ajayarora1235•12m ago•0 comments

Show HN: AI tools with real pricing, submitted in 30 seconds

https://worthtotry.com
1•not_wowinter13•15m ago•0 comments

Cryptomator

https://cryptomator.org
1•Cider9986•16m ago•0 comments

Ozone: The Fault Is Not in Our Trees, but in Ourselves

https://www.science.org/content/blog-post/fault-not-our-trees-ourselves
2•gumby•17m ago•0 comments

New visualizer: U.S. state obesity trends

https://www.exfatloss.com/p/new-visualizer-us-state-obesity-trends
1•paulpauper•17m ago•0 comments

You Are Not Fat Enough for Retatrutide

https://lukasxp.substack.com/p/you-are-not-fat-enough-for-retatrutide
1•paulpauper•18m ago•0 comments

AI #182: Pause for Reflection

https://thezvi.substack.com/p/ai-182-pause-for-reflection
1•paulpauper•19m ago•0 comments

We Taught Sqlc to Invalidate Our Caches

https://blog.exe.dev/we-taught-sqlc-to-invalidate-our-caches
1•bryanmikaelian•19m ago•0 comments

Moon→Leo Transfer Sims for a Lunar Mass Driver, Terrain Analysis, Power Sizing

https://www.youtube.com/watch?v=3I4P_6G3PFY
1•db48x•19m ago•0 comments

BTP v2.2 – An open, offline cryptographic trust protocol for AI agents

https://github.com/ivegotahunnitonit/bartholomew
1•itsub_sa•20m ago•0 comments

Show HN: PNGine, Declarative WebGPU in S-expressions that match the spec 1:1

https://hugodaniel.com/pages/pngine/
1•hugodan•23m ago•0 comments

Data Science Weekly – Issue 665

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

Canadian premier says Trump is a 'bad person' as Canada weighs concessions

https://apnews.com/article/canada-quebec-trump-tariffs-75d3f24bb11178d8c9bb28b144e1dcf0
2•petethomas•29m ago•0 comments

OpenCyvis: An open-source AI phone agent that runs your own LLM

https://github.com/opencyvis/opencyvis-phone
1•Alephinitesimal•31m ago•0 comments

Zalgo: The Good, the Bad, and the Ugly

https://unsung.aresluna.org/zalgo-the-good-the-bad-and-the-very-very-ugly/
1•sohkamyung•32m ago•0 comments

LastSpot: A 100-product leaderboard where bids decay 5% daily

https://lastspot.lol
1•insomnie•32m ago•0 comments

TFreax, a new 3k shootem up game for the Vic20, c64, Atari 400, etc. Open source

https://orac81.itch.io/tfreax
2•orac81•32m ago•0 comments

Intelligent AI Delegation

https://arxiv.org/abs/2602.11865
1•gmays•35m ago•0 comments

Exploring the Far Side of the Moon: A Visual History

https://invertingvision.com/2026/04/06/exploring-the-far-side-of-the-moon-a-visual-history/
1•bryanrasmussen•37m ago•0 comments

Detecting scraper bots through scroll behaviour

https://niki.cat/detecting-scraper-bots-through-scroll-behaviour
6•theanonymousone•41m ago•3 comments

US power grid at risk of 18-month blackout; 1 city now in dark for over a week

https://www.syracuse.com/us-news/2026/08/us-power-grid-at-risk-of-18-month-blackout-1-city-now-in...
5•newsomix9xl•42m ago•1 comments