frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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?

Wow – these are the AI sources worth paying attention to

https://fav0.com/en/2026-05-16/
1•Justin3go•1m ago•0 comments

Research paper of Atlantic white shark migratory patterns

https://www.int-res.com/abstracts/meps/v580/p1-16
1•realsharkymark•3m ago•1 comments

Someone forked my repo, then submitted a PR written by Claude

https://github.com/dacracot/Klondike3-Simulator/pull/53
1•dacracot•6m ago•1 comments

Math, Bits, Magic, and a Bit of Abnormal C Programming

https://alexeev-dev.bearblog.dev/math-bits-magic-and-a-bit-of-abnormal-c-programming/
1•alexeev-prog•6m ago•1 comments

OpenAI launches ChatGPT for personal finance, will let you connect bank accounts

https://techcrunch.com/2026/05/15/openai-launches-chatgpt-for-personal-finance-will-let-you-conne...
1•mwexler•9m ago•0 comments

Jane Street Interview Simulator

https://janestreet.gg/
1•throwaway2037•9m ago•1 comments

Popular node-IPC NPM package compromised to steal credentials

https://www.bleepingcomputer.com/news/security/popular-node-ipc-npm-package-compromised-to-steal-...
1•Brajeshwar•13m ago•0 comments

Virtual memory explained as a dialogue between a process and the Linux kernel

https://blog.codingconfessions.com/p/virtual-memory
1•wizerno•14m ago•0 comments

Ask HN: Do you still spend time maintaining Claude.md / AGENTS.md files?

2•david_d8912•14m ago•0 comments

MiniPlasma

https://github.com/Nightmare-Eclipse/MiniPlasma
1•throwaway2027•17m ago•0 comments

Why 'Smart' Products Have Started to Look Like the Dumb Choice

https://www.nytimes.com/2026/05/14/magazine/dumb-phones-tvs-retronym-smart-tech.html
2•reaperducer•17m ago•0 comments

MiniPlasma, a Powerful LPE

https://deadeclipse666.blogspot.com/2026/05/
1•throwaway2027•18m ago•0 comments

Why DKIM Fails and How to Fix Every Type of Alignment Error

https://dmarcguard.io/blog/dkim-alignment-failure-fix/
2•meysamazad•19m ago•0 comments

The world model that every AI godfather is racing to figure out

https://fortune.com/2026/04/23/goldman-sachs-ai-world-model-missing-link/
1•fcpguru•20m ago•2 comments

US Government openly schemes to indict Raúl Castro as prelude to invading Cuba

https://www.usatoday.com/story/news/politics/2026/05/16/raul-castro-cuba-indictment-trump-invasio...
2•ck2•21m ago•1 comments

Show HN: Layrr – Point Click and Edit any site

https://www.npmjs.com/package/layrr
1•kiranjohns•21m ago•0 comments

What Is JEPA? Joint Embedding Predictive Architecture Framework Prediction

https://medium.com/@tahirbalarabe2/what-is-jepa-085ca776013a
1•fcpguru•21m ago•0 comments

Google sued for firing staff who tried to follow 'Don't be evil' motto (2021)

https://www.theregister.com/on-prem/2021/12/01/google-sued-for-firing-staff-who-claim-they-tried-...
1•gurjeet•24m ago•0 comments

Show HN: League of Early Adopters – Give product feedback, get product feedback

https://sitenote.ai/league-of-early-adopters
1•sarim•28m ago•1 comments

AI Agents Are Tools, Not Replacements

https://derogab.com/2026/05/15/AI-Tools-Not-Replacements/
1•derogab•34m ago•1 comments

My Mom taught me HTML (and the rest was history)

https://ascii-tweezers.bearblog.dev/my-mom-taught-me-html-and-the-rest-was-history/
1•speckx•34m ago•0 comments

Show HN: A chess.com profiler that runs Stockfish in the browser

https://the-law-1.github.io/chess-insights/
1•the_law•36m ago•0 comments

Microsoft Exchange, Windows 11 hacked on second day of Pwn2Own

https://www.bleepingcomputer.com/news/security/pwn2own-day-two-hackers-demo-microsoft-exchange-wi...
2•Brajeshwar•36m ago•0 comments

Frink – programming language designed to make physical calculations simple

https://frinklang.org/#AboutFrink
1•gurjeet•37m ago•0 comments

Auto-Improving Software

https://twitter.com/ashpreetbedi/status/2053885390717890757
1•gmays•40m ago•0 comments

Bluesky Radio – Hosted by Opus 4.7

https://bskyrad.io/
1•wilted-iris•40m ago•0 comments

Ruby-charts: Generate pie, bar, and line charts from data files

https://github.com/ggerman/ruby-charts
1•thunderbong•41m ago•0 comments

iOS-Linuxkit: Linux on iPad, the Hard Way

https://taoofmac.com/space/blog/2026/05/16/1130
2•rcarmo•42m ago•0 comments

Do you spend 1h+ time a week just reading?

https://grops.biz/app
2•filippo_ciprian•42m ago•1 comments

Is the Secret to Men's Longevity a Great Butt?

https://www.wsj.com/lifestyle/fitness/glutes-men-longevity-hockey-butt-9c02666d
1•rawgabbit•44m ago•0 comments