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

Comments

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

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

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

KPop Demon Hunters Is TIME's 2025 Breakthrough of the Year

https://time.com/7338690/breakthrough-of-the-year-2025-kpop-demon-hunters/
1•teleforce•20s ago•0 comments

From macOS to Debian: A Two-Week Experiment

https://bluelemonbits.com/2026/01/02/from-macos-to-debian-a-two-week-experiment/
1•marcmv•1m ago•0 comments

Legit Ways to Make Extra Money Online

https://financeentro.com/2026/01/02/10-legit-ways-to-make-extra-money-online/
1•makix•3m ago•0 comments

The era of single-threaded human productivity is over

https://pocketarc.com/articles/the-era-of-single-threaded-human-productivity-is-over
1•pocketarc•6m ago•0 comments

Slow Dopa

https://www.profgalloway.com/slow-dopa-2/
1•Brajeshwar•7m ago•0 comments

Minimax

https://en.wikipedia.org/wiki/Minimax
1•suioir•7m ago•0 comments

Opsec Guide BTS

https://bfswa.substack.com/p/opsec-guide-bts
1•speckx•8m ago•0 comments

Show HN: Agents UI – open-source macOS terminal for AI coding agents, zellij/SSH

https://agents-ui.com
1•padho•9m ago•0 comments

Kling Motion Control AI

https://motion-control.io
1•sinpor1•9m ago•0 comments

Show HN: A standalone server for probabilistic data structures written in Go

https://github.com/benitolopez/pds
1•lopezb•10m ago•1 comments

HLS Entry-Level Adventure: Delivering Video to Your Phone Like Food Delivery

https://m3u8-player.net/en/blog/hls-beginners-guide/
1•wangneo276•10m ago•0 comments

What 50 Milliseconds Feels Like, ADHD involves a faster internal clock

https://vectorculture.substack.com/p/the-subjective-density-of-time-determines
1•obiefernandez•11m ago•0 comments

MiG in the Middle

https://www.dlab.ninja/2012/04/mig-in-middle.html
1•yubblegum•11m ago•0 comments

A Bluesky-to-Slack thread unroller

https://github.com/rajbot/bluesy-slack-thread-unroller
1•ohjeez•13m ago•0 comments

Taiwan's £7.5T secret weapon is disintegrating

https://www.telegraph.co.uk/world-news/2026/01/02/taiwans-75tn-silicon-shield-is-disintegrating
2•g-b-r•13m ago•1 comments

2025, the year we took the red pill

https://unherd.com/2025/12/2025-the-year-we-took-the-red-pill/
3•voxleone•18m ago•0 comments

Best Stack for a SaaS in 2026

https://forum.pragmaticentrepreneurs.com/t/meilleure-stack-pour-un-saas-en-2026-services-framewor...
1•todsacerdoti•18m ago•0 comments

Vibe Coding Killed Cursor

https://ischemist.com/writings/long-form/how-vibe-coding-killed-cursor
1•hiddenseal•19m ago•0 comments

Ask HN: How to Visualize Logical Block Addressing?

1•shivajikobardan•20m ago•0 comments

What happened in Q4 in my personal project

https://blog.with.audio/posts/q4-2025-withaudio-updates
1•OfflineSergio•21m ago•1 comments

I did 301,432 flashcard reviews in 2025

https://www.natemeyvis.com/i-did-301432-flashcard-reviews-in-2025/
1•Theaetetus•21m ago•0 comments

Why do Americans hate A.I.?

https://www.nytimes.com/2026/01/02/briefing/why-do-americans-hate-ai.html
3•roxolotl•23m ago•1 comments

Ruby2JS is an extensible Ruby to modern JavaScript transpiler

https://www.ruby2js.com/
1•Kerrick•24m ago•0 comments

YC, Enough with political and financial news. More Hacker News please (2008)

https://hackerbook.dosaygo.com/?view=item&p=1&id=311049
2•keepamovin•24m ago•0 comments

Why Nearly Every Apple Has a Sticker–and What That Tiny Label Does

https://www.seriouseats.com/why-do-fruit-stickers-exist-11874523
1•acdanger•25m ago•0 comments

Fork Yeah: We're keeping ingress-Nginx alive

https://www.chainguard.dev/unchained/keeping-ingress-nginx-alive
1•debdolph•26m ago•0 comments

Show HN: OpenSSPM

https://github.com/open-sspm/open-sspm
1•thesardorbek•27m ago•0 comments

The Cost of Software Libraries

https://posts.cgamedev.com/p/the-hidden-cost-of-software-libraries
2•colejohnson66•28m ago•0 comments

Wikipedia's most-read pages reveal our shared curiosities

https://www.not-ship.com/wikipedi/
1•Nitrolo•28m ago•0 comments

What I Want to Say in Interviews

https://nelson.cloud/what-i-actually-want-to-say-in-tech-interviews/
3•nelsonfigueroa•29m ago•0 comments