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

Give Your Coding Agent a Journal

https://doug.sh/posts/give-your-coding-agent-a-journal/
1•dougcalobrisi•41s ago•0 comments

Elon Musk's near-daily online posts about race are turning off some fans

https://www.washingtonpost.com/technology/2026/04/24/musk-online-posts-race-whiteness/
2•ironyman•1m ago•0 comments

Supplyframe Sells Tindie

https://www.hackster.io/news/supplyframe-sells-tindie-now-in-its-second-week-of-site-outage-to-pa...
2•0xBA5ED•4m ago•1 comments

Psychology textbooks still misrepresent famous experiments controversial debates

https://www.psypost.org/psychology-textbooks-still-misrepresent-famous-experiments-and-controvers...
2•ZunarJ5•6m ago•0 comments

Bitcoin 'Q-Day' Draws Nearer as Quantum Researcher Breaks Simplified Key

https://decrypt.co/365444/bitcoin-q-day-draws-nearer-quantum-researcher-breaks-simplified-key
2•HardwareLust•6m ago•0 comments

New adventures, same company (2024)

https://www.mooreds.com/wordpress/archives/3643
3•mooreds•10m ago•0 comments

Ignoring the War Has Been Working for Long-Term Investors

https://www.nytimes.com/2026/04/24/business/iran-war-stocks-bonds-investing.html
2•mooreds•18m ago•0 comments

There is too much traffic for Alex to walk to school, so we drive (2019)

https://www.researchgate.net/publication/324388709_There_is_too_much_traffic_for_Alex_to_walk_to_...
3•aziaziazi•19m ago•0 comments

The Space Between Humans, AI, and the Work We've Been Avoiding

https://www.bettyjunod.com/blog/the-space-between-humans-ai-and-the-work-weve-been-avoiding
2•mooreds•19m ago•0 comments

Trading Is Getting Younger, Ownership Is Getting Older

https://www.apollo.com/wealth/the-daily-spark/trading-is-getting-younger-ownership-is-getting-older
2•akyuu•23m ago•0 comments

Record Labels Drop Piracy Lawsuits Against Altice and Verizon After Cox Ruling

https://torrentfreak.com/record-labels-drop-piracy-lawsuits-against-altice-and-verizon-in-wake-of...
3•Cider9986•23m ago•0 comments

Trends in sudden death mortality across Europe, 2010–2020

https://www.thelancet.com/journals/lanepe/article/PIIS2666-7762(26)00067-0/fulltext
2•akyuu•27m ago•0 comments

Man stole coworkers identity for 30 yrs, victim in mental hosp exonerated by DNA

https://www.cbsnews.com/minnesota/news/matthew-keirans-coworker-identity-theft-sentence-william-w...
4•randycupertino•29m ago•1 comments

Error 404 (Not Found) 1

http://google.com/does-not-exist
2•pbhn•29m ago•1 comments

Mortgage lenders to consider rent history in mortgage applications

https://www.marketplace.org/story/2026/04/23/fannie-freddie-change-to-make-it-easier-for-renters-...
2•littlexsparkee•31m ago•0 comments

Working with Claude Code: A Field Manual

https://blog.iannelson.uk/working-with-claude-code
2•ianfrasernelson•32m ago•0 comments

Robotic Security Dogs Now on the Job to Protect Crops

https://www.globalagtechinitiative.com/in-field-technologies/robotics-automation/robotic-security...
3•rmason•32m ago•1 comments

Supreme Court to hear argument on law enforcement's use of "geofence warrants"

https://www.scotusblog.com/2026/04/court-to-hear-argument-on-law-enforcements-use-of-geofence-war...
3•throw0101c•32m ago•1 comments

Anthropic CPO leaves Figma board after reports of competing product

https://techcrunch.com/2026/04/16/anthropic-cpo-leaves-figmas-board-after-reports-he-will-offer-a...
2•gmays•35m ago•0 comments

Editable 3D models with code or AI in Roblox

https://twitter.com/roblox/status/2047406073263382834
3•dmarcos•37m ago•0 comments

What Is an Enterprise Learning Management System?

1•financehub•38m ago•0 comments

SQLite Vec1 Vector Extension for vector search

https://sqlite.org/vec1/doc/trunk/doc/vec1.md
1•OutOfHere•43m ago•0 comments

Show HN: I've built a nice home server OS

https://lightwhale.asklandd.dk/
15•Zta77•44m ago•3 comments

The Surveillance Accountability Act Demands Warrants for Data

https://reclaimthenet.org/surveillance-accountability-act
2•Cider9986•44m ago•0 comments

Show HN: Wayland Wlroot Hjkl Everywhere

https://git.sr.ht/~hocwp/blog/tree/main/wlroot-hjkl-everywhere.md#wayland-wlroot-codehjklcode-eve...
2•pbrhocwp•46m ago•0 comments

Cloudflare for SaaS: your old provider can silently keep your domain

https://blog.iodev.org/blog/cloudflare-saas-custom-hostname-conflict/
4•else42•47m ago•0 comments

Show HN: Codex context bloat? 87% avg reduction on SWE-bench Verified traces

https://www.npmjs.com/package/pando-proxy
4•george_ciobanu•52m ago•2 comments

Generalised plusequals

https://leontrolski.github.io/alt.html
2•leontrolski•52m ago•0 comments

Ask HN: Any Developer from Wales?

2•danver0•52m ago•1 comments

We Are (Still) Living in the Long Boring

https://freddiedeboer.substack.com/p/we-are-still-living-in-the-long-boring
6•YeGoblynQueenne•55m ago•0 comments