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

Fireshow: Don't send the deck later – walk them through it live on the call

https://fireshow.live/
1•Villmike•2m ago•0 comments

The Mathematical Dance Inside Plant Cells

https://www.quantamagazine.org/the-hidden-mathematical-dance-inside-plant-cells-20260504/
1•lschueller•3m ago•0 comments

What Makes Art Great?

https://nabeelqu.substack.com/p/what-makes-art-great
1•aworks•6m ago•1 comments

What Happened with Mars Sample Return?

https://mceglowski.substack.com/p/what-happened-with-mars-sample-return
2•pavel_lishin•7m ago•0 comments

Barocal can cool your food and drink by squeezing a hunk of plastic crystals

https://techcrunch.com/2026/05/04/barocal-can-cool-your-food-and-drink-by-squeezing-a-hunk-of-pla...
1•Brajeshwar•8m ago•0 comments

For Google Advertisers Who Overpaid the Monopoly – Don't Hate, Arbitrate

https://www.adexchanger.com/antitrust/for-google-advertisers-who-overpaid-the-monopoly-dont-hate-...
2•omer_k•8m ago•0 comments

GitHub Is Down

https://www.githubstatus.com/incidents/72q3n8yxthcy
13•gen220•10m ago•2 comments

Is Mercury.com Down?

1•adam_gyroscope•10m ago•0 comments

An Update on ERSC Availability

https://ersc.io/blog/ersc-availability
1•steveklabnik•11m ago•0 comments

KAL – The Kube API Linter

https://github.com/kubernetes-sigs/kube-api-linter
1•ankitg12•12m ago•0 comments

Evolution has reused the same genes for 120M years

https://phys.org/news/2026-04-evolution-reused-genes-million-years.html
1•gmays•12m ago•0 comments

Sierra Raises $950M at $15B Valuation

https://sierra.ai/blog/better-customer-experiences-built-on-sierra
2•doppp•12m ago•0 comments

Unified physics theory machine-verified in Lean 4 (504 K lines, 0 sorry)

https://ramzesx.github.io/Omega-Theory-Discrete-Spacetime/papers/completeomegatheory/
1•NorbertMarch•14m ago•0 comments

Postgresparser: ANTLR-based PostgreSQL query parser for Go

https://github.com/ValkDB/postgresparser
1•thunderbong•14m ago•0 comments

BrowseNotes – Sticky notes anchored to text on any webpage

https://chromewebstore.google.com/detail/browsenotes/imoakmnljlcbbkhmelagegjdlonhfhcf
1•browseby•14m ago•0 comments

The AI supply crunch is here

https://www.economist.com/leaders/2026/04/30/the-ai-supply-crunch-is-here
2•1vuio0pswjnm7•15m ago•0 comments

Amazon Supply Chain Services: Amazon’s logistics network, open to every business

https://www.aboutamazon.com/news/retail/amazon-supply-chain-services-for-business
2•ryanhn•15m ago•0 comments

Quantifying the impact of AI data centers in a warming world

https://www.researchgate.net/publication/403073048_The_data_heat_island_effect_quantifying_the_im...
1•cdrnsf•16m ago•0 comments

Expanded AMD HDMI 2.1 support is coming to Linux

https://www.gamingonlinux.com/2026/05/expanded-amd-hdmi-2-1-support-is-coming-to-linux/
1•speckx•16m ago•0 comments

Alberta voter list leak is a potential public safety disaster

https://globalnews.ca/news/11828244/alberta-voter-list-leak-public-safety-disaster/
3•Teever•16m ago•2 comments

Show HN: Bonsai 1.7B ternary model at 442T/s on M4 Max

https://agents2agents.ai/bonsai
2•hhuytho•17m ago•0 comments

Ask HN: What is your favorite YouTube channel for developers?

2•chistev•17m ago•3 comments

Content for Content's Sake

https://lucumr.pocoo.org/2026/5/4/content-for-contents-sake/
1•ChoosesBarbecue•18m ago•0 comments

Representation Is All You Need

https://joker666.github.io/blog/2024-10-26-representation-is-all-you-need
1•joker666•18m ago•0 comments

"Open" doesn't mean what it used to

https://lr0.org/blog/p/open/
1•lr0•20m ago•0 comments

Seed oils in the pathogenesis of CVD also warrants further investigation

https://pmc.ncbi.nlm.nih.gov/articles/PMC13082181/
1•bilsbie•21m ago•0 comments

Hedera Introduces CLPR: The Bridgeless Cross-Ledger Protocol

https://www.hashgraph.com/clpr/
1•kfrzcode•25m ago•0 comments

Hello, Babashka

https://clojurecivitas.org/babashka/hello.html
4•drob518•25m ago•0 comments

Ask HN: A Spec Driven Back end development platform to build and evolve safely

1•undermineduser•25m ago•0 comments

Meta's historic loss in court could cost more than $375M

https://www.theverge.com/policy/922380/new-mexico-meta-public-nuisance-trial-kids-safety
1•Brajeshwar•26m ago•0 comments