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?

America, 1926: What a Forgotten 100-Year-Old Report Says About Who We Are

https://www.derekthompson.org/p/america-1926-an-absurdly-deep-dive
1•momentmaker•51s ago•0 comments

Why are we still uploading PDFs just to compress them?

https://lumli.io/blog/pdf-compression-cloud-subscription-2026
1•lumli•2m ago•0 comments

Best Simple System for Now

https://dannorth.net/blog/best-simple-system-for-now/
1•daan-k•3m ago•0 comments

Show HN: AI latent space with overlapping manifolds

https://github.com/PJHkorea/Egregore/blob/main/integrated_egregore_core_test_v6_4.py
1•PJHkorea•3m ago•1 comments

The Honest SendGrid Inbound Parse Alternative – MailKite

https://mailkite.dev/blog/sendgrid-inbound-parse-alternative/
1•bucabay•5m ago•0 comments

Jamesob's guide to running SOTA LLMs locally

https://github.com/jamesob/local-llm
1•livestyle•6m ago•0 comments

It Still Can't Do My Job: Four Years of Moving Goalposts (2022–2026)

https://publicznyprofil.github.io/ai_cant_do_your_work/
1•mydreamof•7m ago•0 comments

The and Justice for All" Book Club

https://markmbello.substack.com/p/please-join-us-tomorrow
1•lawsuitllc•7m ago•0 comments

Battery startups see 'crazy' demand to smooth power surges in data centers

https://www.ft.com/content/55c10ef1-1589-47b2-9fa8-a2a04f5cf316
2•alephnerd•9m ago•0 comments

Dropway: Share LLM artifacts with your team

https://www.hugedomains.com/domain_profile.cfm?d=dropway.com
1•d_pang•11m ago•1 comments

Show HN: SigRank – Competitive Stat Screen and Operator Performance Evals O7

https://github.com/SunrisesIllNeverSee/sigrank-app
1•Burnmydays•11m ago•0 comments

Golden Paths Weren't Built for Agents

https://www.massdriver.cloud/blogs/golden-paths-werent-built-for-agents-part-1
1•mooreds•13m ago•0 comments

AI coding is addictive. Engineers are paying the price

https://leaddev.com/ai/ai-coding-is-addictive-engineers-are-paying-the-price
2•sefrost•15m ago•1 comments

Mistral vs. Claude on our onboarding: 4× faster, 30% cheaper

https://squidler.io/blog/eu-models-1-discovery-mistral
1•tidbeck•17m ago•0 comments

How Fighter Jets Lock on (and How the Targets Know) (2014)

https://gizmodo.com/how-fighter-jets-lock-on-and-how-the-targets-know-1644871272
3•downbad_•17m ago•1 comments

Give Smart People the Tools to Do Smart Things

https://superuserdone.com/posts/2026-07-03-give-smart-people-the-tools/
2•SuperUserDone•20m ago•0 comments

Well, the Steam Machine was pretty cool for the 20 minutes that it worked

https://old.reddit.com/r/steammachine/comments/1ulzo6a/well_the_steam_machine_was_pretty_cool_for...
1•HelloUsername•20m ago•0 comments

Pilot Shell: Spec-driven plans; enforced quality gates; persistent knowledge

https://github.com/maxritter/pilot-shell
1•sea-gold•20m ago•0 comments

Stop AI from Wrecking Your Codebase with Spec-Driven Development

https://guibai.dev/a/7656050265522913280/
1•Soarez•20m ago•0 comments

Building an Intern

https://cra.mr/building-an-intern/
1•vinhnx•21m ago•0 comments

Show HN: LimitBar, a macOS menu bar app showing your Claude usage limits

https://mikaweiss6.gumroad.com/l/limitbar
1•MikaW•21m ago•2 comments

Dad Books Are a Dying Breed

https://www.wsj.com/business/media/dad-books-are-a-dying-breed-d9a28b49
1•loughnane•22m ago•0 comments

An E Ink ESP32-Based Game Boy

https://hackaday.com/2026/07/02/an-eink-esp32-based-gameboy/
1•tjwds•24m ago•0 comments

Trump portfolio tracker account suspended one day after launch

https://www.washingtonexaminer.com/policy/finance-and-economy/4634208/trump-portfolio-tracker-acc...
4•felooboolooomba•27m ago•1 comments

Using OpenTofu's Exclude Flag to Isolate Performance Bottlenecks

https://masterpoint.io/blog/using-opentofu-exclude-flag-isolate-performance-bottlenecks/
2•mooreds•28m ago•0 comments

Show HN: Hello Inbox – Maximize inbox placement for email marketing campaigns

https://www.helloinbox.email/
1•ismaelyws•28m ago•0 comments

Build a blog engine in 15 minutes with Ruby on Rails (2005) [video]

https://www.youtube.com/watch?v=Gzj723LkRJY
1•rmsaksida•33m ago•0 comments

C++ Under Pressure: A Practical Interview Guide from 1k Technical Interviews

https://leanpub.com/cpp-under-pressure
1•ahmedmohamed_•34m ago•0 comments

Colophons, and why I'd never heard the word

https://lionshead.digital/notes/colophons-and-why-id-never-heard-the-word
1•earnestamateur•35m ago•0 comments

Show HN: Finding better quantum error correction codes using ILP

https://github.com/ynnk-research/Modular-Assembly-of-High-Performance-Logical-Blocks
1•ynnk•35m ago•0 comments