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?

Are high-end knife shops worth markup above big cutlery chains?

https://www.paragon-knives.com/
1•bgzlsxaz•1m ago•0 comments

UK PM gives tech firms ultimatum to block explicit images on children's phones

https://www.theguardian.com/technology/2026/jun/08/starmer-tech-firms-ultimatum-block-explicit-im...
2•tompagenet2•3m ago•0 comments

RayforceDB: Columnar Analytics and Graph Traversal in One Pipeline

https://rayforcedb.com/
1•tosh•6m ago•0 comments

Buy a train, bridge or tracks from the Swiss Railway

https://sbbresale.ch/
1•kisamoto•7m ago•0 comments

Let the agents democratize open source

https://world.hey.com/dhh/let-the-agents-democratize-open-source-9fd630a9
1•yulaow•7m ago•0 comments

TrailText – an ESP32 and LoRa off-grid messaging app

https://github.com/brunokeymolen/lora
1•brunokeymolen•7m ago•1 comments

Prompts I Reach for Every Week to Stay Unblocked as an Engineer

https://theaileverageweekly.com/posts/10-prompts-i-reach-for-every-week-to-stay-unblocked-as-an-e...
1•talvardi7•11m ago•0 comments

Show HN: CogCore – An API-native TypeScript runtime for building agents

https://github.com/carsonDB/CogCore
1•CarsonWu•12m ago•0 comments

Show HN: Email and identity stack for AI Agents

https://mailgent.dev/
2•DannyHeng•12m ago•0 comments

A Sustainable Git Option for Sovereign Solutions

https://code.kevwe.com/altgit.git/
1•kevwedotse•13m ago•0 comments

Substrate vs. Broker: Two Emerging Strategies for Enterprise AI

https://signal-memo.com/memo-salesforce-and-sap-are-making-opposite-bets-about-how-agents-will-us...
1•alex-ivan•14m ago•0 comments

GoSeofy

1•Juancabrera123•15m ago•0 comments

Doing Nothing at Work

https://www.seangoedecke.com/doing-nothing-at-work/
1•Sukram21•15m ago•0 comments

Gemini is currently charging us $1K per hour due a bug with the cache feature

https://twitter.com/_oliveiradanilo/status/2063660986213490882
1•jrflowers•17m ago•0 comments

Argentina's 'Madman': Inside the World of Javier Milei

https://www.aljazeera.com/features/longform/2026/6/6/argentinas-madman-inside-the-world-of-javier...
2•robtherobber•17m ago•0 comments

AI Has Come for Serif Fonts

https://www.wired.com/story/ai-has-come-for-serif-fonts/
2•unprovable•19m ago•1 comments

UK PM Starmer set to ban 'harmful' social media for under-16s

https://www.reuters.com/legal/litigation/uk-pm-starmer-set-ban-harmful-social-media-under-16s-202...
7•geox•36m ago•4 comments

The Cypherpunk Library

https://www.cypherpunkbooks.com
15•yu3zhou4•39m ago•1 comments

LLMs and Performative Productivity

https://joshcollinsworth.com/blog/productivity
1•gregnavis•41m ago•0 comments

Owning Your Dependencies

https://thestoicprogrammer.substack.com/p/owning-your-dependencies
2•birdculture•46m ago•1 comments

In Defense of YAML

https://opensource.posit.co/blog/2026-05-21_in-defense-of-yaml/
1•theanonymousone•50m ago•0 comments

Show HN: Free read-only script to find wasted AWS spend

https://cloudbudgetmaster.com/tools/aws-waste-finder/
1•samarth0211•50m ago•0 comments

The GitHub Copilot Bill Came Due. Here's What Engineering Leaders Should Do

https://blog.kilo.ai/p/the-github-copilot-bill-came-due
2•Aireen5858•55m ago•1 comments

Dao Heart 3.13 a symbolic safety layer for value drift and AI alignment research

https://github.com/Mankirat47/Dao-Heart-3.13
1•Mankirat47•58m ago•0 comments

OneDrive data now has an expiry date

https://ms365news.com/blogs/f/your-onedrive-data-now-has-an-expiry-data
6•taubek•1h ago•2 comments

String theory may be inevitable from basic assumptions about the universe

https://www.science.org/content/article/after-empty-promises-string-theory-finds-new-uses
2•isaacfrond•1h ago•0 comments

Cancelling Billionaires: A Review

https://www.counterpunch.org/2026/06/08/cancelling-billionaires-a-review/
2•daesorin•1h ago•0 comments

GitHub is (partially) down again. Do you look for alternatives?

1•Hypnosis6173•1h ago•1 comments

Bitcoin pump to $63,700 triggers the most short liquidations since late April

https://www.coindesk.com/markets/2026/06/08/bitcoin-pump-to-usd63-700-triggers-the-most-short-liq...
1•Varun-Sakhuja•1h ago•1 comments

Mimo v2.5 is better deal than DeepSeek v4 flash

1•shivang2607•1h ago•0 comments