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

MeetMarket: Alternative Gay Hookup App

https://meetmarket.io/welcome
1•trulyhnh•1m ago•0 comments

Show HN: Yes, I vibed coded something But not sure what to do with it

https://trustenvelope.com/
1•ebfe1•1m ago•0 comments

Noyb success: ORF.at must correct misleading cookie banner

https://noyb.eu/en/noyb-success-orfat-must-correct-misleading-cookie-banner
1•latexr•1m ago•0 comments

Dire wolf brought back from extinction after 13,000 years [video]

https://www.youtube.com/watch?v=uxo2xIBe_0Y
1•mgh2•3m ago•0 comments

LatConnect60 investment round: AUKUS HiRes SWIR Satellite constellation

https://spacenews.com/latconnect-60-announces-accelerated-growth-investment-round-to-build-aukus-...
2•defrost•8m ago•0 comments

Gelatine Sculpt: The Secret to Lean Muscle and Tight Skin

https://finance.yahoo.com/sectors/healthcare/articles/gelatine-sculpt-exploding-2026-viral-142500...
1•sarynalp•11m ago•0 comments

Ukkonen's suffix tree algorithm in plain English

https://stackoverflow.com/questions/9452701/ukkonens-suffix-tree-algorithm-in-plain-english
1•cl3misch•14m ago•0 comments

Merlin to Bring Military Autonomy Platform to Commercial Air Cargo

https://www.flyingmag.com/merlin-military-autonomy-commercial-cargo/
1•geox•15m ago•0 comments

Rational quantum mechanics: Testing quantum theory with quantum computers

https://dx.doi.org/10.1073/pnas.2523350123
2•p4bl0•19m ago•2 comments

Achiving 900M Lines of the OIN Linux System Table

https://www.softwareheritage.org/2026/05/18/oin-linux-system-table-software-heritage-archive/
1•pabs3•23m ago•0 comments

Yearslong fight over users' right to tweak smart TV software heads to trial

https://arstechnica.com/gadgets/2026/05/inside-the-fight-to-force-vizio-to-share-linux-based-sour...
2•pabs3•27m ago•1 comments

SpaceX's historic IPO plans: Billions in losses and Musk's ownership

https://www.cnbc.com/2026/05/20/spacex-ipo-live-updates.html
3•1vuio0pswjnm7•30m ago•3 comments

Déjà moo: cows can recognise the faces of people they know

https://www.thetimes.com/uk/science/article/cattle-ability-recall-human-faces-ttn6v0nns
3•petethomas•33m ago•0 comments

BoE Governor says Plans to limit food prices 'not sustainable'

https://www.thetimes.com/business/economics/article/m-and-s-boss-attacks-preposterous-food-price-...
1•petethomas•35m ago•0 comments

I 100% vibecoded a webgame that makes money

https://gunguesser.com
2•abhahbnar•39m ago•0 comments

Musk's SpaceX Reveals Its Finances for the First Time

https://www.nytimes.com/2026/05/20/technology/elon-musk-spacex-ipo.html
2•1vuio0pswjnm7•39m ago•1 comments

Show HN: SkinMax – AI Skin Care Coach

https://howolddoyoulook.com/app
1•beast200•40m ago•0 comments

Anthropic says it's about to have its first profitable quarter

https://techcrunch.com/2026/05/20/anthropic-says-its-about-to-have-its-first-profitable-quarter/
1•nl•43m ago•1 comments

Jeff Bezos says bottom half of earners should pay zero in income taxes

https://www.cnbc.com/2026/05/20/jeff-bezos-income-taxes.html
1•khutorni•46m ago•1 comments

OpenAI Stargate: where the US sites stand

https://epoch.ai/blog/openai-stargate-where-the-us-sites-stand
2•nl•47m ago•0 comments

Meta Begins Laying Off Employees as It Transforms Around AI

https://www.wsj.com/tech/ai/meta-begins-laying-off-thousands-of-employees-as-it-transforms-around...
3•1vuio0pswjnm7•47m ago•0 comments

Wispr Flow Is Broken

https://old.reddit.com/r/WisprFlow/comments/1thejf4/wisprflow_what_is_going_on/
1•ayushchat•48m ago•0 comments

Put yourself in a loop with your coding agents

https://github.com/AsteroidHunter/expediter
2•AsteroidHunter•48m ago•3 comments

Dumbshit.app

https://dumbshit.app
2•robsch•49m ago•0 comments

DiffsHub

https://diffshub.com/
2•tosh•50m ago•0 comments

PR Diff Speed Matters

https://twitter.com/mitchellh/status/2057229385963618787
2•tosh•51m ago•0 comments

[RFC] Open Access to Standards Documents – LLVM Project

https://discourse.llvm.org/t/rfc-open-access-to-standards-documents/90856
1•matt_d•51m ago•0 comments

Show HN: FKS2G – LLM-backed metrics for deciding how closely to review code

https://github.com/kmdupr33/fks2g
1•kmdupree•54m ago•0 comments

The Unreasonable Effectiveness of HTML

https://claude.com/blog/using-claude-code-the-unreasonable-effectiveness-of-html
1•galsapir•56m ago•1 comments

Sparrow compliance check for Linux configs

https://github.com/melezhik/Sparrow6/blob/master/documentation/taskchecks.md
2•melezhik•59m ago•1 comments