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?

Infinite scroll and autoplay are fuelling a global problem

https://news.flinders.edu.au/blog/2026/11/19/infinite-scroll-and-autoplay-are-fuelling-a-global-p...
1•geox•1m ago•0 comments

Building a typographic tester station with Elixir

https://lucassifoni.info/blog/building-a-typographic-tester-station-with-elixir/
1•chantepierre•4m ago•0 comments

Design for Understandability

https://jschuster.org/blog/2026/11/19/design-for-understandability/
2•birdculture•5m ago•0 comments

Points Project

https://pointsproject.org/
1•dorianmariecom•22m ago•0 comments

Why the next major shift in software is not here yet

https://onreflection.dev/essays/the-next-major-shift-is-not-here-yet/
3•gpradeepkrishna•24m ago•1 comments

Show HN: A human-readable account of the Lean proof of the Riemann Hypothesis

1•idix192•25m ago•0 comments

Bumble bee cognition (commentary paper)

https://www.science.org/doi/10.1126/science.aek1724
2•jbotz•28m ago•0 comments

An Open Letter Offering Jensen Huang Free Use of PhantaField's Technology

https://www.phantafield.com/news/an-open-letter-to-jensen-huang
2•phantafield•30m ago•0 comments

New investors buy Anthropic shares for love of Claude

https://app.dowjones.com/factiva/article?id=drn:archive.newsarticle.CWRE000020261121embl0002t
1•paoladima•32m ago•0 comments

DroidDeck: PC Gaming on Android

https://droid-deck.dev/
1•Tomte•36m ago•1 comments

Albertpiworld

https://www.youtube.com/@albertpiworld
1•iansteyn•36m ago•1 comments

The Phenomenology of Early Childhood Experience

https://medium.com/@smoking2man/the-phenomenology-of-early-childhood-experience-feeling-as-an-ins...
2•Aldus551•43m ago•0 comments

CTO of 'RansomwareHelp' Indicted for Wire Fraud

https://krebsonsecurity.com/2026/11/cto-of-ransomwarehelp-indicted-for-wire-fraud/
2•Brajeshwar•45m ago•0 comments

Show HN: Pantry an open source scanner that checks what your coding agents run

https://waffuru.ai/products/pantry
2•ekryski•46m ago•0 comments

The Defender's Window

https://blog.gregbrockman.com/the-defenders-window
1•fagnerbrack•49m ago•0 comments

Platonic space: where cognitive and morphological patterns come from

https://thoughtforms.life/platonic-space-where-cognitive-and-morphological-patterns-come-from-bes...
1•myth_drannon•58m ago•0 comments

Ask HN: Rust, Zig, or C?

3•selectedambient•1h ago•3 comments

Surprisingly Adorable Insect Portraits

https://amateurphotographer.com/latest/these-astonishing-insect-portraits-reveal-a-hidden-world-y...
2•NordStreamYacht•1h ago•0 comments

Making Neurons by Hand

https://vgel.me/notebook/making-neurons-by-hand/
2•pr337h4m•1h ago•0 comments

Oxford and MIT Didn't Bite. So Ken Griffin Took His Miami Campus Elsewhere

https://www.wsj.com/business/ken-griffin-citadel-miami-carnegie-mellon-338bcd20
2•ryan_j_naughton•1h ago•0 comments

I Tracked Down All 60 Birds in GTA 6: A Birder's Guide to Vice City's Wildlife

https://www.audubon.org/magazine/birds-of-gta-6-field-guide-vice-city-wildlife
2•Brajeshwar•1h ago•0 comments

Explore Riemann

https://exploreriemann.com/
2•judegomila•1h ago•0 comments

HTTP/1.1 Must Die

https://http1mustdie.com/
5•doodlesdev•1h ago•1 comments

Aletheia Aegis: Deterministic sub-millisecond output guard for AI agents

https://github.com/vikasny30/aletheia-aegis
1•vikasny30•1h ago•0 comments

Who's making all of the money in the porn industry? [video]

https://www.youtube.com/watch?v=3IsgwsuV_nE
2•cisc•1h ago•0 comments

Turn a Bambu Lab P1S 3D printer into a pen plotter

https://github.com/gtls64/p1s-pen-plotter
2•gtls64•1h ago•1 comments

I'm building GURU, a framework for a personal AI that lives alongside you

https://github.com/GuruProduction/GURUbyUnusLumen
1•introducingGURU•1h ago•1 comments

Federal Revenue When AI Replaces Labor

https://www.rand.org/pubs/research_reports/RRA4980-1.html
3•littlexsparkee•1h ago•2 comments

Bell says it's investigating cyberattack that led to potential theft of data

https://www.cbc.ca/news/business/bell-agentic-cyber-attack-9.7430468
2•MadrasThorn•1h ago•0 comments

Scaling horizontally: how we moved beyond Multi-Raft

https://enroute.sh/blog/scaling-horizontally-how-we-moved-beyond-multi-raft
1•Brajeshwar•1h ago•0 comments