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?

Escaping the Sandbox

https://netwars.pelicancrossing.net/2026/07/24/escaping-the-sandbox/
1•ColinWright•1m ago•0 comments

DOE Launching First Fault-Tolerant Quantum Computer Initiative

https://www.energy.gov/science/articles/energy-department-announces-initiative-create-and-deploy-...
1•donutloop•3m ago•0 comments

Why Sodaslim Is Becoming a Popular Healthy Beverage

https://finance.yahoo.com/healthcare/articles/sodaslim-releases-updated-2026-highlights-122400710...
1•marlonfoltz•3m ago•0 comments

MouthPad: A Tongue-Controlled Touchpad

https://www.augmental.tech/
1•ZaninAndrea•3m ago•0 comments

Secretary Wright Announces First AI "Genesis Mission" Projects

https://www.energy.gov/articles/secretary-energy-chris-wright-announces-first-genesis-mission-pro...
1•donutloop•4m ago•0 comments

At the altar of AI capex, Google is sacrificing the golden goose

https://twitter.com/i/status/2080229375773941871
1•Michelangelo11•4m ago•0 comments

How the Other Half Scams

https://netwars.pelicancrossing.net/2026/07/17/how-the-other-half-scams/
1•ColinWright•5m ago•0 comments

Show HN: Elizabeth Line Guide (London) – Live departures, timetables, fares

https://elizabethlineguide.com
1•ahallan•6m ago•0 comments

Pennsylvania roads are being coated in radioactive wastewater

https://theconversation.com/pennsylvania-roads-are-being-coated-in-radioactive-wastewater-heres-w...
1•geox•7m ago•0 comments

The Library and the Librarian: Why AI Needs Two Different Brains

https://www.innerkore.com/blog/library-and-librarian/
2•gagan2020•14m ago•0 comments

PostgreSQL Extension Catalog

https://pgext.cloud
1•theanonymousone•16m ago•0 comments

The Cretan Method

http://hintjens.com/blog:81
1•thunderbong•16m ago•0 comments

Show HN: BlazeRules – YAML rule engine for streaming data, 5M records/SEC

1•jspuri•17m ago•0 comments

TurboPrefill: 3.27× Prefill Speedup in Llama.cpp

https://devpost.com/software/turboprefill
1•trykhlieb•22m ago•1 comments

Man convicted of child sex crime by added _ char "Fus Ro Dah" Skyrim username

https://www.cbc.ca/news/canada/nova-scotia/how-a-single-underscore-led-to-an-innocent-halifax-man...
6•walrus01•22m ago•3 comments

Instella-Moe: An Open Mixture-of-Experts Language Model

https://rocm.blogs.amd.com/artificial-intelligence/instella-moe/README.html
2•ilreb•23m ago•0 comments

Prompt Caching

https://earendil.com/posts/prompt-caching/
1•lebek•33m ago•0 comments

The Psychopath Code – By Pieter Hintjens [pdf]

https://hintjens.wdfiles.com/local--files/books/psychopathcode.pdf
3•gurjeet•33m ago•0 comments

Ask HN: How would you harden AI changes to a 1M-line legacy SaaS before review?

1•thegreatkahuna•35m ago•0 comments

AP2 and A2A: two agents working together and getting paid (in tokens)

https://blog.owulveryck.info/2026/06/25/from-isolated-agents-to-agentic-mesh-orchestrating-sdlc-w...
1•owulveryck•36m ago•0 comments

Substack adds AI text detection to all notes and posts

https://post.substack.com/p/against-claudefishing
2•meander_water•50m ago•0 comments

Could dark energy come from the Standard Model? ρ_Λ = ρ_P · e^(-90π)

https://zenodo.org/records/21515348
1•kisnorbert•50m ago•0 comments

The quest to keep organs alive outside the body

https://www.technologyreview.com/2026/07/24/1140790/the-quest-to-keep-organs-alive-outside-the-body/
1•joozio•53m ago•0 comments

Markup Language Zoo

https://brett.coulstock.id.au/markup-language-zoo.html
2•MrVandemar•57m ago•0 comments

Android May Soon Restrict On-Device ADB

https://kitsumed.github.io/blog/posts/android-may-soon-restrict-on-device-adb/
31•shscs911•57m ago•10 comments

Flushing the DNS Toilet Twice

https://awfulwoman.com/notes/2026/06/01/1838/
1•uproarchat•1h ago•0 comments

Ask HN: Which is the least sloppy and claudeism free model you have used?

2•diwank•1h ago•0 comments

Postgress in Rust

2•poldex•1h ago•1 comments

Postgres FDW: Pushdown is a negotiation

https://clickhouse.com/blog/postgres-fdw-pushdown-negotiation
1•saisrirampur•1h ago•0 comments

ARC-AGI Leaderboard

https://arcprize.org/leaderboard
47•rzk•1h ago•27 comments