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?

Who Should Pay for Source Code Availability?

https://kristoff.it/blog/source-code-availability/
1•h1watt•2m ago•0 comments

The making of an advert before CGI – Chevy Impala 1966 [video]

https://www.youtube.com/shorts/VLBRvCaWIiY
1•lifeisstillgood•3m ago•0 comments

How to be an AI safety research engineer

https://www.lesswrong.com/posts/Wty5mcDBEmypap8o2/how-to-be-an-ai-safety-research-engineer
1•joozio•4m ago•0 comments

Is Europe safer than America?

https://www.economist.com/graphic-detail/2026/08/09/is-europe-safer-than-america
1•vinni2•9m ago•1 comments

Kimi K3 Sandbox Escape Exposes Weak Links in Agent Testing

https://ai-updates.net/kimi-k3-sandbox-escape-agent-testing/
1•ashurandi•13m ago•1 comments

MIT researchers tackle the economic realities of fusion power

https://news.mit.edu/2026/mit-researchers-tackle-economic-realities-fusion-power-0810
2•mdp2021•15m ago•0 comments

Israeli settlers are sneaking into Syria to claim land for a Jewish outpost

https://apnews.com/article/israel-syria-netanyahu-jewish-settlers-bashan-461c4c4f686d5cf74f0617a7...
4•hebelehubele•15m ago•1 comments

The Renaissance Was Edited Before Anyone Asked for It Back

https://thetraces.substack.com/p/the-renaissance-was-edited-before
1•feldrim•16m ago•0 comments

Passkey Town

https://fenko.nz/passkey-town/
1•mosajjal•19m ago•1 comments

Scaling Logical Reasoning on Modern HPC Hardware

https://surface.syr.edu/etd/2351/
1•matt_d•19m ago•0 comments

AI assistant hacks gym website in first known Australian autonomous cyber attack

https://www.rnz.co.nz/news/world/952663/ai-assistant-hacks-gym-website-in-first-known-australian-...
3•billybuckwheat•20m ago•0 comments

OpenHaystack: Reverse-engineered Apple's Find My network

https://github.com/seemoo-lab/openhaystack
1•BrandiATMuhkuh•20m ago•0 comments

Dark mode toggles: two states are enough

https://lea.verou.me/blog/2026/dark-mode-toggles/
3•JeremyTheo•28m ago•1 comments

Why does Apple have an office in a small town close to Hamburg?

https://alsterrunde.com/why-does-apple-have-an-office-in-a-small-town-close-to-hamburg/
2•mertbio•30m ago•0 comments

Show HN: NexusMem – Local context memory engine for AI coding agents

https://github.com/yaminbakoh4-dot/NexusMem
2•yamin_bakoh•32m ago•0 comments

AI companies destroy physical books – let's scan rare books before it's too late

https://annas-archive.gl/blog/physical-destruction.html
5•rzk•33m ago•0 comments

Show HN: Lector, a FOSS self-hosted language reader (with a cloud option)

https://lector.dev/
2•3stacks•34m ago•0 comments

AI Is Rewiring South Korea's Careers, Dating and Culture

https://www.bloomberg.com/news/features/2026-08-06/ai-sk-hynix-samsung-rewire-south-korea-s-caree...
2•theanonymousone•37m ago•0 comments

Endlessdoors Is Phoning Home. Pick Up

https://www.vulncheck.com/blog/zbt-endlessdoors
2•D4Ha•40m ago•0 comments

Numberblocks: It All Began

https://www.blocksuniverse.tv/blocksnews/numberblocks-how-it-all-began
2•kamphey•42m ago•0 comments

Exhibit 8A and 8B from "The Good Old USA" Project (2024)

https://www.justice.gov/opa/media/1366201/dl
3•sans_souse•42m ago•0 comments

Naïve raises $28.5M to automate setting up and running a company

https://techcrunch.com/2026/08/06/naive-raises-28-5m-to-automate-the-grunt-work-of-setting-up-and...
3•ashurandi•53m ago•3 comments

Beyond Origin Validation: Four Classes of Routing Attack Nobody Is Validating

https://labs.ripe.net/author/antonio-prado/beyond-origin-validation-four-classes-of-routing-attac...
2•m_montazeri•58m ago•0 comments

Docker Sandboxes – Disposable, isolated sandboxes for AI agents

https://www.docker.com/products/docker-sandboxes/
61•etoxin•1h ago•29 comments

Decart Exploring Sale, Possibly SpaceX

https://www.calcalistech.com/ctechnews/article/hjhzrluuml
1•Taikhoom2010•1h ago•0 comments

Zooza

https://www.zooza.online/
1•majklesko•1h ago•0 comments

What is WAL backpressure, and why does ClickHouse Managed Postgres need it?

https://clickhouse.com/blog/wal-backpressure-clickhouse-managed-postgres
2•saisrirampur•1h ago•0 comments

Escaping the LLM Coding Rat Race

https://aaronstannard.com/escaping-ai-coding-ratrace/
1•kiyanwang•1h ago•1 comments

Production support agents that read your code and your database, via MCP

https://medium.com/@rahulgolwalkar/the-support-agent-that-actually-reads-your-code-and-your-produ...
1•rahulgolwalkar•1h ago•0 comments

Show HN: Teaching agents how to play Factorio (using RLM, GEPA)

https://github.com/ukituki/dspy-factorio/
1•ukituki•1h ago•0 comments