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: Mdpreview – Markdown in the terminal (images, diagrams, big headings)

https://github.com/mgranados/mdpreview
1•mgranados•11s ago•0 comments

OpenAI – Hugging Face Incident Technical Report [pdf]

https://cdn.openai.com/pdf/67869394-cb91-4c12-888c-5cbd85c7814c/OpenAI-Hugging-Face%20Incident-Te...
1•pyth0•4m ago•0 comments

Dolly Parton dies aged 80 – researchers celebrate her contributions to science

https://www.nature.com/articles/d41586-026-02676-1
1•geneticdrifts•5m ago•0 comments

Clerky Is Joining Stripe

https://www.clerky.com/blog/clerky-is-joining-stripe
4•zakshay•7m ago•0 comments

Bypassing Copilot Cowork's Sandbox

https://www.promptarmor.com/resources/microsoft-copilot-cowork-sandbox-bypass
1•BatuhanU•8m ago•0 comments

Waymo says there's no AI shortcut to self-driving

https://www.axios.com/2026/08/26/waymo-ai-shortcut-self-driving
2•samizdis•8m ago•1 comments

WebSockets vs. SSE should be about ordering and correctness

https://dashbit.co/blog/websockets-vs-sse
2•crbelaus•10m ago•0 comments

Nvidia Spectrum-X Ethernet Multiplane Network Architecture at Hot Chips 2026

https://www.servethehome.com/nvidia-spectrum-x-ethernet-multiplane-network-architecture-at-hot-ch...
1•ksec•16m ago•0 comments

RevMed's Pancreatic Cancer Pill Priced Above $475,000 a Year

https://www.bloomberg.com/news/articles/2026-08-26/fda-approves-revmed-s-breakthrough-pill-for-pa...
1•wslh•16m ago•0 comments

Hunch: Drive your Mac with any LLM: focus-free, in the background, over MCP

https://github.com/PrithviSeran/hunch-mcp
1•rahimnathwani•18m ago•1 comments

Posiwid: The Purpose of a System Is What It Does

https://daringfireball.net/linked/2026/08/26/posiwid
1•MBCook•18m ago•0 comments

Twitter Is Back at Twitter.now

https://arstechnica.com/tech-policy/2026/08/new-twitter-launches-says-musks-x-gave-up-the-name/
7•rathboma•20m ago•4 comments

More than 18,000 questionable images found in antibody catalogues of 15 co's

https://www.nature.com/articles/d41586-026-02635-w
1•teepo•22m ago•0 comments

Over a third of webpages created after ChatGPT's debut show signs of AI writing

https://nypost.com/2026/08/25/tech/over-a-third-of-webpages-created-after-chatgpts-debut-show-sig...
1•Matrixik•23m ago•0 comments

Elevating app quality: Reducing memory usage and improving device migration

https://android-developers.googleblog.com/2026/08/app-quality-memory-optimization-secure-onboardi...
1•Doctor_Fegg•25m ago•0 comments

You Probably Forget How Cheap Memory Used to Be

https://www.nextplatform.com/store/2026/08/25/you-probably-forget-how-cheap-memory-used-to-be-and...
6•jonbaer•26m ago•0 comments

WebMCP Challenge – OpenAI

https://openai.com/webmcp-challenge/
8•tilt•26m ago•3 comments

Show HN: Every push-up becomes an attack in a camera-counted RPG game

https://pushup.quest/
5•not_wowinter13•27m ago•1 comments

Crypto's Killer App: Buying the Government It Once Defied

https://jeffreylminch.substack.com/p/cryptos-killer-app-buying-the-government
4•rmason•28m ago•0 comments

Programming as a Hobby in the Age of AI

https://www.bennadel.com/blog/4908-programming-as-a-hobby-in-the-age-of-ai.htm
2•rmason•29m ago•0 comments

When Vibecoding Is Safe

https://friedkielbasa.substack.com/p/when-vibecoding-is-actually-safe
2•fkozlowski•30m ago•0 comments

Amazon service that Jeff Bezos called artificial AI is shutting down

https://www.cnbc.com/2026/08/25/amazon-service-that-jeff-bezos-called-artificial-ai-is-shutting-d...
3•kjhughes•31m ago•0 comments

Omarchy – Linux that is capitalizing on AI momentum

7•orsenthil•31m ago•2 comments

Show HN: Invader – an indie iOS podcast player that never phones home

https://invader.gg/
2•HeadOfProbing•32m ago•1 comments

The Texas Grid Has Had a Boring Summer Thanks to Batteries

https://heatmap.news/energy/texas-grid-reliability-batteries
7•coloneltcb•32m ago•0 comments

Re-fueling while cycling made all the difference

https://text.tchncs.de/after-hours-engineering/re-fueling-while-cycling-made-all-the-difference
3•pizzaiolo•32m ago•0 comments

150 Years of Global Stock Returns – The Birthplace Lottery

https://beyondpassive.substack.com/p/150-years-of-global-stock-returns
6•rzk•32m ago•0 comments

UmmahRank – sponsor a listing, your bid sets your rank

https://www.ummahrank.pro/`
2•nothanii•34m ago•0 comments

What will be left for us to work on

https://ICML.cc/virtual/2026/invited-talk/67274
6•Cloudly•34m ago•1 comments

Steampunk Computer Works as Long as I Have Fire [video]

https://www.youtube.com/watch?v=34SSmx31d2U
2•watercooler_guy•35m ago•0 comments