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?

Drilling starts on a seafloor geothermal well off Oregon

https://spectrum.ieee.org/offshore-geothermal-energy
1•geox•1m ago•0 comments

How to Build a Bain-Style Consulting Slides with 10 Decision-Making Frameworks

https://medium.com/@2315610426/how-to-build-a-bain-style-consulting-powerpoint-with-10-decision-m...
1•chenxi030826•3m ago•0 comments

Project Cyan

https://www.lispm.net/projects/cyan/
1•karlgkk•4m ago•1 comments

Show HN: Northstar web browser 1.0.11 released

2•roschdal•6m ago•0 comments

A mysterious organ in the sperm whale's head gives it the power to sink ships

https://www.bbc.com/future/article/20260923-the-science-behind-moby-dick-the-prized-head-of-the-s...
1•1659447091•7m ago•0 comments

The Cosmic latte is FFF8E7

https://en.wikipedia.org/wiki/Cosmic_latte
1•_caw•8m ago•1 comments

'Breaking Bad' Became the Best Show of the 21st Century [video]

https://www.youtube.com/watch?v=55iwZR_xCDQ
1•handfuloflight•13m ago•0 comments

A glimpse into life inside a child prison in France

https://www.theguardian.com/global-development/2026/sep/28/i-sleep-with-all-my-clothes-on-to-prot...
1•sandebert•15m ago•0 comments

Flowlight – open-source network visibility for AI agents on macOS

https://flowlight.xinbetween.com/
1•blessdyb•17m ago•1 comments

Fframes – GPU first video vibe coding framework with 5 years histroy

https://fframes.studio/
1•neogoose•18m ago•0 comments

Foundations of Large Language Models

https://arxiv.org/abs/2501.09223
1•rramadass•20m ago•1 comments

Turning Failure Postmortems into SRE-Benchmark Problems

https://www.sregym.com/blog/postmortems-to-sre-benchmarks
1•matt_d•23m ago•0 comments

Looking for Things to Do in Bangalore?

https://www.tumblr.com/breakout310/825892924988522496/looking-for-exciting-things-to-do-in-bangalore
1•breakoutescaper•33m ago•0 comments

SpaceX – Starship Flight 14

https://www.spacex.com/launches/starship-flight-14
3•duck•36m ago•1 comments

War Bros Didn't Always Rule Silicon Valley

https://www.wired.com/story/war-bros-didnt-always-rule-silicon-valley/
2•sgustard•46m ago•0 comments

Decentralized P2P app with you in the center of a WebTorrent Venn Diagram

https://bubblebased.com/bubbles/global
1•bc3mc2•51m ago•1 comments

Ukraine's new military AI does more than watch the battlefield–it helps commande

https://euromaidanpress.com/2026/09/25/ukraines-new-military-ai-does-more-than-watch-the-battlefi...
2•snarky-comments•51m ago•0 comments

Open-source AnyPS5 dumps emulation to run PS5 games natively on PC

https://www.tomshardware.com/video-games/playstation/open-source-anyps5-dumps-emulation-to-run-pl...
2•sbulaev•57m ago•0 comments

SevenDB: Reactive yet Scalable

https://github.com/sevenDatabase/SevenDB
1•shashanksati11•58m ago•0 comments

World United Blastoff

1•James_Random_Ha•1h ago•0 comments

Stop Asking "Saga or 2PC." Start Asking What Each Operation Needs

https://medium.com/scalar-engineering/stop-asking-saga-or-2pc-start-asking-what-each-operation-ne...
1•feeblefakie•1h ago•0 comments

Australia's Waratah Super Battery Now Operating at Full Capacity

https://www.bloomberg.com/news/articles/2026-09-28/waratah-super-battery-australia-s-most-powerfu...
2•toomuchtodo•1h ago•1 comments

How the stories about all-powerful AI are swallowing the world

https://www.bloodinthemachine.com/p/how-the-stories-about-all-powerful
2•eustoria•1h ago•0 comments

Comics RSS: RSS feeds of comics

https://www.comicsrss.com/
2•eustoria•1h ago•0 comments

Ask HN: Do you think AI agents can escape human control?

3•automaticallyfl•1h ago•3 comments

OpenAI pauses training of latest models

https://www.nbcnews.com/tech/tech-news/openai-pauses-training-latest-models-agents-searched-us-go...
2•geoffbp•1h ago•1 comments

What a black bear is: 30 claims, checked against primary sources

https://pub-a941bfd863a24f91a60e6c4979c18a84.r2.dev/pi-sandbox-uploads/343507889626812416/2026-09...
1•oricvandson•1h ago•0 comments

What Happened to the Coronagraph?

https://blogs.esa.int/proba-3/2026/03/19/what-happened-to-the-coronagraph/
2•bryanrasmussen•1h ago•1 comments

Australia Senate Requests OpenAI, Anthropic CEOs Face AI Inquiry

https://www.bloomberg.com/news/articles/2026-09-27/australia-senate-requests-openai-anthropic-ceo...
4•oxag3n•1h ago•0 comments

Thinking Fast and Slow in AI: The Role of Metacognition

https://arxiv.org/abs/2110.01834
25•teleforce•1h ago•2 comments