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?

Ask HN: How do you run your agent swarm?

1•sermakarevich•1m ago•0 comments

AMule 3.0.0 – The "Alive Again" Version

https://amule-org.github.io/changelog/3.0.0
1•rickcarlino•6m ago•0 comments

Agent-First Authentication and Authorization

https://clawmem.ai/blog/agent-first-authentication-and-authorization/
1•hazel1225•12m ago•0 comments

The mechanics of the IPO process (explained by a former Reddit CEO)

https://twitter.com/i/status/2063389455550218646
1•Michelangelo11•12m ago•0 comments

Beyond MitM: The Rising Danger of Adversary-in-the-Middle Attacks

https://blog.barracuda.com/2025/10/02/beyond-mitm-rising-danger-adversary-middle-attacks
1•walletdrainer•14m ago•0 comments

Unpatched Firefox focus universal XSS 0day poc released

https://twitter.com/i/status/2064119366669435379
1•notRobot•15m ago•0 comments

Soft scrolling on framebuffer consoles – with GPM Handling

https://archives.gentoo.org/gentoo-user/aZt1xIVGbaMAIFBG@MAC.fritz.box/
1•M95D•17m ago•1 comments

Show HN: CliperX – A clipboard manager that lives in the Dynamic Island

https://cliperx.com/
2•xizhechan•18m ago•1 comments

The Nerdy Escorts Cashing in on Silicon Valley's AI Boom

https://www.forbes.com/sites/annatong/2026/06/07/the-nerdy-escorts-cashing-in-on-silicon-valleys-...
1•Michelangelo11•24m ago•0 comments

Plastron: A spreadsheet you grow into an app, in one index.html

https://plastron.ca
2•rheohile10•30m ago•1 comments

SpaceX plans $55B investment to make A.I. chips

https://www.nytimes.com/2026/05/07/business/spacex-chips-terafab.html
2•andsoitis•31m ago•1 comments

Ask HN: Feeling FOMO re: SpaceX, Anthropic, OpenAI IPOs and the future of tech

1•mradek•35m ago•3 comments

Does a token buy you more or less now than it did a few months ago?

https://bigspin.ai/resources/the-decline-of-token-level-purchasing-power
1•pretext•35m ago•1 comments

Facebook is paying people overseas promoting Alberta separatism

https://www.cbc.ca/news/canada/facebook-overseas-alberta-separtism-9.7223966
4•vrganj•37m ago•0 comments

Productivity Effects Across Generations of AI Coding Tools

http://muratbuffalo.blogspot.com/2026/06/writing-code-vs-shipping-code.html
1•ingve•43m ago•0 comments

A game's homemade crypto fell to a DIY supercomputer

https://www.ud2.rip/blog/towerunite/
2•vmfunc•46m ago•0 comments

Siri AI for iPhones and iPads will be delayed indefinitely in the EU

https://www.engadget.com/2189932/siri-ai-for-iphones-and-ipads-will-be-delayed-indefinitely-in-th...
1•adwmayer•47m ago•0 comments

QuillOS: The only Swift-first OS after macOS

https://quillOS.cloud/
1•ljlolel•49m ago•2 comments

Do Better Research with NotebookLM

https://blog.google/innovation-and-ai/products/notebooklm/better-research-notebooklm/
1•nkko•53m ago•0 comments

Is There a Link Between Listening to Music and Mental Health?

https://www.aesthetics.mpg.de/en/newsroom/news/news-article/article/is-there-a-link-between-liste...
1•XzetaU8•54m ago•0 comments

SpaceX CFO telecom analyst discuss

https://twitter.com/elonmusk/status/2064196509780893957
1•__patchbit__•57m ago•0 comments

Suprised to see the open data sources on internet

1•akd29121988•58m ago•0 comments

Stop Asking Claude to Agree with You

https://www.questionpro.com/engineering/engineering/developer%20tools/ai%20&%20machine%20learning...
1•skyDoesWork38•1h ago•0 comments

NASA's X-59 Aircraft Flies Supersonic for First Time

https://www.nasa.gov/aeronautics/x-59-first-supersonic-flight/
3•divbzero•1h ago•0 comments

SpaceX offers details on orbital data center satellites

https://spacenews.com/spacex-offers-details-on-orbital-data-center-satellites/
3•MrBuddyCasino•1h ago•2 comments

Show HN: I created an app to copy OTP from Google Voice to your macOS Clipboard

https://github.com/ptrinh/Notiful
1•ptrinh•1h ago•0 comments

iPhone almost like a birth control device, fertility rates falling after 2007

https://www.indiatoday.in/technology/news/story/iphone-almost-like-a-birth-control-device-fertili...
2•rustoo•1h ago•1 comments

Ask HN: Do you need go-to-market strategy at early stage?

1•2ero_wf•1h ago•0 comments

Built to benefit everyone: our plan By Sam Altman and Jakub Pachocki

https://openai.com/index/built-to-benefit-everyone-our-plan/
1•echan00•1h ago•1 comments

Show HN: Clawcall – give your self-hosted OpenClaw agent inbound phone calls

https://github.com/CODEANDTRUST/clawcall
2•pakbry•1h ago•0 comments