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?

Show HN: Pip – Your Git history puts you on a Performance Improvement Plan

https://github.com/littlestjames82-sys/pip-pip
1•ghostdevstudio•33s ago•0 comments

Ask HN: What positive impact has AI had in the past 5 years?

1•meredithbloom•3m ago•0 comments

Official Microsoft agent-framework PyPI package compromised

https://opensourcemalware.com/blog/agent-framework-pypi-compromised
2•jruohonen•7m ago•0 comments

Rust doubled on GitHub in the year agents started 40% PRs

https://hyscaler.com/insights/the-internet-is-getting-rusty/
2•royraghav28•8m ago•1 comments

Danish researchers find efficient solution to the four colour problem

https://via.ritzau.dk/pressemeddelelse/15284557/breakthrough-danish-researchers-find-efficient-so...
1•theanonymousone•9m ago•0 comments

Stickers on Buttons: Why South Korea's Suneung AI cheating patch won't hold

https://siwoo.lol/note/stickers-on-buttons/
1•siwoo•10m ago•0 comments

Microsoft's official Python agent framework hijacked to distribute malware

https://www.theregister.com/security/2026/11/18/microsofts-official-python-agent-framework-hijack...
1•MadrasTh0rn•12m ago•0 comments

Featherweight, flying robot carries its own sensors and computers

https://news.mit.edu/2026/featherweight-flying-robot-carries-its-own-sensors-and-computers-1118
1•geox•12m ago•0 comments

Wall Street Pledged to Mobilize $500B for Nvidia–But Hasn't Put Up a Dime

https://www.wsj.com/finance/wall-street-pledged-to-mobilize-500-billion-for-nvidiabut-hasnt-put-u...
1•JumpCrisscross•15m ago•0 comments

Every one of my "show" posts is removed immediately

1•selectedambient•16m ago•1 comments

Show HN: Port.fm – Internet radio tuned by decade, energy, or location

https://port.fm/
1•fozuse•17m ago•0 comments

Nvidia Chips Ended Up Within Reach of China's Military

https://www.nytimes.com/2026/11/18/technology/nvidia-alibaba-china-military.html
1•JumpCrisscross•17m ago•1 comments

Towards Universal Data-Efficient Pretraining

https://qlabs.sh/research/applications/
1•Klaster_1•18m ago•0 comments

Show HN: Why Zero to One's Thesis Falls Short with Healthcare

https://davidngo1562.substack.com/p/its-not-about-the-money-until-it
1•illidan1000•21m ago•0 comments

The smart money is selling equity

https://www.acadian-asset.com/investment-insights/owenomics/the-smart-money-is-selling-equity
2•shoo•22m ago•0 comments

Turning one photo into a Goodbye GTA 5 AI video

https://gta5goodbyeai.com/
1•visiohex•23m ago•0 comments

Google Embraces Geothermal Technology to Vaporize Rock for Clean Power

https://www.wsj.com/business/energy-oil/google-embraces-geothermal-technology-to-vaporize-rock-fo...
1•gmays•29m ago•0 comments

As Meta bets big on Muse AI agent, early safety mishaps surface

https://www.reuters.com/investigations/meta-bets-big-muse-ai-agent-early-safety-mishaps-surface-2...
2•spenvo•30m ago•0 comments

Fluent Interface in C – Look ma, no this

https://opensource.googleblog.com/2026/11/fluent-interface-in-c-look-ma-no-this.html
1•matt_d•33m ago•0 comments

Signs of Eagle Predation on a 22-Kg Adult Primate

https://onlinelibrary.wiley.com/doi/10.1002/ajpa.70377
1•gumby•35m ago•0 comments

Email Encryption

https://computer.rip/2026-07-19-email-encryption.html
1•fagnerbrack•35m ago•0 comments

Show HN: The FODMAP mistake most health writers make

1•kouautomation•36m ago•1 comments

I'm starting a book club but for math and physics textbooks

https://www.penandpaperclub.com/why
3•wheresclark•38m ago•3 comments

Pyrefly v1.5.0

https://github.com/pyrefly-org/pyrefly/releases/tag/1.5.0
1•fishgoesblub•39m ago•1 comments

Twig 1.16– Android file manager with per-folder sorting and intro/outro skipping

https://github.com/dev2ex/twig/releases/tag/v1.16.0
1•dev2ex•42m ago•0 comments

My missed keyboard shortcuts used to be safe places

https://pcblues.com/personal/usability/2026/11/19/omarchy-and-keyboard-shortcuts.html
1•pcblues•44m ago•1 comments

GTA 6 Released

https://www.bbc.com/news/live/c60rkg21dl22t
1•qtqtqt•44m ago•1 comments

Microsoft-Decision-1.1 is now GA for fast, low-cost decision making

https://commandline.microsoft.com/microsoft-decision-model-ga/
1•gmays•50m ago•0 comments

Tech Lancaster

https://techlancaster.org/
1•linuxkernal•54m ago•0 comments

Stop

https://geoffralston.substack.com/p/stop
2•nsainsbury•54m ago•0 comments