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?

Surge in scams as fraudsters use AI to target people

https://www.bbc.com/news/articles/cwykp9ygxlvo
1•1659447091•32s ago•0 comments

Monitoring LLM Inference with Prometheus and Grafana (vLLM, TGI, Llama.cpp)

https://www.glukhov.org/observability/monitoring-llm-inference-prometheus-grafana/
1•nryoo•4m ago•0 comments

Even More Batteries Included with Emacs

https://karthinks.com/software/even-more-batteries-included-with-emacs/
1•signa11•7m ago•0 comments

The next frontier of innovation is coming back to the physical world

https://productnow.ai/blogs/a-dose-of-hope-for-the-future
1•kadhirvelm•13m ago•0 comments

Smashed Toilet Phone Web Server

https://www.offthebricks.com/articles/smashed-toilet-phone-web-server
2•mircerlancerous•18m ago•0 comments

DBOS Network Sensing: A Web Services Approach to Collaborative Awareness

https://arxiv.org/abs/2509.09898
2•teleforce•19m ago•0 comments

Decouple the Agent: Why Prompts, Tools, and Models Don't Belong in Your Client

https://vivgrid.com/decoupling-prompts-tools-models-from-agent-client
3•fanweixiao•19m ago•0 comments

AI Has Amnesia. Here's Every System Built to Fix It

https://medium.com/@alanayalag/your-ai-has-amnesia-heres-every-system-built-to-fix-it-ad7dee117a75
2•AlanAAG•21m ago•0 comments

Ask HN: How do you design CLIs for agents?

2•vokneruk•26m ago•0 comments

Lsp85 – an lsp for the Intel 8085 assembly

2•irhs•27m ago•0 comments

Show HN: Go-To-Market for Engineers article series

https://supramono.com/blog/go-to-market-for-engineers-distribution-is-the-product/
3•supramono•35m ago•0 comments

Netlify Drop

https://app.netlify.com/drop
2•skogstokig•35m ago•0 comments

Tech's Next IPO Wave Promises a Charitable Windfall

https://www.wsj.com/finance/investing/techs-next-ipo-wave-promises-a-charitable-windfall-885a1e74
3•builtbystef•46m ago•0 comments

iOS 27's Reworked Stub Islands

https://codecolor.ist/posts/2026-06-15-ios27-reworked-stub-islands/
3•gok•47m ago•0 comments

Argentina Wants to Let AI Own Companies. Here's What That Means

https://www.forbes.com/sites/anishasircar/2026/06/10/ai-owned-companies-argentina/
3•pseudolus•48m ago•0 comments

CoCoMS (Construction Correspondence Management System)

2•cmina•50m ago•0 comments

Sync – Quality Control and Project Management System for AI Agents

https://sync.buzz
2•nikolai_evseev•51m ago•0 comments

Polis – the #1 tool for AI agent coordination

https://polis-protocol.vercel.app/#
2•lucius_gc•54m ago•0 comments

Why You Need to Become a Neuro-Punk Right Now

https://medium.com/@artem-x/why-you-need-to-become-a-neuro-punk-right-now-f266223ac440
2•theorchid•58m ago•0 comments

US and Iran reach cease fire agreement

https://www.nytimes.com/live/2026/06/14/world/iran-war-trump-us
4•koolba•1h ago•0 comments

Molecular Diversity as a Biosignature

https://www.nature.com/articles/s41550-026-02864-z
2•wslh•1h ago•0 comments

Kevin Warsh Wants the Fed to Stop Explaining Everything

https://www.wsj.com/economy/central-banking/fed-warsh-chair-communication-d2f2d226
3•Cider9986•1h ago•1 comments

BEAVER: Enterprise benchmark for LLM Text-to-SQL from private data warehouses

https://beaverbench.github.io/
2•teleforce•1h ago•0 comments

Show HN: Astro Sidey – A simple, minimalistic personal blog theme

https://github.com/odhyp/astro-sidey
2•odhy•1h ago•0 comments

Your Database Is the Bottleneck. Not Your Code

https://howtocenterdiv.com/beyond-the-div/your-database-is-the-bottleneck-not-your-code
2•mooreds•1h ago•0 comments

On, Good Advice Delivered Poorly

https://makc.co/essays/good-advice-delivered-poorly/
2•makc•1h ago•0 comments

Under the River

https://shopify.engineering/under-the-river
2•mooreds•1h ago•0 comments

The More Confident in AI Security, the More Likely Breached, Study Finds

https://www.itsecurityguru.org/2026/06/11/the-more-confident-organizations-are-in-their-ai-securi...
4•mooreds•1h ago•0 comments

The hallucinogenic mushroom that contains no known psychedelic

https://psychedelics.co.uk/news/a-mushroom-genus-that-gets-people-high-but-not-the
29•thunderbong•1h ago•11 comments

Learn to Think in Systems, It'll Put You Ahead of 99% of People [video]

https://www.youtube.com/watch?v=mjTgkm-h__M
3•ohjeez•1h ago•0 comments