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?

California Cyberattack on 911 Systems

https://www.latimes.com/california/story/2026-08-09/cyberattack-forces-emergency-declaration-in-s...
1•vsgherzi•2m ago•0 comments

Show HN: Acquired Podcast Idea Dinner Returns

https://acquirers.vercel.app/
1•Taikhoom2010•3m ago•0 comments

Japanese court overturns Red RAW video patent

https://www.dpreview.com/news/panasonic-did-what-apple-sony-and-nikon-couldnt-overturn-a-red-raw-...
2•anigbrowl•5m ago•0 comments

Is Europe safer than America?

https://economist.com/graphic-detail/2026/08/09/is-europe-safer-than-america
1•andsoitis•9m ago•0 comments

Ask HN: How do you set comp at an early stage startup?

1•jeffreyfate•10m ago•0 comments

The Anatomy of a Pass

https://davidorban.substack.com/p/the-anatomy-of-a-pass
1•mayukh•22m ago•0 comments

Before We Click "Publish" on Hugging Face

https://twitter.com/icoxfog417/status/2086606980584714495
1•icoxfog417•22m ago•0 comments

Ask HN: What Project are you the most proud of?

2•emn4tor•25m ago•0 comments

Cloudflare OS

https://os.cloudflare.app/
2•phirschybar•27m ago•0 comments

What do I want to be? – a poem about parenting in the AI age

https://www.reddit.com/r/Adulting/s/1ZF6OLsjko
1•AmbroseBierce•31m ago•0 comments

I've Been to the Future. It Worked Out

https://iwanajohannsen.substack.com/p/ive-been-to-the-future-it-worked
1•herbertl•32m ago•1 comments

Owner of original Intel 8080 pre-production Rubylith mask seeks restorer

https://www.tomshardware.com/pc-components/cpus/owner-of-original-intel-8080-pre-production-layou...
1•sbulaev•35m ago•0 comments

Show HN: Discord-delete – Delete all your Discord messages from your data export

https://github.com/DatCodeMania/discord-delete
1•DatCodeMania•35m ago•1 comments

America's Military Is Dangerously Exposed

https://www.wsj.com/opinion/americas-military-is-dangerously-exposed-26706217
2•petethomas•36m ago•0 comments

Show HN: A local-first, modular replacement for your accounting software

https://github.com/celerp/celerp
1•ngsevers•37m ago•0 comments

Optimizing a GPT-2-Class Transformer on a GPU

http://martinkristiansen.com/llm-gpu-optimization/index.html
2•mkristiansen•39m ago•1 comments

Iran Is Rewiring Its Proxy Network

https://www.nationalreview.com/2026/08/iran-is-rewiring-its-proxy-network/
1•petethomas•41m ago•0 comments

Ancient Roman shipwreck discovered off Sicily coast

https://www.bbc.com/news/articles/cvgx1kpz17go
2•1659447091•44m ago•0 comments

Linus Torvalds Explains What Makes Linux So Fast [video]

https://www.youtube.com/watch?v=-xbzGngfQEw
1•binyu•47m ago•0 comments

Beyond Prompt Injection: Hacking Apple's Private Cloud Compute

https://blog.sentry.security/beyond-prompt-injection-hacking-apples-private-cloud-compute/
2•sickmate•54m ago•0 comments

GitHub issues as long-term memory for coding agents

https://meshintelligence.substack.com/p/how-to-use-github-as-long-term-memory
1•meshintel•54m ago•0 comments

Bank statement PDF to CSV that runs in the browser

https://statement-to-csv.pages.dev/
1•hewkaiba•57m ago•1 comments

NOVC: Venture Capital Free

https://novc.fyi/
1•xyzzy_plugh•1h ago•0 comments

.NET on AWS Open Source Software Fund

https://github.com/aws/dotnet-foss
1•kristianp•1h ago•1 comments

2036

https://www.codevoid.net/ruminations/2026/08/09/2036.html
1•grork•1h ago•0 comments

The Ambition Project

https://www.betonit.ai/p/the-ambition-project
2•herbertl•1h ago•0 comments

Modern JavaScript Tricks for Cleaner Everyday Code

https://jsdevspace.substack.com/p/20-modern-javascript-tricks-for-cleaner
1•javatuts•1h ago•1 comments

A browser that generates every website from scratch

https://www.xda-developers.com/tried-browser-generates-every-website-from-scratch/
1•TMWNN•1h ago•1 comments

NASA chooses a once-abandoned Spanish village to broadcast the 2026 eclipse

https://www.euronews.com/next/2026/08/07/why-nasa-chooses-this-small-burgos-village-to-broadcast-...
1•jmox•1h ago•0 comments

QuiltOps – Continuous packaging for your patches

https://quiltops.dev/
1•calvinmorrison•1h ago•0 comments