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•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?

Genkit Middleware: Intercept, extend, and harden your agentic apps Blog

https://developers.googleblog.com/announcing-genkit-middleware-intercept-extend-and-harden-your-a...
1•shallow-mind•3m ago•0 comments

Programmable Phones

https://tailrecursion.com/~alan/ProgrammablePhones.html
1•wooby•6m ago•0 comments

The rise and fall of an AI-driven 'local news outlet' in South Florida

https://floridatrib.org/2026/05/14/the-rise-and-fall-of-an-ai-driven-local-news-outlet-in-south-f...
1•martey•8m ago•0 comments

What Are AI Ethics

https://krellixlabs.com/en/blog/what-are-ai-ethics
1•radu_me•9m ago•0 comments

Ask HN: One mistake or hack that taught you the most?

1•SyntaxErrorist•10m ago•2 comments

Agentic evals or LLM as a judge? considering cost, time and quality

1•pipelineofone•12m ago•0 comments

Lookup.disclose.io – find the right security contact for any asset

https://lookup.disclose.io
2•caseyjohnellis•14m ago•1 comments

Agentic SDLC: How OpenSearch accelerates engineering with its own engine

https://opensearch.org/blog/harness-first-agentic-sdlc-how-opensearch-builds-software-using-its-o...
1•Lunar5227•18m ago•0 comments

Show HN: QUptime, quorum based decentralized uptime tool

https://github.com/Axodouble/QUptime
1•Axodouble•20m ago•0 comments

Multi-LLM trading harness with live leaderboard on Alpaca paper trades

https://github.com/achaljhawar/1rok
1•satoshiclad•28m ago•0 comments

What Are the Different Types of AI Testing Tools?

1•allenmatthew•39m ago•0 comments

The Power of the Breath

https://medicine.yale.edu/news-article/the-power-of-the-breath/
3•andsoitis•45m ago•2 comments

Social Media Bans Are for Kids. What About Adults?

https://pmz1.substack.com/p/social-media-bans-are-for-kids-what
3•gieksosz•49m ago•1 comments

How climate-resilient homes in India are reducing dependence on air conditioners

https://www.thehindu.com/sci-tech/energy-and-environment/how-climate-resilient-homes-in-india-are...
2•rustoo•56m ago•0 comments

OpenAI just lost its enterprise AI crown to Anthropic

https://www.businessinsider.com/anthropic-tops-openai-business-ai-adoption-ramp-index-2026-5
3•mazokum•57m ago•0 comments

Edith Eger, Auschwitz Survivor Who Helped Others Cope with Trauma, Dies at 98

https://www.wsj.com/world/edith-eva-eger-dead-13268534
3•hodgesrm•1h ago•0 comments

Britain investigates Microsoft over business software dominance

https://www.reuters.com/legal/litigation/uk-opens-antitrust-probe-into-microsofts-business-softwa...
3•frm88•1h ago•1 comments

Random AI Explained Fast

https://www.youtube.com/watch?v=XURpiqSelBw
2•KornClown7•1h ago•0 comments

Perfect Number Bomb(2025)

https://www.quantumcalculus.org/odd-perfect-number-bomb/
2•nill0•1h ago•0 comments

FilePilot AI – local-first desktop file manager with optional AI summaries

https://github.com/cuiheng511/filepilot-ai
2•cui511511•1h ago•0 comments

How the Ingredients of Life Make Our Journey Worthwhile

https://medium.com/create-your-career/how-the-ingredients-of-life-make-our-journey-worthwhile-12e...
1•andsoitis•1h ago•0 comments

US reportedly dropped fraud charges against Adani after he hired Trump's lawyer

https://www.theguardian.com/us-news/2026/may/14/gautam-adani-billionaire-trump
2•dilawar•1h ago•0 comments

Logic bug in the Linux kernel's __ptrace_may_access() function (LPE)

https://www.openwall.com/lists/oss-security/2026/05/15/2
2•Tiberium•1h ago•0 comments

Ask HN: How do you catch regressions when you change your AI agent's prompt?

1•yakshithk_•1h ago•0 comments

C++26 Shipped a SIMD Library Nobody Asked For

https://lucisqr.substack.com/p/c26-shipped-a-simd-library-nobody
2•signa11•1h ago•0 comments

Solar Is Everything

https://www.barchart.com/story/news/37361552/solar-is-everything-teslas-elon-musk-says-other-ener...
2•andsoitis•1h ago•0 comments

Claude free usage limits are nuts. useless

4•paulpauper•1h ago•0 comments

PSVL 1.0 – The most comprehensive source-visible license (276 clauses)

https://github.com/BMBOMICH/PSVL
1•BMBOMICH•1h ago•0 comments

How Claude Code works in large codebases

https://claude.com/blog/how-claude-code-works-in-large-codebases-best-practices-and-where-to-start
78•shenli3514•1h ago•45 comments

Solar rhythm of sleep compared to modern social norms

https://dylan.gr/1775146616
4•James72689•1h ago•0 comments