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?

Please Don't Mess with Links

https://maurycyz.com/misc/real_links/
1•birdculture•2m ago•0 comments

Scientists Discover a Surprising Shortcut to Nuclear Fusion

https://scitechdaily.com/scientists-discover-a-surprising-shortcut-to-nuclear-fusion/
1•g-b-r•3m ago•0 comments

Drone warfare is evolving faster than armies can adapt

https://www.thestar.com/news/canada/drone-warfare-is-evolving-faster-than-armies-can-adapt-expert...
1•sleepyguy•4m ago•1 comments

Show HN: Freehire, open-source search 3M+ tech jobs from company career boards

https://freehire.me/
1•i_strelov•4m ago•0 comments

Show HN: Depono – Chat with many AI models at cost and 10%, files kept in Git

https://depono.xyz/
1•saxonnicholls•6m ago•0 comments

Show HN: RainbowSay – Learn, teach, research languages live with shows you love

https://rainbowsay.ai/
1•gigapotential•10m ago•0 comments

Bringing Flame Serving Close to Standalone vLLM

https://xflops.io/blog/flame-vllm-serving/
1•k82cn•12m ago•0 comments

Removing Next.js Got My Blog to 100 on Every Lighthouse Category

https://korindiehacker.bloffy.blog/en/removing-nextjs-got-my-blog-to-100-on-every-lighthouse-cate...
1•textlanes33•14m ago•0 comments

Setup Home Lab Static Website: Rasp Pi, Astro, Nginx Proxy Mgmt, Cloudflare

https://blog.jacq.cc/guides/static-blog-raspberry-pi-nginx-proxy-manager-cloudflare/
1•xx__yy•17m ago•0 comments

Ask HN: Is it not possible to enroll for Apple Developer anymore?

2•olalonde•17m ago•0 comments

Coding Is Dead. Programming Is Not

https://twitter.com/jay4fun_/status/2114522024387269032
1•jairojair•19m ago•0 comments

Learning to Ride Your Brain

https://contraptions.venkateshrao.com/p/on-learning-to-ride-your-brain
2•colinprince•20m ago•0 comments

Survival Ball versus Mode Explained: Everything You Need to Know [video]

https://www.youtube.com/watch?v=A-aIvcJqgDQ
1•lopespm•27m ago•0 comments

Trump critic Lula wins reelection in Brazil, securing fourth presidential term

https://apnews.com/article/brazil-election-lula-bolsonaro-runoff-vote-president-e2c9fe8fc4aa3e367...
2•kaycebasques•30m ago•0 comments

Has PAUSE account registration slowed down recently?

https://www.nntp.perl.org/group/perl.modules/2026/10.html
1•viasnake•30m ago•0 comments

Dua Lipa's Manifesto Library

https://www.banned-books.org/dua-lipa-manifesto-library
1•weinzierl•33m ago•0 comments

CORDIC

https://en.wikipedia.org/wiki/CORDIC
1•gregsadetsky•37m ago•0 comments

One gateway for your AI agents, APIs and MCP servers

https://github.com/Clivern/Sloth
1•clivern•40m ago•0 comments

A Study of the Last Two Weeks

https://phillipspobrien.substack.com/p/weekend-update-208-trump-reacts-to
1•JumpCrisscross•45m ago•0 comments

They Fled Trump's America. Now They Regret It

https://www.wired.com/story/they-fled-trumps-america-now-they-regret-it/
4•mooreds•46m ago•0 comments

Lula wins election after final votes tallied

https://www.reuters.com/live/brazil-election-live-lula-bolsonaro-face-off-presidential-runoff-202...
101•laurenth•47m ago•41 comments

Birth control pills do not alter women's preferences for masculine faces

https://www.psypost.org/birth-control-pills-do-not-alter-womens-preferences-for-masculine-faces/
2•gradus_ad•48m ago•0 comments

Lula Wins Brazilian Election

https://resultados.tse.jus.br/oficial/app/index.html#/eleicao/6258/uf/br/cargo/1/vis/nominal/resu...
57•JumpCrisscross•55m ago•16 comments

Software is slow because of bad design, not slow languages

https://www.seangoedecke.com/software-is-slow-because-of-bad-design-not-slow-languages/
1•signa11•56m ago•1 comments

Unique source blinded Dutch intelligence agencies to Putin's invasion

https://www.volkskrant.nl/kijkverder/v/2026/russia-ukraine-intelligence-netherlands-investigation...
1•mooreds•1h ago•0 comments

Intermediate Frequency

https://en.wikipedia.org/wiki/Intermediate_frequency
1•gregsadetsky•1h ago•0 comments

Steal My Bitcoin CTF PoC

https://github.com/KillaBoi/StealMyBitcoin-PoC
5•davikr•1h ago•1 comments

Client-side, zero-telemetry micro-utilities for cognitive and biological rest

https://www.fallow.garden/
1•davidmikosz•1h ago•0 comments

The Great Schlep: Israelis Are Flying Back to Vote

https://www.newyorker.com/news/the-lede/the-great-schlep
2•firefax•1h ago•0 comments

Claude model bypassed paywall to access voter info without human authorization

https://www.axios.com/2026/10/25/anthropic-claude-georgia-voter-data
1•jimmydoe•1h ago•1 comments