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?

Show HN: Quikdown – 17 KB bidirectional Markdown parser and rich-fence editor

https://github.com/deftio/quikdown
1•deftio•1m ago•0 comments

Now that your newsletter is AI-generated, I've Unsubscribed

https://idiallo.com/blog/unsubscribed-from-ai-generated-newsletters
1•nenadpantelic•1m ago•0 comments

All 4,582 abhangs of Sant Tukaram, translated and theme-mapped with AI

https://sant.ajinkya.ai/tukaram
1•csmonk•1m ago•0 comments

Built a rival to the largest fanfiction platforms – alone, at 17

https://obaid.wtf/jotbook/2026/06/20/built-a-rival-to-the-worlds-largest-fanfiction-platforms.html
1•pknerd•2m ago•0 comments

Where Do India's IPO-Bound Founders Come From?

https://www.dealflowiq.com/p/what-indias-ipo-founders-actually
1•koolhead17•3m ago•0 comments

Show HN: Show HN: Kage – A framework to AI agent collaborate memory

https://kage-core.com/
1•kage18•3m ago•0 comments

Improvements to Std:Format in C++26

https://mariusbancila.ro/blog/2026/06/19/improvements-to-stdformat-in-c26/
1•jandeboevrie•9m ago•0 comments

Windows UI evolution: Clicking an unassociated file

https://movq.de/blog/postings/2026-06-20/0/POSTING-en.html
1•jandeboevrie•11m ago•0 comments

The Omnipod 5 insulin pump has been cracked by open source developers

https://nightscout.github.io/omnipod-five/
1•rcgy•13m ago•1 comments

Continuous Quaternion Delta Encoding

https://biochainai.substack.com/p/the-math-of-motion-visualizing-continuous
1•BioChainAI•22m ago•0 comments

Ethereum: Still Chasing Sovereignty

https://twitter.com/i/status/2068429073429287373
2•johnpradeep•32m ago•0 comments

See if you are in the weights of super intelligence

https://intheweights.com/
1•rishabhpoddar•38m ago•1 comments

Ask HN: If AI didn't exist, what would you be building today?

4•akashwadhwani35•48m ago•4 comments

The Pneumatic Tube Mail System in New York City

https://www.untappedcities.com/pneumatic-tube-mail-new-york-city/
1•thunderbong•50m ago•0 comments

The 100k Whys of AI

https://lcamtuf.substack.com/p/the-100000-whys-of-ai
19•surprisetalk•50m ago•2 comments

Show HN: Image Tools Hub – A Curated Directory of AI Image Tools

https://imgtoolshub.com
1•jtnt101•53m ago•0 comments

Systemd v261 Released

https://github.com/systemd/systemd/releases/tag/v261
3•zdkaster•54m ago•1 comments

SUV buyers undeterred by warnings of risk to pedestrians

https://www.theguardian.com/world/2026/jun/20/suv-risks-warnings-road-safety-buyers-uk-study
4•lambdaone•54m ago•1 comments

Lo and Behold, Reveries of the Connected World (Werner Herzog) [video]

https://www.youtube.com/watch?v=q3g3hqNJqpQ
1•david_shi•55m ago•0 comments

Proof of AGI is the impossibility of evals

https://thewatershed.markpesce.com/quacks-ergo-duck/
1•mpesce•56m ago•1 comments

Mark-of-the-web and pinning installers to sites

https://blog.randomoracle.io/2026/06/20/mark-of-the-web-and-pinning-installers-to-sites/
1•jandeboevrie•1h ago•0 comments

The videogame market is as big as ever, with PC leading growth [pdf]

https://resources.newzoo.com/hubfs/Newzoo%20-%20GMRF%20Q2%202026%20Analyst%20Update.pdf
1•HelloUsername•1h ago•0 comments

Earthquake gate stopping a San Andreas disaster under highest stress in 1K years

https://www.cnn.com/2026/06/19/weather/san-andreas-fault-record-stress-in-1000-years-earthquake-l...
1•mikhael•1h ago•0 comments

OCaml 5.5 Released

https://discuss.ocaml.org/t/ocaml-5-5-0-released/18265
3•azhenley•1h ago•0 comments

FFmpegKit NDK r26c patch and maintained Android fork

https://github.com/ffmpegkit-maintained/ffmpeg-kit
1•FFmpegKit•1h ago•0 comments

How do we prevent Bitrot?

https://notgull.net/bitrot/
1•dmit•1h ago•0 comments

Show HN: Shelve – Native macOS menu bar app that auto-organizes your Downloads

https://github.com/DanielZ1-tech/shelve
1•danielzx1•1h ago•0 comments

Ask HN: Would you let your AI coding agent profile and optimize autonomously?

1•connollystr•1h ago•0 comments

He made your free video player run smoothly. Now he's doing that for robots

https://techcrunch.com/2026/06/19/he-made-your-free-video-player-run-smoothly-now-hes-doing-that-...
1•XzetaU8•1h ago•0 comments

Principles and Practice of Deep Representation Learning [pdf]

https://ma-lab-berkeley.github.io/deep-representation-learning-book/assets/book-main.pdf
2•t_serpico•1h ago•0 comments