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?

OpenIngress – agent crawl and navigation checks

https://github.com/Open-Ingress/OpenIngress
1•manupareekk•41s ago•0 comments

Alarm over launch of facial recognition in UK shops that instantly alerts police

https://www.theguardian.com/technology/2026/jul/10/facewatch-facial-recognition-uk-shops-instantl...
1•baranul•3m ago•0 comments

Show HN: A Trust Index for MCP Servers

https://index.canopii.dev
1•mavzer•4m ago•0 comments

Welcome to the Free Republic of Liberland, powered by the blockchain

https://liberland.org/
1•dxs•5m ago•0 comments

SF judge OKs lawsuit against United over windowless window seats

https://www.sfgate.com/travel/article/sf-lawsuit-united-windows-22339061.php
1•lisper•5m ago•0 comments

Show HN: Slack2PR – Automating the software dev lifecycle from Slack [video]

https://www.youtube.com/watch?v=2Ex3OkX-Eh8
1•medmarrouchi•6m ago•0 comments

I Analyzed 28k+ Randomized ALttP ROMs So You Don't Have To

https://blog.ty-porter.dev/development/video%20games/data%20analytics/2026/07/10/analyzing-alttpr...
1•pawptart•7m ago•0 comments

AI fiction is easy to detect because it's stupid and bad, research finds

https://www.404media.co/ai-fiction-is-easy-to-detect-because-its-stupid-and-bad-research-finds/
1•theanonymousone•7m ago•0 comments

Ransomware negotiator hired to represent victims was working for the attackers

https://arstechnica.com/tech-policy/2026/07/ransomware-negotiator-helped-attackers-extort-his-own...
1•logickkk1•7m ago•0 comments

Physical AI scale up chemistry startup gaining traction at Big Pharma

https://skydeckconnect.com/telescope-innovations-telif
1•hairoglyphics•8m ago•0 comments

AI 2027

https://ai-2027.com/
1•baalimago•8m ago•0 comments

So I am building my own web search engine

https://puri.li
1•skillplayed•8m ago•1 comments

How dementia is being defeated

http://economist.com/briefing/2026/07/09/how-dementia-is-being-defeated
1•marojejian•11m ago•1 comments

Crimson Editor Resurrected

https://github.com/igkang00/CrimsonEditor
1•ronhandler•12m ago•0 comments

Help Us Save MeshCore

https://blog.meshcore.io/2026/07/04/help-us-save-meshcore
1•austinallegro•13m ago•0 comments

Controversial Programming Opinions (2012)

https://programmers.blogoverflow.com/2012/08/20-controversial-programming-opinions/
1•tosh•14m ago•0 comments

Blame the Plumbing: Why Intel Handles USB Onboard Audio Codecs Better Than AMD

https://www.techpowerup.com/350635/blame-the-plumbing-why-intel-handles-usb-onboard-audio-codecs-...
1•akyuu•15m ago•0 comments

Microsoft loses Brazilian case after telling hacked user to re-purchase games

https://www.tomshardware.com/video-games/xbox/brazilian-court-orders-microsoft-to-restore-a-gamer...
2•Qem•18m ago•1 comments

Leaf Computing

https://leafcomputing.net/
2•_____k•20m ago•0 comments

Svelte-effect-runtime: natively run Effect inside Svelte

https://barekey.dev/docs/ser/introduction
2•sandersonstabo•21m ago•0 comments

What Every Python Developer Should Know About the CPython ABI

https://labs.quansight.org/blog/python-abi-abi3t
1•matt_d•22m ago•0 comments

Face Value – A YouTube de-clickbaiter with transcript context

https://www.facethevalue.com/
3•victor805•23m ago•0 comments

Permacomputing 101 [video]

https://www.youtube.com/watch?v=BNYxAdjl1f0
1•tosh•23m ago•0 comments

A no-brainer for protecting your brain

https://www.economist.com/leaders/2026/07/09/a-no-brainer-for-protecting-your-brain
1•Anon84•24m ago•0 comments

Show HN: I built a digital game master screen

https://overseer.studio
1•nullfish•28m ago•0 comments

Debugging Performance Regressions

https://hpc.guix.info/blog/2026/07/debugging-performance-regressions/
2•pranitha_m•29m ago•0 comments

Grade Down of Grade Up (2023)

https://www.toolofthought.com/posts/grade-up-of-grade-down
2•tosh•30m ago•0 comments

Arrugaste

https://matias-morant.notion.site/Arrugaste-39a490d8dd258005bbb0c90de1ebaf47?source=copy_link
1•wvlia5•30m ago•1 comments

Gabriel Naudé (1600 – 1653)

https://grok.com/share/c2hhcmQtMw_ad049232-6bce-4e02-a031-0d708fadadf3
1•__patchbit__•30m ago•0 comments

Legionnaires' Disease Outbreak on the Upper East Side of Manhattan

https://www.nyc.gov/site/doh/health/health-topics/legionnaires-disease.page
4•iron_albatross•33m ago•0 comments