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?

The Hype Hangover Kicks In

https://www.mikehyland.com/blog/the-developer-mood-june-2026
1•mjhyl•26s ago•0 comments

Show HN: Flashback Booth, A tactile retro photo booth in the browser

https://flashbackbooth.me
1•rairishabh2810•38s ago•0 comments

Metamodernism: The cultural philosophy of the digital age

https://nesslabs.com/metamodernism
1•andsoitis•1m ago•0 comments

How Israel's AI surveillance breakthrough in Iran is reshaping global intel

https://www.calcalistech.com/ctechnews/article/h17rby8bge
1•myth_drannon•2m ago•0 comments

Ask HN: How do you handle billing when event volume exceeds Stripe's limits?

1•badgerino•3m ago•0 comments

Best YouTube Downloader Alternatives That Work in 2026

https://www.youtubexx.com/
2•freeinvoiceflow•3m ago•0 comments

Phone-Free Events Grew 567% Globally in 2026, over 900% in US Alone

https://www.eventbrite.com/blog/press/newsroom/the-rise-of-phone-free-experiences/
3•karakoram•8m ago•0 comments

TimyWind Sailing Game

https://tinywind.io/play?firstvisit=1
2•SubiculumCode•9m ago•0 comments

Snapcompact: SoTA Compaction – Instant, Local, Free. Pick 3

https://blog.can.ac/2026/06/10/snapcompact/
2•himata4113•12m ago•0 comments

Identifying Life-Changing Books with LLMs

https://blog.joellehman.com/identifying-life-changing-books-with-llms.html
2•andsoitis•13m ago•0 comments

Formal Methods and the Future of Programming

https://blog.janestreet.com/formal-methods-at-jane-street-index/
4•sebg•16m ago•0 comments

Shareholder Supremacy and the Precog CEO

https://pluralistic.net/2026/06/13/minority-shareholder-report/
1•hn_acker•16m ago•0 comments

Ask HN: What would you do with a trillion dollars

2•brudgers•16m ago•1 comments

The Future of Crossover

https://www.codeweavers.com/blog/mjohnson/2026/06/11/whats-in-and-whats-out-for-crossover-27
2•akyuu•16m ago•0 comments

Thanks Amazon

https://www.reddit.com/r/ClaudeAI/s/TUivYGKnCK
2•ihazgithub•17m ago•0 comments

Ask HN: If you had a trillion dollars, what would you do?

2•brudgers•17m ago•1 comments

Show HN: Domainbase – Instant domain search and management

https://domainbase.app/
1•alexpate•17m ago•0 comments

How cyber-criminals adopted Russias secret language of thieves

https://www.bbc.com/future/article/20260611-fenya-how-cyber-criminals-adopted-russias-secret-lang...
2•1659447091•17m ago•0 comments

Mandrake –> Gentoo a.k.a. "Mandrake Expatriate Syndrome" (2003)

https://www.greenfly.org/mes.html
1•coatmatter•18m ago•0 comments

Sealed Super Mario Bros Sells for $3M Setting New Record for a Video Game

https://www.ha.com/heritage-auctions-press-releases-and-news/highest-graded-super-mario-bros.-sel...
3•HelloUsername•19m ago•0 comments

Show HN: Sessemi – Scraping API That Solves Cloudflare/DataDome/Akamai Itself

https://sessemi.com
1•sessemi•19m ago•0 comments

Kennedy Center Says It Has Removed Trump's Name from Building

https://www.wsj.com/politics/policy/kennedy-center-misses-deadline-wants-more-time-to-remove-trum...
3•JumpCrisscross•20m ago•0 comments

Why India wants German submarines

https://www.dw.com/en/why-india-wants-german-submarines-and-what-pakistan-and-china-have-to-do-wi...
1•rustoo•22m ago•0 comments

The first trillionaire is a killer

https://www.theverge.com/tech/949259/the-worlds-first-trillionaire-is-a-killer
4•okneil•22m ago•1 comments

Seasonal changes in human hair growth

https://pubmed.ncbi.nlm.nih.gov/2003996/
1•JumpCrisscross•22m ago•0 comments

Why greatness cannot be planned

https://yinuoli.org/ken-stanley-and-joel-lehman-why-greatness-cant-be-planned/
1•andsoitis•22m ago•0 comments

What Happens to an Economy When It's Too Hot to Work?

https://www.bloomberg.com/news/features/2026-06-12/india-s-extreme-heat-is-hurting-its-economy-an...
5•littlexsparkee•26m ago•0 comments

Running DOS on Behringers DDX3216 with a DIY x86-Bios from Scratch

https://chrisdevblog.com/2026/06/08/running-dos-on-behringers-ddx3216-using-a-diy-x86-bios/
5•rasz•29m ago•0 comments

Something is jamming GPS over Europe. Here's what we found

https://www.youtube.com/watch?v=tz23G_UXCGA
2•nradov•30m ago•1 comments

Show HN: Deterministic and offline duplicate-code detector

https://github.com/Rafaelpta/dupehound
3•rafaepta•31m ago•0 comments