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?

Hackers Use Chinese AI Tool to Hit South Korean Banks

https://www.wsj.com/risk-compliance-journal/the-morning-risk-report-hackers-use-chinese-ai-tool-t...
1•goatley•20s ago•0 comments

Anthropic Startup "Program"

https://www.anthropic.com/startup-program-official-terms
1•artur_makly•35s ago•0 comments

A Framework to Benchmark Different Placement Algorithms in a Distributed System

https://ucsc-ospo.github.io/report/osre26/umass/edge-replication/20260908-mchan/
1•mooreds•47s ago•0 comments

AI Film 'Gods Don't Give Gifts' First Trailer for Dec Run, Plans Oscar Bid

https://variety.com/2026/film/news/ai-film-gods-dont-give-gifts-sets-trailer-plans-oscar-bid-1236...
1•Ariarule•1m ago•0 comments

Microsoft, Ericsson lead global tech alliance for digital trust

https://www.reuters.com/business/microsoft-ericsson-lead-global-tech-alliance-digital-trust-2026-...
1•totetsu•2m ago•0 comments

Show HN: 800M AI harness to beat 7B [video]

https://www.youtube.com/watch?v=PEi7hVju3ds
1•ruoku•2m ago•1 comments

My unsupported Kindle runs Linux now, and it's more useful than when it was new

https://www.xda-developers.com/my-unsupported-kindle-runs-linux-now-and-its-more-useful-than-when...
1•theanonymousone•2m ago•0 comments

Human Friction Makes Agentic AI Safer and Smarter

https://spectrum.ieee.org/agentic-ai-humans-in-loop
1•rbanffy•2m ago•0 comments

Tell HN: Apple not letting removal of AI models on macOS 27 is outrageous

1•busymom0•3m ago•0 comments

The Federation Fallacy (2019)

https://alyssarosenzweig.ca/blog/the-federation-fallacy.html
1•janandonly•3m ago•0 comments

Show HN: I had 100 tabs open, so I built Daysift with AI powered by Proton

https://chromewebstore.google.com/detail/daysift-–-find-any-tab-in/llnlmmjddpfmjjkhpbjkdpcclgnc...
1•fvincenti•3m ago•0 comments

A few vectors for a mixed folder (pooled directory embeddings)

https://www.craftpine.com/dirvec
1•ali-basheer•3m ago•0 comments

A brief history of clinical xenotransplantation

https://pmc.ncbi.nlm.nih.gov/articles/PMC4684730/
1•anarbadalov•5m ago•0 comments

The Model Isn't Cooperating

https://portswigger.net/research/the-model-isnt-cooperating
1•StrauXX•5m ago•0 comments

Show HN: InBrief – open-source AI news aggregator with LLM filtering

https://github.com/frankzch/ai-news-brief
1•frankzch•6m ago•0 comments

The Best of Om Malik

https://elijahpotter.dev/articles/the-best-of-om-malik
1•chilipepperhott•7m ago•0 comments

How the Courts Became a Safe Haven for Corporations

https://prospect.org/2026/10/06/how-courts-became-safe-haven-for-corporations/
2•paimapi•7m ago•0 comments

Show HN: Clawock – AI argues, code settles the trades

https://github.com/KCNyu/clawock
1•kcn•8m ago•0 comments

Cloudflare has "major" outage for 48 hours now

https://www.cloudflarestatus.com/api/v2/status.json
1•datajeroen•8m ago•1 comments

Show HN: I made a TV for old cartoons

https://cartoontv.xyz/
1•a_void_sky•9m ago•0 comments

Piratefly – Free flight deal finder: the cheapest fares from your city, fare

https://shop.lumnika.com/piratefly/?src=hackernews-showhn
1•deusautoai725•9m ago•0 comments

Device detection and occupancy monitoring for Airbnb hosts

https://www.minut.com/features/occupancy-monitoring
1•mikeodds•10m ago•0 comments

Stop Asking Whether AI Wrote It

https://www.inc.com/lindsey-witmer-collins/stop-asking-whether-ai-wrote-it/91414942
1•druskacik•10m ago•1 comments

AI poker coaches, identify leaks, improves decisions

https://sharkplay.org/
1•kodart•11m ago•1 comments

SynthID Detector

https://synthid.com/
4•ilreb•13m ago•1 comments

Trend Switcher Bot (MIT)

https://github.com/dimonb19a/trend-switcher
1•dimonb19a•13m ago•1 comments

Rainmakers: The drones used to seed clouds

https://www.bbc.co.uk/news/articles/c64g71j4lgyjo
1•Brajeshwar•17m ago•0 comments

Creating Fake People Is a Terrible Idea

https://nautil.us/creating-fake-people-is-a-terrible-idea-1285598
1•Brajeshwar•18m ago•1 comments

Record Field of Qualifiers Accepted to Boston Marathon

https://www.baa.org/news/record-field-of-qualifiers-accepted-into-the-131st-boston-marathon-prese...
1•hasheddan•18m ago•0 comments

AI Papers of the Week MCP Tools

https://academy.dair.ai/papers
1•omarsar•18m ago•0 comments