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?

Get leads just by yammering away

https://www.trie.dev/microphone
1•Kriptering•33s ago•1 comments

After Deadly D.C. Crash, FAA Moves Toward Aircraft-Technology Mandate

https://www.wsj.com/business/airlines/after-deadly-d-c-crash-faa-moves-toward-sweeping-aircraft-t...
1•impish9208•42s ago•1 comments

Italy's Domyn to Launch Open Source AI Frontier Model Within a Year

https://www.reuters.com/world/china/italys-domyn-launch-open-source-frontier-ai-model-within-year...
1•tasoeur•1m ago•0 comments

Grant Sanderson – AI and the future of math

https://www.dwarkesh.com/p/grant-sanderson-2
1•crescit_eundo•1m ago•0 comments

Reverse-engineering Codemasters' BIGF archive format in Ruby

https://davidslv.uk/2026/06/30/reading-binary-in-ruby.html
1•davidslv•1m ago•0 comments

Show HN: Clusy – Cursor for data science notebooks in cloud

https://www.clusy.io/
2•eldar_hsnv•2m ago•0 comments

Remote Work Is Making It Harder for Grads to Find (and Keep) Jobs

https://www.wsj.com/lifestyle/careers/work-from-home-gen-z-7b09795b
1•apparent•3m ago•0 comments

The new chaos of being able to build anything

https://readtheinference.substack.com/p/the-new-chaos-of-being-able-to-build
1•mmayernick•4m ago•0 comments

Claude Science

https://claude.com/product/claude-science
3•lebovic•4m ago•0 comments

Supreme Court takes sledgehammer to federal regulatory structure

https://www.npr.org/2026/06/29/nx-s1-5875161/supreme-court-takes-sledgehammer-to-much-of-federal-...
1•marojejian•6m ago•0 comments

Show HN: Trajeckt, a Firewall for AI Agents

https://github.com/beebeeVB/trajeckt/
1•beebeeVB•6m ago•0 comments

Claude Science, an AI workbench for scientists, is now available

https://www.anthropic.com/news/claude-science-ai-workbench
1•meetpateltech•7m ago•0 comments

The Download: AI "coworkers" and stratospheric internet

https://www.technologyreview.com/2026/06/30/1139954/the-download-ai-agents-coworkers-solar-powere...
1•joozio•11m ago•0 comments

Genius AI Detector (Satirical)

https://geniusaidetector.com/
1•ohjeez•11m ago•0 comments

We Are the Last People Who Know How It Works

https://unix.foo/posts/last-people-who-know-how-it-works/
1•cylo•13m ago•0 comments

Show HN: Shot-scraper video tool for recording YAML-defined webapp feature demos

https://simonwillison.net/2026/Jun/30/shot-scraper-video/
1•simonw•13m ago•0 comments

US is working on ban targeting Chinese energy inverters, sources say

https://www.reuters.com/legal/litigation/us-working-ban-targeting-chinese-energy-inverters-source...
1•onemoresoop•13m ago•0 comments

What Split-Brain Patients Reveal About Consciousness

https://thereader.mitpress.mit.edu/what-split-brain-patients-reveal-about-consciousness/
1•gmays•15m ago•0 comments

Why I rebuilt SwiftUI from scratch

https://www.youtube.com/watch?v=z6DAYwHwXDg
1•michael_forrest•15m ago•1 comments

The biggest AI spenders are hiring more, too

https://www.americanbanker.com/news/the-biggest-ai-spenders-are-hiring-more-too
2•petethomas•16m ago•0 comments

Xsnow "protestware" in Debian

https://lwn.net/SubscriberLink/1079385/3d7a57da58b41aa9/
2•6581•17m ago•0 comments

Best fan placement to move air through the house [video]

https://www.youtube.com/watch?v=1L2ef1CP-yw
1•tosh•18m ago•0 comments

18KB File Listing Tool – No_std Rust and Libc

https://github.com/tracyspacy/fli
2•yulkor•18m ago•0 comments

A return to two-pizza culture

https://www.allthingsdistributed.com/2026/06/return-to-two-pizza-culture.html
5•HieronymusBosch•18m ago•0 comments

Ask HN: How would you launch an open-source app with a small budget?

7•Realman78•20m ago•1 comments

Migrating to client-side load balancing at a million requests per second

https://engineering.zalando.com/posts/2026/06/client-side-load-balancing.html
1•cjbooms•20m ago•0 comments

(Lord) Timothy Dexter

https://en.wikipedia.org/wiki/Timothy_Dexter
2•helterskelter•20m ago•0 comments

July Xbox layoffs rumored to be 'largest in gaming history'

https://xcancel.com/georgebsocial/status/2071747657261855201#m
5•kh9000•23m ago•1 comments

Show HN: My 13-year-old built an ant colony tracker

https://formicarium.es
3•abelgvidal•23m ago•0 comments

Nano Banana 2 Lite

https://deepmind.google/models/gemini-image/flash-lite/
21•minimaxir•23m ago•5 comments