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?

MacPad: Touch Mac in iPad

https://github.com/dcmmc/macpad
1•dadoum•8m ago•1 comments

Ant Group releases finance-focused Ling-3.0-flash-Fin

https://artificialanalysis.ai/articles/ant-group-releases-finance-focused-ling-3-0-flash-fin
1•gmays•10m ago•0 comments

New method to minimize immunosuppression after organ transplantation

https://www.nature.com/articles/s43856-026-01906-x
1•pvaldes•13m ago•1 comments

The 'AI Safety' Movement Is Making AI Less Safe

https://reason.com/2026/09/22/the-ai-safety-movement-is-making-ai-less-safe/
8•Bostonian•13m ago•0 comments

Show HN: Livenerf – a benchmark for whether Opus 5.5 gets nerfed

https://github.com/ninjahawk/livenerf
2•ninjahawk1•15m ago•0 comments

Adding side drawer with workspace concepts to rio (rust terminal) like cmux has

https://github.com/raphamorim/rio/pull/1954
1•cs1996•15m ago•0 comments

The Jagged Frontier of Jev 1.13

https://docs.typesafe.ai/model-jaggedness/jev-1.13
2•dhorthy•21m ago•0 comments

Mercury Is Shrinking, and Faster Than We Thought

https://www.nytimes.com/2026/09/11/science/space/mercury-shrinking-wrinkles.html
2•reaperducer•23m ago•1 comments

Swarm Scaling

https://www.tobyord.com/writing/swarm-scaling
1•gmays•26m ago•0 comments

A WIP Lego Sorter: Maybe a million pounds is possible [video]

https://www.youtube.com/watch?v=9G2R9ZcgAhA
3•Teever•26m ago•0 comments

Artificial Intelligence in Research

https://tmodrzyk.github.io/blog/2026/artificial-intelligence-in-research/
1•jeremyscanvic•28m ago•0 comments

CNN Mood 'Like a Funeral' as Paramount Acquires Warner Bros

https://variety.com/2026/tv/news/cnn-funeral-path-hazy-paramount-wins-warner-1236872113/
5•westurner•28m ago•4 comments

Show HN: Palette, a Figma plugin that turns one color into a whole UI system

https://www.figma.com/community/plugin/1682163756621093164
1•jeffmahacek•32m ago•0 comments

AUGUSTOSFACES

https://augusto.at/augustosfaces/
1•luu•33m ago•0 comments

What is the World's Loveliest Language

https://www.economist.com/graphic-detail/2024/01/11/what-is-the-worlds-loveliest-language
1•andsoitis•34m ago•0 comments

Xounds Redux and FruitMenu Redux

https://totallynotmalicious.com/software
1•rgovostes•37m ago•1 comments

Design your programming languages right (2024)

https://blog.veritates.love/design-it-right
1•birdculture•38m ago•0 comments

U.S. Government seizes 54-pound Martian meteorite sold at auction last year

https://www.nytimes.com/2026/09/20/arts/who-owns-this-chunk-of-mars-jeanine-pirro-says-america-do...
5•bookofjoe•38m ago•2 comments

A Taxonomy for Navigating the Global Landscape of AI Regulation (2025)

https://dl.acm.org/doi/10.1145/3715275.3732059
1•mooreds•40m ago•0 comments

The 38 most influential Bluesky posters

https://bsky38.com/
2•mooreds•41m ago•0 comments

UN General Assembly: Trump renames AI to Super Intelligence

https://www.washingtonpost.com/technology/2026/09/22/trump-says-hes-renaming-ai-super-intelligence/
4•f1ay•41m ago•4 comments

The Mac Mini M6 is the fastest way to.. emulate a Windows 98 Pentium II machine

https://nyaa.sh/reviews/mac-mini-m6-emulation
1•petaleverbloom•43m ago•0 comments

Show HN: A fast, offline Markdown viewer for macOS built in Swift

https://github.com/temir-dev/tims-markdown-reader
2•tim_tairov•45m ago•0 comments

About Impersonation Risk Detection

https://support.apple.com/en-us/127906
1•impish9208•45m ago•0 comments

Trump orders AI rebrand as "super intelligence"

https://www.axios.com/2026/09/22/trump-ai-super-intelligence-rebrand
6•kirab•49m ago•2 comments

Neo-Median Voter Model

https://www.betonit.ai/p/the-neo-median-voter-model
2•efavdb•49m ago•0 comments

Simple-jev by featherless AI – Turn context into clear decisions

https://simple-jev.featherless.ai/
1•Risyandi94•50m ago•1 comments

How to Escape the Algorithm

https://raahelbaig.com/entry/intentional-internet/
1•raahelb•52m ago•0 comments

What Does Childhood Trauma Have to Do with White Supremacy?

https://www.psychologytoday.com/us/blog/the-shaping-power-of-experience/202609/what-does-childhoo...
4•rendx•58m ago•2 comments

Inspiring Applications of Spin Model Checker

https://spinroot.com/spin/success.html
1•vitalnodo•58m ago•0 comments