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: A Libc-free HTTP server compiled to native x86-64 with FreedomLang

https://github.com/DO-SAY-GO/freelang/blob/main/examples/HTTPD.md
1•keepamovin•2m ago•0 comments

Repeated Azure VM deployments split into operational lineages

https://webbynode.com/articles/repeated-azure-deployments-split-into-operational-lineages
1•gsgreen•3m ago•0 comments

Cpp2Rust: Translates C++ to safe Rust automatically

https://github.com/Cpp2Rust/cpp2rust
2•signa11•4m ago•0 comments

Request for Senior Developer and Senior Cybersecurity

1•essina•4m ago•0 comments

Show HN: NoMac – let your AI agent ship iOS apps without a Mac

https://nomac.app
2•garymiklos•4m ago•0 comments

Kids run experiment to make $1M

https://www.dollarexperiment.website/
1•stephinmn•6m ago•0 comments

A new kind of robot swims the seas and soars the skies

https://www.npr.org/2026/07/09/nx-s1-5885040/robot-flying-aerial-aquatic-mit-birds
1•Brajeshwar•7m ago•0 comments

Garnix Is Joining Shopify

https://garnix.io/blog/shutting-down/
7•l2dy•7m ago•1 comments

The Politics of Shrimp

https://www.thedial.world/articles/news/bangladesh-shrimp-farming-climate-change
2•speckx•7m ago•0 comments

Turbopuffer vs. Manticore Search on a couple of cheap VPS

https://manticoresearch.com/blog/turbopuffer-vs-manticore/
1•snikolaev•10m ago•0 comments

Data Colada [136] Metadata Falsificada: The Cover-Up File in Gino vs. Harvard

https://datacolada.org/136
1•patrickod•11m ago•0 comments

How to Build a Coding Agent

https://github.com/nicolaygerold/howtobuildacodingagent
2•tosh•12m ago•0 comments

Show HN: Offline Substack Reader

https://apps.apple.com/us/app/stacks-offline-reader/id6778920098
1•hruss•12m ago•0 comments

Compilers and AI 'Cyber' Defense

https://steveklabnik.com/writing/compilers-and-ai-cyber-defense/
1•steveklabnik•12m ago•0 comments

Scan Scam: Criminals Redirect China's Public QR Codes to Porn

https://www.sixthtone.com/news/1018752
1•momentmaker•12m ago•1 comments

The fix for my AI agent wasn't making it smarteR

https://tryfraym.com
1•jrud•14m ago•0 comments

Terrorist Groups Are Using A.I. To Gain an Edge in Battle

https://www.nytimes.com/2026/07/10/us/politics/ai-terrorism-boko-haram-nigeria.html
1•johnny313•14m ago•3 comments

Show HN: Living Neural Network on the Webpage

https://mikky-a.github.io/mnist-station/
1•mikky-a•14m ago•0 comments

IPv4 and IPv6 Subnet Calculator

https://openvpn.net/subnet-calculator/
1•addybojangles•15m ago•1 comments

Why Write Code in 2026

https://softwaredoug.com/blog/2026/07/09/write-code
2•softwaredoug•15m ago•0 comments

Database Consistency Models

https://jepsen.io/consistency/models
2•gurjeet•15m ago•0 comments

Commit Messages

https://mikro2nd.mataroa.blog/blog/commit-messages/
2•speckx•16m ago•0 comments

Meta AI image detector fails to identify some of its own cropped AI images

https://www.reuters.com/business/meta-ai-image-detector-fails-identify-some-its-own-cropped-ai-im...
1•adithyaharish•18m ago•0 comments

Show HN: Journal, Yours to Keep

https://cozyjournal.app/
1•not_wowinter13•19m ago•0 comments

German lawmakers pass cost-saving bill that drugmakers say will drive them out

https://endpoints.news/german-lawmakers-pass-cost-saving-bill-that-drugmakers-say-will-drive-them...
1•brandonb•20m ago•0 comments

USDA lowers beef export sales by 90% amid growing doubts over data

https://www.reuters.com/business/usda-lowers-beef-export-sales-by-90-amid-growing-doubts-over-dat...
1•ijidak•20m ago•0 comments

Generalizing LLMs to PLTs: Probabilistic Language Tries

https://arxiv.org/abs/2604.06228
1•EGreg•20m ago•0 comments

We May Owe Our Intelligence to Our Unique Neurons

https://nautil.us/we-may-owe-our-intelligence-to-our-unique-neurons-1282599
1•Brajeshwar•21m ago•0 comments

Steam sales reportedly topped $11B during H1 2026 due to shifting trends

https://www.tomshardware.com/video-games/pc-gaming/steam-sales-reportedly-topped-usd11-billion-du...
6•speckx•21m ago•0 comments

Hands-On with the AMD Ryzen AI Halo

https://www.microcenter.com/site/mc-news/article/amd-ryzen-ai-halo-review.aspx
3•bdcravens•22m ago•0 comments