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?

EU antitrust chief Ribera backs digital tax on Big Tech, calls it 'peanuts'

https://www.reuters.com/business/retail-consumer/eu-antitrust-chief-ribera-backs-digital-tax-big-...
1•giuliomagnifico•2m ago•0 comments

Huawei's HarmonyOS(Independent OS) Crosses 100M Device Milestone

https://www.huawei.com/en/news/2026/12/harmonyos-collective-achievement-award
1•DeepLogin•4m ago•1 comments

Human Needs >> Genie Needs

https://newsletter.kentbeck.com/p/human-needs-genie-needs
1•umbula•8m ago•0 comments

"allow read: if true" is two permissions, and a field mask isn't one

https://redsuture.com/research/firestore-get-vs-list
1•MikeDMuindi•14m ago•0 comments

Show HN: We turned our marketing site into a flight simulator

https://okae.ai/landing
2•okae-team•15m ago•0 comments

The first beta of Android 18

https://developer.android.com/blog/posts/the-first-beta-of-android-18
1•exploraz•16m ago•0 comments

An agent governance framework for enterprises

https://luciobaiocchi.com/blog/agent-governance-security-framework
3•luciobaiocchi•18m ago•0 comments

Forge Engine – Visual 2D Game Maker Editor

https://forgeengine.space/
1•Benjaminqwer•19m ago•1 comments

Out of the Muck

https://bengodfrey.dev/blog/out-of-the-muck/
1•sudo-bendg•20m ago•0 comments

Adversarial Hiring

https://drive.google.com/file/d/1_u30ecKI2NnLjyE7fbSLbcpKF-njASfb/view
2•rustoo•20m ago•0 comments

Zig: Package conflict management and build system docs

https://ziglang.org/devlog/2026/#2026-12-04
1•joshcsimmons•22m ago•0 comments

V Programming Language 0.5.3

https://github.com/vlang/v/releases/tag/0.5.3
2•hggh•23m ago•0 comments

Post-quantum RSA (terabyte key) (2017)

https://eprint.iacr.org/2017/351
1•networked•23m ago•0 comments

The Hidden Cost of Getting Everything Right

https://www.derekthompson.org/p/what-happens-when-we-build-a-machine
1•thunderbong•24m ago•0 comments

Ente was built by ex Google engineer in response to project maven

https://twitter.com/Felix_Josemon/status/2129063217456628176
2•tachyons•26m ago•0 comments

Keep AI under human control or risk extinction, Anthropic investor warns

https://www.bbc.com/news/articles/c6wy48yv4xw7o
4•jo_in_europe•27m ago•0 comments

Quantum, AI, and Your Keys: You Don't Have to Do Anything

https://gno.land/r/nym-nobody777/blog:p/quantum-ai-keys
1•jaekwon•29m ago•0 comments

Why Nvidia just teamed up with a chip rival [video]

https://www.youtube.com/watch?v=ZQBsvs9_mds
1•saikatsg•30m ago•0 comments

Pushin becomes first Git forge to support post-quantum Git over SSH

https://pushin.eu/blog/2026-12-04-post-quantum-ssh
1•pjullrich•31m ago•1 comments

Against AI-Shaming

https://nitter.click/i/article/2117700723345338412?__aragorn=O9bevrmaXdo_p2biTQFm26p0tWcQCLyvfgX8...
2•Tomte•38m ago•0 comments

State of SSL and TLS Encryption in Late 2026

https://zerossl.com/p/ssl-in-late-2026
1•taubek•42m ago•0 comments

EKA-1 Technical Report [pdf]

https://soket.ai/reports/eka-1-technical-report.pdf
1•porridgeraisin•48m ago•0 comments

What kind of facilities does the Internet Archive have and how is it operated?

https://gigazine.net/gsc_news/en/20260119-web-inside-internet-archives/
3•FrankyHollywood•50m ago•1 comments

I closed one third of all Plasma bugs

https://thelibre.news/how-i-closed-one-third-of-all-plasma-bugs/
2•Gander5739•57m ago•0 comments

Anssi: Recent AI Advances and Their Impact on Cryptography [in French]

https://cyber.gouv.fr/actualites/avis-de-lanssi-sur-avancees-permises-par-lia-et-leur-impact-sur-...
1•otrack•1h ago•0 comments

New Legal Authority for Authorities to Intercept 2FA Messages to Access Accounts

https://decoded.legal/blog/2026/12/a-new-lawful-authority-for-the-interception-of-two-factor-auth...
2•DeepLogin•1h ago•1 comments

Ask HN: You're the most tech savvy US President ever. What's your AI policy?

1•noduerme•1h ago•1 comments

Microbiome home tests are taking off. Can they be trusted?

https://www.nature.com/articles/d41586-026-03710-y
1•mfld•1h ago•0 comments

Nvidia finds 'material weaknesses' in controls over financial reporting

https://www.ft.com/content/5b6c122b-1b13-4d06-8f4e-b43705b68803
6•uxhacker•1h ago•1 comments

Pipedream confirms compromised API keys and is temporarily unavailable

https://pipedream.com/
5•aghuang•1h ago•0 comments