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•10mo ago

Comments

nine_k•10mo 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•10mo ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•10mo ago
They mention this in the article.
spockz•10mo ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•10mo ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•10mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•10mo 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•10mo 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•10mo 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•10mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•10mo ago
This was very well written. Excellent article!
NetOpWibby•10mo ago
Is this like MessagePack for Haskell?

1•insta_tunnel•25s ago

Show HN: Seite static site generator with MCP server and Claude Code integration

https://seite.sh/
1•sanchezomar•53s ago•0 comments

Mitochondria May Be the Key to Longevity

https://www.nytimes.com/2026/02/19/well/mitochondria-longevity-health.html
1•bookofjoe•1m ago•1 comments

Language Models will be Scaffolds

https://alexzhang13.github.io/blog/2026/scaffold/
1•vinhnx•2m ago•0 comments

Raijin – coding agent harness written in Go [MIT license]

https://github.com/francescoalemanno/raijin-mono
1•frankzig•2m ago•0 comments

Show HN: First native zeroclaw build on Android/Termux (aarch64, no proot)

1•bleaknarratives•4m ago•0 comments

Electrical control of magnetism in 2D materials promises to advance spintronics

https://phys.org/news/2026-02-electrical-magnetism-2d-materials-advance.html
1•bilsbie•5m ago•0 comments

A Curious Trig Identity

https://www.johndcook.com/blog/2026/02/24/a-curious-trig-identity/
1•ibobev•5m ago•0 comments

Trig of Inverse Trig

https://www.johndcook.com/blog/2026/02/25/trig-of-inverse-trig/
1•ibobev•6m ago•0 comments

Python Type Checker Comparison: Empty Container Inference

https://pyrefly.org/blog/container-inference-comparison/
1•ocamoss•6m ago•0 comments

Jjq, a local merge queue for jj

https://pauladamsmith.com/blog/2026/02/introducing-jjq-a-local-merge-queue-for-jj.html
1•ibobev•6m ago•0 comments

Tech legend Stewart Brand on Musk, Bezos and his extraordinary life

https://www.theguardian.com/technology/2026/feb/25/tech-legend-stewart-brand-on-musk-bezos-and-hi...
1•rwmj•7m ago•0 comments

The new Design for Stack Overflow is now live [beta]

https://beta.stackoverflow.com/
2•gortok•8m ago•1 comments

Show HN: I scanned 35 SaaS products across ChatGPT, Claude, Perplexity, Gemini

https://www.bersyn.com/
1•gissurthor•8m ago•0 comments

Illusion and Well-Being: A Perspective on Mental Health [pdf]

https://faculty.washington.edu/jdb/articles/Illusion%20and%20Well-Being.pdf
1•RickJWagner•8m ago•1 comments

UAA – A spec for AI and Human coding collaboration

1•alexandretrotel•9m ago•0 comments

AI-Driven Smart Contract Vulnerability Research

https://github.com/CoinFabrik/scout-audit-ai/blob/master/docs/State-Of-The-Art%20Survey%20Documen...
1•wslh•9m ago•0 comments

Show HN: Me.txt – A personal identity file for AI agents

https://www.metxt.org/
1•morochroyce•9m ago•1 comments

Kyoto University develops AI monk robot equipped with Buddhist scriptures

https://english.kyodonews.net/articles/-/71123
1•itmitica•9m ago•0 comments

OpenPencil: Open-source vector design tool controlled by AI Agents

https://github.com/ZSeven-W/openpencil
1•finiking•10m ago•2 comments

Why backups aren't a recovery strategy (and what is)

https://controlplane.com/blog/post/beyond-backups-designing-systems-that-survive-the-inevitable
2•mrlightning•11m ago•0 comments

Show HN: ContextVM – Running MCP over Nostr

1•gzuuus•12m ago•0 comments

Silicon, not oil: Why the U.S. needs the Gulf for AI

https://restofworld.org/2026/pax-silica-qatar-uae/
1•ericyd•13m ago•0 comments

Show HN: A live Python REPL with an agentic LLM that edits and evaluates code

2•andreabergia•13m ago•1 comments

Vital Cat Update: An Update to the Update

https://terribleminds.com/ramble/2026/02/19/vital-cat-update-an-update-to-the-update/
1•iamnothere•14m ago•1 comments

Show HN: Echos – Self-hosted AI knowledge base for things you forget

https://github.com/albinotonnina/echos
1•dupp•14m ago•0 comments

Show HN: PageDuel – A/B testing from $9/mo, no code required

https://pageduel.com
1•bokman123•18m ago•1 comments

Valve is a bigger threat to PlayStation than Xbox ever was

https://jamie.bearblog.dev/console-market-thesis-valve-bigger-threat-to-playstation-than-xbox-eve...
1•jamieskella•20m ago•0 comments

Never Buy A .online Domain

https://www.0xsid.com/blog/online-tld-is-pain
55•ssiddharth•20m ago•3 comments

Show HN: ZoneMapzone World Clock

https://zonemap.live/
1•zzjoey•22m ago•0 comments