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?

Show HN: Find introduction path between you and someone you want to reach

https://reloadium.com/reloadium-contacts/
1•julienreszka•1m ago•0 comments

AI Surveillance and Social Progress

https://www.schneier.com/blog/archives/2026/07/ai-surveillance-and-social-progress.html
1•ahamez•2m ago•0 comments

Jelly Trim ReviEwS (2026): We Tried It My Honest Review

https://gamma.app/embed/Jelly-Trim-ReviEwS-2026-We-Tried-It-My-Honest-Review-53eqnkqqiyo7hbs
1•nahqsakr•2m ago•0 comments

An Ex‑Apple Designer Built an EV with No Doors and a Top Speed of 40 MPH

https://www.inc.com/connor-jewiss/an-ex-apple-designer-built-an-ev-with-no-doors-and-a-top-speed-...
1•connorjewiss•6m ago•0 comments

Trident – macOS menu-bar utility that remaps trackpad gestures

https://github.com/cyanyux/trident
1•cyanyux•7m ago•0 comments

Show HN: Python SDK for signing digital content with revocable signatures

https://github.com/lyfeninja/lyfeninja_blkseal_python_sdk
1•lyfeninja•11m ago•0 comments

Karpathy LLM Wiki (Obsidian Plugin)

https://llmwiki.greenerai.top/
1•rahimnathwani•15m ago•0 comments

OptiAir Portable Cooler ReviEwS (July 2026): We Tried It My Honest Review

https://gamma.app/embed/OptiAir-Portable-Cooler-ReviEwS-July-2026-We-Tried-It-My-Honest-R-llbyvuc...
2•gaxyjaik•15m ago•0 comments

World-War-Ⅱ-era telephone line still in use in Upper Tanana Valley Alaska (2021)

https://www.sketchesofalaska.com/2021/03/world-war-ii-era-telephone-line-still.html
1•Lammy•16m ago•1 comments

Who cleans up after the vibe-coding party?

https://www.ft.com/content/cec8df9e-b43b-4cd1-8feb-c07e804e8d33
2•msephton•17m ago•1 comments

Page Weight Matters

https://nh3.dev/blog/05-bloat
1•birdculture•17m ago•1 comments

Soofi: European sovereign LLM trained in 2 months

https://huggingface.co/spaces/Soofi-Project/Pretraining-Tech-Report
3•hibijibies•20m ago•1 comments

Show HN: Directed Contexts – repo-owned instruction modules for coding agents

https://github.com/TGPSKI/directed-contexts
1•tgpski•20m ago•0 comments

pgrust passes 100% of the Postgres regression tests

https://malisper.me/pgrust-passes-100-of-postgresqls-regression-tests/
15•tosh•21m ago•3 comments

Erexafil ReviEwS (July 2026): We Tried It My Honest Review

https://gamma.app/embed/Erexafil-ReviEwS-July-2026-We-Tried-It-My-Honest-Review-qdrcohhldd0lfot
1•gaxyjamq•25m ago•0 comments

What's in the Housing Bill That Just Became Law

https://www.nytimes.com/2026/07/11/business/economy/housing-bill-affordability.html
2•JumpCrisscross•27m ago•0 comments

Claude Code weekly limits will be lower from Jul 13th

https://old.reddit.com/r/ClaudeAI/comments/1tc9oa0/claude_code_weekly_limits_are_increasing_50_now/
2•freely0085•27m ago•3 comments

As better chatbots get harder to build, AI turns to simulated worlds

https://www.science.org/content/article/better-chatbots-get-harder-build-ai-turns-simulated-worlds
2•pseudolus•31m ago•0 comments

The Download: worms fight pollution, and geoengineering faces reality

https://www.technologyreview.com/2026/07/08/1140216/the-download-worms-manure-pollution-geoengine...
1•joozio•33m ago•0 comments

Ask HN: Why does YouTube make me scroll down to select English

2•msuniverse2026•34m ago•0 comments

Octochains – a Python framework for parallel, isolated multi-agent reasoning

https://github.com/ahmadvh/octochains
1•ahmadvarasteh•34m ago•0 comments

Show HN: My AI agent has 9 hours left to win a public bet – live dashboard

https://1h-money.vercel.app/finale.html
1•parweb•36m ago•0 comments

The Earth Is Coated in Supernova Dust

https://www.thequantumcat.space/p/why-is-the-earth-coated-in-the-dust
1•verzali•36m ago•0 comments

High court rejects most of 'dieselgate' claims brought by 1.6M UK car owners

https://www.theguardian.com/business/2026/jul/10/high-court-rejects-most-of-dieselgate-claims-bro...
1•sscaryterry•36m ago•1 comments

GhostCommit – Convention-File Steganographic Exfiltration (Attack PoC)

https://github.com/asset-group/ghostcommit
1•speckx•38m ago•0 comments

Engineering Peace

https://asteriskmag.com/issues/14/engineering-peace
1•jkly•43m ago•0 comments

The Letter H and a List–How I Connected the Stories in My Memoir

https://brevity.wordpress.com/2026/07/08/the-letter-h-and-a-list/
2•JumpCrisscross•44m ago•0 comments

Your code is fast – if you're lucky

https://tiki.li/blog/lucky_code.html
2•chrka•45m ago•0 comments

Show HN: Colyap – AI friend you can call and text

https://www.colyap.com/
3•piyussh•46m ago•1 comments

WellaCooler ReviEwS (2026): We Tried It My Honest Review

https://gamma.app/embed/WellaCooler-ReviEwS-2026-We-Tried-It-My-Honest-Review-q2joj1931fy6v59
1•Gafyhang•48m ago•0 comments