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?

It's All about the Allocator

https://aarol.dev/posts/zig-allocator/
1•ibobev•3m ago•0 comments

Procedural Puzzle Generation in the Witness

https://www.boristhebrave.com/2026/11/13/procedural-puzzle-generation-in-the-witness/
1•ibobev•4m ago•0 comments

Osint Case Studies

https://osintsearch.org/blog/osint-case-studies
1•maiama•5m ago•0 comments

Two planes collide at Miami International Airport

https://www.cbsnews.com/miami/news/ups-plane-copa-airlines-jet-collide-miami-international-airport/
4•icepush•16m ago•1 comments

Show HN: PowerQueue free online message queue supports AWS, GCE, Azure, AMQP

https://www.powerqueue.link
1•andrewstuart•20m ago•1 comments

Customizable Collector Tags

https://beachselfgrading.com/
1•Beachkilla•23m ago•0 comments

Encyclopedia Galactica

https://en.wikipedia.org/wiki/Encyclopedia_Galactica
2•whoishiding•27m ago•0 comments

SP4N – Helping construction teams understand data and make better decisions

https://sp4n.ai/
4•omarnwaked•28m ago•0 comments

Rising to top net worth, by age

https://flowingdata.com/2026/10/21/higher-net-worth/
1•gmays•28m ago•0 comments

The Single Router in Southern Arkansas That Ground Air Travel to a Halt

https://www.wsj.com/business/airlines/the-single-router-in-southern-arkansas-that-ground-air-trav...
10•lxm•32m ago•0 comments

US loses measles-free status after continued spread of the disease, WSJ reports

https://www.msn.com/en-us/health/diseases-and-conditions/us-loses-measles-free-status-after-conti...
6•pseudolus•34m ago•0 comments

Italy fines Meta $887M for accessing Android users' photos and videos

https://www.theguardian.com/technology/2026/nov/15/italy-fines-meta-887m-for-accessing-android-us...
1•oriettaxx•34m ago•0 comments

Tesla Cybercab pre-orders 'for personal use,' geo restrictions, $299 monthly fee

https://techcrunch.com/2026/11/14/tesla-opens-cybercab-pre-orders-for-personal-use-with-geo-restr...
1•pseudolus•35m ago•1 comments

Ask HN: I did build a app whichlook clos to polish but Struggle is getting user

1•heyykk23•38m ago•2 comments

Tiny Transmitters Track Monarch Butterflies

https://hackaday.com/2026/11/12/tiny-transmitters-track-monarch-butterflies/
3•lxm•43m ago•1 comments

Americans Under 35 Lost 23% of Their Net Worth, but Older Gens Got 37% Richer

https://finance.yahoo.com/economy/articles/americans-under-35-lost-23-150006201.html
2•madihaa•46m ago•2 comments

ChatMate: Remote Prompt Execution on AI Assistants Through Sandbox Escaping [video]

https://www.youtube.com/watch?v=MspRSCAb6uI
1•vbCrLf•49m ago•1 comments

Medicare's AI Experiment

https://www.eff.org/deeplinks/2026/11/medicares-ai-experiment-effector-3820
1•gumby•49m ago•0 comments

Investor-State Dispute Settlement (ISDS)

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3967722
1•Bluestein•50m ago•0 comments

Fun with Constrained Programming

https://blog.cmpxchg8b.com/2012/09/fun-with-constrained-programming.html
1•colejohnson66•52m ago•0 comments

Nintendo of America invests in game preservation

https://www.gamesradar.com/games/nintendo-of-america-invests-in-game-preservation-as-it-looks-to-...
1•jonbaer•57m ago•0 comments

My favourite modern NES games

https://jordi.inversethought.com/blog/25-of-my-favourite-modern-nes-games/
2•jordigh•57m ago•0 comments

Macula For?

https://claude.ai/artifact/2KGKuuJZsMfCu1pjq744qz#en
1•beamologist•1h ago•0 comments

Multi-agent AI (LangGraph) to audit AI papers for reproducibility

https://github.com/owenpatience2010-cmyk/paperpulse
1•OwiiiP•1h ago•0 comments

The Alignment Ticket: A Draft for Dario and Daniela Amodei in 2028

https://thealignmentticket.org/
3•alignthis•1h ago•1 comments

Mystery Trader Bags Nearly $200M Shorting Nvidia Right Before Huang Exit

https://notthebee.com/article/mystery-trader-bags-nearly-200-million-shorting-nvidia-right-before...
1•RickJWagner•1h ago•0 comments

Baron – A Biplane in Every Browser

https://baron.by.dai.studio/
1•diverted247•1h ago•2 comments

Scientists Create Electric Comb That Promotes Rapid Hair Growth in Mice

https://www.sciencealert.com/scientists-invented-an-electric-comb-and-tests-in-mice-show-it-promo...
1•thunderbong•1h ago•0 comments

Live from the Hague: US Taxpayers Seek ICC Warrants for Trump, Rubio over Genoci [video]

https://www.youtube.com/watch?v=8t3NoHl-55Y&t=742s
1•hkhn•1h ago•0 comments

Taxpayer Alliance Against Genocide Calls on ICC to Arrest Trump, Rubio over Gaza

https://truthout.org/articles/taxpayer-alliance-against-genocide-calls-on-icc-to-arrest-trump-rub...
1•hkhn•1h ago•0 comments