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?

AI Slop Detector

https://github.com/QCK-Framework/QCK_SMART_Fractal-Data-Pruning
1•qck-framework•2m ago•0 comments

Chinese EV giant BYD faces 'forced labor' investigation at Hungary factory

https://theworld.org/stories/2026/03/31/chinese-ev-giant-byd-faces-forced-labor-investigation-at-...
1•assimpleaspossi•2m ago•0 comments

Journey of building a PostgreSQL consultancy – a founder's view

https://stormatics.tech/blogs/three-years-of-stormatics-what-building-a-postgresql-consultancy-lo...
4•annieghazali_1•4m ago•0 comments

SpaceX files confidentially for IPO potentially valued at $1.75T

https://techcrunch.com/2026/04/01/spacex-files-confidentially-for-ipo-in-mega-listing-potentially...
1•chakintosh•4m ago•0 comments

Meta and Google face existential threat as nations rush to ban teen users

https://www.latimes.com/business/story/2026-04-01/meta-google-face-existential-threat-as-nations-...
2•1vuio0pswjnm7•5m ago•0 comments

Ubuntu Mate Leader Stepping Down, Seeking New Contributors

https://www.phoronix.com/news/Ubuntu-MATE-Needs-Leader
2•Qem•5m ago•0 comments

The Life-Changing Power of a Book Review Before Algorithms

https://www.nytimes.com/2026/03/24/books/review/larry-mcmurtry-annie-proulx-jeff-bezos-brokeback-...
1•1vuio0pswjnm7•7m ago•0 comments

Show HN: Hacker News, summarized and printed to your local printer

https://github.com/thejchap/jc-news
1•jchap•8m ago•0 comments

Meta Adaptive Ranking Model: Bending the Inference Scaling Curve to Serve Models

https://engineering.fb.com/2026/03/31/ml-applications/meta-adaptive-ranking-model-bending-the-inf...
1•eamag•12m ago•0 comments

A.I. Helped One Man (and His Brother) Build a $1.8B Company

https://www.nytimes.com/2026/04/02/technology/ai-billion-dollar-company-medvi.html
2•jbredeche•13m ago•0 comments

The SpaceX IPO: retail investor notes

https://report.bearblog.dev/the-spacex-ipo-will-be-the-perfect-storm-of-retail-investor-fallacies/
3•u1hcw9nx•13m ago•0 comments

New StackOverflow website looks more like Reddit

https://beta.stackoverflow.com
1•birdculture•14m ago•0 comments

Macron says it is unrealistic to open Hormuz Strait by force

https://www.reuters.com/world/macron-says-it-is-unrealistic-open-hormuz-strait-by-force-2026-04-02/
1•geox•15m ago•0 comments

Gödel's Blockchain Problem: valid but not true

1•tpotts_eth•16m ago•0 comments

Vibe Coding: Best Practices for Prompting

https://supabase.com/blog/vibe-coding-best-practices-for-prompting
1•Bakalemwa•19m ago•0 comments

Lemonade by AMD: a fast and open source local LLM server using GPU and NPU

https://lemonade-server.ai
2•AbuAssar•20m ago•0 comments

Fuel prices are soaring. Plastic could be next

https://www.technologyreview.com/2026/04/02/1135045/plastic-economic-effects/
1•joozio•22m ago•0 comments

Why I'm Building Another AI Meeting Notes Tool Instead of Using Granola.ai

https://www.indiehackers.com/post/why-i-m-building-another-ai-meeting-notes-tool-C3yZAdu9r4DKF2B0...
2•zlat1997•25m ago•2 comments

Spanner Columnar Engine in Preview

https://cloud.google.com/blog/products/databases/spanner-columnar-engine-in-preview
1•fastest963•27m ago•0 comments

Skill Ratings and Matchmaking

https://kalifi.org/2026/02/skill-ratings.html
3•ZacnyLos•27m ago•0 comments

Zstandard Across the Stack

https://oddur.me/posts/zstandard-across-the-stack/
1•oddurmagnusson•31m ago•0 comments

Beyond the Network View: DNS-Driven Application Visibility

https://labs.ripe.net/author/danny-lachos/beyond-the-network-view-dns-driven-application-visibility/
1•jruohonen•34m ago•0 comments

Sweden goes back to basics, swapping screens for books in the classroom

https://undark.org/2026/04/01/sweden-schools-books/
30•novaRom•35m ago•2 comments

Enabling Codex to Analyze Two Decades of Hacker News Data

https://modolap.com/publication/hn-analysis-1
3•ronfriedhaber•42m ago•0 comments

Mix-and-match synthesis of 3D small molecules

https://www.nature.com/articles/d41586-026-00809-0
2•salkahfi•42m ago•0 comments

$200 oil isn't as crazy as it sounds

https://www.cnn.com/2026/04/02/business/price-200-oil-gas-iran
3•dabinat•46m ago•0 comments

Pro-XSLT.js – fast and lightweight JavaScript library implementing XSLT 1.0

https://github.com/hbi99/pro-xslt
1•hbi99•47m ago•0 comments

Half of social-science studies fail replication test in years-long project

https://www.nature.com/articles/d41586-026-00955-5
5•MrBuddyCasino•51m ago•2 comments

Eli Lilly's obesity pill approved by FDA, setting up Novo Nordisk competition

https://www.statnews.com/2026/04/01/eli-lilly-obesity-pill-approved-orforglipron-foundayo/
3•andsoitis•53m ago•0 comments

Ask HN: Has anyone became successful on their own?

5•Nair0•59m ago•6 comments