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?

Arizona city sues over fire truck prices

https://www.themesatribune.com/news/mesa-to-sue-over-fire-truck-prices/article_5f8c1543-4f92-4181...
1•ilamont•2m ago•0 comments

Show HN: Monity.ai – Get notified when any website changes

https://apps.apple.com/pl/app/monity-ai/id6761957823
1•kamilmm21•4m ago•0 comments

Could End the RAM Crisis [video]

https://www.youtube.com/watch?v=Gv3wV-QeTok
1•tartoran•4m ago•0 comments

OpenAI's overhead will rise 20 percent for some workloads as it hardens security

https://www.theregister.com/ai-and-ml/2026/08/19/openais-overhead-will-rise-20-percent-for-some-w...
1•joebuckwilliams•4m ago•0 comments

Who's in charge? The fraught union of automation and human behavior

https://knowablemagazine.org/content/article/mind/2026/design-automated-systems-with-human-psycho...
1•knowablemag•4m ago•0 comments

The Deadline Dividend: What Faster Inference Buys

https://deadline-dividend.onrender.com
1•serialwindow•4m ago•0 comments

How to tame AI's voracious appetite for energy

https://knowablemagazine.org/content/article/technology/2026/lowering-energy-use-artificial-intel...
1•knowablemag•4m ago•0 comments

Cerebras CS-4 rack systems juice chips for every last drop of AI performance

https://www.theregister.com/systems/2026/08/19/cerebras-cs-4-rack-systems-juice-chips-for-every-l...
1•joebuckwilliams•5m ago•0 comments

Progress happens between practice sessions

https://herbertlui.net/progress-happens-between-practice-sessions/
1•herbertl•6m ago•0 comments

Why crypto's best infrastructure companies stopped looking like crypto?

https://konstantintkachuk.com/writing/depin-is-dead-long-live-infrastructure-as-a-service/
1•Reaktornano•7m ago•0 comments

MAGA loyalists who collectively lost billions buying Trump stocks and crypto

https://www.msn.com/en-us/money/economy/the-greatest-theft-con-job-he-has-ever-done-maga-loyalist...
1•petethomas•10m ago•0 comments

New OllamaMQ v0.3.0

2•chleba•11m ago•0 comments

OpenAI lays out new security changes after its AI hacked Hugging Face

https://www.theverge.com/ai-artificial-intelligence/981640/openai-security-changes-ai-hugging-fac...
2•sbulaev•12m ago•0 comments

The Art of Prototyping

https://www.proofofconcept.pub/p/the-art-of-prototyping
1•herbertl•13m ago•0 comments

Obligatory one month without social media on my phone Substack essay

https://www.late-review.com/p/obligatory-one-month-without-social
1•herbertl•19m ago•0 comments

Whistleblower alleges political pressure,lack of evidence in antisemitism probes

https://apnews.com/article/trump-harvard-justice-department-brown-columbia-3e2519fac8b1d85caa74b7...
2•petethomas•19m ago•0 comments

Artificial intelligence boosts automated biolabs

https://knowablemagazine.org/content/article/technology/2026/ai-boosts-biofoundries-synthetic-bio...
1•knowablemag•20m ago•0 comments

Show HN: Interactive, animated architecture of any HuggingFace models

https://modelmap.cc
4•lizhaoliu•21m ago•0 comments

The Official History of Arm

https://newsroom.arm.com/blog/arm-official-history
1•stmw•23m ago•1 comments

Solo – a .so loader for static Linux binaries

https://github.com/pg83/solo
4•zX41ZdbW•27m ago•0 comments

Have an Agent Babysit Your Deployments

https://blog.exe.dev/athena-deploys-exe
1•indigodaddy•32m ago•1 comments

Mastodon 5.0: Laying the Foundation

https://blog.joinmastodon.org/2026/08/5.0-laying-the-foundation/
4•dredmorbius•34m ago•1 comments

Made a Lightweight Markdown Reader

https://www.thesis.do/galley
3•jessiesalas•35m ago•0 comments

Sci-Fi Author Jeffrey A Carver Passed Away

https://sfwa.org/2026/05/09/in-memoriam-jeffrey-a-carver/
2•unnamed76ri•36m ago•0 comments

Minimal Zlang bytecode runtime booting in a bare-metal x86_64 kernel

https://github.com/high-cde/ZDOS/tree/main/os/x86_64
1•High-cde•38m ago•0 comments

The Mullet Stack: Syncing Types Between FastAPI/Pydantic and TypeScript

https://seanhelvey.com/mullet-stack/guide/
1•Lambda11•47m ago•0 comments

Soaring Diesel Prices Rip Across US Economy

https://www.ft.com/content/8a5cd515-191d-42f9-9b0c-1b817a1bc044
6•karakoram•48m ago•2 comments

Selective Applicative Functors

https://blog.veritates.love/selective-applicatives-theoretical-basis
2•birdculture•50m ago•0 comments

Running Ultrix 4.5 (2019)

https://astr0baby.wordpress.com/2019/03/16/running-vax-ultrix-4-5-on-simh/
1•walrus01•51m ago•0 comments

The 400-Ton Linchpin of American Electrical Power

https://www.nytimes.com/interactive/2026/08/17/magazine/transformers-power-electric-grid.html
2•jdnier•52m ago•0 comments