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?

Stop Making Threads

https://moonside.games/posts/stop-making-threads/
1•chnoblouch•51s ago•0 comments

China takes a page from SpaceX and recaptures first stage of rocket to reuse it

https://apnews.com/article/china-rocket-space-reuse-6d695fcad64a101dc3991c1bfa0e7357
1•tocs3•4m ago•0 comments

Tip

https://vivaldi.com/blog/tips/tip-830/
1•nahidai•4m ago•0 comments

Go Pop quiz: what time was it?

https://dave.cheney.net/2025/12/18/pop-quiz-what-time-was-it
1•kristianp•8m ago•0 comments

Einstein's relativity rules chemical bonds in heavy elements, new research shows

https://www.brown.edu/news/2026-07-09/chemical-bonds-relativity
3•hhs•10m ago•1 comments

China recovered its first reusable rocket and showed a new way to do it

https://arstechnica.com/space/2026/07/china-recovered-its-first-reusable-rocket-and-showed-a-new-...
1•sohkamyung•12m ago•0 comments

It's Now Imperative That You Copy That Floppy

https://hackaday.com/2026/07/07/its-now-imperative-that-you-copy-that-floppy/
1•rbanffy•12m ago•0 comments

OmFest Interest Form

https://docs.google.com/forms/d/e/1FAIpQLScyY9c5MowPFW6BmIitqaaF3T-ykM_d8eD2pq2XqwSt7N50zg/viewform
1•mooreds•15m ago•0 comments

Old Icons – All This

https://leancrew.com/all-this/2026/07/old-icons/
1•rbanffy•16m ago•0 comments

Neobrutalism Layouts

https://www.neobrutalism.dev/
1•modinfo•17m ago•0 comments

MCPA: The First Official Certification for the Model Context Protocol

https://aaif.io/blog/introducing-the-mcpa-the-first-official-certification-for-the-model-context-...
1•mooreds•17m ago•0 comments

The AI and observability gap for front end teams

https://embrace.io/guides/ai-observability-gap-report/
2•contrecc•18m ago•0 comments

Y2K in orbit: Tomorrow, we run out of satellite catalogue numbers

https://celestrak.org/
1•ColinWright•18m ago•0 comments

China lands reusable rocket for first time, state media says

https://www.bbc.com/news/articles/cm2rmmx86pdo
3•mattas•19m ago•0 comments

Pearson's Anti-Piracy Vendor Takes Down Best-Selling Author's Own GitHub Repo

https://torrentfreak.com/pearsons-anti-piracy-vendor-takes-down-best-selling-authors-own-github-r...
3•iamnothere•19m ago•0 comments

Apple sues OpenAI/io for stealing trade secrets

https://drive.google.com/file/d/1jxHwYEn2bxsWO3ceHAMKwdWQ11Ijy_-e/view
4•shay_ker•25m ago•1 comments

Netflix reportedly among parties in talks to buy Letterboxd

https://www.theguardian.com/film/2026/jul/10/letterboxd-netflix-sales-talks
5•cdrnsf•30m ago•0 comments

Determinisitc MIDI Synthesizer

https://monictheory.com
1•song_synth•32m ago•0 comments

Together AI, Apps Flyer lead list of Top dynamic companies for Q3 2026

https://greenflagdigital.com/gfd-tech-100-ranking/
1•josephjrobison•33m ago•0 comments

Play Neverball in the Browser

https://play.neverball.org/
1•toilet•35m ago•0 comments

What can you build using this? https://github.com/pixel-1998/axis-protocol

https://github.com/pixel-1998/axis-protocol
1•pixel-1998•36m ago•0 comments

AI Can't Recreate the Thrust Game (But It Can Help You Understand It)

https://www.jamesdrandall.com/posts/thrust_ai_powered_software_archaeology/
1•msephton•36m ago•0 comments

Lucia Auth

https://lucia-auth.com/
2•toilet•37m ago•0 comments

Man partly sucked out of broken window on flight pulled back by passengers

https://apnews.com/article/greece-germany-ryanair-passenger-457c424f541152af1becdb387c90cfdd
2•petethomas•38m ago•1 comments

Linux 7.3 Enabling Second Graphics Pipe for Modern AMD APUs

https://www.phoronix.com/news/Linux-7.3-Second-Pipe-GFX11-APU
1•rbanffy•43m ago•0 comments

The biggest bombshells from Apple's trade secret lawsuit against OpenAI

https://www.businessinsider.com/apple-sues-openai-trade-secret-theft-2026-7
3•uberdru•44m ago•0 comments

Show HN: An MCP server that lets AI agents request disability insurance quotes

https://github.com/seaworthy-io/seaworthy-mcp
1•tobylason•45m ago•0 comments

Claude Savings with context caching awareness

https://github.com/regolo-ai/brick-SR1
2•FrancescoMassa•45m ago•1 comments

Spiel: Chrome extension that reads articles/PDFs aloud with local TTS

https://github.com/preet01/spiel
1•harpreetv•46m ago•0 comments

A Plan to Stop Solar Storms from Sending Us Back to the Stone Age

https://www.wsj.com/science/space-astronomy/solar-storm-what-is-stormwall-e2ca1823
2•JumpCrisscross•46m ago•0 comments