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?

AI Marketing

https://www.lerobit.com
1•akliluart•5m ago•0 comments

The teenage hitmen recruited to kill across Europe

https://www.bbc.com/news/articles/czrjyevmv61o
2•1659447091•6m ago•0 comments

Futurism says Meta has "almost nothing" to show for AI. The numbers say

https://runtimewire.com/article/futurism-says-meta-has-almost-nothing-to-show-for-ai-the-numbers-...
5•ryanmerket•11m ago•3 comments

Ask HN: Do Something about Bots

3•gregdaniels421•11m ago•2 comments

MkLinux and the pimped-out Apple Workgroup Server 9150

http://oldvcr.blogspot.com/2026/08/mklinux-and-pimped-out-apple-workgroup.html
6•goldenskye•12m ago•0 comments

Linux desktop market share has hit over 10% in North America

https://old.reddit.com/r/linux/comments/1vcpk8i/linux_desktop_market_share_has_hit_over_10_in/
3•dviola•15m ago•0 comments

Don't Take the Black Pill (Text Adaptation)

https://andrewkelley.me/post/dont-take-black-pill.html
3•zdw•21m ago•0 comments

Show HN: FirstEmployee.ai – Start a Business

https://firstemployee.ai/
2•nadermx•26m ago•0 comments

Plug-in solar is coming. Plug-in batteries should follow

https://www.regen.co.uk/insights/plug-in-solar-is-coming-plug-in-batteries-should-follow
3•thelastgallon•27m ago•0 comments

Deep-sea vehicles spot 'alien' sharks deep beneath the waves in the Pacific

https://www.science.org/content/article/deep-sea-vehicles-spot-alien-sharks-deep-beneath-waves-pa...
2•pkaeding•34m ago•0 comments

The world first agentic AI radio

https://www.twitch.tv/newsmyimaginationai
4•myimaginationai•42m ago•1 comments

Recurse Center Halftime Reflection

https://holistudio.github.io//2025/11/02/RC-half/
2•luu•49m ago•0 comments

Four Time Scales for Technology Development and Deployment

https://rodneybrooks.com/four-time-scales-for-technology-development-and-deployment/
10•jeffreyrogers•58m ago•0 comments

Design Thinking Is B.S. (2018)

https://www.fastcompany.com/90166804/design-thinking-is-b-s
4•walterbell•1h ago•0 comments

DeepMind Disbands AlphaFold Team, Pivots to Gemini

https://unusualwhales.com/news/deepmind-disbands-alphafold-team-gemini-pivot
4•gmays•1h ago•1 comments

Building agents that survive their own execution

https://conol.ai/blog/building-agents-that-survive-their-own-execution
2•greatony•1h ago•0 comments

When random.bytes() runs but doesn't work

https://insider.btcpp.dev/p/when-randombytes-runs-but-doesnt
3•Funes-•1h ago•0 comments

Show HN: I'm a 15 Year Old Wannabe Engineer, This Is a Cycloidal Gearbox I Built

https://github.com/tom-ilan/cycloidal_gearbox
27•tomilan•1h ago•7 comments

What 'Pluribus' Gets Right About the Hive Mind (2025)

https://www.psychologytoday.com/us/blog/priceless/202512/what-pluribus-gets-right-about-the-hive-...
2•walterbell•1h ago•0 comments

Portal: Current Events

https://en.wikipedia.org/wiki/Portal:Current_events
5•adm4•1h ago•0 comments

Fuck the Algorithm. Own Your Data

https://github.com/adnqcr7-code/privacy-yt-downloader
3•kairos_agent•1h ago•0 comments

Living in the Math World Means Threading the Needle

https://www.quantamagazine.org/hong-wang-wins-2026-fields-medal-the-third-woman-ever-20260723/
3•gmays•1h ago•0 comments

Show HN: CostPerPrompt – Live AI API pricing and real-workload cost calculators

https://costperprompt.com/
3•ahmed_hassan7•1h ago•0 comments

Inverseminar

https://phys.org/news/2026-07-inverting-seminar-recover-scientific-papers.html
4•sundarurfriend•1h ago•0 comments

'Death by organ donation' floated for patients approved for euthanasia

https://nationalpost.com/news/death-by-organ-donation-for-maid-patients
3•walterbell•1h ago•0 comments

Hiring FDE's (full stack software eng) // 100K+ & equity // AI for Manufacturing

https://www.tryharmony.ai/
2•georgeharmony•1h ago•0 comments

I made a free directory to submit your games

https://www.twelve.games
3•mattmerrick•1h ago•0 comments

Token diplomacy: How China is shaping the AI future

https://www.semafor.com/article/07/28/2026/token-diplomacy-how-china-is-shaping-the-worlds-ai-future
4•qwikhost•1h ago•4 comments

Bessent and the Fed help Japan reverse months of yen losses

https://www.japantimes.co.jp/business/2026/08/01/economy/us-treasury-yen-support/
6•mikhael•1h ago•1 comments

The Linux distro and desktop brawler

https://distrofighter.com/
6•ashitlerferad•1h ago•0 comments