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?

The Infinite Policeman – Preliminary Movement

https://medium.com/luminasticity/the-infinite-policeman-preliminary-movement-5038a293c1f2
1•bryanrasmussen•1m ago•0 comments

Playing with Jupyter style playbooks that work with Claude Code

https://old.reddit.com/r/ClaudeCode/comments/1tgdvex/playing_with_jupyter_style_playbooks_that_work/
1•bgnm2000•2m ago•0 comments

Building a Micro-Drilling Machine [video]

https://www.youtube.com/watch?v=KrStsdNG5go
1•pillars•5m ago•0 comments

Better CSS fluid sizing with round()

https://ishadeed.com/article/css-round/
1•BaudouinVH•6m ago•0 comments

Void Room – an offline writing app that does nothing on purpose

https://noirsonance.com/product/void-room/
1•Rimedag•6m ago•0 comments

Your Evals Will Break and You Won't See It Coming

https://wanglun1996.github.io/blog/your-evals-will-break.html
1•muggermuch•6m ago•0 comments

DeerFlow 2.0 – Deep Exploration and Efficient Research Flow

https://github.com/bytedance/deer-flow
1•epaga•8m ago•0 comments

More than 100 UK datacentres plan to burn gas to generate electricity

https://www.theguardian.com/business/2026/may/18/uk-datacentres-plan-to-burn-gas-to-generate-elec...
2•pera•11m ago•0 comments

SFC vs. Vizio Ruling on General Public License Compliance

https://www.dlapiper.com/en-us/insights/publications/2026/01/sfc-v-vizio-ruling-on-general-public...
1•beckford•13m ago•0 comments

Animated 3D map of Chongqing metro [video]

https://www.bilibili.com/video/BV16Z421W7o3/?spm_id_from=333.1387.homepage.video_card.click
1•decimalenough•14m ago•1 comments

2ality Blog: Temporarily Offline because of AI

https://2ality.com
1•tbassetto•16m ago•0 comments

Old Kindle e-readers will stop working on May 20th

https://goodereader.com/blog/kindle/old-kindle-e-readers-will-stop-working-on-may-20th
2•kozmonaut•16m ago•0 comments

Ask HN: Which AI harness comes close to Claude Code?

1•shivang2607•16m ago•0 comments

Code Orange: Fail Small is complete. The result is a stronger Cloudflare network

https://blog.cloudflare.com/code-orange-fail-small-complete/
2•thewisenerd•20m ago•0 comments

`Never-ending' AI slop strains corporate hacking reward schemes

https://www.ft.com/content/dbec4441-02dc-4053-8500-85677973d324
2•1vuio0pswjnm7•25m ago•0 comments

Spring Physics in my Word Game? A technical deep dive into SvelteJS animations

https://colechamberlin.substack.com/p/spring-physics-in-my-word-game
2•jessecoleman•28m ago•0 comments

Ask HN: Favorite In-Depth Deep Dives

4•vsupalov•28m ago•1 comments

Defence Tech Jobs for the week of 2026-05-18

https://defencetechjobs.substack.com/p/defence-tech-jobs-for-the-week-of-561
4•hnsa•31m ago•0 comments

Hacking a weird TV censoring device [video]

https://www.youtube.com/watch?v=a6EWIh2D1NQ
3•goodmythical•43m ago•0 comments

AI Eats the World (2026)

https://www.ben-evans.com/presentations
3•andrewjb•44m ago•0 comments

RAG vs. Fine-Tuning – The Question Every AI Builder Gets Wrong

https://thingswithai.org/posts/rag-vs-fine-tuning
2•UtkarshPatel13•45m ago•0 comments

Wayland Compositor in Minecraft [video]

https://www.youtube.com/watch?v=cTkEM7b0IQw
1•bigyabai•46m ago•0 comments

Stanford AA228V: Validation of Safety Critical Systems (2025)

https://www.youtube.com/playlist?list=PLoROMvodv4rOq1LMLI8U7djzDb8--xpaC
2•imakwana•47m ago•1 comments

Donald E. Knuth: The letter S [pdf]

https://gwern.net/doc/design/typography/1980-knuth.pdf
3•tzury•48m ago•0 comments

TestTest

2•kollittle•48m ago•0 comments

Lost at sea: the man who vanished for 14 months (2015)

https://www.theguardian.com/world/2015/nov/07/fisherman-lost-at-sea-436-days-book-extract
3•downbad_•48m ago•1 comments

Pope creates AI study group as Vatican prepares release of first encyclical

https://apnews.com/article/vatican-artificial-intelligence-pope-musk-nvidia-trump-889c0066f0d5ce7...
2•1vuio0pswjnm7•49m ago•0 comments

SPF Softfail vs. Hardfail: A Data-Backed Decision Guide

https://dmarcguard.io/blog/spf-softfail-vs-hardfail/
1•meysamazad•50m ago•0 comments

LLM Tracing with MLflow AI Gateway

https://karnwong.me/posts/2026/04/llm-tracing-with-mlflow-ai-gateway/
1•meysamazad•50m ago•0 comments

Letters from a Stoic by Seneca

https://lars-christian.com/posts/2026-04-04-letters-from-a-stoic-by-seneca/
1•meysamazad•51m ago•0 comments