frontpage.
newsnewestaskshowjobs

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?

Why LLMs Are Unreliable Language Detectors

https://igorstechnoclub.com/why-llms-are-unreliable-language-detectors/
1•Igor_Wiwi•38s ago•0 comments

John Berger: From Life by Tom Overton review – a vibrant biography

https://www.theguardian.com/books/2026/aug/10/john-berger-from-life-by-tom-overton-review-a-vibra...
1•prismatic•1m ago•0 comments

Designing least-privilege registry credentials for CI

https://omniline.app/blog/death-by-a-thousand-tokens-least-privilege-registry-credentials-for-ci
1•libertas_quae_s•3m ago•0 comments

22 Years on Firefox, and Today I'm All In

https://rietta.com/blog/firefox-in-2026/
2•rietta•3m ago•1 comments

Show HN: Diamonds – Dots and Boxes, but with diagonals and area scoring

https://diamondsthegame.com
1•abhas9•6m ago•0 comments

An American Mosaic (interactive map of ancestry census data)

https://www.nytimes.com/interactive/2026/07/01/us/america-ancestry-census-data-map.html
1•cckolon•6m ago•0 comments

Fastest Inference in MENA

https://runinfra.ai/inference-api
2•OsamaJaber•6m ago•0 comments

Randomly Generated 'Peer Reviewed' Papers Published by Springer Nature

https://dailysceptic.org/2021/10/03/436-randomly-generated-peer-reviewed-papers-published-by-spri...
2•ForgotIdAgain•9m ago•0 comments

Plasmonics

https://en.wikipedia.org/wiki/Plasmonics
1•peter_d_sherman•12m ago•0 comments

Show HN: Interactive TSP solver with step-by-step algorithm explanation

https://tsp.uncledroid.app
1•Abhijit8086•13m ago•0 comments

How to Plan? (2022)

https://kellanem.com/notes/how-to-plan
1•tosh•13m ago•0 comments

Nixpkgs-Multiverse: Fast Mode

https://fzakaria.com/2026/08/14/nixpkgs-multiverse-fast-mode
1•birdculture•15m ago•0 comments

Ask HN: What tools are you using for human code review of AI-assisted code?

1•dafelst•18m ago•0 comments

Show HN: Rungraph – See your AI coding-agent runs as a graph

https://github.com/fayzan123/rungraph
1•FayzanMalik•20m ago•0 comments

When Astronomy Morphs into Astrology

https://www.realclearpolitics.com/articles/2026/08/16/when_astronomy_morphs_into_astrology_154414...
1•RickJWagner•21m ago•0 comments

Let's Be Honest: Tokens Are Replacing Payrolls

https://horse.energy/who_buys_the_tokens.html
2•aakil•22m ago•0 comments

Weather apps are crushing America's small businesses

https://www.businessinsider.com/weather-apps-rain-icon-small-businesses-summer-plans-2026-7
2•ripe•23m ago•2 comments

NIH is ending a key grant for budding clinical researchers

https://www.science.org/content/article/nih-ending-key-grant-budding-clinical-researchers
2•brandonb•24m ago•0 comments

I Made a Plex Server

https://henry.codes/writing/i-made-a-plex-server/
2•ohjeez•25m ago•0 comments

Show HN: ViaNJ – an app that makes NJ Transit ticketing less painful

1•perryraskin•25m ago•0 comments

Trump administration wants to allow companies to hack foreign cybercriminals

https://www.npr.org/2026/08/15/nx-s1-5930311/trump-companies-hack-foreign-cybercriminals
1•geox•26m ago•0 comments

Glider: Drive all your agent CLIs from one terminal

https://utsv.work/Glider/
2•uds5501•28m ago•1 comments

Being Ambitious and Being a Dad

https://nicholascharriere.com/blog/being-ambitious-and-being-a-dad/
1•nichochar•30m ago•0 comments

Who Tells You Whether the Molecule Your AI Just Designed Is Any Good?

https://huggingface.co/blog/FINAL-Bench/open-discovery-challenge
2•makaimc•31m ago•0 comments

Writing 300k+ lines of code per month is the new normal, I guess

https://nmn.gl/blog/how-i-actually-write-10000-lines
1•namanyayg•31m ago•0 comments

Rogue AI aren't science fiction anymore

https://www.theverge.com/column/980337/rogue-ai-science-fiction-openai
1•sbulaev•32m ago•0 comments

The experience of mathematical beauty and its neural correlates (2014)

https://pubmed.ncbi.nlm.nih.gov/24592230/
1•nvartolomei•34m ago•0 comments

I tested every Al model the same way. Only one task got better

https://www.thetrueengineer.com/p/i-tested-every-ai-model-the-same
1•adletbalzhanov•34m ago•0 comments

OLED Burn-In Hasn't Improved Like We Expected

https://www.rtings.com/tv/learn/oled-burn-in-not-improved-as-expected
2•doublepg23•36m ago•0 comments

Lichen – simplest CMS for the web, based on Forth

https://codeberg.org/stringbone/lichen/src/branch/master#lichen
2•smartmic•38m ago•0 comments