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?

Immobiliarelabs NPM packages have been compromised

https://github.com/immobiliare/backstage-plugin-gitlab/issues/1052
1•varunsharma07•1m ago•0 comments

Ask HN: Is "no source code was copied" still a sufficient defense?

1•oscgam1•1m ago•0 comments

Behind closed doors? The private sphere is under threat (2025)

https://www.the-tls.com/politics-society/social-cultural-studies/strangers-and-intimates-tiffany-...
1•throw0101d•1m ago•1 comments

FCC may kill $2B program that connects schools and libraries to Internet

https://arstechnica.com/tech-policy/2026/06/fcc-may-kill-2b-program-that-connects-schools-and-lib...
1•Brajeshwar•2m ago•0 comments

Show HN: I compared 15 AI agent frameworks across 4 production stacks

https://compare-lab.xyz/ai-agent-frameworks/
1•hannune•4m ago•0 comments

Kubescheduler: The Game

https://imjasonh.github.io/kubescheduler-the-game/
1•ImJasonH•5m ago•0 comments

Show HN: Save money with this DIY endurance gel calculator and recipe guide

https://www.theinstant.cc/gel
1•Gshaheen•7m ago•0 comments

Build a Simple RAG App with Telnyx AI Inference

https://github.com/team-telnyx/telnyx-code-examples/tree/main/build-rag-with-telnyx-inference-python
1•sona-coffee11•7m ago•1 comments

Techlang – a compiled, statically typed language targeting LLVM

https://github.com/gummyniki/techlang
1•Mierenik•7m ago•1 comments

Show HN: Dial9, a tool for diagnosing p99+ performance in Rust programs

https://github.com/dial9-rs/dial9
1•rusbus•7m ago•0 comments

Trino's Summer of Grammar

https://trino.io/blog/2026/06/26/summer-of-grammar.html
1•mateuszserafin•8m ago•0 comments

Show HN: BetterDB, MIT Valkey-native context layer for AI agents

https://github.com/BetterDB-inc/monitor/tree/master/packages
1•kaliades•9m ago•0 comments

Matrix URIs, a URL syntax from Tim Berners-Lee that never shipped (1996)

https://www.w3.org/DesignIssues/MatrixURIs.html
1•napolux•10m ago•0 comments

Close America's Transit Automation Gap

https://ifp.org/close-americas-transit-automation-gap/
1•surprisetalk•10m ago•0 comments

Module decomposition cut agent token use 32% on follow-up feature additions

https://docs.krv.ai/topos/agent-cost-savings-case-study.html
1•sgathrid•11m ago•1 comments

My memories of what life was like before the Internet

https://www.vintagecomputing.com/index.php/archives/3132/my-memories-of-what-life-was-like-before...
1•speckx•11m ago•0 comments

MCP Does Not Need Another App Store. It Needs a Control Plane

https://vectoralix.com/blog/mcp-does-not-need-another-app-store-it-needs-a-control-plane
1•eugmai86•12m ago•0 comments

How to Backup Roland Juno-106 Presets

https://knob.monster/how-to-backup-roland-juno-106-presets-sysex-transfer-guide
1•halfradaition•18m ago•0 comments

Serious statin side effects on muscles are rare, new research confirms

https://www.nbcnews.com/health/heart-health/statin-side-effects-muscles-rare-cholesterol-medicati...
1•brandonb•18m ago•0 comments

Miasma campaign poisons 20-plus NPM packages, hunts for developer secrets

https://www.theregister.com/security/2026/06/26/miasma-campaign-poisons-20-plus-npm-packages-hunt...
1•quantummagic•20m ago•0 comments

SQLite: Clustered Indexes and the Without Rowid Optimization

https://sqlite.org/withoutrowid.html
2•tosh•20m ago•0 comments

Archaic Hominin Species Buried Only Their Women

https://nautil.us/archaic-hominin-species-buried-only-their-women-1282257
2•Brajeshwar•20m ago•0 comments

OpenAI leans toward waiting until 2027 for IPO: Report

https://www.msn.com/en-in/lifestyle/pets-animals/openai-leans-toward-waiting-until-2027-for-ipo-r...
2•ms7892•21m ago•0 comments

Mullvad founder gave millions to extremist far right party

https://mastodon.social/@raphaelrobert/116816274242387568
4•vrganj•21m ago•0 comments

Show HN: Apply for jobs by directly emailing relevant people at a company

https://dmtheboss.com/
3•rajat-sr•22m ago•0 comments

The AI industry is pouring millions into US elections

https://www.bloodinthemachine.com/p/the-ai-industry-is-pouring-hundreds
10•speckx•23m ago•1 comments

Executive Proclamation restores commercial fishing in Pacific marine monuments

https://www.noaa.gov/news-release/executive-proclamation-restores-commercial-fishing-in-pacific-m...
1•Gedxx•23m ago•0 comments

Show HN: Most startup launches die after 1 day. I built Founder.best to fix that

https://www.founder.best
3•jacksonnick•24m ago•0 comments

Beyond Vibecoding: Spec Driven Development with OpenSpec and Open Code Review

https://layandreas.github.io/personal-blog/posts/beyond-videcoding/
1•wismwasm•24m ago•1 comments

The Last People Who Know How It Works

https://unix.foo/posts/last-people-who-know-how-it-works/
4•cylo•25m ago•0 comments