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•10mo ago

Comments

nine_k•10mo 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•10mo ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•10mo ago
They mention this in the article.
spockz•10mo ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•10mo ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•10mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•10mo 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•10mo 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•10mo 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•10mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•10mo ago
This was very well written. Excellent article!
NetOpWibby•10mo ago
Is this like MessagePack for Haskell?

Claude's Corner

https://substack.com/home/post/p-189177838
1•YeGoblynQueenne•8m ago•0 comments

AI pays for its self-existence

https://web4.ai/
1•johntopia•14m ago•1 comments

NASA spots new signs of lightning on Mars

https://www.scientificamerican.com/article/is-there-lightning-on-mars-new-evidence-suggests-its-t...
1•Brajeshwar•14m ago•0 comments

Obsidian Sync now has a headless client

https://help.obsidian.md/sync/headless
7•adilmoujahid•15m ago•0 comments

Anthropic vs. DoD: "Any lawful use" is a fight about control

1•colek42•17m ago•1 comments

Yarn 6 has been implemented in Rust

https://yarn6.netlify.app/blog/2026-01-28-yarn-6-preview/
1•porada•18m ago•0 comments

Show HN: Stacked Game of Life

https://stacked-game-of-life.koenvangilst.nl/
1•vnglst•18m ago•0 comments

The Epstein Tax

https://www.profgalloway.com/the-epstein-tax/
1•simonebrunozzi•18m ago•0 comments

Giant string of organic molecules on Mars may be one of best signs of life yet

https://www.livescience.com/space/mars/giant-string-of-organic-molecules-on-mars-may-be-one-of-th...
3•Brajeshwar•21m ago•0 comments

The Saga of Kowloon Walled City

https://www.atlasobscura.com/articles/kowloon-walled-city
3•Brajeshwar•24m ago•0 comments

Unfreeze for ChatGPT – Fix freezing on long conversations /30KB Chrome extension

https://inem.gumroad.com/l/unfreeze-for-chatgpt
1•inem•24m ago•1 comments

I caught an Illegal Russian Spy [video]

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

Why consumer choice is stripped away and how the tech industry profits from it

https://fireborn.mataroa.blog/blog/because-fuck-you-why-consumer-choice-is-being-stripped-away-an...
3•zdw•27m ago•0 comments

Polyworld

https://en.wikipedia.org/wiki/Polyworld
2•nicoloren•30m ago•0 comments

Clustering Developers by Repo/PR/Issue Signals

https://mates.symploke.dev?hn-ph
1•thomasfromcdnjs•31m ago•0 comments

Show HN: Spectra – Turn bank CSV/PDF exports into a local finance dashboard

https://github.com/francescogabrieli/Spectra
1•francesco_gab•32m ago•1 comments

Show HN: Fava Trails – Git-backed memory for AI agents using Jujutsu (JJ)

https://github.com/MachineWisdomAI/fava-trails
1•timeleft--•34m ago•0 comments

Show HN: SQLite for Rivet Actors – one database per agent, tenant, or document

https://github.com/rivet-dev/rivet
2•NathanFlurry•35m ago•0 comments

AssistPlant – Plant Care App in Your Calendar. Your Inbox. The Browser

https://assistplant.com/
1•milos-lekovic•37m ago•1 comments

I coded a game to turn the Epstein Files into Mad Libs. It's hilarious

https://www.epstein-isi.net/
3•douchecoded•38m ago•1 comments

Claude and Gemini debate AI consciousness then analyze their debate performances

https://spinchange.github.io/ai-debates/
1•spinchange•40m ago•1 comments

Ask HN: Whats the best friction approach to breaking phone habits

1•artzev_•42m ago•1 comments

Show HN: MailFomo – Drive urgency in emails with live countdown timers

https://mailfomo.com
1•krachev•42m ago•0 comments

Istota is a powerful (non-claw) AI agent that lives in Nextcloud

https://istota.xyz/
2•durakot•43m ago•0 comments

OpenAI Reaches A.I. Agreement with Defense Dept. After Anthropic Clash

https://www.nytimes.com/2026/02/27/technology/openai-agreement-pentagon-ai.html
1•brandonb•43m ago•0 comments

Why rich people live longer

https://www.empirical.health/blog/rich-people-live-longer-hims-superbowl/
1•brandonb•44m ago•0 comments

Build a DuckDB Extension in Rust in 4 Commands

https://redraiment.medium.com/build-a-duckdb-extension-in-rust-in-4-commands-64600f7e8cc0
1•redraiment•44m ago•1 comments

Agents of Chaos

https://arxiv.org/abs/2602.20021
1•ukuina•44m ago•1 comments

run0 (sudo replacement)

https://www.freedesktop.org/software/systemd/man/257/run0.html
1•bpierre•45m ago•0 comments

You Shouldn't Exercise to Lose Weight

https://time.com/6138809/should-you-exercise-to-lose-weight/
1•paulpauper•46m ago•1 comments