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?

Tell HN: Codex once again autmatically activates /fast on app update

1•mfi•39s ago•0 comments

The Great Powers Are Learning They Have Limits

https://www.wsj.com/world/the-worlds-great-powers-are-learning-they-have-limits-6bd23f64
1•JumpCrisscross•3m ago•0 comments

South Korea's SK Hynix Eyes US Listing as Soon as August

https://www.reuters.com/world/asia-pacific/south-koreas-sk-hynix-eyes-us-listing-soon-august-sour...
2•JumpCrisscross•6m ago•0 comments

I built a tool that automates the creation of vertical Quran recitation videos

https://reeldeen.vercel.app/
1•Seepless•6m ago•0 comments

The Illusion of Control: When Complexity Outpaces Mastery

https://victoriaaremo.substack.com/p/the-illusion-of-control-when-complexity
1•victoria_aremo•9m ago•0 comments

What Happens to a Balloon That Keeps Rising into the Upper Atmosphere?

https://aviation.stackexchange.com/questions/115306/what-happens-to-a-balloon-that-keeps-rising-i...
1•peter_d_sherman•10m ago•0 comments

Show HN: Plug and AI – Slack bot for the whole team, not per-seat

https://plugand.ai/
1•coderai•10m ago•0 comments

Claude Fable 5 silently degrades its own performance on frontier AI work

https://mkotlikov.substack.com/p/fable-5-considered-harmful
1•mkotlikov•10m ago•1 comments

Notepad++ Zero-Click RCE via Path Traversal (CVE-2026-52884)

https://github.com/notepad-plus-plus/notepad-plus-plus/security/advisories/GHSA-p58x-r3c9-x9p6
1•ringzeropirate•10m ago•0 comments

Show HN: Tapflow – self-hosted iOS/Android simulator streaming for mobile QA

https://github.com/jo-duchan/tapflow
3•duchanjo•15m ago•0 comments

Implementing Live Cryptocurrency Trading with DolphinDB

https://medium.com/@DolphinDB_Inc/from-backtest-to-production-implementing-live-cryptocurrency-tr...
2•Polly_Liu•15m ago•0 comments

This was probably a dumb gamble

https://twitter.com/Steve_Yegge/status/2064517667923374578
1•tosh•16m ago•0 comments

Uppinote20 Claude-Dashboard

https://github.com/uppinote20/claude-dashboard
1•geoffbp•17m ago•0 comments

BareMetal

https://en.wikipedia.org/wiki/BareMetal
1•tosh•18m ago•0 comments

Implementing a Funding Rate Arbitrage Strategy with Backtesting

https://medium.com/@DolphinDB_Inc/profiting-from-perpetuals-implementing-a-funding-rate-arbitrage...
3•dbaa4real•19m ago•0 comments

Port React Compiler to Rust

https://github.com/react/react/pull/36173
5•boudra•19m ago•0 comments

Broadcom: The private cloud is where enterprise AI workloads are being deployed

https://investors.broadcom.com/news-releases/news-release-details/broadcoms-private-cloud-outlook...
1•giuliomagnifico•21m ago•0 comments

Show HN: Are.na Commander – a file-like Are.na browser

https://arena-commander.netlify.app
1•meelford•21m ago•0 comments

Faking keyword arguments to functions in C++

https://nibblestew.blogspot.com/2026/06/faking-keyword-arguments-to-functions.html
1•ingve•22m ago•0 comments

Not having an opinion on SpaceX is going to cost you

https://www.ft.com/content/d4069188-30ca-4838-a3d3-f3c8ffe4a13b
2•mmarian•25m ago•1 comments

Only Bounds

https://smallcultfollowing.com/babysteps/blog/2026/06/09/only-bounds/
1•ingve•29m ago•0 comments

Third Interconnect Attack to Break AMD SEV-SNP

https://xca-attacks.github.io/staleus/
1•pipogipo•30m ago•0 comments

FPGA-Accelerated Lock Management and Transaction Processing

https://arxiv.org/abs/2605.13398
1•teleforce•30m ago•0 comments

From physical therapy, dance to workout with real-time coaching

https://apps.apple.com/us/app/workout-dance-for-all/id6765586514
3•donchurchill•32m ago•1 comments

The Field Guide to CSS Grid Lanes

https://gridlanes.webkit.org/
2•ingve•38m ago•0 comments

Junior Devs Who Use AI Are Not Cheating – They're Training Smarter

https://theaileverageweekly.com/posts/junior-devs-who-use-ai-are-not-cheating-they-re-training-sm...
1•talvardi7•38m ago•0 comments

Stolen Lego, Mormons and corrupt Cops – a recap of all the major facts

https://illumdig.substack.com/p/stolen-lego-mormons-and-corrupt-cops
2•dan_ryan•40m ago•1 comments

Study links joint pain supplement to accelerating dementia

https://ufhealth.org/news/2026/study-links-joint-pain-supplement-to-accelerating-dementia-2
2•supermatou•40m ago•0 comments

Show HN: HolaClaw, an OpenClaw Distro for macOS

https://holaclaw.ai/
2•ridruejo•41m ago•1 comments

What if gravity broke for 60 seconds?

https://www.youtube.com/watch?v=dNWwIfjJXZY
1•Asheed•42m ago•0 comments