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

Comments

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

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

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

The DC-ROMA II is the fastest RISC-V laptop and is odd

https://www.jeffgeerling.com/blog/2025/dc-roma-ii-fastest-risc-v-laptop-and-odd
1•ingve•2m ago•0 comments

Ask HN: Numerical Implementation in New Language?

1•keepamovin•3m ago•0 comments

Sam Altman issues 'code red' at OpenAI as ChatGPT contends with rivals

https://www.theguardian.com/technology/2025/dec/02/sam-altman-issues-code-red-at-openai-as-chatgp...
1•PaulHoule•8m ago•0 comments

Infomaniak launches a free and sovereign AI

https://euria.infomaniak.com/
1•pm-security•8m ago•1 comments

Contestants fight polar bears and snakes in new AI reality show

https://www.thetimes.com/uk/media/article/non-player-combat-ai-reality-show-mh95fkkmj
1•petethomas•9m ago•0 comments

AI Dominance Plans Threatened by Administration Own Attacks on Solar, Wind Power

https://www.bloomberg.com/news/articles/2025-12-04/trump-s-ai-dominance-plans-threatened-by-his-o...
2•zekrioca•11m ago•1 comments

Orderzup best shipping aggregator in India launching soon

1•orderzup•12m ago•0 comments

Current tech scenario in Miami and future potential?

1•samyadn12•13m ago•0 comments

Over 12,000 Startup Ideas Right Here

https://startupideasdb.com
1•suhaspatil101•15m ago•0 comments

Trump greenlights Nvidia H200 AI chip sales to China if U.S. gets 25% cut

https://www.cnbc.com/2025/12/08/trump-nvidia-h200-sales-china.html
1•mgh2•17m ago•0 comments

Swipe File: Save and Share Ad Inspirations Efficiently

https://denote.net/swipe-file
1•MiaTaylor•17m ago•0 comments

Longplayer: A thousand-year-long composition turns 25 (2024)

https://longplayer.org/news/2024/12/31/a-thousand-year-long-composition-turns-25/
1•1659447091•19m ago•0 comments

Show HN: Zonformat– 35–60% fewer LLM tokens using zero-overhead notation

https://zonformat.org
1•ronibhakta•25m ago•0 comments

The reality of living overseas [video]

https://www.youtube.com/watch?v=tvcWuqKhsGg
2•keepamovin•29m ago•1 comments

I built a tiny API that detects champion loss in B2B SaaS

https://github.com/malukutty/champion-drift-detector-api
1•bhaviav100•29m ago•1 comments

It Is Possible to Import PST Contacts into My Android Phone

1•JonaScott•29m ago•0 comments

Solving SQL Bolt

https://www.youtube.com/watch?v=QvVePlwTa14
1•implabinash•30m ago•1 comments

A.I. Videos Have Flooded Social Media. No One Was Ready

https://www.nytimes.com/2025/12/08/technology/ai-slop-sora-social-media.html
1•insane_dreamer•31m ago•2 comments

Show HN: I built a "Netflix-grade" retro game player for the browser(React+WASM)

https://github.com/muditjuneja/koin-deck-retro-player
1•beingmudit•36m ago•0 comments

My Apple notes should've been my journal

1•lolisimus•38m ago•0 comments

DHH and Open Source

https://ma.tt/2025/12/dhh-open-source/
6•software_writer•43m ago•0 comments

How Bad is Dialup Internet in 2025? [video]

https://www.youtube.com/watch?v=T-qyNFjZaQs
1•pabs3•46m ago•0 comments

Australia's social media ban for children has left big tech scrambling

https://www.bbc.com/news/articles/ce86381p70eo
3•tartoran•50m ago•0 comments

Brain activity changes throughout the day

https://news.umich.edu/how-brain-activity-changes-throughout-the-day/
1•XzetaU8•54m ago•0 comments

Forkable Swaps in AI generated food images for its catering partners

https://sf.eater.com/restaurant-news/210033/forkable-ai-generated-food-photos-catering
1•forthwall•56m ago•0 comments

Artificial Intelligence Index Report (2025) [pdf]

https://hai.stanford.edu/assets/files/hai_ai_index_report_2025.pdf
1•saikatsg•58m ago•0 comments

AI and recruitment: Are we in a race to the bottom?

https://www.bbc.com/news/articles/ced6jv76091o
1•1659447091•1h ago•0 comments

More proof of how good Gemini Live is [video]

https://www.youtube.com/shorts/XJufw4jPJ1w
2•sin4ch•1h ago•0 comments

Erdős Problem #1026

https://terrytao.wordpress.com/2025/12/08/the-story-of-erdos-problem-126/
2•cgdl•1h ago•0 comments

Australia's peak mental health groups didn't want the teen social media ban

https://www.crikey.com.au/2025/12/09/teen-social-media-ban-experts-concerns-suicide-content/
1•defrost•1h ago•1 comments