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?

Show HN: CheapStack – affordable dev starter kits and boilerplates

https://cheapstack.dev
1•makbar890•20s ago•0 comments

Algorithm Aversion

https://en.wikipedia.org/wiki/Algorithm_aversion
1•cainxinth•21s ago•0 comments

Fable is stylistically closer to Kimi K3 than Claude Opus

https://slopidx.com/models/claude-fable-5
1•zetrk•39s ago•0 comments

US administration considering ban on Chinese open source AI models

https://www.axios.com/2026/07/20/ai-us-china-open-source-kimi
1•anigbrowl•1m ago•0 comments

The Messy Reality of AI Transformation

https://seasonedleadership.substack.com/p/the-messy-reality-of-ai-transformation
1•mooreds•9m ago•0 comments

Jan – Open-Source ChatGPT Replacement

https://www.jan.ai/
1•jantissler•10m ago•1 comments

The Cartel Olympics

https://www.theatlantic.com/magazine/2026/05/mexico-cartel-la-union-tepito/686453/
1•cdrnsf•10m ago•0 comments

Donation Controversy

https://mullvad.net/en/blog/donation-controversy
2•Cider9986•12m ago•1 comments

US imposes new 50% tariffs on some Canadian products

https://www.reuters.com/business/us-imposes-new-50-tariffs-canadian-products-2026-07-20/
4•JumpCrisscross•15m ago•2 comments

You're not ambitious enough with Claude

https://twitter.com/christinexzhu/status/2074847461588267466
1•gmays•17m ago•0 comments

Pregnant Womans Roadside Death Triggers Push to Reopen Mississippi DeltaHospital

https://kffhealthnews.org/rural-health/rural-mississippi-delta-hospital-desert-pregnant-woman-die...
2•Jimmc414•17m ago•0 comments

Tell HN: TIL accessing old.reddit.com now requires accounts

3•nanis•18m ago•3 comments

Designing an Ethernet Switch ASIC

https://essenceia.github.io/projects/ethernet_switch_asic/
1•random__duck•20m ago•0 comments

Show HN: Seek – Ctrl+F for Videos

https://seekapp.cc
1•surprisefox•20m ago•0 comments

Parsifal and The Muppet Movie are the only two genuine Gesamtkunstwerke

https://morbidcuriosity.substack.com/p/enthullet-die-rainbow-connection
1•pnwpnw•21m ago•0 comments

My falling-out with the rationalist community

https://lcamtuf.substack.com/p/my-falling-out-with-the-rationalist
2•surprisetalk•25m ago•0 comments

Show HN: Velprium - Time Workspace

https://www.velprium.com/
1•mjkl7896•25m ago•0 comments

Mysterious little red dots at the beginning time may have an explanation

https://www.livescience.com/space/mysterious-little-red-dots-at-the-beginning-time-may-finally-ha...
1•arto•26m ago•0 comments

Ramp AI Router

https://router-website-ramp.vercel.app/router
1•robbiet480•27m ago•1 comments

Poverty of attention. Text became free. Attention didn't. (German)

https://christopher-helm.com/aufmerksamkeit-ueberfischung-ki-journalismus/
1•chelm•28m ago•0 comments

Repos in 29 days with an AI pipeline – what broke wasn't code

https://lkforge.com/blog/26-repos-in-29-days/
1•lucianBKR•28m ago•0 comments

US judge approves Anthropic's $1.5B settlement of copyright lawsuit

https://www.reuters.com/world/us-judge-approves-anthropics-15-billion-settlement-copyright-lawsui...
2•Anon84•30m ago•0 comments

Free LLM balancer combines multiple local inference machines with cloud fallback

https://github.com/Gysho/LLMrPro
1•ThomasWink1981•31m ago•1 comments

DeskPad – Virtual Keyboard and Mouse for Android Desktop Mode

https://github.com/auxiliaryutils/deskpad-app
1•Nemeses1•31m ago•1 comments

Confront Reality (2012)

http://www.aaronsw.com/weblog/anders
2•waaldev•32m ago•1 comments

An Ode to the Old Ways

https://agniva.me/personal/2026/07/19/ode-to-old-ways.html
1•sangeeth96•32m ago•0 comments

Richard Hamming: how one frustrated mathematician made data repair itself

https://nirmalutwani.substack.com/p/when-bits-flip-and-everything-breaks
1•nutwani91•32m ago•1 comments

Did California's DMV Director lie to the legislature?

https://papersplease.org/wp/2026/07/01/did-californias-dmv-director-lie-to-the-legislature/
2•Jimmc414•33m ago•0 comments

New Orleans Cops Published Policy Document Allowing Weaponized Drones

https://www.404media.co/new-orleans-cops-published-policy-document-allowing-weaponized-drones/
3•Jimmc414•33m ago•0 comments

The depth problem with agentic research

https://moekhalil.substack.com/p/the-depth-problem-with-agentic-research
1•mfkhalil•35m ago•0 comments