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?

JetBrains Junie Local: An agent you own, not one you rent

https://junie.jetbrains.com/
1•LelouBil•1m ago•0 comments

Everything We Know About Facebook's Mood Manipulation Experiment (2014)

https://www.theatlantic.com/technology/archive/2014/06/everything-we-know-about-facebooks-secret-...
1•r721•1m ago•0 comments

Show HN: Flying rocket car x Flappy Bird

https://bs.fyi/arcade/flying-car
1•drchiu•1m ago•0 comments

Detecting Filesystem Capability Laundering in MCP Servers at Scale

https://arxiv.org/abs/2610.22301
1•ersinesen•1m ago•0 comments

TikTok "Permanently Suspends" the 'Musk' Film Account, Raising Suppression Fears

https://www.hollywoodreporter.com/news/politics-news/musk-movie-tiktok-banned-theaters-showtimes-...
2•softwaredoug•1m ago•0 comments

Linux bugs fixed per release over time: >2× rise since 2026-04

https://lwn.net/Articles/1088776/
3•farlight•2m ago•0 comments

What Makes Art Great?

https://nabeelqu.substack.com/p/what-makes-art-great
2•matteohorvath•3m ago•0 comments

Implant can restore sight for patients with macular degeneration

https://www.technologyreview.com/2026/10/16/1145840/prima-implant-restores-sight-macular-degenera...
2•joozio•3m ago•0 comments

Some of my recent talks and interviews

https://terrytao.wordpress.com/2026/10/17/some-of-my-recent-talks-and-interviews/
2•smilelamp•5m ago•0 comments

tsc-ts: TypeScript written in TypeScript

https://github.com/vercel-labs/tsc-ts
2•tosh•6m ago•0 comments

Show HN: UOS – a workspace the server can't read (post-quantum, E2EE)

https://uos.sh/whitepaper/
2•ultimaos•6m ago•0 comments

Show HN: Would You Merge It? – 24 bugs AI assistants write, as fix-it katas

https://github.com/SohailKhan0525/would-you-merge
2•qofenolabs•6m ago•0 comments

Tennyson's Faith: A Nobler Type

https://hedgehogreview.com/issues/the-fading-promise-of-higher-education/articles/tennysons-faith
2•prismatic•6m ago•0 comments

Texas Has Been Considering Selling a Beloved State Park to Elon Musk's SpaceX

https://www.texasmonthly.com/news-politics/boca-chica-spacex-elon-musk/
3•malshe•6m ago•0 comments

Show HN: Setforge – free lifting tracker for iPhone/Watch that counts reps

https://testflight.apple.com/join/kXfU8bRv
2•yashsinghal0316•8m ago•0 comments

Gold is Now the Top U.S. Export

https://www.numismaticnews.net/gold-now-top-u-s-export
2•iamnothere•10m ago•0 comments

EU plans to fast-track antitrust approval of SpaceX rival

https://finance.yahoo.com/economy/policy/articles/eu-plans-fast-track-antitrust-183153257.html
3•malshe•11m ago•0 comments

$1.5B data centre for Canada's cyber spy agency to be built in Ottawa area

https://www.ctvnews.ca/ottawa/article/data-centre-for-canadas-cyber-spy-agency-to-be-built-in-ott...
3•Teever•12m ago•0 comments

Surfing Pelicans

https://fenderog.com/art-crit/page.html?p=surfing-pelican
2•fenderog•15m ago•0 comments

Emergent Design, Outside the Codebase

https://bytecode.news/posts/2026/10/emergent-design-outside-the-codebase
3•sarumake•17m ago•0 comments

The AI-Native Large-Scale Agile Software Development Manifesto

https://arxiv.org/abs/2605.07717
2•mellosouls•18m ago•0 comments

We're Always Limited by Attention

https://kadhirvelm.dev/blogs/limited-by-attention
2•kadhirvelm•20m ago•1 comments

Alexandr Wang, Meta's Gen Z billionaire AI whizz

https://www.economist.com/the-world-in-brief
2•andsoitis•20m ago•0 comments

Why the Creators of AI Do Not Understand Their Own Creations

2•borissunik•21m ago•0 comments

Why do computers/phones have a restart option along with the power off option?

2•saonnet•23m ago•0 comments

Nearly All Volume on FIFA-Linked Prediction Market Is Circular Trading

https://www.wsj.com/finance/nearly-all-volume-on-fifa-linked-prediction-market-is-circular-tradin...
3•impish9208•25m ago•1 comments

A.I., please don't take my job from me [song] [video]

https://www.youtube.com/watch?v=UIZM1cJxbHc
2•pabo•26m ago•2 comments

Show HN: Baa – find and free what your AI agents left running on your Mac

https://github.com/selviarora/baa
1•selviarora•29m ago•2 comments

Show HN: Children's Chore – A chore chart and reward app for families

https://childrenschoreapp.com
1•febeee•32m ago•0 comments

Meta removes language that may have allowed it to scrape news sites

https://www.theverge.com/tech/1013409/meta-removes-language-that-may-have-allowed-it-to-scrape-ne...
3•ilamont•33m ago•0 comments