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?

Show HN: Quarter – A TUI launcher to browse, search and launch your games

https://github.com/stronxyo/quarter
1•stronxyo•5m ago•0 comments

Mastodon 5.0: A closer look – Mastodon Blog

https://blog.joinmastodon.org/2026/10/5.0-a-closer-look/
1•rbanffy•6m ago•0 comments

"Theranos 2.0" startup has patents, investors but no product

https://fortune.com/2026/10/25/elizabeth-holmes-partner-billy-evans-haemanthus-blood-testing-star...
2•gosen•6m ago•1 comments

Show HN: AirFlick Drop – AirDrop for Windows with zero mobile app installs

https://github.com/k39139215-gif/airflick-drop
1•Snapmotion3421•8m ago•0 comments

Turn Superlogical's Rex into an AI Harness

https://github.com/alpcanaydin/rexmod/
1•alpcan•8m ago•0 comments

Qt Bridges Technology Preview: Qt Quick UIs for Rust and C# Developers

https://www.qt.io/blog/qt-bridges-technology-preview-rust-csharp
3•leonardsouza•9m ago•0 comments

A Global Anti-Right Backlash

https://www.newyorker.com/news/global-notes/a-global-anti-right-backlash
1•rbanffy•9m ago•0 comments

Copper is an operating system for robots

https://github.com/copper-project/copper-rs
1•ahamez•9m ago•0 comments

People 'Vibe Manufacturing'

https://www.businessinsider.com/vibe-manufacturing-ai-prototypes-cad-coding-2026-11
1•theanonymousone•11m ago•1 comments

Rivian, Ford and GM are using 3D printing to reduce costs

https://www.cnbc.com/2026/10/31/automakers-3d-printing-ford-rivian-gm.html
1•andrewstetsenko•14m ago•0 comments

I indexed 37h of my YouTube library using an RTX 4090 and local ML models in 24h

2•iliashad•16m ago•2 comments

Quill Cowork

https://www.youtube.com/watch?v=M97H4umU3pE
1•Bhavishya2011•17m ago•0 comments

FerroUI a cross-platform UI framework for Rust

https://ferroui.github.io/website/
3•wiso•17m ago•1 comments

The Linux 7.4 Merge Window Is Easily the Largest in Kernel History

https://www.phoronix.com/news/Linux-7.4-Massive-Window
2•acossta•20m ago•0 comments

The Future of the Internet

https://erikjohannes.no/posts/20261023-the-future-of-the-internet/index.html
3•speckx•23m ago•2 comments

Artists hiding painted pebbles around the world

https://www.bbc.com/news/articles/c674pvkkp2eyo
1•1659447091•24m ago•0 comments

How to Conquer a Nation Without Fighting [video]

https://www.youtube.com/watch?v=6NTDGriJZmU
2•PorciiVorbesc•26m ago•0 comments

Nouli – A decision model TUI to branch and blend multiple histories

https://github.com/nouli-ai/nouli
2•SurfingAlpaca•27m ago•0 comments

Windows 95 is still being used to sort eggs in Germany

https://www.pcgamer.com/hardware/windows-95-arguably-the-first-pc-gaming-os-is-still-being-used-t...
1•speckx•32m ago•1 comments

Are We All Too Cynical for Star Trek?

https://www.thebulwark.com/p/are-we-all-too-cynical-for-star-trek
3•Bluestein•34m ago•0 comments

Moving an RTS from Godot to Lobster

https://age-of-anything.com/devlog/2026-10-30-moving-to-lobster
1•Drache93•34m ago•1 comments

HackerTok: TikTok but for Hacker News

https://github.com/hackertok/hackertok.github.io
1•allinonai•36m ago•1 comments

Are There Problems Beyond the Reach of AI [video]

https://www.youtube.com/watch?v=NWNbAEivyvs
4•efavdb•39m ago•0 comments

Representation Hypothesis with JEPAs

https://www.alphaxiv.org/abs/2610.39302
1•redox_•44m ago•0 comments

OSS Contributions: From Intellectual Work to Token Donations

https://www.tobiaspitters.com/blog/oss-contributions-from-intellectual-work-to-token-donations
3•CloseChoice•45m ago•0 comments

Show HN: Castov – A local-first desktop automation engine using local AI

https://castov.com
2•castov•46m ago•0 comments

Old Ideas

https://blog.fogus.me/thoughts/old-ideas.html
1•myth_drannon•49m ago•0 comments

Writing Is Magic; Machine Writing Is Ash

https://www.baldurbjarnason.com/2026/machine-writing-is-ash/
3•speckx•50m ago•0 comments

What kept GPUs waiting: an E1 study of distributed training overhead

https://nodeox.com/blog/e1-distributed-training-overhead
1•dvoronko•53m ago•0 comments

Show HN: Jik – a self-hosted language using region-based memory management

https://github.com/jik-lang/jik
3•scorched_soy•54m ago•0 comments