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?

Why Reading Egyptian Hieroglyphics Is Easier Than You Think

https://www.openculture.com/2026/08/why-reading-egyptian-hieroglyphics-is-easier-than-you-think.html
1•theanonymousone•37s ago•0 comments

Fake Apple Pay charge brings the classic tech support scam to your phone

https://www.malwarebytes.com/blog/scams/2026/08/fake-apple-pay-charge-brings-the-classic-tech-sup...
1•speckx•1m ago•0 comments

A Faster Alternative to DuckDB

https://ctrlb.ai/blogs/a-faster-alternative-to-duckdb
1•ruhani_grover•1m ago•0 comments

Oral History of Andy Hertzfeld, part 1 of 2 [video]

https://www.youtube.com/watch?v=Mi55hZXNOuY
1•tambourine_man•4m ago•0 comments

Integrations That Write Themselves

https://builders.ramp.com/post/integrations-that-write-themselves
1•matthieu_bl•5m ago•0 comments

Haiku R1/Beta6 Released

https://www.osnews.com/story/145885/haiku-r1-beta6-released/
1•mariuz•7m ago•0 comments

Sometimes Your Best Customers Barely Use Your Product

https://www.tariqdeir.com/best-customers-barely-use-your-product/
1•speckx•8m ago•0 comments

Cyborg cockroaches with tiny syringes designed to join search and rescue teams

https://www.theguardian.com/technology/2026/aug/27/cockroaches-used-search-rescue-earthquakes-sci...
2•thunderbong•8m ago•1 comments

Casey Muratori – The Root of the Root of All Evil – BSC 2026 [video]

https://www.youtube.com/watch?v=hpj6r6CjJf8
3•surprisetalk•10m ago•0 comments

What the Model – Local LLM Inventory for macOS

https://github.com/powtac/wtm
1•pow-tac•13m ago•0 comments

The end of credential sprawl for agents

https://vercel.com/blog/the-end-of-credential-sprawl-for-agents
2•shahargl•14m ago•0 comments

Stop Turning Off Your AC When You Go on Vacation

https://www.cnet.com/home/stop-turning-off-your-ac-when-you-go-on-vacation-an-hvac-expert-explain...
1•speckx•14m ago•0 comments

The Raycast Keyboard

https://www.raycast.com/keyboard
3•herrherrmann•14m ago•2 comments

The Agent Host for persistent, portable agent sessions

https://code.visualstudio.com/blogs/2026/08/26/agent-host-architecture
1•lbw1215•15m ago•0 comments

Radiant Wins $750M U.S. Army Contract to Deliver Reactors to U.S. Military Bases

https://finance.yahoo.com/energy/articles/radiant-wins-750m-contract-u-200000209.html
1•mpweiher•16m ago•0 comments

Show HN: Invader – an indie iOS podcast player that never phones home

https://invader.gg/
4•HeadOfProbing•16m ago•0 comments

Show HN: OngsList – my own billboard but in the style of Craigslist

https://ongslist.com
1•ongdevlab•16m ago•1 comments

Focusing on "focus on what you want to see more of" (2023)

https://dejavucoder.substack.com/p/focusing-on-focus-on-what-you-want
1•tosh•17m ago•0 comments

Gao: One in four f-35s can fly all missions readiness

https://www.airandspaceforces.com/gao-one-in-four-f-35s-can-fly-all-missions-readiness/
1•orwin•22m ago•1 comments

Redburner – A rail shooter in the four shades of red of the 1995 Virtual Boy

https://redburner.com
2•ges•24m ago•1 comments

Flint: Efficiently Leveraging High Bandwidth Flash for LLM Inference

https://arxiv.org/abs/2608.25062
1•metrofun•24m ago•0 comments

Fragmented AI Is Creating a "Faster but Not Better" Workplace

https://en-hk.newsroom.workday.com/new-workday-research-fragmented-ai-creating-faster-but-not-bet...
1•nilen•24m ago•0 comments

"No way to prevent this" say users of only language where this regularly happens

https://xeiaso.net/shitposts/no-way-to-prevent-this/memory-safety/CVE-2026-41992/
20•xena•25m ago•2 comments

Agentic Payments: How Agents Move Money

https://zdne.org/articles/agentic-payments/
1•zdne•25m ago•0 comments

Idiolect – measure how you write, then match AI drafts to it

https://idiolect-two.vercel.app
1•joannamarrie•26m ago•0 comments

Qwen3.8-Flash-Next: How to Run Locally

https://unsloth.ai/docs/models/qwen3.8-next
3•TechTechTech•27m ago•0 comments

Show HN: AI engineer course where every lesson is runnable Spring Boot project

https://engineerprep.io/
1•sanguluri•29m ago•0 comments

Augmental's Mouthpad Is a Touchpad for Your Tongue

https://spectrum.ieee.org/augmental-mouthpad-assistive-tongue-interface
1•sohkamyung•30m ago•0 comments

Bill Gates Warns AI Could Upend Jobs, Security and Society Without a Global Plan

https://www.citybiz.co/article/894943/bill-gates-warns-ai-could-upend-jobs-security-and-society-w...
2•fittingopposite•31m ago•0 comments

Show HN: Trading experiments, 5 years, all reproducible. The answer was no

https://theedgethatwasnt.com/
3•peoplesfintech•32m ago•1 comments