frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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?

Why reluctant 'guru' says Dutch will win World Cup

https://www.bbc.co.uk/sport/football/articles/c20223n3k4yo
1•cjr•47s ago•0 comments

AI Infra Is Nothing Like the "Classic Cloud Infra"

https://ramansharma.substack.com/p/ai-infra-is-nothing-like-the-classic
1•intrepidsoldier•1m ago•0 comments

Malware dev tries to steal Claude users' secrets, leaks own GitHub private token

https://theins.press/en/corruption/291857
1•lschueller•3m ago•1 comments

Broadcom gets early start on WiFi 8 with next-gen wireless routing kit

https://www.theregister.com/networks/2026/05/27/broadcom-gets-early-start-on-wifi-8-with-new-rout...
1•Bender•6m ago•1 comments

Argonne flexes spare supercompute to build private AI inference service

https://www.theregister.com/ai-ml/2026/05/27/argonne-flexes-spare-supercompute-to-build-private-a...
2•Bender•8m ago•0 comments

One-and-Done Heart Disease Prevention? Scientists Show It May Be Possible

https://www.nytimes.com/2026/05/25/health/cholesterol-ldl-gene-therapy.html
1•gmays•8m ago•0 comments

What's Missing in CSS Layout

https://patrickbrosset.com/articles/2026-05-20-whats-missing-in-css-layout/
2•pickpuck•8m ago•0 comments

42 Years of Darkness: The Horror of Uranus [video]

https://www.youtube.com/watch?v=mV6sU9xzstE
1•fortran77•10m ago•0 comments

Google employee charged with using inside information to make $1M on Polymarket

https://abcnews.com/US/google-employee-charged-inside-information-make-1-million/story?id=133350018
2•ortusdux•12m ago•1 comments

Biohub releases a world model of protein biology

https://biohub.org/news/world-model-of-protein-biology/
3•automatic-berry•15m ago•0 comments

Apple Developing iPhone Anti-Snatching Feature, Locking Stolen Phones Instantly

https://www.macrumors.com/2026/05/27/apple-anti-theft-iphone-feature/
1•mgh2•16m ago•0 comments

AIs don't like religion – particularly Jehovah's Witnesses, study claims

https://www.theregister.com/ai-ml/2026/05/27/ais-dont-like-religion-particularly-jehovahs-witness...
2•Bender•17m ago•1 comments

The email that fixed ReTab

https://lycheeisle.com/blog/adding-voiceover-to-retab/
2•hyouuu•17m ago•0 comments

Agent Accountability Gap: Why Network Policies, API Gateways, & RBAC Isnt Enough

https://www.tigera.io/blog/the-ai-agent-accountability-gap-why-network-policies-api-gateways-and-...
1•baroiall•20m ago•0 comments

Coding a Classical Robot Controller in the Age of Coding Agents

https://discourse.openrobotics.org/t/post-qualification-contribution-coding-a-classical-robot-con...
2•ttmacer•24m ago•0 comments

Apple working on iPhone anti-snatching feature that locks device automatically

https://9to5mac.com/2026/05/26/apple-working-on-iphone-anti-snatching-feature-that-locks-the-devi...
3•dabinat•24m ago•0 comments

Simpson's Gender-Equality Paradox

https://www.pnas.org/doi/10.1073/pnas.2422247122
5•doener•25m ago•0 comments

Show HN: I help founders kill doom scrolling and hook people's attention fast

https://stopclip.com
4•Odeh13•27m ago•1 comments

After Automation

https://every.to/p/after-automation
3•pfannl•30m ago•0 comments

Sony Launches Bravia 9 II and Bravia 7 II with 'True RGB'

https://www.flatpanelshd.com/news.php?subaction=showfull&id=1779897602
4•ksec•35m ago•0 comments

DNTerminal – Autonomous Domain Investment Agent

https://dnterminal.com
3•untitled-now•35m ago•0 comments

"Moving House" (and Offices, Apartments, etc.)

https://notoneoffbritishisms.com/2026/05/27/moving-house-and-offices-apartments-etc/
2•jjgreen•36m ago•0 comments

Top NJ and NY prosecutors announce investigation of World Cup ticket prices

https://www.politico.com/news/2026/05/27/nj-ny-world-cup-ticket-price-investigation-00937921
2•JumpCrisscross•36m ago•0 comments

Apex: A Fast, Specialized Model for React Native

https://www.callstack.com/blog/introducing-apex-a-fast-specialized-model-for-react-native
5•__natty__•44m ago•0 comments

Show HN: Fast CPU summarize, eli5, fact-check or translate any text

https://github.com/kouhxp/fftext
2•mrkn1•47m ago•0 comments

ClickStack Cloud: Serverless observability powered by ClickHouse

https://clickhouse.com/blog/clickstack-cloud-private-preview
2•samaysharma•48m ago•0 comments

CostBench: an open benchmark for data warehouse cost-performance

https://clickhouse.com/blog/costbench-data-warehouse-cost-performance
3•samaysharma•49m ago•0 comments

Sam Altman and Dario Amodei are walking back their AI jobs apocalypse prophecies

https://fortune.com/2026/05/26/sam-altman-dario-amodei-walking-back-ai-jobs-apocalypse-prophecies...
4•samaysharma•50m ago•0 comments

A Simple Makefile Tutorial (2008)

https://cs.colby.edu/maxwell/courses/tutorials/maketutor/
2•birdculture•50m ago•0 comments

Backyard Star Wars (2010)

https://spectrum.ieee.org/backyard-star-wars
4•Jtsummers•51m ago•1 comments