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?

Final run for the current LHC accelerator (but more to come)

https://www.nikhef.nl/en/news/final-run-for-the-current-lhc-accelerator-but-more-to-come/
2•elashri•5m ago•0 comments

Have politics come for the National Academies of Science?

https://arstechnica.com/science/2026/06/have-politics-finally-come-for-the-national-academies-of-...
1•rbanffy•7m ago•0 comments

Hacking Salesforce Sites with an LLM Agent

https://www.reco.ai/blog/hacking-salesforce-sites-with-an-llm-agent
1•llmacpu•11m ago•0 comments

Why the US economy keeps defying the odds

https://www.bbc.com/news/articles/cwy031el03po
1•ilreb•13m ago•0 comments

Anthropic Is Taking AI Welfare Seriously. I'm Not Sure It Knows What It's Measu

https://www.lesswrong.com/posts/gNtHHCh363xSGJyz3/anthropic-is-taking-ai-welfare-seriously-i-m-no...
2•joozio•24m ago•0 comments

I accidentally hit SOTA on agentic memory by using AI companions

https://graph.coder.company/
2•vignesh_146•25m ago•1 comments

Local Models in Mid-2026

https://coles.codes/posts/local-models-mid-2026
1•colescodes•27m ago•0 comments

Google's Pinpoint is the free research tool you should know about

https://www.fastcompany.com/91558438/googles-pinpoint-is-the-free-research-tool-you-should-know-a...
1•OutOfHere•29m ago•1 comments

Untrusted data in Linux – How Rust is going to save us

https://www.youtube.com/watch?v=Nzmj7K0FNRY
1•tux1968•30m ago•0 comments

One-click, production-like ATProto network for local development and E2E testing

https://github.com/eurosky-social/u-at-proto
1•doener•33m ago•0 comments

Levyer: The Platform. Designed for Freedom

https://levyer.com/
1•doener•34m ago•0 comments

HumanizeHub: A confidential marketplace for humanizing AI content

https://humanizehub.me
1•cocoglare•38m ago•0 comments

While Oracle Will Rake in Big Bucks on AI, Profits Are Hard to Predict

https://www.nextplatform.com/cloud/2026/06/12/while-oracle-will-rake-in-big-bucks-on-ai-profits-a...
1•rbanffy•40m ago•0 comments

Upscaling Space Quest 3 [video]

https://www.youtube.com/watch?v=Zozc1xGuO7Q
1•skibz•44m ago•0 comments

Network service termination for certain Sony Electronics products

https://www.sony.com/electronics/support/articles/00398725
2•croes•45m ago•0 comments

Sygnet – Hash any document with SHA3-512 and declare your AI usage level

https://mysygnet.com
1•Pistachero•47m ago•0 comments

Zuckerberg says Meta made 'mistakes' in AI workforce shift

https://www.reuters.com/business/metas-zuckerberg-admits-mistakes-made-ai-transformation-2026-06-12/
1•jgilias•47m ago•0 comments

Superpowers for Claude, Codex etc.

https://github.com/obra/superpowers
1•wood_spirit•48m ago•0 comments

Nockchain vs. Pearl: The Great Compute War

https://x.com/blocmates/article/2065357097353764868
1•MrBuddyCasino•51m ago•0 comments

A Rant about IPOs

https://dampedspring101.substack.com/p/ipo-rant-everybody-lies
1•rwmj•56m ago•0 comments

Trial of 12mph bike lane speed limit grinds gears of Dutch cyclists

https://www.theguardian.com/world/2026/jun/14/trial-of-12mph-bike-lane-speed-limit-grinds-gears-o...
8•defrost•1h ago•8 comments

Cursed Knowledge

https://obscura.com/cursed-knowledge/
2•Cider9986•1h ago•0 comments

An architectural blueprint to excise MS-DOS device debt (CON, NUL) from Windows

https://feedbackportal.microsoft.com/feedback/idea/dca14930-b767-f111-9b47-6045bdbd0989
1•breakthematrix•1h ago•0 comments

New Brunswick woman sues OpenAI, alleging ChatGPT led to daughter's death

https://www.cbc.ca/news/canada/new-brunswick/sue-open-ai-suicide-chat-gpt-9.7234630
1•uladzislau•1h ago•0 comments

Don't trust large context windows

https://garrit.xyz/posts/2026-05-06-dont-trust-large-context-windows
13•computersuck•1h ago•5 comments

China Is Propping Up the World Economy by Importing Less Oil

https://www.wsj.com/business/energy-oil/china-is-propping-up-the-world-economy-by-importing-a-lot...
6•PankajGhosh•1h ago•0 comments

Introduction to (Multimodal) LLM-as-a-Judge

https://yinghonglan.substack.com/p/introduction-to-multimodal-llm-as
4•rented_mule•1h ago•0 comments

Mining And refining: uranium and plutonium (2024)

https://hackaday.com/2024/04/24/mining-and-refining-uranium-and-plutonium/
2•leonidasrup•1h ago•0 comments

How an astrophysicist uses Codex to help simulate black holes

https://openai.com/index/using-codex-to-simulate-black-holes/
3•gmays•1h ago•0 comments

AI: Surgeon's Assistant or Commodity on a Meter?

https://replicated.wiki/blog/stream.html
2•gritzko•1h ago•0 comments