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?

Legacy Carmakers Seen Losing Mass Market to Chinese Rivals

https://www.bloomberg.com/news/articles/2026-10-13/legacy-carmakers-seen-losing-mass-market-to-ch...
1•toomuchtodo•23s ago•0 comments

Formula 1 returns to Africa with 10-year agreement to race in Rwanda

https://www.formula1.com/en/latest/article/formula-1-returns-to-africa-with-10-year-agreement-to-...
1•tosh•39s ago•0 comments

iPhone Takes Bigger Slice of a Shrinking Smartphone Market

https://www.macrumors.com/2026/10/13/iphone-takes-bigger-slice-of-shrinking-market/
1•tosh•1m ago•0 comments

Speculative Sauropods

https://svpow.com/2026/10/02/speculative-sauropods/
1•surprisetalk•1m ago•0 comments

How to let a coding agent port your code and know what it ported

https://jscpd.dev/blog/when-code-clones-matter
1•andreypk•2m ago•0 comments

Show HN: Oxynote – Self-hosted wiki with live Prometheus/SQL charts and reviews

https://github.com/oxynote/oxynote
2•davseby•5m ago•0 comments

Agent Conversion – Can AI agents use your website?

https://agent-conversion-coral.vercel.app/en/research/d001
2•ivanpugnaire•8m ago•0 comments

Using the Wrong Dictionary (2014)

https://jsomers.net/blog/dictionary
3•hangsi•8m ago•0 comments

Show HN: Magic Tools Hub – 112 PDF tools that run in the browser

https://www.magictoolshub.com/
2•magictoolshup•11m ago•0 comments

Show HN: Let your agents create product demo for you

https://www.fluxcut.dev
2•loveTech•12m ago•0 comments

Jev handed our LLM the wrong page a tenth as often as our embeddings

https://sayora.ai/many-hands/jev-vs-embeddings/
6•Bocajmai•13m ago•3 comments

Building an evidence-grounded agentic security operations harness on Cloudflare

https://blog.cloudflare.com/agentic-security-operations/
2•hnp9j9qtda•13m ago•0 comments

My self-hosted infrastructure as code

https://codeberg.org/infrastructure-lch361-net
2•lch361•13m ago•0 comments

Exposing why every AI launch goes viral on X [video]

https://www.youtube.com/watch?v=xNgQtzEl4lY
3•qwertyforce•14m ago•0 comments

Orbital Data Centers Risk Becoming Military Targets in Space

https://www.bloomberg.com/news/articles/2026-10-13/orbital-data-centers-risk-becoming-military-ta...
2•sbulaev•14m ago•0 comments

Cyber attack on French supermarket fridges raises alarm over food security

https://www.ft.com/content/6908a0ce-ffdd-4ea9-b376-d35d362639f3
3•sbulaev•14m ago•0 comments

Single technology is killing oil demand

https://climatemoney.substack.com/p/this-single-technology-is-killing
4•speckx•16m ago•0 comments

Show HN: Stepbook – run long agent tasks as short steps with saved state

https://github.com/bahdan111/stepbook
3•bahdankap•17m ago•0 comments

Doomsday: Friday, 13 November, A.D. 2026 Science Paper

https://pubmed.ncbi.nlm.nih.gov/13782058/
2•trilogic•18m ago•2 comments

IPv4 Parsing: Having Your Cake and Eating It Too

https://extractingcycles.com/blog/ipv4-parsing-having-your-cake-and-eating-it-too/article/
2•csno•18m ago•0 comments

Show HN: Helicon – Desktop App for Meta's Muse Code CLI (Linux, Windows, macOS)

https://github.com/HarjjotSinghh/helicon
2•harjjotsinghh•19m ago•0 comments

Show HN: Ecsodus – Migrate AWS Copilot apps to Terraform without losing prod

https://github.com/moneytool/ecsodus
2•moneytool•19m ago•0 comments

Show HN: Autograph – a music notation editor you can drive with Claude over MCP

https://autographmusic.com
2•yetanotheruser•20m ago•0 comments

Mozilla Introduces Firefox Enterprise

https://www.firefox.com/en-US/enterprise/
24•recvonline•21m ago•6 comments

A Visual Intro to Complex Numbers

https://photonlines.substack.com/p/a-visual-intro-to-complex-numbers
3•surprisetalk•21m ago•0 comments

Show HN: Opensidian

https://opensidian.org/
3•jpzk•22m ago•3 comments

HumanLayer: Multiplayer Coding Agent Workspace

https://www.humanlayer.dev/
1•saikatsg•22m ago•0 comments

I built a new feature for my blog using my voice

https://simonw.substack.com/p/i-built-a-new-feature-for-my-blog
1•throwaway2037•22m ago•0 comments

MDMA: An open source federated LLM inference engine

https://github.com/seuros/mdma
2•urzil•22m ago•2 comments

Show HN: AI Crimes, a game where you spot the bug an AI wrote

https://solveaicrimes.com
1•alexvervloet•24m ago•1 comments