frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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?

EU weighs restricting use of US cloud platforms to process sensitive gov data

https://www.osnews.com/story/144943/eu-weighs-restricting-use-of-us-cloud-platforms-to-process-se...
1•abdelhousni•3m ago•0 comments

Bieke Depoorter – A Magnum photographer exploring portraiture

https://www.youtube.com/watch?v=NGZDrpCTKRM
1•fallinditch•3m ago•0 comments

Raw Truthful Nothing Hidden Musician Bares All with New Album

https://www.youtube.com/playlist?list=PLiykFHje0lV5iOXB1WegGtZ3yOS11HtP1
1•keithgdarley•5m ago•1 comments

AI is everywhere. Deep study still worth it? No idea, but I will try

https://pynsights.vercel.app
1•MarinhoD•16m ago•0 comments

Nostalgic Electronics Kits Central

https://www.nostalgickitscentral.com/
3•cf100clunk•18m ago•1 comments

Human-Like Document AI

https://pageindex.ai/
1•DeathArrow•20m ago•0 comments

What AI Did to My College Class

https://www.nytimes.com/2026/05/17/opinion/chatgpt-ai-college-school-graduation.html
4•billyp-rva•21m ago•0 comments

The quiet grief of adult friendship

https://timesofindia.indiatimes.com/blogs/civil-irony/the-quiet-grief-of-adult-friendship/
3•luispa•21m ago•1 comments

Meta deletes popular 1M follower account after Kuwaiti request

https://twitter.com/ryangrim/status/2055992439031185782
4•bhouston•22m ago•0 comments

The occasional ECONNRESET

https://movq.de/blog/postings/2026-05-05/1/POSTING-en.html
2•zdw•23m ago•0 comments

Americans Are Smashing Flock Cameras

https://stateofsurveillance.org/news/flock-cameras-destroyed-nationwide-ice-backlash-2026/
53•rolph•23m ago•25 comments

The Protein Shortage Is Coming

https://www.theatlantic.com/culture/2026/05/protein-powder-shortage/687193/
2•paulpauper•25m ago•0 comments

A chat-less interface to collaborate with LLM agents directly from your files

https://github.com/piqoni/piqo-extension
1•lexoj•25m ago•0 comments

Is the Modern NBA Breaking Its Stars?

https://www.theringer.com/2026/05/14/nba/nba-injuries-leg-calf-hamstring-achilles-data
1•paulpauper•26m ago•0 comments

Reviewing so called Pull Requests at $dayjob

https://rkta.de/dayjob-pr-review.html
2•g0xA52A2A•27m ago•0 comments

Oto Smart Sprinkler Review (2026): Solar-Powered and Simple to Use

https://www.wired.com/review/oto-smart-sprinkler/
1•joozio•28m ago•0 comments

TinyStories-260K running locally on a stock Game Boy Color

https://github.com/maddiedreese/gbc-transformer
1•medbar•29m ago•0 comments

Google Maps Satellite Imagery of Palisades Fire Area Reverts

https://twitter.com/royolone/status/2055465365312815543
4•kingleopold•30m ago•1 comments

Engineering a Safer World: Risk Modelling – and Safety Engineering? – For AI Lo

https://www.lesswrong.com/posts/mL5asdegoa56CkqgJ/engineering-a-safer-world-risk-modelling-and-sa...
2•joozio•32m ago•0 comments

A Parliament of Owls and a Murder of Crows: How Groups of Birds Got Their Names

https://www.themarginalian.org/2024/01/04/brian-wildsmith-birds-company-terms/
3•bookofjoe•32m ago•0 comments

Getting Matured Through Learning

2•Shailendra_S•32m ago•0 comments

How Reese Witherspoon built $900M company from a problem Hollywood wouldn't fix

https://fortune.com/2026/05/17/reese-witherspoon-hello-sunshine-900-million-sale-founder-mindset/
3•happy-go-lucky•35m ago•0 comments

Rethinking the Luddites in the Age of AI

https://www.newyorker.com/books/page-turner/rethinking-the-luddites-in-the-age-of-ai
3•simonebrunozzi•39m ago•0 comments

A Gentle Introduction to World Models

https://neurallens.substack.com/p/a-gentle-introduction-to-world-models
2•dokdev•44m ago•0 comments

Where Have All the Cycles Gone? [video]

https://www.youtube.com/watch?v=B-aDBB34o6Y
1•tosh•49m ago•0 comments

Show HN: Typeset sitelen pona and copy a PNG (for toki pona speakers)

https://sitelen.vercel.app/
1•vitaly-pavlenko•51m ago•0 comments

Scaffold a complete 1990s Geocities-themed static website in seconds

https://gitea.com/sugardaddyapp/geocities-boilerplate
3•hankerapp•55m ago•0 comments

Age Assurance on the Internet: Identity, Privacy, and the Limits of Verification

https://sphericalcowconsulting.com/2026/04/14/age-assurance/
8•mooreds•55m ago•2 comments

Bun's problem may be developing in the open

https://00f.net/2026/05/17/developping-in-the-open/
1•avinassh•55m ago•0 comments

Polylux: Open-source replacement for Asus Armoury Crate that saves 470MB RAM

https://github.com/vladulus/polylux
1•polylux•56m ago•0 comments