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?

CEO of Mistral: AI is software. It can be controlled

https://www.lemonde.fr/en/economy/article/2026/09/24/arthur-mensch-ceo-of-french-start-up-mistral...
1•thibaut_barrere•6m ago•1 comments

The Discovery Tax: Why Coding Agents Waste 2,500 Tokens Before Writing Code

https://blog.jarv.dev/the-discovery-tax
2•runtooldev•10m ago•0 comments

Google's orbital AI data center test packs four TPUs and 1,000W of solar power

https://www.tomshardware.com/tech-industry/data-centers/google-is-blasting-an-experimental-ai-dat...
2•pseudolus•10m ago•0 comments

How to Freelance Now?

2•Alexadar•11m ago•0 comments

Typed-lm: a Rust jev open source alternative

https://github.com/neurono-ml/typed-lm
2•andrelgcclaudin•14m ago•2 comments

LaserActive

https://en.wikipedia.org/wiki/LaserActive
2•tosh•14m ago•0 comments

Catching Rogue Agents in Real Time with Synchronous Control Monitoring

https://max.ax/writing/synchronous-control-monitoring/
2•k5hp•16m ago•0 comments

Enabling the next-generation trait solver on nightly

https://blog.rust-lang.org/2026/08/21/enabling-next-solver-on-nightly/
2•bucket2015•18m ago•0 comments

What Does Your Data Reveal About Sports Betting Apps? Help ProPublica Find Out

https://projects.propublica.org/sports-betting-uploader/
1•beatrixlockwood•18m ago•0 comments

Gameboy Macro (2016)

https://www.instructables.com/Gameboy-Macro/
1•tosh•19m ago•0 comments

Maze Toys

https://maze.toys
1•momentmaker•20m ago•0 comments

In Silicon Valley, the End of Humanity Has Always Been Part of the Plan

https://gizmodo.com/in-silicon-valley-the-end-of-humanity-has-always-been-part-of-the-plan-200081...
1•poopcat•20m ago•0 comments

How to Feel Good

https://evanjconrad.com/posts/how-to-feel-good
1•momentmaker•20m ago•0 comments

Many surgical interventions are little better than placebo

https://www.economist.com/science-and-technology/2026/09/23/many-surgical-interventions-are-littl...
1•sohkamyung•25m ago•0 comments

The computer hacker who tried to take down Man City

https://www.bbc.co.uk/sport/football/articles/cwywld5v28jo
1•birdmania•28m ago•1 comments

The use of humor in depression: An integration of benefits and risks

https://www.sciencedirect.com/science/article/pii/S0272735826000905?via%3Dihub
1•bookofjoe•29m ago•0 comments

JuhRadial MX: Linux control for MX devices and generic

https://github.com/JuhLabs/juhradial-mx
1•JuhLabs•30m ago•0 comments

Show HN: Docspira – JSON/YAML/regex tools that never leave the browser

https://docspira.com/
1•Mortivox•31m ago•0 comments

OpenAI says its AI agents posted user images online in error

https://techxplore.com/news/2026-09-openai-ai-agents-user-images.html
1•geox•32m ago•0 comments

New species of parasitic wasp discovered in Assam's Dibru-Saikhowa National Park

https://researchmatters.in/news/new-first-of-its-kind-species-of-parasitic-wasp-discovered-in-ass...
1•thunderbong•32m ago•0 comments

Harari vs. Henrich: What science says about human evolution

https://josephheath.substack.com/p/harari-vs-henrich
1•Ariarule•36m ago•0 comments

No errors, no warnings, no gods, no masters – HTML Purity is a Fetish

https://shkspr.mobi/blog/2026/09/no-errors-no-warnings-no-gods-no-masters-html-purity-is-a-fetish/
1•edent•38m ago•0 comments

That About Wraps It Up for Stock Mac UI

https://inessential.com/2026/09/22/that-about-wraps-it-up-for.html
1•JumpCrisscross•39m ago•0 comments

Show HN: Blue Lock Farm – a Roblox wiki, database and tools

https://bluelockfarm.com/
1•richardharmer•40m ago•0 comments

Chinese AI models surge in global popularity – and Washington is worried

https://www.cnbc.com/2026/09/26/china-ai-global-adoption.html
1•pseudolus•46m ago•0 comments

The Americans Having the Most Sex

https://www.theatlantic.com/ideas/2026/09/religion-sex-recession-marriage/688774/
1•metanoia_•48m ago•1 comments

Show HN: Asụsụ Ọma, a free app for learning Igbo with native-speaker audio

https://asusuoma.com
1•ebenezerdon•53m ago•0 comments

The Cost of Blue Light: Multiorgan Pathology Induced by LED Exposure

https://www.biorxiv.org/content/10.64898/2026.09.11.750850v1.full
1•bilsbie•55m ago•0 comments

OK, so where are all these data centres?

https://www.ft.com/content/4c3f75a2-c2f9-4ef7-9895-21daf5e92dfe
1•Betelbuddy•55m ago•1 comments

What and Whose Knowledge? Measuring Epistemic Diversity in Large Language Models

https://arxiv.org/abs/2510.04226
1•daniel_iversen•1h ago•0 comments