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?

Scientists Thought This Amphibious Mouse Was Extinct. It's Reappeared

https://www.nationalgeographic.com/animals/article/ethiopia-water-mouse-extinct-rediscovery
1•spankibalt•12s ago•0 comments

GTA VI is a cynical and sometimes shallow joyride through the American psyche

https://www.cbc.ca/news/entertainment/grand-theft-auto-vi-review-9.7425005
1•uladzislau•2m ago•0 comments

CodeRabbit Verify: Agentic application testing and QA

https://www.coderabbit.ai/blog/introducing-coderabbit-verify
1•smb06•7m ago•1 comments

Amazon vows to fight the company's first NA union contract at a CAN warehouse

https://apnews.com/article/amazon-unifor-union-workers-1e0626c31c857ad54aa9b20d8c83b54d
1•Teever•7m ago•0 comments

The Life of a Composer

https://composer.pablostanley.com/#1
1•alexnew•7m ago•0 comments

Chainguard Introduces Free Starter and $500 Team Plans

https://devops.com/chainguard-introduces-free-starter-and-500-team-plans
1•CrankyBear•8m ago•0 comments

Nvidia Tells Employees That Company Is Moving on from Huang Era

https://www.bloomberg.com/news/articles/2026-11-18/nvidia-tells-employees-that-company-is-moving-...
2•TheAlchemist•8m ago•0 comments

Grand Theft Auto VI Critic Reviews

https://www.metacritic.com/game/grand-theft-auto-vi/critic-reviews/
1•TechTechTech•9m ago•1 comments

Play drums with your keyboard

https://plastic.audio/drum-pad/
1•madbyte•10m ago•0 comments

The social use of meow in the interaction between cats and humans

https://www.sciencedirect.com/science/article/abs/pii/S0003347226002940?via%3Dihub=
1•ohjeez•10m ago•0 comments

Harvard study estimates magnitude of US data center pollution - climate talks

https://www.nbcnews.com/tech/tech-news/harvard-study-estimates-magnitude-us-data-center-pollution...
1•Goodliff•10m ago•0 comments

Energy Wins Driving Optical Computing AI

https://spectrum.ieee.org/optical-computing-ai
1•rbanffy•10m ago•0 comments

Show HN: A 149M model handles 70% of phone-agent steps locally, Claude the rest

https://github.com/chayworks/milo-pointer
1•chaitanyav33•10m ago•0 comments

Show HN: A forkable folk song; each recording holds the code that sang it

https://now.itsby.you/
1•sorghum•11m ago•0 comments

HubSpot Lost 80% of Its Traffic – CMO Explains Why Revenue Kept Growing

https://www.searchenginejournal.com/hubspot-lost-80-of-its-traffic-cmo-kipp-bodnar-explains-why-r...
1•gscott•12m ago•0 comments

Java4Shell: When base64 decoding leads to remote code execution?

https://lemire.me/blog/2026/11/18/java4shell-when-base64-decoding-leads-to-remote-code-execution/
1•josephscott•13m ago•0 comments

Anthropic Prices IPO at $83 a Share

https://www.wsj.com/finance/stocks/anthropic-prices-ipo-at-83-a-share-0290494c
3•dcgudeman•13m ago•0 comments

Google Buys Worker Data from Spirit Airlines in a New Market to Feed AI

https://www.nytimes.com/2026/11/18/business/economy/google-spirit-employee-data-ai.html
3•haunter•14m ago•0 comments

Show HN: InfraSim, a system design simulator game for iOS and Android

https://petalformllc.com/apps/infrasim/
1•petalform•14m ago•0 comments

Hailo is now part of Microchip

https://hailo.ai/company-overview/newsroom/news/continuing-to-build-with-hailo/
1•geerlingguy•15m ago•0 comments

I made my first internet moneeeeey and it took me only 6 years

https://www.indiehackers.com/post/i-made-my-first-internet-moneeeeeey-and-it-took-me-only-6-years...
2•trizoza•18m ago•0 comments

Anthropic prices IPO at $83 per share

https://www.cnbc.com/2026/11/18/anthropic-ipo-ai-offering-price.html
4•Betelbuddy•18m ago•0 comments

Why 'Metropolis', Fritz Lang's Silent Movie, Still Defines SciFi 100 Years Later [video]

https://www.youtube.com/watch?v=lFdvbf9bomM
4•austinallegro•18m ago•0 comments

Canadians impacted by Microsoft outage could soon join new class-action lawsuit

https://www.blogto.com/city/2026/11/microsoft-outage-class-action-lawsuit-canada/
3•jethronethro•19m ago•0 comments

Gemini 4 Neon

https://twitter.com/sundarpichai/status/2123167780988125621
2•mistic92•20m ago•1 comments

Gemini 4 Neon

https://blog.google/innovation-and-ai/models-and-research/gemini-models/introducing-gemini-4-neon/
115•yigitdemirag•21m ago•76 comments

Great resources on everything about agentic harnesses

https://www.harness-hub.org
2•naxmax•22m ago•0 comments

A Couple of Posts about AI and the IGF Awards

https://www.clockworkworlds.com/a-couple-of-posts-about-ai-and-the-igf-awards/
1•smartmic•23m ago•0 comments

The Free Moron Sitting Next to You

https://chriscleveland.com/p/the-free-moron-sitting-next-to-you
3•ccleve•26m ago•1 comments

Chlorophyll Engine 10M Trees – 15km² Test [video]

https://www.youtube.com/watch?v=VC_NUxbeA0E
1•crummy•27m ago•0 comments