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?

We asked 29 people building US data centers when AI capacity will arrive

https://www.latolabs.io/studies/ear-to-the-ground/
1•tnch•41s ago•0 comments

Show HN: MCP-Sentry v2.0 – Zero-dependency firewall and audit proxy for MCP

https://github.com/yepinggu66/mcp-sentry
1•pingguye•1m ago•0 comments

Valkey 9.2 Cuts Backup Memory Overhead and Gives GPU Fleets a Shared Cache

https://techstrong.it/ai/valkey-9-2-cuts-backup-memory-overhead-and-gives-gpu-fleets-a-shared-cache/
1•CrankyBear•1m ago•0 comments

Dave Plummer: The Man Who Scammed Millions (In 2006) [video]

https://www.youtube.com/watch?v=1GeF9AjlqP8
1•febed•1m ago•0 comments

The 98% Slot Machine: How Paid Advertising Became an Extraction Tax

https://globalcommercegraph.com/writing/the-ninety-eight-percent-slot-machine
1•dev1one1•1m ago•0 comments

Show HN: Fdroid Feed Manager and API

https://github.com/npodbielski/FdroidManager
1•npodbielski•2m ago•0 comments

Thomas Nagel on AI Consciousness

https://www.wired.com/story/just-ridiculous-a-famed-philosopher-takes-on-ai-consciousness/
1•slibhb•4m ago•0 comments

Merck and Isomorphic Labs Enter Strategic Research Collaboration

https://www.merck.com/news/merck-and-isomorphic-labs-enter-strategic-research-collaboration/
1•hentrep•4m ago•1 comments

Anatomy of an AI-driven attack: Bitrise security incident report

https://bitrise.io/artex-incident-report
1•jampa•5m ago•0 comments

Show HN: Orbital – Everything (known) in Earth orbit, live in 3D, in the browser

https://jerredcook.github.io/orbital/
1•gifford89•5m ago•0 comments

Ratio Tracking, Intuitively

https://lisyarus.github.io/blog/posts/ratio-tracking-intuitively.html
1•ibobev•6m ago•0 comments

A list of 1000 smart home deals for Amazon black Friday

https://smarthomescene.com/blog/best-amazon-black-friday-and-cyber-monday-smart-home-deals/
1•kiselio•6m ago•0 comments

High Stakes Are Strongly Typed

https://www.motivenotes.ai/p/high-stakes-are-strongly-typed
3•supo•7m ago•0 comments

Why New Outlook Can't Drag Files to Other Apps

https://magicdragin.app/blog/why-new-outlook-drag-and-drop-fails
1•jeremy_spiegel•7m ago•1 comments

Ask AI the same question twice and 64% of answers name different brands

https://supercite.ai/blog/why-ai-recommends-different-brands
1•avatar99•7m ago•0 comments

To Catch a Ransomware Scammer, FBI Posed as Both Victim and Attacker

https://www.404media.co/ransomware-fraud-attack-fbi-indictment/
2•cdrnsf•7m ago•0 comments

Show HN: Unsworn – Polyglot API Router

https://github.com/j4crev/unsworn
1•j4w8n•8m ago•0 comments

New law 'maybe needed' after Google rejects call to remove Brand's YouTube video

https://www.theguardian.com/news/2026/nov/19/google-youtube-russell-brand-youtube-prison-message-...
1•Jigsy•9m ago•1 comments

RDMA over USB4 on Windows: run larger local AI models across PCs

https://techcommunity.microsoft.com/blog/microsoftusbblog/introducing-rdma-over-usb4%c2%ae-on-win...
1•akshayt•9m ago•0 comments

Apps such as Adobe/Battle.net won't run if your PC fails MS's new security check

https://www.windowslatest.com/2026/11/18/apps-could-soon-refuse-to-run-on-your-windows-11-pc-if-i...
1•josephcsible•10m ago•0 comments

Ignore the Code: Oberon (2009)

https://ignorethecode.net/blog/2009/04/22/oberon/
1•ibn_khaldun•10m ago•0 comments

Chile: UFO Sightings by 18th Century Jesuits

https://inexplicata.blogspot.com/2026/08/chile-ufo-sightings-by-18th-century.html
3•bookofjoe•10m ago•0 comments

Biogen's anti-tau Alzheimer's drug slows decline 38% by year 2

https://www.reuters.com/business/healthcare-pharmaceuticals/biogens-anti-tau-alzheimers-drug-bene...
1•Vaslo•10m ago•0 comments

Show HN: Count Macula menu bar app that counts highlighted words and characters

https://countmacula.app/?via=hackernews
1•sajomes•11m ago•0 comments

Balcony solar: two panels, some zip ties, and an outlet

https://gregable.com/2026/11/balcony-solar.html
1•gregable•13m ago•0 comments

Live stock ticker theme for Claude Code desktop

https://github.com/cktang88/claude-ticker-theme
1•kt01•13m ago•0 comments

A linked history of the AI stack

https://foundationindex.ustunozgur.com/
1•arbayi•14m ago•0 comments

How does medical inflation compare to inflation in the rest of the economy?

https://www.healthsystemtracker.org/brief/how-does-medical-inflation-compare-to-inflation-in-the-...
1•elffjs•14m ago•0 comments

Lustro – a tree of deterministic random streams (Rust, Python, C)

https://github.com/Ligatum/Lustro
1•atomU235•16m ago•0 comments

Show HN: Modern HN – a userscript that restyles Hacker News

https://github.com/FallDownTheSystem/modern-hn
1•FallDownTS•17m ago•0 comments