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: The Only Prediction Market That Helps You Make Educated Bets

1•realJared54•2m ago•0 comments

Fable 5 wrote a Windows kernel in 38 minutes

https://tolmo.com/blog/when-the-model-writes-the-kernel/
1•ecares•6m ago•0 comments

Porting Moebius 0.2B image inpainting model to run in browser with Claude Code

https://simonwillison.net/2026/Jun/22/porting-moebius/
1•lumpa•7m ago•0 comments

Music retailer sues Fender over C&Ds in Stratocaster copyright dispute

https://www.guitarworld.com/gear/electric-guitars/thomann-is-suing-fender
2•ilamont•9m ago•0 comments

The Complete Kubrick

https://www.criterion.com/boxsets/9000-the-complete-kubrick
1•pentagrama•13m ago•0 comments

SpaceX turns to bond market to raise capital, reports $100.8B cash

https://www.reuters.com/business/media-telecom/spacex-launches-notes-offering-discloses-1008-bill...
2•voxadam•14m ago•0 comments

Heritage sites are at risk in a warming world – and how to save them

https://www.nature.com/articles/d41586-026-01956-0
1•gnabgib•16m ago•0 comments

Show HN: Nts – NTS Radio in your terminal

https://github.com/r-ohan/nts-radio-cli
1•rohan_•17m ago•0 comments

What it takes to get high Text-to-SQL accuracy in production

https://www.wisdom.ai/blog/how-wisdom-gets-text-to-sql-right
1•sharva•18m ago•0 comments

The Adobe Semaphore puzzle had been solved

https://www.nbcbayarea.com/news/local/san-jose-adobes-third-semaphore-puzzle-solved/4102715/
1•thatxliner•18m ago•0 comments

Fatal Tesla Crash into Texas Home Now Under Federal Safety Investigation

https://www.wsj.com/business/autos/fatal-tesla-crash-into-texas-home-now-under-federal-safety-inv...
3•JumpCrisscross•20m ago•0 comments

The annotated PyTorch training loop

https://idlemachines.co.uk/essays/pytorch-training-loop
2•smaddrellmander•21m ago•0 comments

Sakana Fugu multi-agent system delivered as one model

https://github.com/SakanaAI/fugu
1•882542F3884314B•22m ago•0 comments

At least 18 dead in France, including two children in hot car, as Europe bakes

https://www.reuters.com/business/environment/temperatures-exceed-40c-european-heatwave-three-die-...
2•rawgabbit•27m ago•0 comments

The Technium: Why Are LLMs Smart?

https://kk.org/thetechnium/why-are-llms-smart/
1•tortilla•29m ago•0 comments

PostmarketOS v26.06 (Alpen Avocado) released

https://postmarketos.org/blog/2026/06/21/v26.06-release/
1•birdculture•29m ago•0 comments

We are witnessing the slow death of the prestige career

https://www.theguardian.com/commentisfree/2026/jun/22/consulting-ai-prestige-careers
1•bookofjoe•32m ago•1 comments

"ChatGPT is I presume broken"

https://old.reddit.com/r/ChatGPT/comments/1ucs6ni/chatgpt_is_i_presume_broken/
1•beatthatflight•33m ago•1 comments

Humanoid Robot Begs for Electricity Money on China Streets with QR Code

https://yipzap.com/humanoid-robot-begs-for-electricity-money-on-china-streets-with-qr-code-the-vi...
3•noida•35m ago•0 comments

GLM-5.2 is above GPT-5.5 in new agentic knowledge work eval

https://artificialanalysis.ai/articles/aa-briefcase
3•declanjackson•35m ago•0 comments

AI Doesn't Replace On-Call Judgment

https://blog.sntxrr.dev/ai-doesnt-replace-on-call-judgment/
1•mooreds•38m ago•0 comments

Not a Task Manager

https://columns.app/
1•inloopwetrust•44m ago•1 comments

Why eval startups fail (2025)

https://thomasliao.com/eval-startups
2•jxmorris12•46m ago•0 comments

The PostgreSQL C Dialect

https://wiki.postgresql.org/wiki/The_PostgreSQL_C_Dialect
2•plaur782•49m ago•0 comments

Trump signs executive orders to drive development of quantum computer by 2028

https://finance.yahoo.com/markets/article/trump-signs-executive-orders-to-drive-development-of-co...
3•wslh•49m ago•0 comments

Server Survival

https://github.com/pshenok/server-survival
1•skogstokig•55m ago•0 comments

Ask HN: How do you make AI writing usable?

3•david_shi•55m ago•2 comments

People around the world see a winner on AI – and it's not the US

https://www.politico.com/news/2026/06/15/people-around-the-world-see-a-winner-on-ai-and-its-not-t...
1•yogthos•55m ago•1 comments

The Value of Standards-Compliant Authentication

https://fusionauth.io/articles/oauth/value-standards-compliant-authentication
1•mooreds•59m ago•0 comments

ContextMaestro – Curated Engineering Feed

https://www.contextmaestro.com/
1•jazzboss•1h ago•0 comments