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

Comments

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

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

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

Content Scraping Issue: Risks and Dangers of Artificial Intelligence

https://sites.google.com/view/amenintare-gemini/
1•marinescu•2m ago•0 comments

Anthropic's Mythos Model Is Being Accessed by Unauthorized Users

https://www.bloomberg.com/news/articles/2026-04-21/anthropic-s-mythos-model-is-being-accessed-by-...
2•mfiguiere•6m ago•0 comments

The Birth Certificate for AI Agents

https://dnsid.ai
1•cdrnsf•8m ago•0 comments

Yojam: A macOS default-browser shim that routes URLs through a rule engine

https://github.com/fluffypony/yojam
1•birdculture•11m ago•0 comments

Embedded 191,922 Met artworks to find hidden twins across 4k years

https://jmp1062.github.io/met-weirdest-art/
1•jperryjperry•14m ago•1 comments

Show HN: CLI-use – turn any MCP server into a CLI in one command

1•justvugg•16m ago•0 comments

Tenstorrent's Large Compute Cluster, Generates Video Faster Than Real Time

https://www.eetimes.com/tenstorrent-previews-large-compute-cluster-generates-video-faster-than-re...
1•montyanderson•18m ago•0 comments

A Boy That Cried Mythos: Verification Is Collapsing Trust in Anthropic

https://www.flyingpenguin.com/the-boy-that-cried-mythos-verification-is-collapsing-trust-in-anthr...
2•MBCook•18m ago•0 comments

Objectively Measured Daytime Napping Pattern&All-Cause Mortality in Older Adults

https://jamanetwork.com/journals/jamanetworkopen/fullarticle/2847953
2•bookofjoe•20m ago•0 comments

Edster – An open-source local AI agent with swarm mode and a web UI

https://github.com/unrealumanga/Nedster
2•unrealumanga•20m ago•0 comments

Parrot is a C++ library for fused array operations using CUDA/Thrust

https://github.com/NVlabs/parrot
1•tosh•22m ago•0 comments

What America Has Lost in the War with Iran

https://www.americanprogress.org/article/what-america-has-lost-in-the-war-with-iran/
3•KnuthIsGod•22m ago•0 comments

Might be the most Hollywood style launch video I've seen

https://twitter.com/photon_hq/status/2046656633749860430
2•juliec216•23m ago•0 comments

Terence Tao: On the importance of partial progress (2012)

https://terrytao.wordpress.com/career-advice/on-the-importance-of-partial-progress/
1•vinipolicena•23m ago•0 comments

TSRX – TypeScript Language Extension for Declarative UI

https://tsrx.dev/
1•bpierre•24m ago•0 comments

MCPorter – Call MCPs from TypeScript or as CLI

https://github.com/steipete/mcporter
1•dinakars777•33m ago•1 comments

WireGuard for Windows Reaches v1.0

https://lists.zx2c4.com/pipermail/wireguard/2026-April/009580.html
4•zx2c4•37m ago•0 comments

Why WooCommerce Needs an AI Store Manager, Not Another Chatbot?

https://heysarva.com
1•aishwaryashthe•38m ago•0 comments

Canadians pay more than 3.50x than Poles on matched BTC card route

https://augea.io/reports/retail-crypto-cost-benchmark-2026-q2
2•pharrisson•39m ago•0 comments

Fontspots: Eurostile

https://typesetinthefuture.com/2014/11/29/fontspots-eurostile/
2•_vaporwave_•40m ago•0 comments

Show HN: I built a coding agent that works with 8k context local models

https://github.com/razvanneculai/litecode
1•razvanneculai•42m ago•0 comments

.NET 10.0.7 Out-of-Band Security Update

https://devblogs.microsoft.com/dotnet/dotnet-10-0-7-oob-security-update/
3•yread•45m ago•0 comments

Trump is super unpopular. So why don't Democrats have a bigger lead?

https://www.natesilver.net/p/sbsq-31-trump-is-super-unpopular
4•7777777phil•45m ago•2 comments

AI Unmasked: a series of courses on AI without the hype

https://www.aiunmasked.io/
2•quietproof•45m ago•0 comments

We heard you: the new Framework Laptop 13 Pro [video]

https://www.youtube.com/watch?v=GnOpIQJnYWU
1•znpy•50m ago•1 comments

Ask HN: Claude Code Alternative

5•Frannky•50m ago•3 comments

Air Force can't quit the A-10 Warthog, extends service into 2030

https://taskandpurpose.com/news/air-force-a10-warthog-2030/
6•ilamont•50m ago•1 comments

Tell HN: My open-source project hit 5k registered users

5•darkhorse13•53m ago•1 comments

The distribution of power and inclusiveness across deep time

https://www.science.org/doi/10.1126/sciadv.aec1426
1•PaulHoule•53m ago•0 comments

Taskd – a new task management system

https://lmd.sh/taskd-a-new-task-management-system/
2•levidurfee•53m ago•0 comments