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?

Supply Chain Attack Targets Laravel-Lang Packages with Credential Stealer

https://www.aikido.dev/blog/supply-chain-attack-targets-laravel-lang-packages-with-credential-ste...
1•nullbio•4m ago•1 comments

Deepsec: The security harness for finding vulnerabilities in your codebase

https://vercel.com/blog/introducing-deepsec-find-and-fix-vulnerabilities-in-your-code-base
1•882542F3884314B•9m ago•0 comments

Perplexity Bumblebee: Read-Only Tool for Dev Supply Chain Checks on macOS/Linux

https://github.com/perplexityai/bumblebee
1•882542F3884314B•12m ago•0 comments

Show HN: ThinkLLM, A knowledge graph of AI models (HTTPS://thinkllm.dev)

https://thinkllm.dev
1•gkanellopoulos•13m ago•0 comments

All Model Labs Are Now Agent Labs

https://www.latent.space/p/ainews-all-model-labs-are-now-agent
1•swyx•14m ago•0 comments

Zero-dependency CLI that converts LinkedIn exports into Markdown for LLMs

https://linkedin2md.daza.ar/
1•juanmanueldaza•16m ago•0 comments

Show HN: Waiting for AI Grand Prix racing SIM? Me too So I made one

https://github.com/elodin-sys/ai-grand-prix
2•danAtElodin•17m ago•0 comments

The SpaceX IPO filing is filled with AI bets, Starship dreams

https://techcrunch.com/2026/05/20/the-spacex-ipo-filing-ai-bets-starship-dreams-elon-musk/
1•dotcoma•18m ago•0 comments

The analog computer museum's online library

https://www.analogmuseum.org/english/library.html
1•nill0•35m ago•0 comments

Being oncall taught me everything

https://yaoyue.org/blog/2026-oncall/
1•RyeCombinator•39m ago•1 comments

Product Launches, Tools and Builder Guides

https://nicklaunches.com/
2•theorchid•41m ago•3 comments

Google Is Killing ChromeOS: Aluminium OS, Its Android-Based Replacement

https://techjournal.org/google-aluminium-os-replacing-chromeos
11•pabs3•47m ago•2 comments

The Making of Indian Statistics

https://altermag.com/articles/the-making-of-indian-statistics
2•trojanalert•50m ago•0 comments

Microsoft reports AI is more expensive than paying human employees

https://fortune.com/2026/05/22/microsoft-ai-cost-problem-tokens-agents/
50•nreece•55m ago•13 comments

Most EVM systems have no memory

https://blog.bridgexapi.io/most-evm-systems-have-no-memory
2•Bridgexapi•56m ago•1 comments

Agent Substrate

https://github.com/agent-substrate/substrate
1•ahmedtd•57m ago•0 comments

Comparisons as Predictable as the Sunrise

https://pudding.cool/2026/05/similes/
1•newtwentysix•58m ago•0 comments

What Is an Air Gap?

https://www.ibm.com/think/topics/air-gap
1•teleforce•1h ago•0 comments

Ask HN: How concerned are you about a debt crisis?

6•bhag2066•1h ago•2 comments

Laravel Lang Compromised with RCE Backdoor Across 700 Versions

https://socket.dev/blog/laravel-lang-compromise
2•gpi•1h ago•0 comments

New kind of dark tourism emerging in online 'Backrooms,' study shows

https://phys.org/news/2026-05-kind-dark-tourism-emerging-online.html
1•WaitWaitWha•1h ago•0 comments

How the Library of Congress is using both AI and volunteers to unlock history

https://www.nextgov.com/artificial-intelligence/2026/05/how-library-congress-using-both-ai-and-vo...
1•WaitWaitWha•1h ago•0 comments

The Verification Tree: Turning AI bug report floods into a confidence signal

https://zenodo.org/records/20349904
2•yellow_glovez•1h ago•0 comments

Thousands evacuated in Garden Grove worry toxic chemicals in tank could explode

https://ktla.com/news/orange-county/thousands-evacuated-again-after-toxic-tank-leak-in-garden-grove/
2•Bender•1h ago•1 comments

Systemd 261-Rc1 Released with OS Installer, IMDS Subsystem and New Storagectl

https://www.phoronix.com/news/systemd-261-rc1
1•Bender•1h ago•0 comments

Feds unwittingly leak pilots' pre-crash conversation

https://www.theregister.com/science/2026/05/23/feds-unwittingly-leak-pilots-pre-crash-conversatio...
2•Bender•1h ago•0 comments

Kagi Search API is now in public preview

https://kagi.com/changelog#10622
3•mroche•1h ago•0 comments

A Visual Tour of Classical Electromagnetism (1960)

https://web.mit.edu/8.02t/www/802TEAL3D/visualizations/guidedtour/Tour.htm#_Toc27302365
2•nill0•1h ago•0 comments

My Hermes and Obsidian Setup and Use Cases

https://metedata.substack.com/p/013-my-hermes-and-obsidian-set-up
1•thunderbong•1h ago•0 comments

New rule requires most green-card applicants to apply from outside U.S.

https://www.washingtonpost.com/immigration/2026/05/22/new-rule-requires-most-green-card-applicant...
23•michaelsbradley•1h ago•11 comments