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?

Postgres 19 Repack: Built-In Online Table Bloat Cleanup

https://www.snowflake.com/en/blog/engineering/postgres-19-repack-table-bloat/
1•ibobev•35s ago•0 comments

RoundSquare.lean: Zero-Axiom Negative Resolution of the Clay Yang–Mills Problem

https://zenodo.org/records/23918639/files/RoundSquare.lean
1•DRLogvinovich•37s ago•0 comments

Behind the Curtain: OpenAI's post-election power play

https://www.axios.com/2026/11/01/scoop-openai-post-midterm-policy
1•pretext•1m ago•0 comments

AR guitar with just a laptop and scissors

https://www.arguitar.com/
1•castlew•1m ago•0 comments

Dutch Court Orders ISP to Block Z-Library and OceanofPDF

https://torrentfreak.com/dutch-court-orders-isp-to-block-z-library-and-oceanofpdf/
1•boccalerie•1m ago•0 comments

Why websites are forced to make you prove you're human

https://benjojo.co.uk/u/benjojo/h/1YxzY821JjV34QWjr6
1•eraclide•1m ago•0 comments

New typeface using intricate designs from Shakespeare's First Folio

https://www.itsnicethat.com/news/typeland-shakespeares-globe-amifer-folio-graphic-design-090323
1•bryanrasmussen•2m ago•1 comments

Show HN: Night Map

https://night-map.surge.sh/
2•stagas•2m ago•0 comments

Samsung's 2 Nm Taylor Fab 2 Reportedly Booked, Mostly by AMD

https://www.techpowerup.com/354477/samsungs-2-nm-taylor-fab-2-reportedly-fully-booked-mostly-by-amd
1•speckx•3m ago•0 comments

If you're on Replit Pro, you have until November 8 to opt out of arbitration

https://readthediff.substack.com/p/replit-pro-arbitration-opt-out-november-8
1•MiguelSosa•3m ago•0 comments

Hermes Is Good?

https://elijahpotter.dev/articles/hermes-is-actually-good
1•chilipepperhott•3m ago•0 comments

We Tested Coding Agent Harnesses. Thinking Harder Beat All of Them

https://surgehq.ai/blog/benchmarking-coding-agent-harnesses
1•landonxi•3m ago•0 comments

Rust Sudo is not feature complete

https://mastodon.social/@cks/117547904775599551
1•htk•6m ago•0 comments

Accused Impostor in Private Tracker Lawsuit Faces Contempt

https://torrentfreak.com/accused-impostor-in-private-tracker-lawsuit-faces-contempt-for-withholdi...
1•boccalerie•6m ago•0 comments

The client asked for a chatbot. We built a fancy PDF viewer instead

https://ingram.tech/posts/we-built-a-fancy-pdf-viewer
1•scrollaway•6m ago•0 comments

Show HN: Who and where are your anagranames?

https://louisabraham.github.io/anagranames/
1•Labo333•7m ago•0 comments

Investigating Vault Particles with Claude

https://www.anthropic.com/research/investigating-vault-particles-with-claude
1•artninja1988•8m ago•0 comments

Verne V0.5: U.S. Open-Weight SOTA Robotics Foundation Model

https://vernerobotics.com/research/verne-v0-5
4•dinge•8m ago•0 comments

Residential Proxies Detected on White House Network

https://layer3intel.com/blog/residential-proxies-white-house-network
9•Rasbora•10m ago•1 comments

Discord 302 Rickroll URL

https://www.youtube.com/watch?v=dQw4w9WgXcQ
1•hmokiguess•13m ago•2 comments

The Open Door

https://access.ripplenav.org/door
1•RRwood•16m ago•0 comments

Apple Cuts Internal AI Usage Budgets in Move to Reduce Spending

https://www.bloomberg.com/news/articles/2026-11-04/apple-cuts-internal-ai-usage-budgets-in-move-t...
5•layer8•17m ago•1 comments

The Crackpot Index (1998)

https://math.ucr.edu/home/baez/crackpot.html
1•gregsadetsky•19m ago•0 comments

Watching my gh actions runners

https://yeet.cx/blog/who-broke-ci
2•ok_major_9889•21m ago•0 comments

Foot-stiffening socks could make walking less tiring

https://phys.org/news/2026-11-foot-stiffening-socks.html
2•samizdis•21m ago•0 comments

Binance hackers used fake job interviews in record heist

https://www.japantimes.co.jp/business/2026/11/04/tech/binance-hackers-job-interviews-heist/
1•rawgabbit•22m ago•1 comments

LifeTrail – Passive GPS tracker, local trail history, no account

https://play.google.com/store/apps/details?id=cc.lifetrail&hl=en_US
1•LifeTrailApp•23m ago•0 comments

New Pancreatic Cancer Vaccine Sparked Immune Responses in 99% of Patients

https://www.sciencealert.com/new-pancreatic-cancer-vaccine-sparked-immune-responses-in-99-of-pati...
2•amichail•23m ago•0 comments

Make more money on consumer subscriptions with Crew Plans

https://jjmaxwell4.com/writing/crew-plans/
1•jjmaxwell4•24m ago•0 comments

Show HN: Gauge – Open-Source CLI to recursively improve your docs

https://github.com/gauge-sh/gauge-cli
1•0x63_Problems•24m ago•0 comments