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?

Thundermail June 2026 Update

https://blog.thunderbird.net/2026/06/thundermail-june-2026-update-what-we-learned-after-the-first...
3•bariumbitmap•5m ago•0 comments

Russell Vought's Latest Plan to Gut the Government Should Terrify You

https://www.thenation.com/article/politics/russell-vought-omb-grant-rule/
4•petethomas•5m ago•0 comments

Rura: Interactive TUI scratchpad for building shell pipelines

https://github.com/tlipinski/rura
2•loa_observer•6m ago•0 comments

China's CXMT Is Set to Challenge DRAM Incumbents

https://newsletter.semianalysis.com/p/chinas-cxmt-is-set-to-challenge-dram
3•djfergus•11m ago•1 comments

Show HN: HowMuch – Wordle, but you guess prices

https://howmuchgame.com/
2•spsneo•23m ago•1 comments

LogiGate: A zero-trust middleware architecture for AI liability written in Rust

https://github.com/Les-Senters/Logigate-architecture
2•zkpvault•24m ago•0 comments

California wealth tax fight moves to voters

https://www.politico.com/news/2026/06/25/california-wealth-tax-billionaires-ballot-00977427
4•shinryudbz•27m ago•0 comments

What happened after 2k people tried to hack my AI assistant

https://www.fernandoi.cl/posts/hackmyclaw/
2•cuchoi•35m ago•0 comments

Sochely – An SEO-first platform for creating and discovering local events

https://sochely.com/
2•godimittry90•36m ago•0 comments

Notion is shutting down its email client one year after launch

https://www.neowin.net/news/notion-is-shutting-down-its-email-client-one-year-after-launch/
4•bundie•38m ago•1 comments

Iraq warns it might leave OPEC if oil quota not raised

https://www.reuters.com/business/energy/iraq-consider-all-options-if-opec-quota-is-not-raised-has...
6•JumpCrisscross•39m ago•1 comments

Musk ordered to testify in election lottery cases; one lawsuit may be narrowed

https://www.reuters.com/legal/government/elon-musk-ordered-testify-election-lottery-cases-one-law...
5•JumpCrisscross•40m ago•0 comments

Competition intensifies for Anthropic and OpenAI ahead of IPOs

https://www.ft.com/content/8c02de04-5516-405b-941d-289e586d8eb8
2•JumpCrisscross•40m ago•0 comments

Phases of Ice

https://en.wikipedia.org/wiki/Phases_of_ice
3•thunderbong•52m ago•0 comments

White House asks OpenAI to limit its next model release

https://www.cnn.com/2026/06/25/tech/openai-limit-release-white-house
4•AaronO•53m ago•1 comments

Hallucination in World Models Is Predictable and Preventable

https://www.nicklashansen.com/mmbench2/
2•ilreb•53m ago•0 comments

Honesty gets Emacs patch rejected

https://xlii.space/eng/honesty-gets-emacs-patch-rejected/
2•signa11•55m ago•0 comments

Guardrails for offensive AI agents and why instructions are never enough

https://dest.host/b/guardrails-for-offensive-ai-agents/
2•snorbleck•57m ago•0 comments

How to Write an Effective Software Design Document

https://refactoringenglish.com/excerpts/write-an-effective-design-doc/
2•RickJWagner•59m ago•0 comments

Vanguard on Demand: Kernel Level Cheating (Prevention)

https://www.riotgames.com/en/news/vanguard-on-demand
2•internet-390•1h ago•1 comments

Offline Access and Authentication

https://fusionauth.io/community/forum/topic/3129/offline-access-authentication
3•mooreds•1h ago•0 comments

My Argument Against Self-Care

https://www.shirahaddad.com/writing/no-to-self-care
3•mooreds•1h ago•0 comments

Why Problem Statements Aren't Enough

https://letters.unchartedpathbreakthroughs.com/posts/why-problem-statements-arent-enough
2•mooreds•1h ago•0 comments

Local-first AI coding assistant for IntelliJ-based IDEs (paid)

https://plugins.jetbrains.com/plugin/31304-llamatik-code/
4•oogali•1h ago•0 comments

Why the Slate Truck Only Costs $25K

https://www.edmunds.com/car-news/2027-slate-truck-price-explained.html
7•RickJWagner•1h ago•8 comments

A Declaration of the Independence of Cyberspace (1996)

https://www.eff.org/cyberspace-independence
2•petermcneeley•1h ago•1 comments

Show HN: Bikepacking Planner

https://www.theinstant.cc/pack
4•Gshaheen•1h ago•0 comments

A data race that doesn't compile

https://corentin-core.github.io/posts/ruxe-type-level-disjointness/
17•stmw•1h ago•5 comments

Xbox follows Apple with price increases

https://techcrunch.com/2026/06/25/xbox-follows-apple-with-price-increases/
3•DR_MING•1h ago•0 comments

Rust Foundation Welcomes OpenAI as Platinum Member

https://rustfoundation.org/media/rust-foundation-welcomes-openai-as-platinum-member-announces-don...
2•stmw•1h ago•0 comments