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?

Pantograph

https://github.com/jeprinz/pantograph/blob/main/README.md
2•sargstuff•2m ago•0 comments

Uber SubmitQueue: a high-performance speculative merge queue

https://github.com/uber/submitqueue/
1•handfuloflight•4m ago•0 comments

Ads in Software Are Like Stickers on Laptops

https://daringfireball.net/2026/07/ads_in_software_are_like_stickers_on_laptops
1•naves•5m ago•1 comments

Geometrically patterned ancient earthworks in Acre, Rio Branco, Brazil

https://researchportal.helsinki.fi/en/publications/geometrically-patterned-ancient-earthworks-in-...
2•jhncls•5m ago•0 comments

The Silicon Valley Founder Meat Grinder

https://zaksa.zip/blog/silicon-valley-founder-meat-grinder/
2•Kaizeras•7m ago•0 comments

Show HN: Voris: privacy-first analytics for the AI-influenced web

https://voris.ai/
1•wowinter15•10m ago•0 comments

Structure Editors

https://github.com/yairchu/awesome-structure-editors/blob/main/README.md
1•sargstuff•11m ago•1 comments

Colorado declares town abandoned amid water and leadership crisis

https://www.theguardian.com/us-news/2026/aug/01/hartman-colorado-town-abandoned
4•speckx•14m ago•0 comments

Cookware Got Worse on Purpose: Who Owns Pyrex and All-Clad Now

https://www.worseonpurpose.com/p/your-cookware-got-worse-on-purpose
3•xbryanx•20m ago•1 comments

"AI Brendans" or "Virtual Brendans" (2025)

https://www.brendangregg.com/blog/2025-11-28/ai-virtual-brendans.html
1•Jimmc414•21m ago•0 comments

Cracking under pressure: silicon fractures on ATLAS strip tracker petals

https://arxiv.org/abs/2607.25080
2•Jimmc414•21m ago•0 comments

Show HN: Crew, a local collaborative (people and agents) IDE

https://github.com/JamelHammoud/crew
1•jamelhammoud•22m ago•0 comments

Fools and Dreamers [video]

https://www.youtube.com/watch?v=3VZSJKbzyMc
1•pvaldes•23m ago•0 comments

My Tests Were Green. My Verification Tool Wasn't

https://igel-data.com/blog/verification-found-two-bugs/
2•yito88•25m ago•0 comments

A functional hypothesis for the Roman dodecahedron, with measured aperture data

https://zenodo.org/records/21744442
2•DoDecaHeJon•28m ago•0 comments

Show HN: Open OneNote Viewer in Rust

https://github.com/emsi/OneNoteViewer
3•emsi•31m ago•0 comments

Top amputation surgeon had own legs removed due to fetish. Were patients safe?

https://www.theguardian.com/uk-news/2026/aug/01/neil-hopper-surgeon-amputated-legs-fetish-extreme...
37•bookofjoe•32m ago•18 comments

Restoring your suspended Instagram account (by emailing your Congressman) (2024)

https://diamondsinthelibrary.com/instagram-permanently-suspended/
2•fursgonemild•32m ago•1 comments

Dear Alpha School: I Hope You're Right

https://www.aei.org/commentary/dear-alpha-school-i-hope-youre-right/
3•paulpauper•34m ago•0 comments

All in Your Head Excerpt: Psychiatry and the Isolated Demand for Rigor

https://freddiedeboer.substack.com/p/all-in-your-head-excerpt-psychiatry
2•paulpauper•35m ago•0 comments

CannonSmash-web

https://jgbrwn.itch.io/cannonsmash-web
2•indigodaddy•42m ago•0 comments

But can your calculator run Linux?

https://raymii.org/s/articles/But_can_your_calculator_run_Linux.html
9•jandeboevrie•43m ago•0 comments

Reclaim – Resume tailoring that flags adjacent skills instead of keywordstuffing

https://www.reclaim.careers/
2•Adoomah•45m ago•0 comments

Take More Screenshots (2022)

https://alexwlchan.net/2022/screenshots/
2•downbad_•47m ago•0 comments

Google News is just Forrest Gump's shrimp boat now

https://elgan.com/google-news-is-just-forrest-gumps-shrimp-boat-now
84•mikelgan•48m ago•47 comments

Which web browser has no AI?

6•lilerjee•49m ago•6 comments

EU accuses Temu of hindering raid in Ireland

https://www.rte.ie/news/business/2026/0731/1585977-temu-dublin/
3•austinallegro•54m ago•0 comments

The Index – a hand-checked catalog of AI tools

https://theindex.agnissanisaac.com/
2•Code_A-Z•54m ago•0 comments

AI #179 Part 2: Hearing the Fire Alarm

https://thezvi.substack.com/p/ai-179-part-2-hearing-the-fire-alarm
3•paulpauper•56m ago•0 comments

Moiré Pattern

https://en.wikipedia.org/wiki/Moir%C3%A9_pattern
2•petethomas•1h ago•0 comments