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

Comments

nine_k•11mo 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•11mo ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•11mo ago
They mention this in the article.
spockz•11mo 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•11mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•11mo 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•11mo 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•11mo 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•11mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•11mo ago
This was very well written. Excellent article!
NetOpWibby•11mo ago
Is this like MessagePack for Haskell?

US inflation surges to 3.3% as Iran war fuels energy price shock

https://www.euronews.com/business/2026/04/10/us-inflation-surges-to-33-as-iran-war-fuels-energy-p...
1•geox•26s ago•0 comments

Amazon ending support for older Kindles

https://techcrunch.com/2026/04/08/amazon-to-end-support-for-older-kindle-devices-2012/
1•eggy•1m ago•0 comments

AI on the couch: Anthropic gives Claude 20 hours of psychiatry

https://arstechnica.com/ai/2026/04/why-anthropic-sent-its-claude-ai-to-an-actual-psychiatrist/
1•Levitating•3m ago•1 comments

'Survivor' Style Corporate Retreat Descends into Hellish Nightmare

https://www.thedailybeast.com/survivor-style-corporate-retreat-descends-into-hellish-nightmare/
1•cainxinth•3m ago•0 comments

Cerebras Is Coming to AWS

https://www.cerebras.ai/blog/cerebras-is-coming-to-aws
3•jbredeche•4m ago•0 comments

Mauna Loa Solar Observatory Reopens to Support Artemis II Mission

https://www.meteorologicaltechnologyinternational.com/news/space-weather/mauna-loa-solar-observat...
1•lgeorget•4m ago•0 comments

US summons bank bosses over cyber risks from Anthropic's latest AI model

https://www.theguardian.com/technology/2026/apr/10/us-summoned-bank-bosses-to-discuss-cyber-risks...
1•ascold•5m ago•0 comments

Ask HN: Why Databases Instead of Filesystem?

2•uticus•5m ago•1 comments

Ask HN: Will we ever do something about patent trolls?

2•giancarlostoro•7m ago•0 comments

Fewer than 3 in 10 register for HMRC's Making Tax Digital shake-up

https://www.theregister.com/2026/04/10/mtd_hmrc/
1•Brajeshwar•7m ago•0 comments

Claude Mythos and misguided open-weight fearmongering

https://www.interconnects.ai/p/claude-mythos-and-misguided-open
1•speckx•9m ago•0 comments

Ask HN: How do designers and marketers use Command Line? AI? Technical tools?

1•vietthan•9m ago•0 comments

How do you and your team manage secrets day to day?

1•markvm•10m ago•0 comments

The Chilling Role of ChatGPT in Mass Shootings and Other Violence

https://www.motherjones.com/media/2026/04/chatgpt-tumbler-ridge-fsu-openai-chatbots-mass-shootings/
1•cdrnsf•12m ago•0 comments

Powell, Bessent discussed Mythos cyber threat with major U.S. banks

https://www.cnbc.com/2026/04/10/powell-bessent-us-bank-ceos-anthropic-mythos-ai-cyber.html
2•kaycebasques•13m ago•1 comments

Propulsion and Energy Physicist Photos at Deep Tech Week NYC 2026

https://www.flickr.com/photos/timventura/albums/72177720333020849/
1•timventura•13m ago•1 comments

The growth metric Silicon Valley loves most is also its least trusted

https://www.latimes.com/business/story/2026-04-07/growth-metric-silicon-valley-loves-most-is-also...
2•1vuio0pswjnm7•13m ago•0 comments

The effects of caffeine consumption do not decay with a ~5 hour half-life

https://www.lesswrong.com/posts/vefsxkGWkEMmDcZ7v/the-effects-of-caffeine-consumption-do-not-deca...
5•swah•13m ago•1 comments

Show HN: LightningWindowSwitcher – search for open windows on macOS/Win

https://lightningwindowswitcher.com/
1•afonso_soares•14m ago•0 comments

A Chicago Fan's Recordings of 10k Music Shows Are Now Online

https://blockclubchicago.org/2026/04/10/from-early-nirvana-to-phish-a-chicago-fans-secret-recordi...
2•xnx•15m ago•0 comments

Most Americans are using AI but are sick and tired of hearing about it: survey

https://nypost.com/2026/04/09/tech/most-americans-are-using-ai-but-people-are-sick-and-tired-of-h...
2•1vuio0pswjnm7•15m ago•0 comments

Journalists, whistleblowers and activists should set a Dead Man's Switch

https://alcazarsec.com/deadmanswitch/use-cases/journalists
1•alcazar•17m ago•0 comments

Rethinking the Riemann Hypothesis through wave interactions (Flux perspective)

https://zenodo.org/records/19450903
2•kimhanhee•18m ago•0 comments

Show HN: AI Readiness Checker – See how AI bots interact with your website

https://zerokit.dev/tools/ai-readiness.html
1•SCbusiness•18m ago•0 comments

EU Big Tech fines top $7B in 2 years

https://www.cnbc.com/2026/04/10/google-meta-big-tech-6-billion-euros-eu-fine.html
3•1vuio0pswjnm7•19m ago•0 comments

Founders, Open Your App

https://timleland.com/founders-open-your-app/
1•TimLeland•19m ago•0 comments

Show HN: Zeroclawed: Secure Agent Gateway

https://github.com/bglusman/zeroclawed
3•bglusman•19m ago•0 comments

Is Schoolwork Optional Now?

https://www.theatlantic.com/technology/2026/04/ai-agents-school-education/686754/
1•JumpCrisscross•20m ago•0 comments

A full-on embrace: how the EU's largest news publisher fell in love with the US

https://www.theguardian.com/media/2026/apr/08/how-axel-springer-germany-mathias-doepfner-us-polit...
1•doener•21m ago•0 comments

Proton: Born Private

https://proton.me/mail/born-private
2•qkc3p3Jbf4•21m ago•1 comments