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?

Dissolving arterial plaque by isolating the vessel from blood flow

https://www.cureus.com/articles/488870-closed-loop-extracorporeal-vascular-cleaning-by-staged-che...
1•iliatoli•48s ago•0 comments

Cisco to buy unit 8200 affiliated company that tracks all your API keys

https://www.timesofisrael.com/us-tech-giant-cisco-buys-israeli-ai-cyber-startup-to-protect-digita...
1•neuroelectron•7m ago•0 comments

Supreme Court signals it may end Cisco human rights suit

https://www.washingtonpost.com/politics/2026/05/02/supreme-court-cisco-torture-china/
1•neuroelectron•10m ago•0 comments

Denial of Service Vulnerability in React Server Components

https://github.com/facebook/react/security/advisories/GHSA-rv78-f8rc-xrxh
1•karimf•12m ago•0 comments

Could Lovable's automatic 10% pay raise be the cure for toxic cultures?

https://techcrunch.com/2026/05/07/could-lovables-automatic-10-pay-raise-be-the-cure-for-toxic-cul...
2•dicksent•12m ago•0 comments

Trump Is Getting Away with Murdering an American Industry

https://heatmap.news/plus/the-fight/spotlight/trump-federal-aviation-administration-wind-farms
2•gok•17m ago•0 comments

I designed Microsoft's EA channel in 2001. It's being dismantled in 2026

https://www.brendanoconnor.net/case-studies/microsoft-enterprise-channel/
1•brendo_y•18m ago•0 comments

Copy Fail 2: Electric Boogaloo

https://github.com/0xdeadbeefnetwork/Copy_Fail2-Electric_Boogaloo
4•larusso•21m ago•0 comments

Tailscale is down

https://status.tailscale.com/incidents/01KR2VHMYPMHVS821CJRD4Q3N9
2•bithavoc•21m ago•0 comments

Ask HN: Does CopyFail make a stronger case for rolling releases such as Arch?

1•fullstacking•25m ago•1 comments

Higher usage limits for Claude and a compute deal with SpaceX

https://www.anthropic.com/news/higher-limits-spacex?id=19234
2•alex_young•29m ago•1 comments

NIST – How Do You Measure It?

https://www.nist.gov/how-do-you-measure-it
1•rramadass•30m ago•1 comments

US will start revoking passports for parents who owe child support

https://apnews.com/article/passports-unpaid-child-support-penalty-state-department-42d90cfa8a06ee...
2•OutOfHere•30m ago•0 comments

Show HN: jj diff review integrated with agents

https://twitter.com/plannotator/status/2052594084527677612
1•ramoz•30m ago•0 comments

Digging into Drama at the Document Foundation

https://lwn.net/Articles/1066418/
1•signa11•30m ago•0 comments

Coming of Age

https://dirt.fyi/article/2026/05/coming-of-age
1•colinprince•31m ago•0 comments

Most bad analytics is a translation problem, not a tooling problem

https://lowhangingdata.com/article/telephone-game-bad-analytics/
1•mryagerr•31m ago•0 comments

Sunburn inspired a new way to store energy

https://www.bbc.com/news/articles/c62l9gnx775o
1•eptityri•33m ago•0 comments

QuickTools Pro – Free browser-based utility suite

https://fascinating-crepe-d7b325.netlify.app/
1•chbayah•36m ago•0 comments

Am I over reacting?

https://talkboy.org/s/DgwuLPHR
1•reieicucv•38m ago•0 comments

Guitar tuner that uses phone accelerometer

https://tautme.github.io/phone-sensors/accel-tuner.html
2•adm4•39m ago•1 comments

Life Layering

https://longevity.stanford.edu/michael-clinton-on-life-layering/
1•andsoitis•44m ago•0 comments

Utah data center: Projected daily heat equivalent to 23 atomic bombs

https://www.abc4.com/news/northern-utah/box-elder-data-center-heat-atomic-bombs/
5•WarOnPrivacy•44m ago•5 comments

New York state set to ban law enforcement, including ICE, from wearing masks

https://www.reuters.com/legal/government/new-york-state-set-ban-law-enforcement-including-ice-wea...
20•tartoran•45m ago•3 comments

AWS says data center overheating in North Virginia disrupts services

https://www.reuters.com/business/retail-consumer/amazon-cloud-unit-says-data-center-overheating-n...
6•christhecaribou•50m ago•1 comments

Replit's Amjad Masad on Cursor deal, Apple fight, and why he'd rather not sell

https://techcrunch.com/2026/05/01/replits-amjad-masad-on-the-cursor-deal-fighting-apple-and-why-h...
1•gmays•52m ago•0 comments

Sley is live: the first native AI programming language

https://github.com/GreyforgeLabs/sley
1•Greyforge•55m ago•2 comments

Evaluating Geekbench 6

https://chipsandcheese.com/p/evaluating-geekbench-6
1•wmf•1h ago•0 comments

Canadian sues DHS over alleged Google data grab tied to social media posts

https://www.cbc.ca/news/world/us-dhs-aclu-lawsuit-canadian-john-doe-9.7187851
4•cdrnsf•1h ago•1 comments

How to Generate Terraform from Existing AWS Resources

https://www.ops0.com/blog/generate-terraform-from-existing-aws-resources
1•sureshpaulchamy•1h ago•0 comments