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

SpaceX just disclosed Musk's new compensation package

https://xcancel.com/gnoble79/status/2049597193670234341
1•doener•55s ago•0 comments

Queen Camilla Unites Winnie-the-Pooh with a Long-Lost Friend

https://www.nytimes.com/2026/04/29/books/queen-camilla-winnie-the-pooh.html
1•ChrisArchitect•5m ago•0 comments

Collective Speed Is Not the Summation of Individual Speed

https://blog.jim-nielsen.com/2026/collective-speed-isnt-the-sum-of-individual-speed/
1•zdw•6m ago•0 comments

Free Solar Radiation, Heat Flux,Temperature,Humidity Data from Dtdss Algorithm

https://cloud.fiaos.org/data/
1•iopoer•7m ago•0 comments

Copy Fail: 732 Bytes to Root on Every Major Linux Distribution

https://xint.io/blog/copy-fail-linux-distributions
2•eyalitki•12m ago•2 comments

What it takes to transpose a matrix

https://gudok.xyz/transpose/
1•signa11•13m ago•0 comments

Meta's multi-billion-dollar Graviton deal

https://www.tomshardware.com/tech-industry/artificial-intelligence/metas-multi-billion-dollar-gra...
1•y1n0•14m ago•0 comments

Tell HN: VS Code v1.117.0 automatically adds GitHub Copilot as your co author

2•adithyassekhar•14m ago•0 comments

Incompressible Knowledge Probes: Measuring what frontier models know

https://01.me/research/ikp/
1•wmf•15m ago•0 comments

Humanoid Robots Will Work as Baggage Handlers at Tokyo Airport

https://www.engadget.com/2160602/humanoid-robots-will-work-as-baggage-handlers-at-tokyo-airport/
1•y1n0•15m ago•1 comments

Iran Proposes Bitcoin Oil Toll

https://decrypt.co/363641/iran-bitcoin-payments-oil-ships-seeking-hormuz-passage
1•janandonly•15m ago•0 comments

Tesla Semi: first truck rolls off high-volume production line

https://electrek.co/2026/04/29/tesla-semi-first-truck-high-volume-production-line/
1•y1n0•16m ago•0 comments

House approves reauthorization of warrantless spy powers

https://thehill.com/homenews/house/5856102-warrantless-spy-powers-fisa-702/
1•divbzero•17m ago•0 comments

Why Model Collapse in LLMs Is Inevitable with Self-Learning

https://hackaday.com/2026/04/29/why-model-collapse-in-llms-is-inevitable-with-self-learning/
1•omer_k•17m ago•0 comments

Europe has a fuel problem: It doesn't know how much it has

https://www.politico.eu/article/europe-fuel-supply-problem/
2•leonidasrup•19m ago•0 comments

Half of 'long shot' Polymarket bets on military action are successful

https://www.ft.com/content/989d335e-275b-4cdc-b51d-4b29fd8895b0
2•petethomas•21m ago•0 comments

Ask HN: Is anyone still using the ChatGPT browser, Atlas?

1•widenrun•26m ago•0 comments

AI optimism surges in Asia, unlike in the U.S.

https://restofworld.org/2026/ai-optimism-asia/
1•TheWeiHu•33m ago•2 comments

The Shadow Glass

https://morrigan-tech.com/blog/the-shadow-glass/
1•milkglass•38m ago•0 comments

OpenObserve Raises $10M Series A

https://openobserve.ai/blog/series-a-announcement/
3•safeie•41m ago•0 comments

Monad Tutorials Timeline

https://wiki.haskell.org/Monad_tutorials_timeline
2•brudgers•51m ago•1 comments

Lessons from Building an OTel Normalizer for GenAI

https://www.groundcover.com/blog/otel-normalizer-genai-part-1
2•thebitofmyheart•56m ago•0 comments

Physicists reveal universal speed limit on quantum information scrambling

https://phys.org/news/2026-04-physicists-reveal-universal-limit-quantum.html
2•thunderbong•1h ago•1 comments

Talking About Dark Matter – Sixty Symbols [video]

https://www.youtube.com/watch?v=qxuMRaUbWow
1•celias•1h ago•1 comments

Show HN: Vela Coach – an open-source coach that reads your Granola transcripts

https://github.com/Vela-Engineering/coach
1•yihlamur•1h ago•0 comments

Ashby's Law of Requisite Variety (Cybernetics)

https://en.wikipedia.org/wiki/Variety_(cybernetics)
1•nomilk•1h ago•0 comments

Humanoid Robots Are Still a Body Problem with Jerry Pratt [video]

https://www.youtube.com/watch?v=fsPDZjWMKMs
3•thunderbong•1h ago•0 comments

Meta stock drops on quarterly results 'internet disruptions' user numbers down

https://www.cnbc.com/2026/04/29/meta-q1-earnings-report-2026.html
4•1vuio0pswjnm7•1h ago•0 comments

In Backlash Against Tech in Schools, Parents Are Winning Rollbacks

https://www.nytimes.com/2026/04/29/technology/parents-school-tech-backlash.html
3•1vuio0pswjnm7•1h ago•0 comments

Tourist dies after being bitten at snake show while on vacation in Egypt

https://www.cnn.com/2026/04/28/africa/tourist-dies-snake-bite-egypt-scli-intl
1•fortran77•1h ago•0 comments