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?

USB Power Delivery: Plugging into the Benefits

https://www.aptiv.com/en/insights/article/usb-power-delivery-plugging-into-the-benefits
1•mooreds•2m ago•0 comments

iFixit tears down Trump Mobile [video]

https://www.youtube.com/watch?v=XHpP5otFv4M
1•peteforde•2m ago•0 comments

Mozilla to increase its free Firefox VPN limits and locations until Aug 31

https://blog.mozilla.org/en/firefox/firefox-built-in-vpn-summer/
1•exploraz•3m ago•0 comments

FlowG v0.59.0 with Dark Mode support

https://flowg.cloud/blog/darkmode
1•linkdd•6m ago•0 comments

A 5.3M-year-old deep-sea whale necropolis in the Diamantina Zone

https://www.nature.com/articles/s41586-026-10546-z
2•whicks•11m ago•0 comments

US Military Shahed-136 Kamikaze Drone Clone Getting Hivemind Swarming Capability

https://www.twz.com/air/u-s-militarys-lucas-kamikaze-drone-is-getting-hivemind-swarming-capability
1•prmph•11m ago•1 comments

Big tech apps that make life easy are scamming you

https://restofworld.org/2026/tech-facebook-google-whatsapp-scams/
1•donohoe•11m ago•0 comments

Show HN: EzziwebTools – A collection of 30 free tools

https://ezziwebtools.com
1•Ezzymd•11m ago•0 comments

Anthropic apologizes for invisible Claude Fable guardrails

https://www.theverge.com/ai-artificial-intelligence/948280/anthropic-claude-fable-invisible-disti...
1•rarisma•12m ago•0 comments

Show HN: AlfinaAI – AI stock and IPO analysis for retail investors

https://alfina.ai
2•stockanalyst987•14m ago•0 comments

InventorySpread – Newsletter ad slots priced below affiliate revenue

https://inventoryspread.com
1•Northtide•16m ago•1 comments

Active-active fixed our counters but broke everything else

https://useautumn.com/blog/active-active-redis-cache
2•johnyeocx•19m ago•0 comments

Python tool for converting files and office documents to Markdown

https://github.com/microsoft/markitdown
2•mooreds•20m ago•0 comments

Creating Photo Essays About Community: A Guide to Our Where We Are Contest

https://www.nytimes.com/2024/02/14/learning/creating-photo-essays-about-community-a-guide-to-our-...
1•tlyleung•20m ago•0 comments

Geopolitics fuel grain market volatility

https://www.kpler.com/blog/geopolitics-fuel-grain-market-volatility
1•mooreds•21m ago•0 comments

A Commons of Software Productive Infrastructure, by and for Capital

https://marewolf.me/posts/draupnir/26/software-productive-infrastructure.html
1•simonmic•21m ago•0 comments

Brit workers waste nearly six hours a week 'botsitting'

https://www.theregister.com/ai-and-ml/2026/06/10/brit-workers-waste-nearly-six-hours-a-week-botsi...
4•theanonymousone•22m ago•1 comments

Parallelogram – catch fine-tuning dataset bugs before training

https://www.parallelogram.dev/
1•thatayotlhe04•22m ago•0 comments

Hedge Funds Are Expanding Desks Designed to Profit from Natural-Catastrophe Risk

https://www.bloomberg.com/news/articles/2026-06-07/hedge-funds-are-hiring-experts-in-catastrophe-...
2•giuliomagnifico•23m ago•0 comments

Bootstrapping Rust Considered Harmful

https://www.ntecs.de/blog/2026-02-01-bootstrapping-rust-considered-harmful/
1•birdculture•24m ago•0 comments

I procrastinate by building tools to stop me from procrastinating: A sad story

2•thisislorenzov•26m ago•3 comments

Show HN: LoadLore – what if your team's way of working was installable?

https://loadlore.dev
1•whitephoenix•26m ago•0 comments

Merle: Why Even Signal Calls Apple and Google [video]

https://www.youtube.com/watch?v=c3ennD3wKn0
1•smukherjee19•26m ago•0 comments

The Riemann Hypothesis – interactive explanation

https://riemann.adilmoujahid.com
1•lifty•27m ago•0 comments

Shadow AI threat's growth affecting healthtech's growth

https://www.verax.ai/blog/shadow-ai-healthtech-deals
1•jasonchernofsky•27m ago•0 comments

Amazon-owned Ring should pay Americans for scanning their faces, lawsuit says

https://arstechnica.com/tech-policy/2026/06/amazon-owned-ring-should-pay-americans-for-scanning-t...
3•anticorporate•27m ago•0 comments

Odin 2026-06 Released

https://github.com/odin-lang/Odin/releases/tag/dev-2026-06
1•lerno•29m ago•0 comments

Apple's Passwords App Becomes Agentic

https://www.heise.de/en/news/Apple-s-Passwords-App-Becomes-Agentic-11328901.html
2•Tomte•32m ago•0 comments

Claude Opus is more performant on OpenCode than Claude Code

https://artificialanalysis.ai/agents/coding-agents
4•log101•33m ago•0 comments

The Slack Notifications Flowchart Explained

https://www.magicbell.com/blog/slack-notifications-flowchart
2•ColinWright•34m ago•0 comments