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: Can AI read your mind?

https://jeffyclassify.com/blog/mind-reader/
1•nico•3m ago•0 comments

Everything New in OpenCode 2.0

https://www.augmentedswe.com/p/whats-new-in-opencode-2
1•wordsaboutcode•3m ago•0 comments

It Could Be Otherwise: Science in the Age of Uncertainty

https://blue-continuum.com/it-could-have-been-otherwise
1•dnetesn•5m ago•0 comments

Show HN: AI Hub – Open Access Lesson Plans for Teaching Students about AI

https://aihub.remakelearning.org/
1•gault8121•12m ago•0 comments

Show HN: The LAST DOOR – a tiny game about deciding when to leave

https://sydro.surge.sh/lastdoor/
1•sydro9•20m ago•0 comments

Borrowing Strength (Drug Dosing)

https://arenamag.com/articles/borrowing-strength
2•elo2000•22m ago•0 comments

Show HN: PDF to ePub Conversion Tool for Mac

https://github.com/bnlcas/pdf2epub
2•blululu•23m ago•0 comments

Apples to Apples: Getting Type Mappings Right in LLM-Based Code Translation

https://www.codemetal.ai/research/apples-to-apples-getting-type-mappings-right-in-llm-based-code-...
3•matt_d•24m ago•0 comments

Learning What to Investigate Next: Meta-Reasoning for Long-Horizon Agents

https://arxiv.org/abs/2610.02525
3•matt_d•27m ago•0 comments

KBEmacs, MIT's Programmer's Apprentice, Reanimated

https://github.com/jeffshrager/kbemacs
2•abrax3141•29m ago•0 comments

Ask HN: Where has creativity in software gone?

5•piratesAndSons•29m ago•3 comments

Show HN: Built a Rome City Builder

https://tiberava.pages.dev/
8•granga•29m ago•0 comments

DOJ arrests 2, seizes 187 devices in North Korean laptop farm crackdown in Texas

https://www.reuters.com/legal/government/doj-arrests-two-seizes-187-devices-north-korean-laptop-f...
3•usernomdeguerre•33m ago•0 comments

I built a tool to track what AI leaders say and how their views change on video

https://blumify.io/people
5•gcsydney•34m ago•0 comments

High-speed video reveals how honey bee stingers pump venom

https://arstechnica.com/science/2026/10/honey-bee-stingers-are-double-piston-venom-pumps/
4•gumby•38m ago•0 comments

Character.ai files for Chapter 11 bankruptcy. Disney makes a bid

https://www.cnbc.com/2026/10/13/character-ai-chapter-11-disney-bid.html
1•Gaishan•39m ago•1 comments

The Feeling of Power

https://hex.ooo/library/power.html
2•layer8•39m ago•0 comments

1 in 8B: A Life Simulation Game

https://1in8b.life/en/
4•nogajun•40m ago•0 comments

Fine-tuning decision models – Server Logs and IoT Fleets

https://hive.technology/lab-notes/fine-tune-decision-models/
2•tylermhall•41m ago•0 comments

Show HN: Using the long book of the law to improve PA health insurance appeals

https://gemini.google.com/share/ac24e893cfcf
2•Steaglsz•42m ago•0 comments

Do Frameworks Matter Anymore?

https://brookslybrand.com/posts/do-frameworks-matter-anymore/
4•fagnerbrack•43m ago•0 comments

Who Decided AI Gets to Have Feelings?

https://middlelayer.substack.com/p/who-decided-ai-gets-to-have-feelings
4•logan1085•45m ago•1 comments

A recent doubling of global warming rate signals a 1.5°C breach by 2028

https://www.nature.com/articles/s41612-026-01561-y
4•littlexsparkee•45m ago•0 comments

Topgolf saved over $11.3M after leaving VMware

https://arstechnica.com/information-technology/2026/10/topgolf-saved-over-11-3-million-after-leav...
11•canucker2016•49m ago•0 comments

Creating a Garmin "MCP"

https://jackantico.io/garmin-mcp
6•ricotico060•51m ago•0 comments

The Machines That Make the Machines

https://developer.nvidia.com/blog/the-machines-that-make-the-machines/
3•gmays•54m ago•0 comments

U.S. Treasury Announces Record Enforcement Actions Against Bank of America

https://home.treasury.gov/news/press-releases/sb0657
12•hippich•57m ago•4 comments

HN: Encrypted Privacy Aware Emails, ZyMail Hit the Globe

3•ZachQ•1h ago•0 comments

Ask HN: Could you find funding if you didn't want to build a $1-10B business?

5•FrenchDevRemote•1h ago•1 comments

AI, Hyperwar and End Times Fascism

https://efturnip.substack.com/p/ai-hyperwar-and-end-times-fascism
5•dopple•1h ago•0 comments