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?

SaaS Cheat Code

https://twitter.com/ZavgSergey/status/2105117523804856384
1•zavg•38s ago•0 comments

Jinn – a Rust microkernel with capability-base security looking f contributors

https://github.com/GeovaneEstanislau/Jinn_Project
1•onofiu•41s ago•0 comments

One photographer has spent two decades building a visual ark of animal life

https://www.photoroo.com/cp/893/8-things-we-didnt-expect-to-find-in-5633-photography-headlines
1•adinfiite•1m ago•0 comments

Show HN: Moching – AI desktop agent with 219 built-in tools (Rust)

https://github.com/moching-ai-dev/moching
1•moching_ai_dev•9m ago•0 comments

Something Interesting

https://github.com/gameel11223/International-AI-Tribunal-Charter
1•gameelalabsi•9m ago•1 comments

AWS Service Availability Updates

https://aws.amazon.com/about-aws/whats-new/2026/09/aws-service-availability/
1•dabinat•14m ago•0 comments

Sculptures honoring N. Korean soldiers to be erected in Vietnam

https://www.koreatimes.co.kr/foreignaffairs/northkorea/20260928/sculptures-honoring-n-korean-sold...
1•MadrasTh0rn•17m ago•0 comments

Basecamp 5 and Hey Outage Postmortem

https://www.37status.com/incidents/l1yn9n8f21p6
1•doppp•22m ago•0 comments

Strange Parodies of Atari 2600 Video Game Box Cover Art (2008)

https://mightygodking.com/2008/04/21/fun-from-yesterday/
2•peter_d_sherman•22m ago•0 comments

Halo CE in the Browser

https://halo-web.otherness-bugs.workers.dev
1•twalichiewicz•24m ago•0 comments

The Ecology of Memory: Scent, Culture, and the Brain

https://worldsensorium.com/the-ecology-of-memory-scent-culture-and-the-brain/
1•dnetesn•26m ago•0 comments

Remembering the Future: Blade Runner

https://blue-continuum.com/remembering-the-future-blade-runner
1•dnetesn•27m ago•0 comments

Let's talk about trading compute

https://twitter.com/gpugene/status/2104186844007248332
1•gmays•33m ago•0 comments

RRSI: Regularized Recursive Self-Improvement of Agent Harnesses

https://regularized-rsi.com/
2•jonbaer•39m ago•0 comments

MLB considers Grand Teton National Park for baseball game site

https://apnews.com/article/wyoming-grand-teton-national-park-baseball-game-b408fe1bd4c20c77120b2d...
1•JumpCrisscross•40m ago•0 comments

Beyond LLMs: A Post-Transformer World Emerges

https://cacm.acm.org/news/beyond-llms-a-post-transformer-world-emerges/
1•yarapavan•40m ago•0 comments

Show HN: Alter Zero – RAM-efficient agent for coding, security and automation

https://github.com/linuztx/alter-zero
1•linuztx•43m ago•0 comments

Show HN: Reflex Engine Beats Both Llama.cpp and vLLM on Cold-Start to TTFT

https://github.com/lateos-ai/reflex
1•leochong•44m ago•0 comments

Important Update About My Apps and Apple Developer Account

https://ibanks.craft.me/EzHqVCrHtslL8X
2•thombles•44m ago•0 comments

Jev-as-a-Judge: Accept When Confident, Escalate When Unsure

https://arxiv.org/abs/2609.26550
1•nico•46m ago•0 comments

How do you deal with people who strongly disagree with your views?

https://lemire.me/blog/2026/09/30/how-do-you-deal-with-people-who-strongly-disagree-with-your-views/
1•smilelamp•46m ago•0 comments

Before Comparing Meta Muse Sentinel,Read the Earlier Disclosures in June 2026

https://zenodo.org/records/23040181
1•sangamdas•48m ago•0 comments

Show HN: Momentum Mouse – slide your phone on a desk and the PC cursor follows

https://www.indiegogo.com/projects/momentum-mouse/momentum-mouse-go?refcode=kH0RTo2_MUm4wpY6MALV9Q
1•TheMirthCo•51m ago•0 comments

Mark

https://colossus.com/article/mark-zuckerberg-profile/
1•lorenz_li•52m ago•0 comments

Want to protect yourself against cancer? Get vaccinated

https://www.scientificamerican.com/article/one-in-eight-new-cancers-are-likely-caused-by-infectio...
2•andrewl•56m ago•2 comments

Thinking out loud AI and Cancer Cure

1•wwolfson97•57m ago•0 comments

Why the Bronze Age Collapsed

https://www.worksinprogress.news/p/why-really-caused-the-bronze-age
4•benbreen•58m ago•1 comments

Diffsmith AI Code Review Tool

https://apps.apple.com/us/app/diffsmith-code-review-studio/id6787073815?mt=12
1•mzagaja•59m ago•0 comments

Batcher's Bitonic Merger Sort

https://raintown.org/lava/sorter/
1•azhenley•1h ago•0 comments

LabBench: Can AI agents decide what experiment to run next?

https://gamowlabs.com/labbench-benchmarking-ai-wet-lab-decisions.html
4•wardbradt•1h ago•0 comments