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?

User Inyerface – A worst-practice UI experiment

https://userinyerface.com/
2•hunvreus•4m ago•0 comments

ChatGPT plan purchasing bug: Free to buy

https://community.openai.com/t/security-report-apple-pay-receipt-validation-does-not-bind-to-purc...
2•pengfeituan•5m ago•0 comments

Cory Doctorow on the High Cost of Living with the Ultra-Rich

https://www.newyorker.com/books/book-currents/cory-doctorow-on-the-high-cost-of-living-with-the-u...
1•mitchbob•6m ago•1 comments

Wawa VFX

https://github.com/wass08/wawa-vfx
1•Lisa0802•13m ago•0 comments

The Match Act Is the Missing Piece in America's AI Export Control Strategy

https://www.thefai.org/posts/the-match-act-is-the-missing-piece-in-america-s-ai-export-control-st...
1•num42•19m ago•0 comments

Bipartisan Bill to Tighten Controls on Sensitive Chipmaking Equipment

https://baumgartner.house.gov/2026/04/02/baumgartner-introduces-bipartisan-bill-to-tighten-contro...
1•num42•19m ago•0 comments

37signals Dev – The ONCE app server

https://dev.37signals.com/once-app-server/
1•doppp•20m ago•0 comments

Show HN: Website that recommends outfit using weather and AI

https://what2wear-two.vercel.app
1•COOLmanYT•20m ago•1 comments

The Season Finale of TBPN

https://www.workingtheorys.com/p/tbpn
1•momentmaker•25m ago•0 comments

Using AI to get better at algorithms

https://medium.com/@andreiboar/algotutor-using-ai-to-actually-get-better-at-algorithms-a2b7b96e054a
1•zuzuleinen•27m ago•0 comments

Three-Monitor Ridge Racer Machine Emulated in MAME

https://hackaday.com/2026/04/18/three-monitor-ridge-racer-machine-emulated-in-mame/
1•pathompong•35m ago•0 comments

10 tips to increase your token consumption

https://twitter.com/vidzert/status/2045698735926038824
1•ruslan5t•37m ago•0 comments

Finland, Tesla, and the Quiet Revolution in How We Touch Electricity

https://tonysalas369.substack.com/p/finland-tesla-and-the-quiet-revolution
1•Eterbios•40m ago•0 comments

Air Canada suspends 6 routes 'no longer economically feasible'

https://www.cbc.ca/news/canada/air-canada-jet-fuel-flights-9.7167904
1•geox•46m ago•0 comments

The Bhagavad Gita: Explained

https://cultchron.substack.com/p/bhagvad-gita-in-a-nutshell
1•intrepidsoldier•47m ago•0 comments

Agents don't sleep, but your infra (and brain) might need to

https://blog.mehdio.com/p/ctrlr-13-agents-dont-sleep-but-your
1•eigenBasis•47m ago•0 comments

The Commodification of Uncertainty

https://www.copingwithfootnotes.com/p/the-commodification-of-uncertainty
1•heywoods•56m ago•0 comments

Show HN: DevToolBox – 88 client-side developer tools, no tracking, 9 languages

https://viadreams.cc/en/
1•arenas2026•58m ago•0 comments

Opsec oopsie: Dutch Navy frigate location outed by mailed Bluetooth tracker

https://www.theregister.com/2026/04/17/dutch_navy_frigate_tracked/
1•gnabgib•58m ago•0 comments

I made an interactive Fast and the Furious timeline/map

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

Trust as Constellation

https://signalintent.net/2026/04/18/after-the-chain-trust-as-constellation/
1•tokonomy_dev•1h ago•0 comments

Scientists invent new way to detect skin cancer (2024)

https://www.bbc.com/news/articles/c9wzj1m3g4no
1•teleforce•1h ago•0 comments

The world in which IPv6 was a good design

https://apenwarr.ca/log/20170810
2•signa11•1h ago•0 comments

Self-hosted webmail client for JMAP protocol: Email, calendar, contacts, files

https://github.com/bulwarkmail/webmail
3•DASD•1h ago•2 comments

A PHP Dev Just Solved a 20 Year-Old KDE Plasma Bug

https://itsfoss.com/news/kde-plasma-per-screen-virtual-desktops/
1•alhazrod•1h ago•0 comments

Chained Library

https://en.wikipedia.org/wiki/Chained_library
1•jfil•1h ago•1 comments

Show HN: Multi-agent task management for Claude and Gemini

https://agentrq.com
1•mrtnx•1h ago•0 comments

Enumerations

https://astronomy487.com/all/
1•downboots•1h ago•0 comments

ChatGPT vs. Gemini vs. Claude: The Best LLM Subscription You Should Buy

https://www.artificialintelligencemadesimple.com/p/chatgpt-vs-gemini-vs-claude-the-best
1•imranmk•1h ago•0 comments

I made Claude Code at least 30% more efficient (for me anyway)

https://github.com/noahkirsch/Claude-Code-Glow
1•noahkirsch•1h ago•4 comments