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?

Show HN: Clinch – exit-intent discounts for Shopify with a built-in holdout

https://getclinch.co
1•hectorguedea•1m ago•0 comments

Building Neon Object Storage

https://neon.com/blog/building-neon-object-storage
1•emschwartz•1m ago•0 comments

OpenAI researcher Naomi Bashkansky resigns to build AI that can read thoughts

https://www.indiatoday.in/technology/news/story/openai-researcher-naomi-bashkansky-resigns-to-bui...
1•msalsas•2m ago•1 comments

The Knowledge Graph Gives You the What. The Why Was Never in the Folder

https://medium.com/@iamalizaidi110/the-knowledge-graph-gives-you-the-what-the-why-was-never-in-th...
1•iamalizaidi•2m ago•0 comments

Wildfire-Driven Deforestation Rates in California Among Highest in World

https://www.ucdavis.edu/climate/news/wildfire-driven-deforestation-rates-california-among-highest...
2•littlexsparkee•5m ago•0 comments

Running Linux on Baochip-1x

https://github.com/pkoscik/baochip-linux
1•hasheddan•5m ago•0 comments

Use local Chrome as a search API for coding agents

https://www.lsearch.dev
1•kl01•6m ago•0 comments

Canaries in the column? AI exposure and the UK's hiring slowdown

https://bankunderground.co.uk/2026/08/06/canaries-in-the-column-ai-exposure-and-the-uks-hiring-sl...
1•zoenolan•7m ago•0 comments

Securing Agents Across Perplexity's Client Endpoints with Numbat

https://research.perplexity.ai/articles/securing-agents-across-perplexity%E2%80%99s-client-endpoi...
1•gmays•7m ago•0 comments

Jeff Dean's Discovery Loop Should Automate Chip Design First

https://futuresearch.ai/discovery-loop-forecast/
1•ddp26•8m ago•0 comments

Why It's Normal for Children to Be Demanding

https://thenumbersdad.substack.com/p/the-evolutionary-logic-of-a-demanding
1•paulpauper•8m ago•0 comments

Put Your Money Down, They Say

https://www.science.org/content/blog-post/put-your-money-down-they-say
2•EA-3167•9m ago•0 comments

Why 'super movers' have healthier brains – and how to be one

https://www.washingtonpost.com/wellness/2026/08/05/why-super-movers-have-healthier-brains-how-be-...
1•gurjeet•10m ago•1 comments

The Ambition Project

https://www.betonit.ai/p/the-ambition-project
1•paulpauper•10m ago•0 comments

The Binmen of Birmingham

https://marginalrevolution.com/marginalrevolution/2026/08/the-binmen-of-birmingham.html
1•paulpauper•11m ago•0 comments

Tesla, SpaceX confirm 'Terafab' chip fab site – $16.8B first phase

https://electrek.co/2026/08/06/tesla-spacex-terafab-grimes-county-16-8-billion/
3•fahrradflucht•11m ago•0 comments

I'm proud to open-source Capty today

https://github.com/capty-app/capty
1•543310•12m ago•0 comments

Weak-to-strong generalization (GPT-4 Turbo was Pareto-SOTA)

https://www.forourposterity.com/weak-to-strong-generalization/
2•ronfriedhaber•16m ago•0 comments

A Peer-Reviewed Crypto 2026 Paper Gave ML-KEM's Foundation a New Quantum Target

https://postquantum.com/security-pqc/mlwe-edcp-crypto-2026-ml-kem/
1•u1hcw9nx•16m ago•0 comments

I Am Going to Hit AI with a Hammer and See What Happens

https://www.theseedsofscience.pub/p/i-am-going-to-hit-ai-with-a-hammer
1•Ariarule•16m ago•0 comments

DeepSeek Plans 'Significant' Price Increase for Its AI Services

https://finance.yahoo.com/technology/ai/articles/deepseek-plans-significant-price-increase-025333...
2•thrownaway561•17m ago•0 comments

Blue Origin narrowing in on root cause of catastrophic rocket accident

https://arstechnica.com/space/2026/08/blue-origin-narrowing-in-on-root-cause-of-catastrophic-rock...
2•dangle1•17m ago•0 comments

Contextual embedding in RavenDB (or how to save 220M USD)

https://ayende.com/blog/204099-a/contextual-embedding-in-ravendb-or-how-to-save-220-000-000-usd
1•ayende•17m ago•0 comments

Is there room for a coordination layer alongside event sourcing?

https://github.com/0ssy/trs-runtime
1•Nexus-HQ•18m ago•0 comments

David Bessis – If AI does the Science, what is left for us? [video]

https://www.youtube.com/watch?v=LRWiu1gaQmI
2•gyger•18m ago•0 comments

Safety fears as scientists make first viruses designed by AI

https://www.theguardian.com/science/2026/aug/06/safety-fears-as-scientists-make-first-viruses-des...
1•jbjbjbjb•18m ago•0 comments

Cultures of Programming: A Companion Exhibition to the Book

https://tomasp.net/cultures/exhibition/
1•lioeters•19m ago•0 comments

LLM DeepSWE Pareto Frontier

https://deepswe.datacurve.ai/
1•ijidak•21m ago•0 comments

Qwen3.8 Max now ranked as the best overall model by agentic index

https://artificialanalysis.ai/?intelligence=agentic-index
3•apitman•21m ago•0 comments

Plumb a PDF for detailed information

https://github.com/jsvine/pdfplumber
2•saikatsg•23m ago•1 comments