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?

City Chicken vs. City Chicken: Berlin's Bloody Rotisserie Feud

https://www.heistberlin.com/news/nhas-city-chicken-sonnenallee-feud-prison-ramtin-torture/
1•randycupertino•2m ago•1 comments

Avalanche's desktop fusion reactor delivers blistering-hot plasma

https://techcrunch.com/2026/06/10/avalanches-desktop-fusion-reactor-delivers-blistering-hot-plasma/
1•Brajeshwar•2m ago•0 comments

An Interview with Jen Schreiber (2025)

https://ciamweekly.substack.com/p/an-interview-with-jen-schreiber
1•mooreds•3m ago•0 comments

Show HN: strangeClaw – a self-hosted agent running inside a Firecracker microVM

https://github.com/itsthestranger/strangeClaw
1•pstrange•4m ago•0 comments

Tell HN: Stack Overflow seems down

2•tom1337•4m ago•1 comments

My Journey in Open-Source Library Development

https://olegdubovoi.com/publications/my-journey-in-open-source-library-development/
1•empiree•4m ago•0 comments

Summary of recent buggy Kindle updates since Nov 2025: dictionary, fonts, manga

1•seam_carver•6m ago•0 comments

Reusing code can be a sunk cost fallacy in the LLM era

https://www.nvegater.com/blog/build-specific
1•nvegater•6m ago•0 comments

The Last Evolution, by John W Campbell Jr. (1932)

https://www.gutenberg.org/files/27462/27462-h/27462-h.htm
2•cf100clunk•6m ago•0 comments

Show HN: Building a Resume ontology and tooling for LLMs CV management

https://github.com/kelu124/Resume_RDF_update/tree/main
1•kelu124•7m ago•0 comments

Show HN: Rscrypto 0.4 treats constant-time as a release gate

https://github.com/loadingalias/rscrypto/releases/tag/v0.4.0
1•LoadingALIAS•7m ago•0 comments

Fable will NOT help if it thinks your ML research/ML engineering is interesting

https://twitter.com/SemiAnalysis_/status/2064482714149896431
1•malshe•8m ago•1 comments

Beyond Platforms and Protocols

https://upstream.force11.org/beyond-platforms-and-protocols/
1•jruohonen•8m ago•0 comments

Execution Feedback Matters More Than Pipeline Topology in 1-3B Code Generation

https://arxiv.org/abs/2604.21950
1•PaulHoule•8m ago•0 comments

Elon Musk accused of fuelling unrest after Belfast knife attack

https://dpa-international.com/politics/urn:newsml:dpa.com:20090101:260610-930-200483/
3•cdrnsf•9m ago•0 comments

Show HN: Chip's Challenge (1992), rebuilt for the web

https://claudes-challenge.vercel.app
1•kenblum•10m ago•0 comments

The .at domain registry is threatening to send debt collectors (2013)

https://old.reddit.com/r/sysadmin/comments/1bnjus/the_austrian_at_domain_registry_is_threatening_to/
1•lambertsimnel•11m ago•0 comments

.NET 11 Preview 5 is now available

https://devblogs.microsoft.com/dotnet/dotnet-11-preview-5/
1•philonoist•12m ago•0 comments

The Design of Display Processors (1968) [pdf]

http://cva.stanford.edu/classes/cs99s/papers/myer-sutherland-design-of-display-processors.pdf
1•rbanffy•13m ago•0 comments

Ask HN: The next evolutionary step in LLM usage?

2•tomaytotomato•15m ago•0 comments

Ask HN: Should the term "cognitive surrender" apply to writers who publish slop?

2•mpalmer•16m ago•0 comments

Show HN: HelixDB – A Graph Database built on Object-storage

https://github.com/HelixDB/helix-db/tree/main
2•GeorgeCurtis•16m ago•0 comments

Barry Diller says MGM's physical assets are more valuable in AI age

https://www.ft.com/content/121bd067-294f-4c01-bd51-8360b7a420a6
1•mikhael•17m ago•0 comments

Show HN: See what your AIs know about you that the others don't

https://www.memkeeper.eu/
2•tomtom1977•19m ago•1 comments

Foil

https://en.wikipedia.org/wiki/Foil_(narrative)
1•tosh•20m ago•0 comments

Anthropic releases 'safe' version of Claude Mythos AI model to public

https://www.theguardian.com/technology/2026/jun/09/anthropic-claude-mythos-ai-model
1•Brajeshwar•20m ago•1 comments

Everything Is Recorded Now

https://www.a16z.news/p/everything-is-recorded-now
1•7777777phil•21m ago•0 comments

China's BYD aims to be biggest car firm within five years

https://www.theguardian.com/business/2026/jun/10/china-byd-car-firm-ev-maker-toyota
7•toomuchtodo•24m ago•0 comments

Siri AI Is a Malware Vector

https://loufranco.com/blog/siri-ai-is-a-malware-vector
1•speckx•25m ago•0 comments

Show HN: Knobkit – fast ai webapps; fully in-browser or on a stateless server

https://knobkit.dev/
1•alainbrown•26m ago•0 comments