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?

A Controlled Study of Attention-Only Transformers

https://arxiv.org/abs/2607.18363
1•E-Reverance•18s ago•1 comments

The first six ideas in machine learning

https://stochastic.blog/the-first-six-ideas-in-machine-learning/
1•Anon84•34s ago•0 comments

Never Enough

https://dark.ronacher.eu/2026/7/21/never-enough/
1•reasonableklout•1m ago•0 comments

Show HN: My Attempt of Ricing macOS

https://github.com/kushvinth/dotfiles
1•Kushvinth•1m ago•0 comments

Air Force conducts live-fire test for Collaborative Combat Aircraft program

https://www.acc.af.mil/News/Article-Display/Article/4547699/air-force-conducts-live-fire-test-for...
1•lxm•3m ago•0 comments

Nanbeige4.2-3B

https://huggingface.co/Nanbeige/Nanbeige4.2-3B
1•drgore•3m ago•0 comments

What's under your feet in New York City

https://www.youtube.com/watch?v=Iclf_JnPkKw
1•sheri•7m ago•0 comments

Ask HN: Why AI labs publish different benchmarks?

1•mzubairtahir•12m ago•0 comments

Salience Induction Against Multi-Hop RAG Agents: Threat and Defense

https://arxiv.org/abs/2607.17535
1•sbulaev•18m ago•0 comments

Running Laguna S 2.1 locally on Apple Silicon: 52 tok/s with 38.5 GB peak memory

https://github.com/tanishq-dubey/macos-laguna-s2.1
2•tdubey•22m ago•0 comments

Making Our Own Spectrogram

https://fasterthanli.me/articles/making-our-own-spectrogram
1•Jimmc414•23m ago•0 comments

Choosing GPT-5.6 Sol, Terra, or Luna in Codex

https://twitter.com/pvncher/status/2077708372363624894
1•gmays•23m ago•0 comments

Martin Picard's Mitochondrial Theory of Mind

https://www.quantamagazine.org/martin-picards-mitochondrial-theory-of-mind-20260717/
2•Jimmc414•24m ago•0 comments

R2 is now Generally Available (2022)

https://blog.cloudflare.com/r2-ga/
2•soheilpro•27m ago•1 comments

Starveling Rabblement

https://www.lrb.co.uk/the-paper/v48/n13/terry-eagleton/starveling-rabblement
1•prismatic•28m ago•0 comments

Show HN: Remote Bash Script Debugger

https://edebug.sh
1•ldom22•29m ago•1 comments

A mechanical light bulb from 1675 [video]

https://www.youtube.com/watch?v=0Y-9GbsS9Fg
1•fortran77•33m ago•0 comments

Volkswagen blocks Android devices running GrapheneOS from myVW App

https://www.autoevolution.com/news/volkswagen-bans-security-focused-grapheneos-cites-security-rea...
1•rvz•37m ago•0 comments

The AI Bubble Is No Ordinary Bubble

https://www.theatlantic.com/ideas/2026/07/ai-economy-stock-market/688004/
5•simonpure•39m ago•3 comments

Yubikey 5.8

https://www.yubico.com/press-releases/yubico-extends-passkeys-beyond-trusted-authentication-to-ve...
3•Lwrless•43m ago•0 comments

Déjà View: Someone already tried this

https://dejaview.bsct.so/
4•thunderbong•52m ago•2 comments

Late.sh – a command-line Clubhouse for computer people

https://late.sh/
3•itherseed•53m ago•0 comments

Dashrath Manjhi – Mountain Man

https://en.wikipedia.org/wiki/Dashrath_Manjhi
2•bch•54m ago•0 comments

America's AI labs are under threat from cheap Chinese rivals

https://economist.com/business/2026/07/21/americas-ai-labs-are-under-threat-from-cheap-chinese-ri...
2•andsoitis•55m ago•1 comments

The conservative road to nowhere: Hanson's empty populism

https://www.newpolitics.com.au/p/the-road-to-nowhere-hansons-empty
4•modernhousewife•57m ago•0 comments

Faze Marketing – Free Platform for Developers to Connect with UGC Creators

https://apps.apple.com/us/app/faze-marketing/id6778672309
1•marketingapps•59m ago•0 comments

Luau Type Functions

https://luau.org/types/type-functions/
1•Philpax•1h ago•0 comments

Hydrogen Production utilizing nuclear process heat

https://dae.gov.in/dae-inaugurates-worlds-first-hydrogen-production-facility-based-on-copper-chlo...
2•thelastgallon•1h ago•1 comments

Oracle's credit rating drops to one level above junk [video]

https://www.youtube.com/watch?v=T757udwH45Q
1•rossdavidh•1h ago•2 comments

Lifesaving Genetics Tool Works Best If You're White

https://www.nytimes.com/2026/07/20/science/polygenic-risk-scores-diversity.html
1•bookofjoe•1h ago•1 comments