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?

San Francisco supervisors balk at 362-page, AI-assisted city code rewrite

https://missionlocal.org/2026/06/s-f-supervisors-balk-at-362-page-city-code-rewrite/
1•tastyface•2m ago•0 comments

Show HN: Agentic OS – the operating system for AI agents

https://aos.injecting.ai/
1•nickpismenkov•8m ago•0 comments

My Mac's Wi-Fi Was Crawling at 50 Mbps with a Perfect Signal

https://bugmedaily.substack.com/p/my-macs-wi-fi-was-crawling-at-50
1•enesunal•12m ago•0 comments

An opinionated (and mainly correct) guide to naming

https://adamtornhill.substack.com/p/an-opinionated-and-mainly-correct
2•gmays•15m ago•0 comments

Serving Local AI on My Jetson Through Durable Streams

https://s2.dev/blog/local-ai
1•shikhar•17m ago•0 comments

US lifts curbs on Anthropic's Fable, Mythos AI models

https://www.reuters.com/business/us-lift-export-controls-anthropics-fable-ai-model-tuesday-source...
2•lossolo•18m ago•1 comments

Anthropic launches Claude Science: an AI workbench for scientists (2026)

https://lucasaguiar.xyz/pt/posts/claude-science-ai-workbench-cientistas-2026/
2•isfttr•19m ago•0 comments

Discretizing Reward Models

https://arxiv.org/abs/2606.21795
1•gmays•23m ago•0 comments

Exploring The Spectrum -Dr. John Ott documentary on the health effects of light [video]

https://www.youtube.com/watch?v=BOUA8UAEAdY
1•Eaglo•26m ago•0 comments

Guardians of the Agents Formal verification of AI workflows. (Dec 2025)

https://cacm.acm.org/practice/guardians-of-the-agents/
1•steilpass•28m ago•0 comments

Oʻahu Needs More Solar, Not New Power Plants

https://civilbeat.org/2026/06/oahu-needs-more-solar-not-new-power-plants/
1•toomuchtodo•29m ago•1 comments

WhiteHouse lifts export control on Anthropic that froze its most advanced models

https://www.cnn.com/2026/06/30/tech/anthropic-export-control-ban-lifted-white-house
3•dstala•31m ago•2 comments

The Future of Software Engineering Is Here but Not Evenly Distributed (Updated)

https://twitter.com/jmugan/status/2065962078322438524
1•jmugan•36m ago•0 comments

Taiwan raids Super Micro in widening China chip smuggling probe

https://www.japantimes.co.jp/business/2026/06/30/taiwan-super-micro-china-chip-smuggling/
5•billybuckwheat•43m ago•0 comments

White House picks Avi Loeb with polarizing alien theories to lead UFO council

https://www.pbs.org/newshour/politics/white-house-picks-harvard-professor-with-polarizing-alien-t...
6•ceejayoz•48m ago•1 comments

The President Made More Than $1Billon in Crypto Deals

https://www.wsj.com/politics/policy/trump-made-more-than-1-billion-on-crypto-deals-part-of-2025-w...
3•fortran77•49m ago•1 comments

A Fusion First: Realta Demos Direct Energy Conversion

https://realtafusion.com/fusion-first-realta-demos-direct-energy-conversion/
1•sien•50m ago•0 comments

Show HN: Explore Ethereum by the Shape of a Transaction

https://www.chaingenius.ai
2•spennant•52m ago•0 comments

Faster Gemma 4 on MLX with multi-token prediction

https://ollama.com/blog/faster-gemma-4-mlx-mtp
2•ilreb•54m ago•0 comments

Why Jet Engines Aren't "Made in China"

https://aakash.substack.com/p/why-jet-engines-arent-made-in-china
3•paulpauper•54m ago•0 comments

Scott Alexander as a modern-day Edmund Wilson

https://statmodeling.stat.columbia.edu/2026/06/07/scott-alexander-as-a-modern-day-edmund-wilson/
3•paulpauper•54m ago•0 comments

Frame Error

https://linch.substack.com/p/frame-error
2•paulpauper•55m ago•0 comments

Wikipedia: Deleted Articles with Freaky Titles

https://en.wikipedia.org/wiki/Wikipedia:Deleted_articles_with_freaky_titles
3•surprisetalk•55m ago•1 comments

Tor’s Arti 2.5.0 Released: Stable Counter Galois Onion

https://blog.torproject.org/arti_2_5_0_released/
3•iamnothere•56m ago•3 comments

Llmaker – spin up a working LLM app from a single prompt, right in your terminal

https://github.com/raiyanyahya/llmaker
3•sleepynoodle•56m ago•0 comments

The Threat of Residential Proxies

https://www.feistyduck.com/newsletter/issue_138_the_threat_of_residential_proxies
2•matheusmoreira•59m ago•0 comments

JWST spots mature galaxy cluster, redefining "cosmic noon."

https://www.eurekalert.org/news-releases/1132818
1•croes•1h ago•1 comments

China's Great Green Wall: 66B trees growing faster than natural forests

https://www.livescience.com/planet-earth/plants/trees-in-chinas-great-green-wall-appear-to-grow-f...
6•simonpure•1h ago•0 comments

The Green Metrics Tool

https://metrics.green-coding.io
1•dijksterhuis•1h ago•1 comments

A new AIs-heading technique to track grain smuggling

https://www.bellingcat.com/news/2026/06/12/shadow-fleet-russian-grain-stolen-ukraine-libya-ais-te...
1•Jimmc414•1h ago•0 comments