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?

It Has to Be Fun

https://jpmens.net/2026/11/21/it-has-to-be-fun/
2•Tomte•2m ago•0 comments

Mutex poisoning is not for everyone

https://bertptrs.nl/2026/11/16/mutex-poisoning-is-not-for-everyone.html
1•birdculture•3m ago•0 comments

/Bin/Sh Invaders

https://www.blog.montgomerie.net/posts/2026-11-03-sh-invaders/
1•jrmg•4m ago•0 comments

A Letter to Mr. Shannon (Unanswered)

https://notes.doering.ai/p/a-letter-to-mr-shannon-unanswered
1•bbor•4m ago•0 comments

Counting to 4B with linear congruential generators and Feistel networks

https://acid.vegas/blog/counting-to-four-billion/
1•acidvegas4real•7m ago•0 comments

The Decline of Trans and Queer Identity Among Young Americans

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6433544
4•RickJWagner•11m ago•0 comments

Lean Verification of the Riemann Hypothesis

https://leanprover-community.github.io/blog/posts/riemann-hypothesis/
1•g-b-r•11m ago•1 comments

DRM with Castlabs and WebRTC

https://www.red5.net/blog/drm-with-castlabs-and-webrtc/
1•mondainx•12m ago•0 comments

The real-life risks of relying on proprietary software

https://www.fsf.org/blogs/community/2026-real-life-risks-of-proprietary-software
1•pizzaiolo•12m ago•0 comments

The Age of Personal Software in Healthcare

https://daveads.github.io/writing/the-age-of-personal-software-in-healthcare/
1•daveads5•15m ago•0 comments

WikiHouse

https://www.wikihouse.cc
1•tosh•15m ago•0 comments

2 Million 3D particle characters x2 fighting game in a single SVG

https://svgfpsaiagents.github.io/svgfpsgameAI/particlefighter.svg
1•zwanemakki•16m ago•1 comments

How much space is taken up by document versions?

https://eclecticlight.co/2026/11/21/how-much-space-is-taken-up-by-document-versions/
1•Brajeshwar•17m ago•0 comments

Playing GTA VI with a brain computer interface

https://twitter.com/neuralink/status/2123890949029818800
1•houqp•20m ago•0 comments

What is alternative grading? These TMU professors share how it works

https://www.ctvnews.ca/toronto/article/what-is-alternative-grading-these-tmu-professors-share-how...
1•amichail•24m ago•0 comments

The Future of Programming (2013)

https://worrydream.com/dbx/
1•zenincognito•24m ago•0 comments

Advent of Code 2026 starts in 10 days

https://www.reddit.com/r/adventofcode/comments/1xi8ltn/every_december_since_2015_ive_created_a_bu...
1•vismit2000•25m ago•0 comments

Vit B12-based air electrode for high-performance rechargeable zinc–air batteries

https://pubs.rsc.org/ta/article/14/50/34201/1280936/A-vitamin-B12-based-air-electrode-for-high
2•bookofjoe•25m ago•0 comments

Thenflation: A real life price guess game over the years

https://thenflation.com/
1•mvennekool•25m ago•2 comments

JEDEC Previews DDR6 Memory Standard: 2.35x More Bandwidth, 44% Narrower DIMMs

https://www.servethehome.com/jedec-previews-ddr6-memory-standard-2-35x-more-bandwidth-44-narrower...
2•ksec•25m ago•0 comments

MySQL Development as It Happens, Part 2 – Vector Indexes

https://blogs.oracle.com/mysql/mysql-development-as-it-happens-part-2-vector-indexes
1•ksec•26m ago•0 comments

Odin November 2026 Newsletter

https://odin-lang.org/news/newsletter-2026-11/
1•ksec•26m ago•0 comments

Qwen3.8 27B Just Became a Coding Monster (DaisyRose)

https://www.youtube.com/watch?v=bwsSnLM3YFI
1•lroe•27m ago•0 comments

Battery storage in Great Britain: how a grid battery makes money

https://a115.co.uk/battery-storage-revenues/
2•a115ltd•29m ago•0 comments

Branchi – Open-Source Git Client for Windows and Linux (Rust and Flutter)

https://github.com/mbpcoder/Branchi
1•mbpcoder•31m ago•0 comments

Armiger – a local ONNX torrent classifier for Bitmagnet and Rats Search

https://github.com/spencernorton/armiger
2•bilegeek•35m ago•0 comments

Ask HN: Best books you've read this year (2026)?

1•learner_yearner•37m ago•0 comments

Free System Design Course (Visual Learners)

https://systems-design.aiengineer.co/
3•owlewis•38m ago•0 comments

'Positive review only': Researchers hide AI prompts in papers Asia

https://asia.nikkei.com/business/technology/artificial-intelligence/positive-review-only-research...
1•colinprince•41m ago•0 comments

Apollo, Goldman lead $44B SpaceX GPU debt financing

https://www.reuters.com/business/media-telecom/apollo-goldman-lead-44-billion-spacex-gpu-debt-fin...
3•jeffufl•42m ago•0 comments