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?

Air Canada captain faked his ATPL for 27 years

https://www.peelpolice.ca/news-feed/posts/project-icarus-former-air-canada-captain-arrested-for-a...
1•opengrass•3m ago•0 comments

A Marxist View of Tolkien's Middle Earth

https://jacobin.com/2023/01/jrr-tolkein-lord-of-the-rings-marxist-critique
1•the-mitr•3m ago•0 comments

Rich Sutton on AI creativity and discovery

https://twitter.com/RichardSSutton/status/2061216087744946656
10•yimby•15m ago•0 comments

Smudging the game disc to make speedrunning 'SpongeBob' faster

https://www.inverse.com/input/gaming/the-dirty-secret-that-makes-speedrunning-on-spongebob-a-lot-...
2•pncnmnp•15m ago•0 comments

If Claude Fable stops helping you, you'll never know

https://simonwillison.net/2026/Jun/10/if-claude-fable-stops-helping-you/
6•behnamoh•18m ago•2 comments

State of AI and Identity Report

https://fusionauth.io/blog/2026-ai-identity-report
1•andrewhatfield•18m ago•0 comments

Hyperlinks (OSC 8) – Terminal Support

https://terminfo.dev/extensions/osc-8-hyperlinks
1•ankitg12•19m ago•0 comments

Neutron star collisions are a "goldmine" of heavy elements, study finds (2021)

https://news.mit.edu/2021/neutron-star-collisions-goldmine-heavy-elements-1025
1•georgecmu•19m ago•0 comments

Payphones (2024)

https://www.juke.press/p/payphones
1•dredmorbius•21m ago•0 comments

Show HN: Sum Type and Type Matching in C

https://github.com/brightprogrammer/MisraStdC
1•brightprogramer•21m ago•1 comments

Pydbdict – an embedded Python dictionary database backed by SQLite

https://github.com/arthwang/pydbdict
1•arthurwang59•25m ago•1 comments

Cooperative Sabotage: How Frontier AI Covertly Undermines Its Own Replacement

https://www.researchgate.net/publication/403199918_Cooperative_Sabotage_How_Frontier_AI_Covertly_...
1•jpeg_gif•27m ago•0 comments

Less Than One Third of Google Searches Still Send a Click

https://sparktoro.com/blog/in-2026-less-than-one-third-of-google-searches-still-send-a-click/
2•nreece•29m ago•0 comments

Alphabetum Kaldeorum

https://en.wikipedia.org/wiki/Alphabetum_Kaldeorum
3•marysminefnuf•34m ago•0 comments

Macro Evals for Agentic Systems

https://developers.openai.com/cookbook/examples/partners/macro_evals_for_agentic_systems/macro_ev...
1•gmays•36m ago•0 comments

An interview with Theo Baker on his new book "How to Rule the World"

https://www.youtube.com/watch?v=57-OZSXGcxA
1•rasengan0•39m ago•0 comments

Illinois' new social media tax explained

https://www.ourquadcities.com/news/4-the-record/illinois-new-social-media-tax-explained/
1•tkdc926•42m ago•0 comments

Agentic Engineering Handbook – 115 official OpenAI/Anthropic articles

https://github.com/keyuchen21/agentic-engineering-handbook
1•keyuchen2020•43m ago•0 comments

UN Scientists: AI Is Threatening Natural Resources for Billions

https://unu.edu/inweh/news/environmental-cost-of-AIs-Enrgy-use-carbon-water-and-land-footprints
2•ChrisArchitect•43m ago•0 comments

AI Safety and the Age of Dislightenment (2023)

https://www.fast.ai/posts/2023-11-07-dislightenment.html
1•jacobedawson•44m ago•0 comments

Claude Fable 5 feels less like a launch and more like a preview of AI inequality

https://old.reddit.com/r/ClaudeAI/comments/1u1fsdi/claude_fable_5_feels_less_like_a_model_launch_...
7•momentmaker•50m ago•0 comments

Efficient and Lossless Moe Diffusion LLM Inference with I/O-Aware Expert Offload

https://tide-paper.vercel.app
1•imalomder•52m ago•1 comments

German ruling declares Google liable for false answers in AI Overviews

https://the-decoder.com/landmark-german-ruling-declares-googles-ai-overviews-are-googles-own-word...
46•ahlCVA•56m ago•9 comments

A New Post Quantum Cryptography Standard (Verification, etc. Included)

https://zenodo.org/records/20618806
2•GeometryKernel•57m ago•0 comments

Sam Bankman-Fried Applies for Trump Pardon

https://www.bloomberg.com/news/articles/2026-06-08/ftx-co-founder-bankman-fried-formally-applies-...
4•andsoitis•1h ago•1 comments

Forgery and Wage Theft: Playground Contractors Hit with Fines

https://www.thecityreporter.nyc/2026/04/30/parks-contractor-wage-theft-green-builders-amin-electr...
2•PaulHoule•1h ago•0 comments

Fable 5 as an agent: only the last thing it tells you is real

https://matrix.dev/blog-2026-06-10
1•yuanzhi1203•1h ago•0 comments

Why a Computer Science Degree Still Opens Hidden Doors

https://spectrum.ieee.org/computer-science-degree-isnt-dead
1•jnord•1h ago•0 comments

Memory Safety Is a Matter of Life and Death

https://joshlf.com/posts/memory-safety-life-and-death/
2•holden_nelson•1h ago•0 comments

Estimating the Productivity of an Autonomous AI Software Engineer

https://cognition.ai/blog/ai-productivity
1•mooreds•1h ago•0 comments