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?

Splitting Mounjaro pens for fun and profit

https://www.lesswrong.com/posts/EsYEuNDEm96DCb8Jy/splitting-mounjaro-pens-for-fun-and-profit
1•henryaj•4m ago•0 comments

Satoshi Has the Right to Hide. We Have the Right to Search for Him

https://www.thefp.com/p/satoshi-has-the-right-to-hide
1•fortran77•4m ago•0 comments

Private firms providing services to NHS made £1.6B profit in two years

https://www.theguardian.com/society/2026/apr/13/private-companies-nhs-services-profit-chpi-research
1•gpi•9m ago•0 comments

Clinical trial shows gene editing works for β-Thalassaemia, too

https://arstechnica.com/science/2026/04/clinical-trial-shows-gene-editing-works-for-%ce%b2-thalas...
1•bryanrasmussen•12m ago•0 comments

Show HW: Implementing denoising diffusion probabilistic models from scratch

https://github.com/aldipiroli/ddpm_from_scratch
1•tgnk2341•15m ago•0 comments

Show HN: Bad Apple (Oscilloscope-Like) – one stroke per frame

https://bad-apple-on-oscilloscope.pages.dev/
1•araniwa•17m ago•1 comments

The Paper Computer

https://jsomers.net/blog/the-paper-computer
1•jsomers•21m ago•0 comments

No Degree, $155K Pay: Trump's FAA Is Recruiting Gamers as Air Traffic Controller

https://www.ibtimes.co.uk/faa-recruits-gamers-air-traffic-control-1791239
4•onemoresoop•26m ago•0 comments

Altman Shooters Are Paid Actors

https://twitter.com/boneGPT/status/2043550790095134846
2•fakeshoot•32m ago•0 comments

Ask HN: Insta, X, Reddit or HN?

1•wasimsk•32m ago•0 comments

What web browser do you use?

1•nicp•32m ago•2 comments

Reconciling Two UC Berkeleys – The Soapbox

https://www.dailycal.org/opinion/the_soapbox/reconciling-two-uc-berkeleys/article_0fe38fc6-1399-4...
2•paulpauper•34m ago•1 comments

My Dialogue with Jonathan Zittrain

https://marginalrevolution.com/marginalrevolution/2026/04/my-dialogue-with-jonathan-zittrain.html
2•paulpauper•36m ago•0 comments

Your Single Use iPhone [video]

https://www.youtube.com/watch?v=NG-lLt5X3Rs
3•Klaster_1•43m ago•0 comments

A unified Go SDK for working with large language models

https://github.com/aarock1234/ai
1•abdelsabbah•44m ago•1 comments

Lightweight internet radio management tool

https://github.com/tchovi/AirBoneRadio
1•Indigenism•46m ago•1 comments

Code Review Is the New Bottleneck for Engineering Teams

https://newsletter.eng-leadership.com/p/code-review-is-the-new-bottleneck
1•gpi•48m ago•0 comments

End of the Orban Era

https://www.bloomberg.com/news/articles/2026-04-12/end-of-the-orban-era-the-party-is-just-startin...
3•dlx•49m ago•1 comments

Self-Improving AI Agent

https://github.com/NousResearch/hermes-agent
1•granto•50m ago•0 comments

Jyf

2•ramzidddinq•51m ago•0 comments

Show HN: Cryptr a shell utility for encrypting and decrypting files with OpenSSL

https://github.com/nodesocket/cryptr
1•nodesocket•52m ago•0 comments

A Canonical Generalization of OBDD

https://arxiv.org/abs/2604.05537
1•luu•53m ago•0 comments

The Expensive Anxiety of AI

https://aarils.com/personal/the-expensive-anxiety-of-ai
2•bridgettegraham•53m ago•0 comments

How are you reducing LLM token costs for async workflows?

https://github.com/parallem-ai/parallem
1•alexliu79•1h ago•1 comments

Balsamiq AI

https://balsamiq.com/product/ai/
1•ilt•1h ago•0 comments

StackTrove: Encrypted local registry for all your side projects

https://github.com/sennaBruno/stacktrove
1•essieli•1h ago•0 comments

Justin Sun Accuses Trump's WLFI Cryptocurrency of Hiding Wallet Freeze Function

https://beincrypto.com/justin-sun-slams-world-liberty-financials-blacklist-feature/
3•jrflowers•1h ago•0 comments

'The gravest crime against humanity': What does the UN vote on slavery mean?

https://www.bbc.com/news/articles/c0rxqng5pyno
4•gpi•1h ago•0 comments

IBM AP-101 general-purpose computer [pdf]

https://gandalfddi.z19.web.core.windows.net/Shuttle/IBM%20AP-101S%20General%20Purpose%20Computer%...
2•__patchbit__•1h ago•0 comments

Your Harness, Your Memory

https://blog.langchain.com/your-harness-your-memory/
3•tanelpoder•1h ago•0 comments