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?

Detection of a four-carbon sugar in interstellar space

https://www.nature.com/articles/s41550-026-02905-7
1•anyonecancode•1m ago•0 comments

US "Normalizing Unmanned Aircraft Systems Bvlos Operations" Rule Moves Closer

https://www.unmannedairspace.info/latest-news-and-information/us-normalizing-unmanned-aircraft-sy...
1•bryanrasmussen•5m ago•1 comments

Why is LinkedIn enumerating my browser extensions?

https://insertchaos.bearblog.dev/the-strange-case-of-an-attack-on-my-browser/
1•snorbleck•8m ago•0 comments

Ongoing changes to Android security patches due to AI vulnerability discovery

https://discuss.grapheneos.org/d/40286-ongoing-changes-to-android-security-patches-due-to-ai-vuln...
1•Cider9986•13m ago•0 comments

Therapists see more young patients with gambling problems. They blame Kalshi

https://laist.com/news/health/la-therapists-are-seeing-more-young-patients-with-gambling-problems...
1•geox•14m ago•0 comments

Android Developer Verifier

https://old.reddit.com/r/degoogle/comments/1uvd1of/everyone_listen/
2•cma•16m ago•0 comments

Every project should have an invariants.md

https://twitter.com/PiccoGabriele/status/2076876444760957440
2•piccogabriele•17m ago•2 comments

Is that bot a Pomeranian or a wolf – and who to sue when it 'bites'?

https://news.harvard.edu/gazette/story/2026/07/is-that-bot-a-pomeranian-or-a-wolf-and-who-to-sue-...
3•rathodravish•18m ago•0 comments

One Contract, Every Model: An Operating Standard for AI Coding Agents

https://manazir.dev/blog/operating-standard-harness
2•mnzralee•18m ago•0 comments

Show HN: Self-hosting unpruned GLM-5.2 on a 4-node DGX Spark cluster

https://github.com/XanuNetworks/GLM-5.2-QuantTrio-DCP-4x-DGX-Spark
2•deepseaOne•19m ago•0 comments

Turbopuffer vs. Manticore Search on a couple of cheap VPS

https://medium.com/@s_nikolaev/turbopuffer-vs-manticore-search-on-a-couple-of-cheap-vps-171c35fe25d9
2•snikolaev•20m ago•0 comments

Show HN: Open-source background location tracking SDK for Android and iOS

https://www.traccar.org/blog/traccar-client-sdk/
2•tananaev•21m ago•0 comments

West Memphis Three

https://en.wikipedia.org/wiki/West_Memphis_Three
2•js2•23m ago•0 comments

YouTrackDB is a general-use object-oriented graph database

https://github.com/JetBrains/youtrackdb
2•gjvc•26m ago•0 comments

Show HN:PandaClip a local mcp tool for an agents working state

https://github.com/xfloukiex-lab/pandaclip
3•VektorGeist•31m ago•0 comments

I made a neural network that I can train using my fingers

https://medium.com/@ceo_44783/i-built-a-neural-network-i-could-train-with-my-fingers-e1dd37627bf7
2•tylersuard•34m ago•1 comments

Come Friendly SBOMs

https://freebsdfoundation.org/our-work/journal/browser-based-edition/improving-software-quality/c...
2•Tomte•34m ago•0 comments

Show HN: An autonomous SOC built to refuse causation it can't prove

https://www.domesoc.com/
2•MohammadKhubaib•37m ago•0 comments

Jamkernelp2p: A sovereign P2P microkernel for ultimate lightness and control

https://github.com/jamkernel/jamkernelp2p
2•jamkernelp2p•39m ago•0 comments

Claude Science, an AI workbench for scientists

https://www.anthropic.com/news/claude-science-ai-workbench
2•mgh2•39m ago•0 comments

CTA-Pipelining: A Latency-Oriented Spatial Scaling Method for Multi-GPU Systems

https://arxiv.org/abs/2607.07862
2•matt_d•40m ago•0 comments

Rendering Fonts Quickly on the GPU

https://www.outercloud.dev/blogs/webgpu-font-rendering/
3•outercloud•40m ago•1 comments

Why South America Is So Good at Football

https://atlasdevelopment.substack.com/p/why-south-america-is-so-good-at-football
2•gmays•41m ago•0 comments

Microsoft Promises to Fix Search with Major Windows 11 Overhau

https://www.windowscentral.com/microsoft/windows-11/microsoft-announces-major-windows-11-search-o...
2•m463•43m ago•0 comments

AI Isn't Human. Stop Talking About It Like It Is

https://www.thefp.com/p/artificial-intelligence-not-human
2•arkhiver•56m ago•1 comments

Wither ACM? Publish and Perish?

https://cacm.acm.org/opinion/wither-acm-publish-and-perish/
2•jwstarr•57m ago•0 comments

A high-performance JavaScript/TypeScript compiler toolchain written in Zig

https://yuku.fyi/
2•flashblaze•58m ago•0 comments

The EU is not about to censor access to the internet

https://www.euronews.com/my-europe/2026/07/13/no-the-eu-is-not-about-to-censor-access-to-the-inte...
2•alexey-salmin•59m ago•3 comments

America's Other Elections Problem

https://www.economist.com/united-states/2026/07/13/americas-other-elections-problem
3•andsoitis•1h ago•0 comments

Informing Ourselves to Death (1990)

https://web.archive.org/web/20031029211844/http://www.frostbytes.com/~jimf/informing.html
3•Chronos52•1h ago•0 comments