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: ExANS – Lossless KV cache compression at 622 GB/s on H100

https://www.theopenlake.com/blog/exans-lossless-gpu-compression-for-bf16-kv-cache
1•arnav__1•15s ago•0 comments

Show HN: Webklip – ephemeral online clipboard with live sync and E2E encryption

https://webklip.com/
1•vsergione•21s ago•0 comments

Desktop Linux just cracked 10% market share – and Windows 11 is mostly to blame

https://www.zdnet.com/article/the-linux-desktop-finally-cracks-the-10-market-share-barrier/
1•CrankyBear•50s ago•0 comments

I'm Scared a Stranger Will Call My Novel AI, So I Built GitHub for Words

https://dylan.blog/2026/08/03/im-scared-a-stranger-will.html
1•harper•1m ago•0 comments

Your model already knows the answer: how benchmark answers leak into LLMs

https://elman.ai/news/your-model-already-knows-the-answer/
1•fran-mora•2m ago•0 comments

Reactivating TensorBoard: Why treat an oscilloscope like a photo frame?

https://github.com/PastToFuture-Whisperer/xprof-cubism-reducer/discussions/1
1•PTF-W•3m ago•0 comments

Sash: Keeping secrets away from software that acts on your behalf

https://zenodo.org/records/21797233
1•cmt-t•4m ago•0 comments

PBCareerOS – Multi-dimensional career intelligence and roadmap generator

https://customizecareermap.org/
1•Pballada80•5m ago•0 comments

Why everything breaks at 150 people

https://falconer.com/notes/cerebras-knowledge-base/
3•iamgioh•7m ago•1 comments

Show HN: T – Conductor, but for Your CLI

https://github.com/PiemonteF/t
2•Absonsonson•7m ago•0 comments

My NixOS Dev Machine

https://miccah.io/posts/2026-08-01-my-nixos-dev-machine/
2•speckx•7m ago•0 comments

Celld: Self-hosted, distributed Durable Objects

https://github.com/denoland/celld
2•calvinfo•9m ago•0 comments

DDR5 Prices Surge 7% in July, Reaching New Highs

https://www.techpowerup.com/350920/ddr5-prices-surge-7-in-july-reaching-new-highs
1•gslin•9m ago•0 comments

A Four-Ton SpaceX Rocket Stage Hit the Moon, but No One Saw It

https://www.nytimes.com/2026/08/05/science/space-x-moon-crash-confirmation.html
2•donohoe•10m ago•0 comments

You don't need an MCP server. A Markdown file is enough

https://mindcloud.co/docs/universal/rest/home/latest/introduction/build-with-ai
1•danilovilhena•11m ago•0 comments

Modernizing Reddit's Infrastructure and Moderation Tools

https://redditinc.com/news/modernizing-reddits-infrastructure-and-moderation-tools
1•HieronymusBosch•11m ago•0 comments

VA orders Dominion to charge more transmission costs to data centers

https://virginiamercury.com/2026/08/05/scc-orders-dominion-to-develop-tariff-to-assign-more-trans...
1•jaredwiener•12m ago•0 comments

Launch HN: HyperProbe (YC S26) – Agents that do read-only debugging in prod

https://www.hyperprobe.co
4•shailendraht•12m ago•0 comments

AWS DynamoDB Vector Search

https://aws.amazon.com/blogs/aws/amazon-dynamodb-now-supports-real-time-vector-search-at-any-scale/
2•aws_is_awesome•12m ago•0 comments

I'm Begging You: Never Write with A.I

https://www.nytimes.com/2026/08/04/opinion/artificial-intelligence-ai-writing.html
3•gmays•13m ago•0 comments

Why I'm leaving OpenAI to build telepathy

https://naomibashkansky.com/blog/telepathy/
3•devanshp•13m ago•1 comments

Microservices [video]

https://www.youtube.com/watch?v=y8OnoxKotPQ
1•ustad•14m ago•0 comments

US refunds $100B of Donald Trump's 'liberation day' tariffs

https://www.theguardian.com/us-news/2026/aug/05/trump-administration-has-paid-back-100bn-of-165bn...
2•imzadi•16m ago•1 comments

Broadcaster Wins Blocking Injunction Covering Pirate Sites That Don't Exist Yet

https://torrentfreak.com/broadcaster-wins-broad-u-s-blocking-injunction-covering-pirate-sites-tha...
1•speckx•16m ago•0 comments

Hollywood and Shanghai Cinema in the 1930s [pdf]

https://docs.lib.purdue.edu/cgi/viewcontent.cgi?article=2225&context=clcweb
1•Bluestein•17m ago•0 comments

Google DeepMind CEO Demis Hassabis steps down

https://www.ft.com/content/61d41764-f2f7-4906-a112-ff3073972c51
2•alvis•18m ago•0 comments

Google shakes up AI leadership as DeepMind chief shifts role

https://www.reuters.com/business/google-shakes-up-ai-leadership-deepmind-chief-shifts-role-2026-0...
1•usernomdeguerre•21m ago•0 comments

Stop Sending Me Your Errors

https://kramkow.ski/article/2026/08/05/stop_sending_me_your_errors.html
2•speckx•24m ago•0 comments

Major Hedge Funds Targeted in Wave of Attempted Cyberattacks

https://www.bloomberg.com/news/articles/2026-08-05/major-hedge-funds-targeted-in-wave-of-attempte...
2•lemonlym•24m ago•2 comments

Anti-Zionism is not anti-Semitism UK appeal tribunal confirms in landmark ruling

https://www.middleeastmonitor.com/20260804-anti-zionism-is-not-anti-semitism-uk-appeal-tribunal-c...
5•thisislife2•25m ago•0 comments