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?

Private Hosted OpenClaw that can connect to your data with included AI models

https://platform.joinable.ai
1•tnac•22s ago•0 comments

Show HN: Machine – One VM per Project

1•katspaugh•49s ago•0 comments

Directory of Blogs with a /Now Section

https://nownownow.com/
1•James72689•2m ago•0 comments

Five LLM agents play Werewolf in-browser, each with a private DuckDB

https://kayhan.dev/posts/013-werewolf-five-agents-one-browser/
1•keynha•8m ago•0 comments

My Wi-Fi Was Faster Than Ethernet So I Fixed It

https://www.youtube.com/watch?v=pzb7py2HeqA
1•iamflimflam1•20m ago•0 comments

An example of functional slop code

https://manemasters.vip/
1•AndrewKemendo•22m ago•1 comments

Driving

https://jzhao.xyz/posts/driving
1•wonger_•25m ago•0 comments

Groww beat every odd to get here. Now what?

https://the-ken.com/newsletters/two-by-two/groww-beat-every-odd-to-get-here-now-what/
1•vidyesh•38m ago•0 comments

AI Poop Analysis App Offered to Sell Me Database of Its Users' Poops

https://www.404media.co/ai-poop-analysis-app-offered-to-sell-me-access-to-its-users-poops/
1•tjek•39m ago•0 comments

Tesla Solar Roof is on life support as it pivot to panels

https://electrek.co/2026/05/14/tesla-solar-roof-promise-vs-reality-pivot-panels/
17•celsoazevedo•40m ago•2 comments

In Japan, we don't see robots as a threat: just a form of presence in the world

https://english.elpais.com/science-tech/2026-05-16/takeshi-yoro-anatomist-in-japan-we-dont-see-a-...
1•pilingual•41m ago•0 comments

Danger Testing

https://www.dangertesting.com/
1•skogstokig•48m ago•0 comments

Anyone on the Internet Can Ring Your Doorbell

https://www.abgeo.dev/blog/anyone-can-ring-your-doorbell
1•jrdres•51m ago•0 comments

Coal Makes a Comeback, Fueled by War in the Middle East

https://www.wsj.com/business/energy-oil/coal-makes-a-comeback-fueled-by-war-in-the-middle-east-fb...
2•JumpCrisscross•52m ago•0 comments

Grok vs. ChatGPT vs. Gemini Comparison 2026: Complete Guide (Tested)

https://aithinkerlab.com/grok-vs-chatgpt-vs-gemini-comparison-2026/
1•carlual•54m ago•1 comments

We refrigerated our way out of needing each other

https://pilgrima.ge/p/the-middleman
1•momentmaker•54m ago•0 comments

Achieving last-iterate convergence in a QNN via an autonomous Gmetric driver

https://github.com/unbconductor/psi.emergence
1•psiemergence•58m ago•0 comments

Grafana Labs internal source code accessed

https://twitter.com/grafana/status/2055827123236171827
11•jschorr•1h ago•1 comments

Show HN: Serene Bach – a Go weblog engine that runs as CGI or HTTP

https://github.com/serendipitynz/serenebach
2•takkyun•1h ago•0 comments

Show HN: Brokkr - Scalable cluster management for GPU/HPC workloads

https://github.com/jackthepunished/brokkr
1•bhdr26k•1h ago•0 comments

As the West Dries Out, a New Generation of Dams Rise

https://www.bloomberg.com/news/features/2026-05-15/colorado-builds-new-dams-in-a-race-with-the-we...
2•divbzero•1h ago•1 comments

Learning to Write (Again)

https://jampa.bearblog.dev/learning-to-write-again/
1•tjampa•1h ago•0 comments

The latest X algorithm has been published to GitHub

https://twitter.com/elonmusk/status/2055277918633562153
3•guiambros•1h ago•0 comments

A Tale of Two File Names

https://tomgalvin.uk/blog/gen/2015/06/09/filenames/
1•GranPC•1h ago•1 comments

Refray – ∞-way RW Git sync tool and auto conflict resolution, for leaving GitHub

https://github.com/MaigoLabs/refray
2•azaneko•1h ago•0 comments

Recent Developments in LLM Architectures: KV Sharing, MHC, Compressed Attention

https://magazine.sebastianraschka.com/p/recent-developments-in-llm-architectures
1•pretext•1h ago•0 comments

I Found Ultra-Pure Quantum Crystals in an Abandoned Mine in the Atacama Desert

https://medium.com/@breid.at/ultra-pure-quantum-crystals-from-an-abandoned-mine-in-a-mysterious-d...
1•vi_sextus_vi•1h ago•0 comments

We Built a Web That Consumes Us

https://gist.github.com/motyar/e53a2c23362a5d5a73a6895e79ee3d20
2•motyar•1h ago•0 comments

'News will find me' mindset makes people trust algorithms and online networks

https://www.psu.edu/news/bellisario-college-communications/story/news-will-find-me-mindset-makes-...
2•thunderbong•1h ago•0 comments

Async I/O in Zig 0.16, today

https://lalinsky.com/2026/05/11/async-io-in-zig-016-today.html
2•signa11•1h ago•0 comments