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?

Doug Lea's Malloc

https://gee.cs.oswego.edu/dl/html/malloc.html
1•grep_it•5m ago•0 comments

In which a traveling salesman digs π out of LLM temperature math

https://www.hexbites.dev/stories/2026-11-25-pi-from-simulated-annealing.html
1•kromych•10m ago•0 comments

Solar Wanderer – A 1:1 real-time solar system explorer in the browser

https://github.com/hyqzz/Solar-Wanderer
2•JulieZhao00•11m ago•0 comments

A Physical Password Manager that doesn't keep your data

https://hackaday.io/project/207443-lomenett-usb-password-manager
1•sidkukert•12m ago•0 comments

Usaciv – the United States as a strategy game

https://karpathy.ai/usaciv/
2•gmays•22m ago•0 comments

Why would a country ask to stay least developed?

https://finshots.in/archive/why-would-a-country-ask-to-stay-least-developed/
2•vismit2000•26m ago•0 comments

Qualcomm's Oryon 3 Reaches the Top

https://chipsandcheese.com/p/qualcomms-oryon-3-reaches-the-top
3•wmf•29m ago•0 comments

HNSW Hit Memory and Filter Wall: Elasticsearch, OpenSearch Faiss, Qdrant, Milvus [video]

https://www.youtube.com/watch?v=fnZiKAPpn-A
1•massengine•30m ago•0 comments

Get notified when a new vulnerability is exploited

https://pushout.app/@cve
3•vasanthv•36m ago•0 comments

OpenAI cuts GPT-6.2 usage: Astra hits limits 40% faster, Sol 25% faster

https://twitter.com/thsottiaux/status/2125784147889393806
5•Herrera•36m ago•0 comments

Darts SAM – A free darts autoscorer that uses your webcams

https://dartssam.co.uk/
1•indigodaddy•38m ago•0 comments

Ask HN: What IDE do you use and how many agents touch your tickets before merge?

1•DesaiAshu•38m ago•0 comments

Show HN: Olumino, a Markdown notes and spaced repetition app

https://olumino.app
3•Wiyseful•40m ago•2 comments

Britain needs to cut its mental-health benefits bill

https://www.economist.com/leaders/2026/11/25/britain-needs-to-cut-its-mental-health-benefits-bill
2•andsoitis•41m ago•0 comments

Show HN: LEIE Check – Search the OIG health care exclusion list by name or NPI

https://leiecheck.com
1•j1mmyhackett•51m ago•0 comments

Complex Systems Frameworks Collection (Complex Isn't Complicated)

https://www.complexsystemsframeworks.ca/
1•rramadass•51m ago•0 comments

Billions in Data Center Deals Grind to Halt After Chip Curbs

https://www.bloomberg.com/news/articles/2026-11-25/billions-in-data-center-deals-grind-to-halt-af...
3•petethomas•57m ago•0 comments

Quantum physics can prove where you are

https://www.nature.com/articles/d41586-026-03378-4
1•AnnikaL•58m ago•0 comments

Gut-Wrenching Volatility Grips Wall Street as AI Doubts Creep In

https://www.bloomberg.com/news/articles/2026-11-25/stomach-churning-swings-rock-wall-street-as-ai...
4•petethomas•59m ago•0 comments

Ask HN: Security for the Small Developer

4•dvduval•1h ago•0 comments

Tell HN: Finality is like the speed of light to LLMs from the labs

3•figassis•1h ago•0 comments

The World: Zoom from observable universe to the standard model

https://v3ai.github.io/the-world/
2•v3ai•1h ago•0 comments

Minipg: PostgreSQL as a Single Executable

https://progrium.github.io/minipg/
7•rguiscard•1h ago•1 comments

Music: A Desktop Replacment for Spotify

https://v3ai.github.io/music/
3•v3ai•1h ago•5 comments

Cognition as least action: the Physarum Lagrangian

https://royalsocietypublishing.org/rsif/article/23/244/20251265/484274/Cognition-as-least-action-...
1•the-mitr•1h ago•0 comments

Google MCP servers, CLI, standardized usage tiers, and admin policies

https://workspaceupdates.googleblog.com/2026/11/mcp-servers-cli-standardized-usage-tiers-now-avai...
1•cebert•1h ago•0 comments

A Closer Look at Claude's Mac "Apps"

https://www.macstories.net/stories/a-closer-look-at-claudes-mac-apps/
5•CharlesW•1h ago•0 comments

The Naturalist's Library

https://www.c82.net/naturalists-library/
3•rafael859•1h ago•0 comments

Proving a Fixed Upper Bound on Jensen's Affairs

https://bitbanter.com/posts/2026-11-25/proving-a-fixed-upper-bound-on-jensens-affairs/
13•gmays•1h ago•2 comments

Common Cents Act (H.R.10167)

https://www.congress.gov/bill/119th-congress/house-bill/10167
4•dataflow•1h ago•0 comments