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•11mo ago

Comments

nine_k•11mo 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•11mo ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•11mo ago
They mention this in the article.
spockz•11mo ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•11mo ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•11mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•11mo 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•11mo 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•11mo 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•11mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•11mo ago
This was very well written. Excellent article!
NetOpWibby•11mo ago
Is this like MessagePack for Haskell?

The Closing of the Frontier

https://tanyaverma.sh/2026/04/10/closing-of-the-frontier.html
1•FrasiertheLion•3m ago•0 comments

Show HN: 2048 with a Leaderboard

https://www.the2048league.com/
1•khet•5m ago•0 comments

Deep Work on macOS Starts with Context, Not Blockers

https://www.brnsft.com/blog/how-to-set-up-a-deep-work-system-on-mac-from-scratch
1•robertohanas•9m ago•0 comments

How Transistors Work (1995)

http://amasci.com/amateur/transis.html
1•downbad_•12m ago•1 comments

Bringing Rust to the Pixel Baseband

https://security.googleblog.com/2026/04/bringing-rust-to-pixel-baseband.html
1•dochtman•13m ago•0 comments

The Making of Dark Castle

https://www.gamedeveloper.com/business/the-making-of-i-dark-castle-i-an-excerpt-from-the-secret-h...
1•AntiRush•15m ago•0 comments

Strategy Letter V (2002)

https://www.joelonsoftware.com/2002/06/12/strategy-letter-v/
1•crescit_eundo•19m ago•0 comments

A Fake Screen Fixed My macOS Space Switcher

https://jorviksoftware.cc/notes/2026/04/11/when-the-stars-align-redux
1•jonathan_hollin•20m ago•0 comments

The Brutal Reality of Today's Job Market 2026

https://maxjobintel.online/
1•videobroker•21m ago•0 comments

Ukraine and Weapons of Mass Destruction

https://en.wikipedia.org/wiki/Ukraine_and_weapons_of_mass_destruction
2•chistev•25m ago•1 comments

Jet Fuel Crunch Is Getting Severe with No Reprieve in Sight for Airlines

https://www.wsj.com/business/airlines/jet-fuel-crunch-is-getting-severe-with-no-reprieve-in-sight...
3•bookofjoe•26m ago•1 comments

After Me(One encrypted vault. One QR code. Your family gets everything)

https://www.myafterme.co.uk/
1•elufadeju•27m ago•0 comments

I Pick My Stack for Vibe Coding

https://tildehacker.com/how-i-pick-my-stack-for-vibe-coding
1•tildehacker•29m ago•0 comments

Show HN: Git why – log your agent reasoning trace along your code

https://hexapode.github.io/git-why/
3•pierre•34m ago•0 comments

AGI Is the Wrong Word

https://breaking-changes.blog/agi-is-here-part-2/
1•oakhan3•34m ago•0 comments

Democratic AI to serve the public – OneProject.org

https://oneproject.org/how-to-make-ai-serve-the-public/
2•cucumberbund•38m ago•0 comments

NetWatch v0.11.0 – TUI network diagnostics, now with connection filtering

https://github.com/matthart1983/netwatch
1•matthart1983•38m ago•0 comments

I built a free 30-day habit tracker in Google Sheets

1•polaritymaking•40m ago•0 comments

Ask HN: What is the most annoying part of scheduling meetings?

1•preston-kwei•40m ago•1 comments

Chromium Fingerprint Simulation Framework Assessment

https://www.questcontents.com/2026/04/chromium-fingerprint-simulation.html
1•imarand•41m ago•0 comments

Ask HN: Has anyone reconsidered Antivirus software after recent security news?

3•pants2•47m ago•1 comments

PandemicAlarm – Free disease outbreak tracker aggregating WHO, CDC, and ProMED

https://pandemicalarm.com
1•PixelShipper•47m ago•0 comments

I built a free Canadian tax estimator for self-employed people

https://nextindata.substack.com/p/i-built-a-free-canadian-tax-estimator
1•nazanki•51m ago•0 comments

AI Is Tipping the Scales Toward Hackers After Mythos Release

https://www.nbcnews.com/tech/security/anthropic-claude-mythos-ai-hackers-cybersecurity-vulnerabil...
8•thywis•52m ago•4 comments

Transaction-level provenance for AI art certificate/signed/license on every sale

https://arcvelvetos.web.app/verify?id=AwCCW6DLQgA4s5XVZ86X&type=sale
2•PCasinoAVOS•54m ago•0 comments

AI still can't figure out PowerPoint

https://www.perspectives.plus/p/ai-still-cant-figure-out-powerpoint
2•jukkan•54m ago•0 comments

LPM 1.0 – Video-Based Character Performance Model

https://large-performance-model.github.io/
1•LopRabbit•54m ago•0 comments

Anyone know how I can cancel this? I dont want it

https://old.reddit.com/r/wallstreetbets/comments/1siq4m2/anyone_know_how_i_can_cancel_this_i_dont...
3•simonpure•1h ago•0 comments

Tell HN: See the AI Doc

2•linsomniac•1h ago•1 comments

Why Aren't We Uv Yet?

https://aleyan.com/blog/2026-why-arent-we-uv-yet/
2•birdculture•1h ago•3 comments