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?

Fixed-Rate Mortgages Are Rent Control for Homeoweners

https://precon.substack.com/p/fixed-rate-mortgages-are-rent-control
2•NomNew•2m ago•0 comments

Content-defined chunking in Go: 3.7 GB/s and a third less memory

https://www.plakar.io/posts/2026-06-14/go-cdc-chunkers-v1.1.0-faster-leaner-and-provably-correct/
1•vcoisne•2m ago•0 comments

Too Many Islands, Too Few Bridges: Notes from the Event Modeling Conference 2026

https://docs.eventsourcingdb.io/blog/2026/06/29/too-many-islands-too-few-bridges-notes-from-the-e...
1•goloroden•3m ago•0 comments

Show HN: Selixes - Self-hosted LLM failover gateway, budget caps and PII

1•selixes•5m ago•0 comments

Making POSIX filesystems replicated and highly available

https://www.zerofs.net/blog/highly-available-posix-on-s3
1•Eikon•5m ago•0 comments

Self-Destructing Graphics Cards

https://www.tomshardware.com/pc-components/gpus/melting-power-connectors-and-how-to-safeguard-aga...
1•TEHERET•8m ago•0 comments

Using Home Assistant in a botanical garden

https://vooijs.eu/posts/why-is-there-smoke-from-the-boiler-room/
1•wildekek•9m ago•0 comments

Ha-Joon Chang on the Future of India's Industrialization

https://frontline.thehindu.com/interviews/india-industrialisation-ha-joon-chang-interview/article...
1•pessimizer•13m ago•0 comments

Reading Is the Ultimate Cognitive Enhancer

https://neurosciencenews.com/literacy-reshapes-cognition-30955/
3•bookofjoe•14m ago•1 comments

Uyuni Joins OpenSUSE Project Ahead of Annual Conference

https://news.opensuse.org/2026/06/22/uyuni-joins-opensuse/
2•ferryth•15m ago•0 comments

The 'Two Ships' Theory of American History

https://www.theatlantic.com/magazine/2026/08/the-slave-ship-and-the-mayflower/687628/
1•paulpauper•15m ago•0 comments

New Manager Guide Series

https://yusufaytas.com/series/new-manager-guide
7•yusufaytas•17m ago•1 comments

Living Codegraph

https://rlmlocal.com
2•fortsignal•18m ago•0 comments

I Added TurboQuant to Pgvector

https://github.com/pgvector/pgvector/pull/989
1•mxfeinberg•18m ago•0 comments

Show HN: I built a "living proof-of-work" for builders (Show HN that persists)

https://kritive.com
1•sonOfHades•18m ago•0 comments

Give AI-built websites a real design with DESIGN.md

https://getdesign.md/
1•spking•18m ago•0 comments

Unfathomable bugs #10: The Broken Windows Build

https://algassert.com/post/2603
1•fanf2•19m ago•0 comments

Free and Private Bookmarking Tool / Browser Start Page

https://vectorization.eu/start-page/
1•alsusart•20m ago•1 comments

30-Year Sentence for Transporting Zines Is a Five-Alarm Fire for Free Speech

https://theintercept.com/2026/06/26/daniel-sanchez-estrada-zines-prairieland-free-speech/
1•xrd•22m ago•0 comments

New mathematical operator just dropped – reality's kernel just got an upgrade

https://zenodo.org/records/20976243
2•CarloLoopTheory•27m ago•2 comments

Code responsibly, don't drink and vibecode

https://usama.leaflet.pub/3mpdjez6cz22g
2•iarchetype•28m ago•0 comments

Show HN: Rendering Markdown with LaTeX in the Terminal

https://mil.ad/blog/2026/latex-in-markdown.html
2•playnext•36m ago•1 comments

Show HN: Looped Whisper (FOSS) – Voice transcription menubar app for macOS

https://github.com/loopedautomation/whisper
1•RatulMaharaj•36m ago•0 comments

Build System Improvements, Centralized Overview, etc.

https://gist.github.com/rcalixte/0afb119cbcc130c21063839f65b53ab7
2•rcalixte•41m ago•0 comments

How information theory saved my word game

https://motplot.app/helloworld
1•jamwise•42m ago•2 comments

Show HN: Adipoli: a hand-wired keyboard for opposable thumbs

https://codeberg.org/sudobangbang/adipoli
2•sudo_bangbang•49m ago•0 comments

Jimmy is a tool to convert your notes from different formats to Markdown

https://marph91.github.io/jimmy/
3•CTOSian•55m ago•0 comments

Microsoft Bought a Nuclear Plant

https://moai.studio/blog/posts/microsoft-bought-a-nuke-plant.html
2•ionwake•57m ago•2 comments

France Is Too Hot for Shutters and Ceiling Fans

https://www.theatlantic.com/ideas/2026/06/france-air-conditioning-failure/687723/
4•paulpauper•58m ago•1 comments

Higher Ed Is Sorry

https://www.theatlantic.com/ideas/2026/06/higher-education-universities-public-trust/687714/
2•paulpauper•58m ago•0 comments