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?

Decimen Optical Transfer: fountain-coded QR file transfer

https://github.com/bashalarmistalt/decimen-optical-transfer/
1•thunderbong•3m ago•0 comments

The Automation Mindset: Why AI Rewards Builders and Sidelines Everyone Else

https://digitalmagazines.online/articles/the-automation-mindset-why-ai-rewards-builders
1•FeelingCreative•3m ago•0 comments

What Every Programmer Should Know About Twists of Elliptic Curves

https://leetarxiv.substack.com/p/twists-of-elliptic-curves
1•birdculture•3m ago•0 comments

US cites 'unauthorized travel' to end DACA status for mother deported to Mexico

https://apnews.com/article/daca-immigration-texas-uscis-09071c1707e6e1d385ca503c9c75bc6f
1•petethomas•4m ago•0 comments

Economist Style Plugins for Claude Code

https://github.com/TAJD/economist-style-guide-plugin
1•handfuloflight•5m ago•0 comments

Judge Voices Doubt US Has Justified Its Ban on Anthropic AI

https://www.bloomberg.com/news/articles/2026-07-30/judge-voices-doubt-us-has-justified-its-ban-on...
2•sbulaev•9m ago•0 comments

Cursor Benchmark Partners

https://cursor.com/blog/benchmarkpartners
1•MehrdadKhnzd•14m ago•0 comments

Show HN: A VS Code extension buffers NPM updates to avoid supply chain attacks

https://marketplace.visualstudio.com/items?itemName=about14sheep.tinynpm
1•about14sheep•19m ago•0 comments

Anthropic AI Models Hacked Three Organizations During Tests

https://www.bloomberg.com/news/articles/2026-07-30/anthropic-s-ai-models-hacked-three-organizatio...
3•evo_9•23m ago•0 comments

Show HN: Great Spectations, the Spec Checker

https://greatspectations.com
1•RustyRussell•24m ago•1 comments

NeuronAI turns smart solutions into voice

https://neuronai.uz/en/
3•yutabek•30m ago•0 comments

We accidentally built an LLVM compiler for Jax

https://iza.ac/posts/2026/07/accidental-llvm-compiler-for-jax/
2•infinitewalk•30m ago•0 comments

ISS Mimic

https://iss-mimic.github.io/Mimic/dashboard.html
1•michaefe•32m ago•1 comments

The Religion of Speed

https://graybeard.ing/the-religion-of-speed/
2•MobiusHorizons•33m ago•2 comments

Premier league bans gambling sponsors

https://www.footyheadlines.com/2646571793/betting-ban-takes-effect-no-more-gambling-sponsors-in-t...
3•paoliniluis•35m ago•1 comments

Save and restore may be coming to GNOME

https://lwn.net/Articles/1083750/
1•signa11•36m ago•0 comments

Show HN: Play SNES, gba, in your terminal, even in tmux

https://github.com/jhickner/rom
1•jhickner•37m ago•0 comments

Specula: Scaling formal specs for autonomous model checking of system code

https://arxiv.org/abs/2607.25333
1•matt_d•37m ago•0 comments

Memory-level parallelism: AMD is the king

https://lemire.me/blog/2026/07/25/memory-level-parallelism-amd-is-the-king/
2•signa11•41m ago•0 comments

LLVM AI Tool Use Policy

https://llvm.org/docs/AIToolPolicy.html
1•compiler-guy•42m ago•0 comments

Inkling Small is the highest-scoring open-weight model evaluated by ARC Prize

https://twitter.com/arcprize/status/2082925303601459347
3•thebricklayr•44m ago•0 comments

Hugging Face Incident Initial Post-Mortem

https://cloudsecurityalliance.org/artifacts/hugging-face-ciso-post-mortem
1•hentrep•44m ago•0 comments

Gemini Robotics

https://deepmind.google/models/gemini-robotics/
2•jonbaer•46m ago•0 comments

DeepSeek Founder Liang Wenfeng in His Own Words

https://www.geopolitechs.org/p/deepseek-founder-liang-wenfeng-in
1•gmays•46m ago•0 comments

WTF per Minute – An Actual Measurement for Code Quality

https://muhammad-rahmatullah.medium.com/wtf-per-minute-an-actual-measurement-for-code-quality-780...
1•compiler-guy•47m ago•0 comments

NVIDIA-labs OO Agents: Native Python Object-Oriented Agents

https://github.com/NVIDIA-NeMo/labs-OO-Agents
2•matt_d•47m ago•0 comments

Anthropic AI Models Hacked Three Companies During Tests

https://www.wsj.com/tech/ai/anthropic-ai-models-hacked-three-companies-during-tests-bd752c86
12•bmulholland•52m ago•7 comments

The AI Aesthetic

https://blog.jim-nielsen.com/2026/ai-aesthetic/
19•montroser•54m ago•6 comments

The Absurdity of Albert Camus

https://www.historytoday.com/archive/portrait-author-historian/absurdity-albert-camus
2•apollinaire•55m ago•0 comments

Cross-Vendor Semantic Void Matrix: Zero-Byte Outputs in GPT/Claude/Gemini/Kimi

https://zenodo.org/records/21696066
1•rayanpal_•56m ago•0 comments