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?

Show HN: A document snapshot solution to counter backups with name "Final_final"

https://apps.microsoft.com/detail/9nsd7jd58g17?hl=en-US&gl=US
1•hideload•3m ago•0 comments

Humanoid Robot Shatters Human Half-Marathon Record to Make History

https://hothardware.com/news/humanoid-robot-shatters-human-half-marathon-record
1•axelfontaine•3m ago•0 comments

American Library Association releases list of the most challenged books of 2025

https://text.npr.org/nx-s1-5791617
1•everdrive•4m ago•0 comments

The glance, and song, that could define the Premier League title race

https://www.cnn.com/2026/04/20/sport/premier-league-manchester-city-arsenal-erling-haaland
1•mooreds•5m ago•0 comments

US Class Action Suit over BrowserGate

https://browsergate.eu/updates/us-class-action-suit-over-browsergate-filed/
2•speckx•5m ago•0 comments

Show HN: Clock-MCP, stop guessing the time in AI

https://crates.io/crates/clock-mcp
1•DavidCanHelp•6m ago•1 comments

We got 207 tok/s with Qwen3.5-27B on an RTX 3090

https://github.com/Luce-Org/lucebox-hub
2•GreenGames•6m ago•1 comments

After a 7.7-magnitude quake, Japan warns of slightly higher risk of a mega-quake

https://www.pbs.org/newshour/world/after-a-7-7-magnitude-quake-japan-warns-of-slightly-higher-ris...
2•mikhael•6m ago•0 comments

Personal AI Safety: The Default Settings Will Not Save You

https://personalaisafety.com/p/the-default-settings-will-not-save
2•lukaszkorecki•7m ago•0 comments

Pasta sauce wants to record your family

https://www.theverge.com/tech/913874/prego-connection-keeper-bundle-voice-recorder-storycorps
1•corvad•9m ago•1 comments

Everything is AI now – does this kill the excitment of software development?

1•sminchev•10m ago•4 comments

America's coming revolt is in the 'wired belt'

https://www.ft.com/content/08ac1335-6fa5-4f62-ab51-0451d9e155d4
2•alephnerd•12m ago•0 comments

Show HN: Git Push No-Mistakes

https://github.com/kunchenguid/no-mistakes
1•akane8•12m ago•0 comments

Kimi vendor verifier – verify accuracy of inference providers

https://www.kimi.com/blog/kimi-vendor-verifier
2•Alifatisk•12m ago•0 comments

Expansion Artifacts

https://mattstromawn.com/writing/expansion-artifacts/
1•tobr•14m ago•0 comments

A Nation of Copycats in a Data Center

https://sphera.substack.com/p/a-nation-of-copycats-in-a-data-center
1•KyleVlaros•15m ago•0 comments

Some fish can tell when you're staring at them or their eggs

https://www.scientificamerican.com/article/these-fish-know-when-youre-watching-them/
2•thinkingemote•15m ago•0 comments

Scientists Uncover Potential Brain Risks of Popular Fish Oil Supplements

https://scitechdaily.com/scientists-uncover-potential-brain-risks-of-popular-fish-oil-supplements/
2•thinkingemote•17m ago•0 comments

Freedom of Information Request – Chat GPT Conversations – UK Science Secretary

https://www.gov.uk/government/publications/foi2025-00120-plain-text-copy-of-peter-kyles-chatgpt-h...
1•oli5679•19m ago•0 comments

A Camera That Freezes Rotation | Stroboscopic Video

https://www.youtube.com/watch?v=xXAQZLS5Epw
1•voctor•21m ago•0 comments

Prediction Markets: Last Week Tonight with John Oliver [video]

https://www.youtube.com/watch?v=ZN4njIQcSR4
1•cdrnsf•23m ago•0 comments

Alignment by Default?

https://blog.cosmos-institute.org/p/alignment-by-default
2•paulpauper•25m ago•0 comments

Eight Rules to Regain Public Trust in Academia

https://marginalrevolution.com/marginalrevolution/2026/04/eight-rules-to-regain-public-trust-in-a...
2•paulpauper•26m ago•0 comments

Knausgaard's Diabolic Realism

https://www.thedriftmag.com/roman-flood/
1•paulpauper•26m ago•0 comments

As Enrollment Dips, School Administrators Turn to TikTok to Advertise

https://www.nytimes.com/2026/04/17/nyregion/nyc-school-ads.html
1•bookofjoe•28m ago•1 comments

Changes to GitHub Copilot Individual Plans

https://github.blog/news-insights/company-news/changes-to-github-copilot-individual-plans/
10•zorrn•28m ago•3 comments

Polymarket profits by placing bets on its own platform [video]

https://www.youtube.com/watch?v=A654vzQTGbQ
3•etrand_•29m ago•0 comments

Agentic Coding Is About to Fracture Open Source

https://blog.herlein.com/post/agentic-coding-impact-on-oss/
1•speckx•31m ago•0 comments

Show HN: troubleshooting.sh – paste a error, get a fix with root cause explained

https://troubleshooting.sh/
1•informsyed•31m ago•0 comments

Debasement

https://en.wikipedia.org/wiki/Debasement
1•downboots•31m ago•0 comments