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•11mo ago

Comments

nine_k•11mo 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•11mo ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•11mo ago
They mention this in the article.
spockz•11mo ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•10mo ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•11mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•11mo 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•11mo 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•11mo 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•11mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•11mo ago
This was very well written. Excellent article!
NetOpWibby•11mo ago
Is this like MessagePack for Haskell?

What 1k Days of Wordle API Data Reveals About How People Play

https://www.garbagecollected.dev/p/i-had-a-simple-question-about-wordle
1•ee64a4a•2m ago•0 comments

Natt Brittin: Ex-Google boss confirmed as new BBC director general

https://www.bbc.com/news/articles/cjd97evn2gko
1•theanonymousone•2m ago•0 comments

Tell HN: Hawaiian Airlines app showing someone else's flight info

1•HoldOnAMinute•4m ago•0 comments

Paper Tape Is All You Need – Training a Transformer on a 1976 Minicomputer

https://github.com/dbrll/ATTN-11
1•rahen•4m ago•0 comments

The Brigade System Helps Restaurants Succeed. Does It Also Lead to Abuse?

https://www.nytimes.com/2026/03/25/dining/noma-brigade-system.html
1•ripe•5m ago•0 comments

Before Leon AI 2.0, I want to say this

https://blog.getleon.ai/before-leon-ai-2-0-i-want-to-say-this/
1•Louistiti•6m ago•1 comments

Show HN: Let Me Emoji That for You

https://letmeemojithatforyou.com
1•kilroy123•8m ago•0 comments

I said code review was dead. Here's what I got wrong – and right

https://www.aviator.co/blog/code-review-dead/
1•tonkkatonka•8m ago•1 comments

Agent-browser – Browser automation CLI

https://agent-browser.dev/commands
2•kristianpaul•10m ago•0 comments

Building an AI Data Analyst Sucks

https://getbruin.com/blog/build-your-own-ai-data-analyst/
1•karakanb•11m ago•0 comments

Code Review usage will count toward Codex limit instead of having separate limit

https://help.openai.com/en/articles/12642688-using-credits-for-flexible-usage-in-chatgpt-freegopl...
2•jeremyg22•11m ago•0 comments

Show HN: Building an open-source product demo platform

https://livedemo.ai
1•gapostolov•12m ago•2 comments

Children of Heaven

https://spontaneousoddities.substack.com/p/children-of-heaven
2•surprisetalk•16m ago•0 comments

Microscope Light

https://mitxela.com/projects/microlight
1•surprisetalk•16m ago•0 comments

"Roadrunner": a bipedal, wheeled robot for multi-modal locomotion [video]

https://www.youtube.com/watch?v=9kae-UAME1U
1•surprisetalk•16m ago•0 comments

macOS Tips (2024)

https://blog.xoria.org/macos-tips/
2•surprisetalk•16m ago•1 comments

Show HN: New Hacker News Watchlists Crome Extension

https://chromewebstore.google.com/detail/hn-watchlists-hacker-news/hecdejfkdohajgcfmgekpbjhkoaohplg
1•losalah•16m ago•0 comments

The Casino That's Eating the World

https://www.nytimes.com/2026/03/23/opinion/prediction-markets-gambling.html
1•ChrisArchitect•18m ago•1 comments

NASA Sets Out New Plans and Timelines for Moon Base and Nuclear Mars Mission

https://www.nytimes.com/2026/03/24/science/nasa-moon-base-mars-spacecraft.html
1•Brajeshwar•18m ago•0 comments

Show HN: I build a free feed reader that reimagines what is possible with RSS

https://hypertexting.com/blog/introducing-hypertexting/
1•calebhailey•18m ago•0 comments

An Extensive Benchmark of C and C++ Hash Tables

https://jacksonallan.github.io/c_cpp_hash_tables_benchmark/
3•klaussilveira•19m ago•0 comments

My quest to preserve VHS- era gaming culture, one eBay bid at a time

https://www.theguardian.com/games/2026/mar/25/my-quest-to-preserve-vhs-era-video-culture-one-ebay...
1•toomuchtodo•19m ago•0 comments

The best design style extraction and reuse skill on the market.

https://github.com/zanwei/design-dna
1•Johnson8053•20m ago•0 comments

I Put a Full JVM Inside a Browser Tab. It "Works". Technically. Eventually

https://bmarti44.substack.com/p/i-put-a-full-jvm-inside-a-browser
1•PaulHoule•21m ago•0 comments

Supreme Court Sides with Cox in Copyright Fight over Pirated Music

https://www.nytimes.com/2026/03/25/us/politics/supreme-court-cox-music-copyright.html
25•oj2828•21m ago•4 comments

I built a game where an AI judges whether things deserve each other

https://yoursoulmateis.wtf
1•edgardou•22m ago•1 comments

Malicious Litellm 1.82.8: Credential Theft and Persistent Backdoor

https://safedep.io/malicious-litellm-1-82-8-analysis/
1•alokDT•22m ago•0 comments

I built a YAML DSL for Temporal workflows

https://zigflow.dev/articles/why-i-built-a-yaml-dsl-for-temporal-workflows/
1•mrsimonemms•22m ago•0 comments

A Rare Blog

https://andys.blog/rare/
1•andytratt•22m ago•0 comments

Comprehensive C++ Hashmap Benchmarks (2022)

https://martin.ankerl.com/2022/08/27/hashmap-bench-01/
2•klaussilveira•22m ago•0 comments