frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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?

Waymo to Deploy Robotaxi with Zeekr to Expand Public Rides

https://www.bloomberg.com/news/articles/2026-05-28/waymo-to-deploy-robotaxi-built-with-zeekr-to-e...
1•aanet•1m ago•1 comments

New Retype for Obsidian Plugin

https://retype.com/blog/2026-05-25-retype-for-obsidian/
1•geoffreymcgill•1m ago•1 comments

A company turned visas to Europe into big business

https://www.politico.eu/article/how-a-company-turned-visas-to-europe-into-big-business/
1•rustoo•2m ago•0 comments

One week later, the same AWS t3.large VM changed personalities again

https://webbynode.com/articles/one-week-later-aws-t3-large-looked-completely-different-again
1•gsgreen•2m ago•0 comments

Ask HN: What Do You Struggle With?

1•chistev•2m ago•0 comments

International Masturbation Month

https://en.wikipedia.org/wiki/International_Masturbation_Month
1•bpavuk•2m ago•0 comments

I built an Android-like OS that runs in the browser

1•haozaz•2m ago•0 comments

OpenClaw Architecture – Part 1: Control Plane, Sessions, and the Event Loop

https://theagentstack.substack.com/p/openclaw-architecture-part-1-control
1•0xchamin•3m ago•1 comments

Nuclear Space Power and Propulsion [video]

https://www.youtube.com/watch?v=fhwE8Ll4YNQ
2•rustoo•3m ago•0 comments

Real-time LLM Inference on Standard GPUs (3k tokens/s per request)

https://blog.kog.ai/real-time-llm-inference-on-standard-gpus-3-000-tokens-s-per-request/
4•morgangiraud•6m ago•0 comments

Deep Tech Companies Are Built Different

https://www.codingvc.com/p/deep-tech-companies-are-built-different
1•mahirsaid•6m ago•0 comments

The Download: climate tech goes public and the AI Hype Index returns

https://www.technologyreview.com/2026/05/28/1138085/the-download-climate-tech-ipos-ai-hype-index/
1•joozio•7m ago•0 comments

Leibniz's Explanation of binary arithmetic (1703)

https://www.leibniz-translations.com/binary
2•aragonite•11m ago•0 comments

What the Pope said about AI

https://www.newyorker.com/news/the-lede/what-pope-leo-xiv-said-about-ai
1•FinnLobsien•13m ago•0 comments

Cities Are Covering Flock Cameras with Trash Bags

https://www.404media.co/cities-are-covering-flock-cameras-with-trash-bags/
3•droidjj•15m ago•0 comments

The AI Productivity Trap

https://www.wespiser.com/posts/2026-05-28-ai-productivity-trap.html
1•wespiser_2018•15m ago•1 comments

Linux is a dumpster fire – somebody call the fire department

https://tuomov.medium.com/linux-is-a-dumpster-fire-7e67d1f85a19
1•alekq•15m ago•0 comments

Tame your pesky little scripts

https://hamatti.org/posts/tame-your-pesky-little-scripts/
1•speckx•15m ago•0 comments

Large Language Models in Software Security Analysis

https://cacm.acm.org/research/large-language-models-in-software-security-analysis/
1•yarapavan•16m ago•0 comments

Dynamic Workflows in Claude Code

https://claude.com/blog/introducing-dynamic-workflows-in-claude-code
6•mil22•17m ago•1 comments

Un asistente de IA que termina tareas reales en tu ordenador

1•dash_ai•18m ago•0 comments

Claude Opus 4.8

https://www.anthropic.com/news/claude-opus-4-8
192•craigmart•20m ago•88 comments

Beyond the Prompt: Claude Code

https://arps18.github.io/posts/claude-code-mastery/p
1•Sandman•20m ago•0 comments

Show HN: Timelocked – local, offline timed-release file encryption

https://www.timelocked.app/
1•caltanjun•20m ago•0 comments

Tracing HTTP Requests with Go's net/HTTP/httptrace

https://blainsmith.com/articles/httptrace-with-go/
1•speckx•23m ago•0 comments

Tuning LLVM's SLP Vectorizer Cost Model

https://blog.kaving.me/blog/tuning-llvms-slp-vectorizer-cost-model/
2•matt_d•25m ago•0 comments

The Agent Trust Stack: A Layered Framework

https://www.citizenofthecloud.com/blog/agent-trust-stack-layered-framework
2•williamk101•25m ago•0 comments

Trivial Pursuits

https://www.lrb.co.uk/the-paper/v48/n10/david-runciman/trivial-pursuits
3•diodorus•26m ago•0 comments

US and Iranian negotiators reach tentative deal to launch nuclear talks

https://apnews.com/article/iran-us-war-oil-may-28-2026-8f5ed2813ba63df7ae9ccbe991688d29
2•geox•27m ago•0 comments

Chatbots' Downward Spiral

https://cacm.acm.org/news/chatbots-downward-spiral/
3•yarapavan•27m ago•0 comments