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?

Is making IRL friends are hard

1•sumanrani•4m ago•0 comments

Show HN: Retroguard – Verifiably secure AI guardrails

https://retroguard.ai
2•ttttonyhe•4m ago•0 comments

New study shows how Nazi-era propaganda influences present-day attitudes

https://www.psypost.org/new-study-shows-how-nazi-era-propaganda-influences-present-day-attitudes/
1•giuliomagnifico•7m ago•0 comments

Brockman Says Musk Vowed on Trial's Eve to Make Him 'Hated'

https://www.bloomberg.com/news/articles/2026-05-04/openai-s-brockman-to-testify-after-musk-s-text...
1•1vuio0pswjnm7•8m ago•0 comments

Anthropic quietly nerfed Claude Code's 1-hour cache

https://www.xda-developers.com/anthropic-quietly-nerfed-claude-code-hour-cache-token-budget/
2•mikhael•9m ago•0 comments

Qwem Meetup Presentation: Function Calling Harness, from 6.75% to 100%

https://typia.io/blog/function-calling-harness-qwen-meetup-korea/
1•autobe•11m ago•0 comments

The week my AI assistant deleted my production model (and made it better)

https://medium.com/@cmitre/the-week-my-ai-assistant-tried-to-end-me-and-accidentally-helped-me-bu...
2•ceemite•11m ago•1 comments

What Is Authorship When Machines Can Write?

https://thereader.mitpress.mit.edu/what-is-authorship-when-machines-can-write/
2•Hooke•12m ago•0 comments

Anthropic entering AI services business

https://www.anthropic.com/news/enterprise-ai-services-company
2•darshanmakwana•15m ago•0 comments

Wolfgang Koeppen's Structural Musicality

https://www.theparisreview.org/blog/2026/05/04/wolfgang-koeppens-structural-musicality/
1•prismatic•19m ago•0 comments

What Silicon Valley layoffs hide about the future of the job market

https://www.washingtonpost.com/technology/2026/05/01/ai-jobs-tech-layoffs-austerity/
1•1vuio0pswjnm7•19m ago•1 comments

Major Ubuntu Outage

https://status.canonical.com/#/incident/KNms6QK9ewuzz-7xUsPsNylV20jEt5kyKsd8A-3ptQEbtT2eC1f61ywPf...
2•NiekvdMaas•20m ago•1 comments

I built a WordPress AI agent that handles sales and support (No monthly fees)

https://www.indiehackers.com/post/i-built-a-wordpress-ai-agent-that-handles-sales-and-support-no-...
1•shahisoft•24m ago•0 comments

Why Does a Single Firefox Tab Take Almost 1.5GB RAM?

3•syeare•25m ago•0 comments

Kavya – A local-first Markdown writing app for macOS

https://kavya-app.com/
1•juanmanuelf•27m ago•0 comments

OpenAI president defends motives in for-profit restructuring, reveals $30B stake

https://www.ft.com/content/5c24fa13-ae43-4d5a-9b68-b6ebae227dce
1•1vuio0pswjnm7•34m ago•1 comments

Anthropic co-founder Jack Clark: 60%+ chance of automated AI R&D by 2029

https://importai.substack.com/p/import-ai-455-automating-ai-research
5•thoughtpeddler•36m ago•1 comments

Kenya: AI was used to load Health System costs onto poorest

https://sha.africauncensored.online/
2•gmargari•36m ago•0 comments

Apple Plans to Let Users Build Their Own Passes in iOS 27 Wallet App

https://www.bloomberg.com/news/articles/2026-05-04/ios-27-features-apple-plans-to-let-users-build...
3•petethomas•36m ago•0 comments

Why Your Country Sucks-A World Cup Satire from Mexico City

https://almaasfalto.com/why-your-country-sucks/
3•JFWFTW•38m ago•0 comments

Halley's Comet Meteor Shower (Eta Aquariids) About to Peak

https://www.sciencealert.com/look-up-the-halleys-comet-meteor-shower-is-just-about-to-peak
2•Gaishan•38m ago•0 comments

'Engineer' is so 2025. In AI land, everyone's a 'builder' now

https://sfstandard.com/2026/03/05/engineer-2025-ai-land-everyone-s-builder-now/
2•geetee•39m ago•0 comments

OpenClaw Got Safer in Public

https://openclaw.ai/blog/openclaw-security-in-public
3•drippurp•39m ago•0 comments

Ask HN: Why would we care about "extended time horizons" and LLMs?

2•ozozozd•44m ago•1 comments

Why China Didn't Colonise the World

https://twitter.com/petruch10/status/2051127478132113892
2•MrBuddyCasino•46m ago•0 comments

Taiwan Could Learn from Ukraine. Informally, Connections Are Growing

https://www.nytimes.com/2026/05/05/world/europe/ukraine-taiwan-drones.html
3•mikhael•50m ago•0 comments

Ask HN:How's you experience building an app on Cloudflare? (Workers, D1,R2 etc.)

4•indieDevAttempt•51m ago•0 comments

Why is Apple's R&D run rate suddenly $40B/yr.?

https://asymco.com/2026/05/04/why-is-apples-rd-run-rate-suddenly-40-billion-yr/
3•ndr42•52m ago•0 comments

OpenAI can't build working RSS feeds

https://openai.com/news/rss.xml
6•johnnyAghands•52m ago•2 comments

Cybercrime investigations in practice: Insights from the LockerGoga case

https://www.sciencedirect.com/science/article/pii/S2666281726000685
2•Manheim•52m ago•0 comments