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?

Conductor's shutting down on the 20th so I built an alternative (founder, AMA)

https://concors.dev/
1•katalist•4m ago•0 comments

Anthropic secures $3.4B generator deal for AI data centers

https://www.reuters.com/business/energy/anthropic-secures-34-billion-generator-deal-ai-data-cente...
2•giuliomagnifico•5m ago•0 comments

Trying to outsmart the Apple News algorithm

https://www.fabian.fyi/2026/11/rock-veto-algorithm.html
1•optimiz•7m ago•0 comments

AI learns from the products of thinking, not thought itself

https://theconversation.com/ai-learns-from-the-products-of-thinking-not-thought-itself-thats-a-pr...
1•bitofenglish•8m ago•0 comments

The Origins of Peanut Allergy

https://stephenskolnick.substack.com/p/on-the-origins-of-peanut-allergy
2•bobbiechen•10m ago•0 comments

Four Useful Questions

https://www.henrikkarlsson.xyz/p/four-useful-questions
1•Curiositry•12m ago•0 comments

Show HN: An Ad-Free, 100%

https://minitooldesk.com/vs/
1•minitooldesk•18m ago•0 comments

Detecting signs of hypertension using wearable sensors

https://research.google/blog/detecting-signs-of-hypertension-using-wearable-sensors/
1•jonbaer•18m ago•0 comments

Show HN: Huobidex – A handpicked hub for tools and products

https://huobidex.com
1•dotcurio•19m ago•0 comments

A digital bank's collapse toppled Paraguay's president

https://www.reuters.com/business/finance/how-digital-banks-collapse-toppled-paraguays-president-2...
2•geox•24m ago•0 comments

View / Nvidia's $4.5T test of founder immunity

https://www.semafor.com/article/11/08/2026/nvidias-45-trillion-test-of-founder-immunity
1•snikolaev•25m ago•0 comments

AO3's outage has been a boon for Tumblr, especially among Gen Z

https://mashable.com/life/ao3-down-tumblr-boon-among-gen-z
2•rdmuser•25m ago•0 comments

Humans' Origin Story Is Being Revised [video]

https://www.youtube.com/watch?v=wDU27f84hAs
1•pizzaiolo•29m ago•0 comments

The Collision: What AI Does to Us

https://mitsloan.mit.edu/ideas-made-to-matter/collision-what-ai-does-to-us
1•ilamont•30m ago•0 comments

Nvidia CEO Affair with Chinese Spy

https://www.cnn.com/2026/11/08/business/nvidia-investigation-ceo-jensen-huang
2•jokksc•32m ago•0 comments

Show HN: clap.cpp – Audio embedding inference in C++ (GGML)

https://github.com/gorse-io/clap.cpp
2•lutun•39m ago•0 comments

Why MariaDB is giving financial services a cache of its own

https://mariadb.com/resources/blog/why-mariadb-is-giving-financial-services-a-cache-of-its-own/
3•Klaster_1•41m ago•0 comments

Elegy for What's Left of the Normal

https://www.lesswrong.com/posts/fooXeRHjgpv4TcoRy/elegy-for-what-s-left-of-the-normal
1•jdkee•42m ago•0 comments

Show HN: Flide: Make Jev-like decision models up to 9.5x faster

https://github.com/OmniJev/Flide
2•unikcc•42m ago•0 comments

Michael Burry's public calls would have played out

https://henryzhang.substack.com/p/how-michael-burrys-public-calls-would
1•henryzhangpku•46m ago•0 comments

Hide your slop PR descriptions behind <details><summary>

https://simonwillison.net/2026/Nov/9/details-summary/
3•acossta•57m ago•0 comments

Show HN: A diffusion model that runs in pure CSS, no JavaScript

https://metrix187.github.io/diffusion.css/
2•quantara•1h ago•0 comments

D200mm: A New Scale for Single‑Crystal Diamond

https://www.df.com/insights/d200mm-single-crystal-diamond
2•addaon•1h ago•0 comments

The bonus that makes employees more committed

https://uwaterloo.ca/school-of-accounting-and-finance/news/bonus-makes-employees-more-committed
3•rohanm93•1h ago•0 comments

I Resist Generative "AI"

https://estherweidauer.com/articles/why-resist-generative-ai.html
3•isolay•1h ago•1 comments

Best-Effort Extent-Same, a btrfs dedupe agent

https://github.com/Zygo/bees
2•modinfo•1h ago•0 comments

Show HN: Just Dashboard, an open-source VPS management dashboard

https://github.com/JustDashboard/Just-Dashboard
2•Wayy01•1h ago•0 comments

Cryptocurrencies slide to two-month lows after US midterms

https://www.reuters.com/business/cryptocurrencies-slide-two-month-lows-after-us-midterms-2026-11-08/
3•1vuio0pswjnm7•1h ago•1 comments

Slavdom Unearthed: Marian Wawrzeniecki's Neopagan Paintings (1891–1923)

https://publicdomainreview.org/collection/marian-wawrzeniecki/
2•lermontov•1h ago•0 comments

Pay per pre-configured GPU hour or per token for open-source LLM inference?

4•yiro13•1h ago•0 comments