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•12mo ago

Comments

nine_k•12mo 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•12mo ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•12mo ago
They mention this in the article.
spockz•12mo ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•12mo ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•12mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•12mo 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•12mo 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•12mo 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•12mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•12mo ago
This was very well written. Excellent article!
NetOpWibby•12mo ago
Is this like MessagePack for Haskell?

Fashion for a Hot Planet

https://faculty.engineering.asu.edu/konrad/research/cool-future-fashion-for-a-hot-planet/
1•dreadsword•1m ago•0 comments

Thunderbird Pro April 2026 Update

https://blog.thunderbird.net/2026/04/thunderbird-pro-april-2026-update/
1•raybb•2m ago•0 comments

Xiaomi MiMo-v2.5 is now officially open-sourced

https://twitter.com/XiaomiMiMo/status/2048821516079661561
1•bsgada•4m ago•1 comments

Show HN: macOS screensaver that displays Google Trends as fish in a deep-ocean

https://apoorvkulkarni.com/trending-screensaver/
1•ak009•5m ago•0 comments

Ask HN: What Is the "Lore" of HN?

1•Cider9986•6m ago•0 comments

Show HN: CoPilot for Project Management

https://quickapproveai.com/
1•xvok•6m ago•0 comments

Compu-Global-Hyper-Mega-Net: A Retro Internet for Retro Computers (LFNW 2026) [video]

https://www.youtube.com/watch?v=cSJsGNIDjtc
1•CursedSilicon•8m ago•0 comments

A man who decides when and where your next flight will be going

https://www.cnn.com/travel/airline-planning-officer-aviation-decisions
1•charrington•8m ago•0 comments

Event Clash of Prompts: A Real-Time Prompt Battle Royale

https://builder.aws.com
1•symbiotic_sec•9m ago•1 comments

Another supply-chain attack: elementary-data Python package compromised

https://arstechnica.com/security/2026/04/open-source-package-with-1-million-monthly-downloads-sto...
2•mil22•9m ago•1 comments

Live coverage: ULA to launch 29 Amazon Leo satellites on Atlas 5 LIVE in ~2hrs

https://spaceflightnow.com/2026/04/27/live-coverage-ula-to-launch-29-amazon-leo-satellites-on-atl...
1•bookmtn•11m ago•0 comments

Immigrants' Recent Effects on Government Budgets: 1994–2023

https://www.cato.org/white-paper/immigrants-recent-effects-government-budgets-1994-2023
3•Anon84•11m ago•0 comments

Talkie: a 13B vintage language model from 1930

https://talkie-lm.com/introducing-talkie
1•jekude•13m ago•0 comments

Ask HN: Will hardware ever be cheap again?

2•bjourne•13m ago•0 comments

Talkie: An LM from 1930

https://talkie-lm.com/chat
1•yusufozkan•13m ago•0 comments

ChatGPT Images 2.0 Still Can't Draw the Seven-Legged Spider I Want

https://will-keleher.com/posts/chatgpt-image-2-still-cant-draw-a-seven-legged-spider/
2•bsgada•18m ago•0 comments

AMD used AI to reimplement slurm in Rust

https://github.com/ROCm/spur
1•latchkey•18m ago•0 comments

Trump Administration Will Pay More Energy Firms to Cancel Wind Farms

https://www.nytimes.com/2026/04/27/climate/trump-administration-wind-farms.html
2•duxup•18m ago•1 comments

OlmoEarth: Custom embedding exports for downstream analysis

https://allenai.org/blog/olmoearth-embeddings
1•gmays•18m ago•0 comments

Using Rust to Build a $1 Handheld Gaming Console

https://chrisdell.info/using-rust-to-build-a-1-dollar-handheld-gaming-console/
2•kianryan•20m ago•0 comments

David Silver of DeepMind raises $1B to build AI that learns without human data

https://techcrunch.com/2026/04/27/deepminds-david-silver-just-raised-1-1b-to-build-an-ai-that-lea...
1•ryan_j_naughton•20m ago•0 comments

Gitglimpse – a CLI that turns your Git history into structured context

https://github.com/dino-zecevic/gitglimpse
1•dinoze•22m ago•1 comments

California's Billionaire Tax Has the Signatures to Make the Ballot

https://sfstandard.com/2026/04/26/california-billionaire-tax-2026/
3•m463•24m ago•0 comments

Switched from robot_localization to a single-node GPS fusion setup

https://github.com/manankharwar/fusioncore
1•kharwarm•29m ago•0 comments

Tell HN: Spam from Fridayaicore.in

2•HotGarbage•30m ago•0 comments

A History of Live Programming (2013)

https://liveprogramming.github.io/liveblog/2013/01/a-history-of-live-programming/
1•_doctor_love•32m ago•0 comments

AI strategy is all wrong

https://www.computerworld.com/article/4162557/your-ai-strategy-is-all-wrong.html
1•mikelgan•32m ago•1 comments

It's the Age of Electricity and America Isn't Ready

https://www.nytimes.com/interactive/2026/04/27/opinion/electricity-power-grid-infrastructure.html
4•rafaelc•32m ago•0 comments

Noctua releases official 3D CAD models for its cooling fans

https://www.noctua.at/en/3d-cad-models
1•embedding-shape•33m ago•1 comments

Tell HN: One Medical Is a Nightmare

4•rincebrain•34m ago•0 comments