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?

Musicians shortchanged by AI deals with labels, lawsuit alleges

https://www.latimes.com/entertainment-arts/business/story/2026-06-08/american-federation-of-music...
1•1vuio0pswjnm7•2m ago•0 comments

Show HN: My open source agent built and launched its own business in 48 hours

https://github.com/smithersbot/smithersbot
1•SmithersBot•3m ago•0 comments

Live scanner that detects antidetect browsers like Kameleo

https://sntlhq.com
1•kaspartomson•4m ago•0 comments

The Boeing 747 Begins Its Final Descent

https://www.theatlantic.com/magazine/2026/07/boeing-747-retirement/687304/
1•Brajeshwar•5m ago•0 comments

Show HN: Hyperpost – Reference Implementation of a Website

https://github.com/AlessandroTambellini/hyperpost
1•ale_tambellini•5m ago•0 comments

Why the NATO Logo Is One of the Most Recognizable Symbols in the World

https://detroitchinatown.org/why-the-nato-logo-is-one-of-the-most-recognizable-symbols-in-the-world/
1•Alifatisk•6m ago•0 comments

How to Build a Google Sheets API Integration with Nango and Codex

https://nango.dev/blog/how-to-build-a-google-sheets-api-integration-with-nango-and-codex/
1•sapneshnaik•6m ago•0 comments

Where Did Earth Get Its Oceans? Maybe It Made Them Itself

https://www.quantamagazine.org/where-did-earth-get-its-oceans-maybe-it-made-them-itself-20260612/
1•ibobev•7m ago•0 comments

C64IDE: Powerful, Free Mac Commodore 64 IDE Review

https://retrogamecoders.com/c64ide-review/
1•ibobev•8m ago•0 comments

You can power on a Mac remotely

https://www.jeffgeerling.com/blog/2026/power-on-your-mac-remotely/
1•speckx•8m ago•0 comments

After empty promises, string theory finds new uses

https://www.science.org/content/article/after-empty-promises-string-theory-finds-new-uses
1•the-mitr•9m ago•0 comments

Second Circuit Rejects Sam Bankman-Fried's Appeal

https://www.citationneeded.news/second-circuit-rejects-sam-bankman-frieds-appeal/
2•cdrnsf•9m ago•0 comments

Show HN: VibeClip – open-source AI video editor you control by chatting

https://github.com/oktaydbk54/vibeclip
1•borandabak•9m ago•0 comments

In the Atacama Desert, astronomers live and work in a James Bond villain lair

https://www.bbc.com/future/article/20260609-inside-the-bond-set-where-astronomers-live
1•bookofjoe•9m ago•1 comments

Review of Synthetic Users Finds Synthetic Users Don't Work

https://www.thevoiceofuser.com/the-largest-review-of-synthetic-participants-ever-conducted-found-...
1•cdrnsf•11m ago•0 comments

Wasi: WebGPU – A Proposed WebAssembly System Interface API

https://github.com/WebAssembly/wasi-webgpu
2•giancarlostoro•13m ago•0 comments

Show HN: StackScope – I crawled over 40k indie launches to see what they ship

https://stackscope.dev/
1•datafreak_•14m ago•0 comments

HN Comment Golf

1•dijksterhuis•15m ago•3 comments

Fluxor: A zero-dependency PHP framework with file-based routing

https://github.com/lizzyman04/fluxor
1•lizzyman04•16m ago•0 comments

Elon Musk Is Colonizing Earth

https://www.nytimes.com/2026/06/12/opinion/elon-musk-spacex-starbase-texas.html
2•dieselgate•17m ago•0 comments

Anthropic's Fable is the most locked-down public model we've ever seen

https://www.understandingai.org/p/anthropics-fable-is-the-most-locked
2•speckx•19m ago•0 comments

The Roblox Problem

https://bxwrites.substack.com/p/the-roblox-problem
1•bushwart•21m ago•0 comments

Swamp Is Interesting Because It Doesn't Trust AI

https://ravegraph.beehiiv.com/p/swamp-is-interesting-because-it-doesn-t-trust-ai
1•nickstinemates•22m ago•0 comments

Adding ext3/4 compliant journaling to the 30-year-old GNU Hurd microkernel

https://github.com/mnikic/hurd-journaling
1•backend_dev82•23m ago•1 comments

Show HN: World Cup bracket game with no back end – brackets live in the URL

https://golazo.giitaayan.com
1•fellowplayer•23m ago•0 comments

Show HN: A Terrible Way to Consume Hacker News – AI Slop

https://deadinternet.tech/feed
3•keegandonley•23m ago•0 comments

500M Subscriber Livestream [video]

https://www.youtube.com/watch?v=A9TikdsD5eg
1•Cider9986•24m ago•0 comments

CRISPR Tech Selectively Shreds Cancer Cells, Including "Undruggable" Cancers

https://innovativegenomics.org/news/crispr-technique-selectively-shreds-cancer-cells/
1•gmays•25m ago•0 comments

Commits

https://shub.club/writings/2026/june/commits/
1•forthwall•25m ago•0 comments

American Ebola Unit Sparks Fury, Protests and a Political Crisis in Kenya

https://www.nytimes.com/2026/06/10/world/africa/ebola-kenya-us-protests.html
1•ViktorRay•26m ago•1 comments