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

Comments

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

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

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

The Fast and the Furious – Interactive Storyline and Filming Locations

https://fatf-timeline.vercel.app/
1•jfigure•1m ago•0 comments

V8 Exploitation: From Libc Pwn to Browser Bugs

https://varik.dev/blog/v8/getting-started-with-v8-exploitation
1•varik77•3m ago•0 comments

Ipxlat: a stateless IPv4/IPv6 translation device

https://lore.kernel.org/netdev/20260319151230.655687-1-ralf@mandelbit.com/
2•PaulHoule•4m ago•0 comments

How have we changed since our species first appeared?

https://australian.museum/learn/science/human-evolution/how-have-we-changed-since-our-species-fir...
1•thunderbong•4m ago•0 comments

Vladimir Putin Singing Blueberry Hill

https://commons.wikimedia.org/wiki/File:Vladimir_Putin_singing_Blueberry_Hill.ogv
2•dnemmers•6m ago•0 comments

Under the hood of MDN's new front end

https://developer.mozilla.org/en-US/blog/mdn-front-end-deep-dive/
2•donohoe•6m ago•0 comments

YouTube Premium price is going up $2 to $15.99/mo

https://www.usatoday.com/story/money/2026/04/10/youtube-premium-price-increase/89551627007/
4•chirau•7m ago•0 comments

State Dept. Directive Signals Shift from Counter-Disinfo to Cognitive Warfare

https://weaponizedspaces.substack.com/p/state-dept-directive-signals-shift
1•rbanffy•8m ago•0 comments

Chrome Extension: Aftermark, your bookmarks are breadcrumbs

https://chromewebstore.google.com/detail/aftermark-—-your-bookmark/megmnnapedodhkmlaacfjlamgeim...
1•DavidCanHelp•8m ago•0 comments

A Tinyblog about Tinygrad

https://tinyblog-phi.vercel.app/tinygrad
3•ppadjin123•8m ago•0 comments

PyUnixOS – A Unix-Like OS in MicroPython for ESP32

https://github.com/Arc1011/PyUnixOS
2•Arc1011•9m ago•0 comments

Show HN: MLForge – A visual graph editor for building PyTorch models

https://github.com/zaina-ml/ml_forge
1•zaina-ml•9m ago•0 comments

Amazon Luna ends support for third-party subscriptions and game purchases

https://www.engadget.com/gaming/amazon-luna-ends-support-for-third-party-subscriptions-and-game-p...
1•bookofjoe•12m ago•0 comments

Voting Through the Veil: John Rawls on selfish vs. selfless voting

https://nonzerosum.games/theveil.html
1•zdw•12m ago•0 comments

The Million-Dollar Nose

https://www.theatlantic.com/magazine/archive/2000/12/the-million-dollar-nose/378450/
1•Anon84•13m ago•0 comments

Valve Developer Improves the Linux Gaming Experience for Limited VRAM Hardware

https://www.phoronix.com/news/Valve-Better-Gaming-Low-vRAM
3•bpierre•22m ago•0 comments

Pizza Legacy an Open-Source Reimplementation of Pizza Connection (Pizza Tycoon)

https://pizzalegacy.nl/
1•doener•23m ago•0 comments

Physicists resolve a long-standing puzzle over the size of a proton

https://www.newscientist.com/article/2522294-physicists-resolve-a-long-standing-puzzle-over-the-s...
2•atombender•23m ago•1 comments

The Future of Everything Is Lies, I Guess: Annoyances

https://aphyr.com/posts/415-the-future-of-everything-is-lies-i-guess-annoyances
4•aphyr•30m ago•0 comments

Brazil seizes over 1,100 weapons and 1.5 tons of drugs from US, says official

https://www.reuters.com/world/americas/brazil-seizes-over-1100-weapons-15-tons-drugs-us-says-offi...
8•kaycebasques•32m ago•1 comments

Black traffic: the corporate sabotage technique you've never heard of

https://www.machinesociety.ai/p/black-traffic-the-corporate-sabotage-37e
1•mikelgan•32m ago•1 comments

Nexus AI

https://nexusai.run
1•nexusai26•32m ago•0 comments

BYD to open 20 car dealerships in Canada this year

https://financialpost.com/transportation/autos/byd-open-20-car-dealerships-canada-2026
4•pseudolus•36m ago•0 comments

Selective Test Execution at Stripe: Fast CI for a 50M-Line Ruby Monorepo

https://stripe.dev/blog/selective-test-execution-at-stripe-fast-ci-for-a-50m-line-ruby-monorepo
1•Wingy•37m ago•0 comments

QB64 Tutorial A beginner's introduction to game programming

https://www.qb64tutorial.com
1•AlexeyBrin•37m ago•0 comments

Show HN: Peer – health research chat, 6 medical databases, verified citations

https://frompeer.com/
2•uelbably•37m ago•0 comments

Published on Rapid API

1•CapianHolstrom•39m ago•0 comments

Canada Can't Pretend America Is Still the Good Guy

https://thewalrus.ca/the-us-torpedoed-an-unarmed-ship-who-are-the-good-guys-again/
9•Teever•43m ago•1 comments

The Case That More Openness Brings More Good to Society

https://danieltan.weblog.lol/2026/04/the-case-that-more-openness-brings-more-good-to-society
1•danieltanfh95•44m ago•0 comments

Measure coding productivity with this Claude Code Plugin

https://github.com/Facens/coding-productivity
3•Facens•45m ago•1 comments