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?

Zo Computer

https://www.zo.computer
1•erhuve•3m ago•0 comments

America is destroying itself. It's no surprise

https://www.theguardian.com/commentisfree/2026/jul/04/us-history-destruction
1•skissane•3m ago•0 comments

Guix substitute and guix pull vulnerabilities

https://guix.gnu.org/blog/2026/guix-substitute-pull-vulnerabilities/
1•logickkk1•11m ago•0 comments

Scientists reverse brain aging, with a nasal spray

https://stories.tamu.edu/news/2026/04/14/scientists-reverse-brain-aging-with-a-nasal-spray/
6•cybermango•13m ago•0 comments

Apple Container 1.0 Released as a Native Docker Alternative for macOS

https://linuxiac.com/apple-container-1-0-released-as-a-native-docker-alternative-for-macos/
2•atkrad•14m ago•0 comments

Reflections on the Guillotine

https://theanarchistlibrary.org/library/albert-camus-reflections-on-the-guillotine
2•halperter•18m ago•0 comments

Blood Cell 'Nurseries' Upend Understanding of Human Physiology

https://news.feinberg.northwestern.edu/2026/07/02/blood-cell-nurseries-upend-understanding-of-hum...
1•cybermango•19m ago•0 comments

Be a Hikikomori for Science

https://www.theregister.com/science/2026/07/04/nasa-says-it-will-isolate-volunteers-from-the-outs...
4•johnea•22m ago•1 comments

Proxying inference requests in 6ms with Pingora, Envoy, and Spanner

https://modal.com/blog/serverless-servers
1•birdculture•24m ago•0 comments

Brawndo Plasma Thermos Makes What Plants Crave [video]

https://www.youtube.com/watch?v=brfSLxoHUps
1•westurner•25m ago•0 comments

Tungsten – an expressive, fast programming language

https://tungsten-lang.org/
3•jeffpeterson•27m ago•1 comments

Mapping with In-Memory Layers to Reduce LLM Overload

https://ridgetext.com/blog/mapbox-llm-composition
1•Buckwheat469•28m ago•0 comments

Jellyfont: Visual Search Engine for Fonts

https://www.jellyfont.xyz/
2•lcutner•30m ago•0 comments

Drone Autonomy Crash Course

https://www.cggonzalez.com/blog/index.html
2•cgg1•32m ago•0 comments

The Quest to Make Humanoid Robots Safe Enough for Humans

https://www.wsj.com/tech/the-quest-to-make-humanoid-robots-safe-enough-for-humans-4887c123
1•bookofjoe•41m ago•1 comments

Recovering garbled Bitcoin addresses (2024)

https://purplesyringa.moe/blog/recovering-garbled-bitcoin-addresses/
2•zX41ZdbW•42m ago•0 comments

AI Authentication and Authorization

https://fusionauth.io/articles/ai/ai-authentication-authorization
1•mooreds•43m ago•0 comments

The Ugly Phase

https://trishagee.com/2026/07/04/the-ugly-phase/
1•mooreds•44m ago•0 comments

Mantissa, a distributed workload orchestration system

https://mantissa.io/blog/init/
1•artursapek•46m ago•0 comments

Scientists discover a surprising link between Vitamin C and brain health

https://www.sciencedaily.com/releases/2026/06/260626030428.htm
2•OutOfHere•52m ago•1 comments

Ask HN: When will the stock market crash?

5•roschdal•59m ago•5 comments

DeFi yield comparison, read before depositing

https://hduynam99.substack.com/p/how-to-find-the-best-defi-yield
1•hoangthuytrang•1h ago•0 comments

Birdsong data from Merlin ID app to help global biodiversity project

https://www.theguardian.com/environment/2026/jul/04/merlin-app-birdsong-identification-ebird-biod...
2•andsoitis•1h ago•0 comments

Microsoft Copilot OS revealed in LEAKED video: built on Copilot and agentic AI

https://www.windowscentral.com/microsoft/windows-11/microsoft-copilot-os-revealed-in-leaked-video...
1•type0•1h ago•0 comments

Tell HN: Megalodon.jp is faster than archive.today and doesn't require reCAPTCHA

1•Cider9986•1h ago•0 comments

Out-of-core LLM inference engine written from scratch in Rust

https://github.com/Vage91/Kortex
1•Vage91•1h ago•0 comments

Simulation Game: Can you Terraform Mars?

https://www.nature.com/immersive/d41586-026-01978-8/index.html
1•cybermango•1h ago•0 comments

Tool that stops iCloud from eating your Mac's SSD

https://github.com/rexbrahh/icloud-guard/tree/main
3•rexbrahh•1h ago•1 comments

I just tired of killing AI slop

https://www.surgeos.app/
1•yernururu•1h ago•1 comments

RFC: Stopping runaway AI agent spend with atomic budget reservations

https://github.com/iamapsrajput/agent-budget-protocol/blob/main/RFC.md
1•iamapsrajput•1h ago•0 comments