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?

Ask HN: How zero-server apps sync keys and chat history securely across devices?

1•Brandon-Coll•41s ago•0 comments

The existence of the square root of two

https://www.dpmms.cam.ac.uk/~wtg10/roottwo.html
1•pykello•49s ago•0 comments

Kodak invented digital photography in 1975 and still couldn't survive it [video]

https://www.youtube.com/watch?v=c_N-ZI6aGhA
1•adhikaribipin•1m ago•0 comments

Does this website look vibe coded?

https://platform.stridee.fit
1•alvaromolina0•2m ago•0 comments

How much would value the domain 'cmdk.ai' and 'commandk.ai'

1•hpragdish•6m ago•0 comments

Checkout this coding harness that compiles codebase. 78% SWE-Bench (DS v4flash)

https://benzi.fly.dev/
2•sessionking•7m ago•2 comments

AI code where are the pitfalls?

1•ffgffffddxxxx•8m ago•0 comments

Os8088.com: IBM XT OS now has a Browser, CP/M 2.2 with Z80 core and MS Word 1.1a

https://os8088.com/spotlight/
2•jggonz•8m ago•1 comments

AI generated code is it any good?

https://discuss.google.dev/t/trusted-automation-with-google-antigravity-scaling-secure-finance-in...
1•ffgffffddxxxx•8m ago•1 comments

Apple Compared My Neurodivergent Disability Adjustments to Dog-Sitting: VisionOS

https://edgecaseexistence.com/articles/apple-dogsitting/
2•xr-rnd•10m ago•0 comments

Did OpenAI's AI hack Hugging Face? An evidence audit

https://speedyweedyops.org/did-openai-ai-hack-hugging-face/
1•igovnow•10m ago•0 comments

The AI Boom Is About to Make Cars More Expensive

https://www.theatlantic.com/technology/2026/08/car-prices-memory-ram-ai/688329/
1•littlexsparkee•11m ago•2 comments

Firefly Aerospace to fly Zeno Power radioisotope heater on lunar lander mission

https://spacenews.com/firefly-aerospace-to-fly-zeno-power-radioisotope-heating-unit-on-lunar-land...
2•rbanffy•11m ago•0 comments

Astronomers detect fastest known star in Milky Way

https://www.theguardian.com/science/2026/aug/19/astronomers-detect-fastest-known-star-in-milky-wa...
1•wslh•14m ago•0 comments

I Became a Pediatrician Because I Wanted to Be a Good Adult

https://drped.substack.com/p/i-became-a-pediatrician-because-i
8•jamarna•16m ago•1 comments

Show HN: ComputeFence – preflight checks for rented GPU training jobs

https://github.com/Francisco-Booth/ComputeFence
1•Exolio_AI•17m ago•0 comments

AI-generated writing: it's still bad

https://greyenlightenment.com/2026/08/18/ai-generated-writing-its-still-bad/
4•paulpauper•17m ago•1 comments

AI is less likely to launch a nuclear strike when it reasons in Japanese

https://www.unite.ai/ai-is-less-likely-to-launch-a-nuclear-strike-when-it-reasons-in-japanese/
2•50kIters•17m ago•0 comments

Every Steam Frame Official Video Leaked [video]

https://www.youtube.com/watch?v=PpMgjtQhVsI
1•LelouBil•17m ago•0 comments

OpenAI's Unraveling Has Begun

https://garymarcus.substack.com/p/breaking-openais-unraveling-has-begun
10•7777777phil•19m ago•1 comments

Show HN: I forked an agent stack and measured myself against it, losses included

https://toolbay.ai/stack
1•orion232•20m ago•0 comments

I am so against volunteering in academia (ecology-edition)

https://statmodeling.stat.columbia.edu/2026/08/19/why-i-am-so-against-volunteering-in-academia-ec...
3•Tomte•21m ago•0 comments

Ask HN: If you write release notes, what stops you from being specific?

1•gtirloni•22m ago•0 comments

Taurus: Building a live guitar pedalboard from AudioUnit plugins on Mac and iPad [video]

https://www.youtube.com/watch?v=CpU4yg9-E9Y
1•arbayi•25m ago•0 comments

The learned helplessness epidemic of the AI era

https://substack.com/sign-in
1•ronniebasak•27m ago•0 comments

Everything at the CLI

1•rmn_tnc•28m ago•3 comments

Qector: Bringing a 15-back end Rust quantum decoder to Claude Desktop

https://github.com/GuillaumeLessard/qector-claude-plugin
1•QECTOR•29m ago•0 comments

The Meaning of the $20 Burrito That's Tearing MAGA Apart

https://www.nytimes.com/2026/08/17/opinion/inflation-affordability-prices-burrito.html
7•whack•31m ago•0 comments

How You Build a 4.9-Star Web App (and Where You're Wrong About PWA) [video]

https://www.youtube.com/watch?v=8d4cMxSyrlc
1•da02•31m ago•0 comments

U.S. government debt passes $40T, more than doubling in a decade

https://www.cnbc.com/2026/08/19/us-government-debt-passes-40-trillion-mark-for-the-first-time.html
9•mfiguiere•31m ago•1 comments