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?

I tested the viral "antigravity drive" claims against published physics

https://github.com/Montblanctech/ehd-thrust-verification
1•MontblancTech•4m ago•0 comments

Chat Wells, an Internet Masquerade

https://stuff.kyleperik.com/chatwells/
1•kyleperik•5m ago•1 comments

Emacs 31.1 RC1 is available

https://lists.gnu.org/archive/html/emacs-devel/2026-08/msg00599.html
1•ixsploit•5m ago•0 comments

Poll showing Bass leading Raman by double digits was bogus "social experiment"

https://www.msn.com/en-us/news/news/poll-showing-bass-leading-raman-by-double-digits-was-bogus-co...
2•ilamont•8m ago•0 comments

Weird Machines in Transport Layer Security

https://arxiv.org/abs/2608.13685
3•sbulaev•13m ago•0 comments

What If I Told You Humans Are Moving Faster Than AI?

https://medium.com/freedomofthought/what-if-i-told-you-humans-are-moving-faster-than-ai-833441f3fb21
2•raynchad•18m ago•0 comments

Why It Hasn't Happened Yet: Capable AI and Malicious Intent

https://substack.norabble.com/p/why-it-hasnt-happened-yet
2•nedruod•25m ago•0 comments

Niu Lai – a two-person animated film becomes an unlikely hit in China [video]

https://www.youtube.com/watch?v=5XdeI0cOWSs
1•gregzeng95•30m ago•0 comments

Expert Witness to ChatGPT "Show how 3M is 0 percent at fault"

https://www.404media.co/show-how-3m-is-0-at-fault-expert-witness-used-chatgpt-to-write-report-def...
2•kristjansson•35m ago•0 comments

Using Starlink's Satellites to Study Earth's Upper Atmosphere

https://hackaday.com/2026/08/17/using-starlinks-satellites-to-study-earths-upper-atmosphere/
1•toomuchtodo•39m ago•0 comments

When it comes to LLM, it's you who's using it wrong

https://www.vinoth.net/llm-wrong
1•avinoth•40m ago•0 comments

San Diego 150 Years Ago: Rare AI Reconstruction Visuals [video]

https://www.youtube.com/watch?v=qWaR_nc5sKM
2•latchkey•41m ago•0 comments

PineNote and PineTab2 are estimated to run out of stock in three months

https://social.treehouse.systems/@pine64/117111063654864544
1•dredmorbius•45m ago•1 comments

Beyond WASI: Running any Rust application in the browser with BrowserPod 3.0

https://labs.leaningtech.com/blog/browserpod-rust
1•corv•45m ago•0 comments

The Large Hadron Collider: 1984 – 2017

https://timeline.web.cern.ch/timeline-header/93
1•andsoitis•46m ago•0 comments

Missed shifts were costly to this McDonald's. An app has fixed the problem

https://text.npr.org/nx-s1-5893721
2•williadc•54m ago•0 comments

Sick of A.I. Slop? So Are Tech Giants

https://www.nytimes.com/2026/08/17/technology/ai-slop.html
1•uxhacker•57m ago•0 comments

Show HN: An open source alternative to Google's Critique

https://twigg.vc
1•andrebianchessi•58m ago•0 comments

USS Benfold Stalled and Lost Power in the South China Sea for Four Days

https://news.usni.org/2026/08/14/uss-benfold-was-stalled-in-the-south-china-sea-for-four-days-aft...
4•Gaishan•59m ago•0 comments

Columbia House Is Shutting Down

https://pitchfork.com/story/columbia-house-is-shutting-down/
5•ChrisArchitect•1h ago•2 comments

Fires on the Plain: Both Ends Burning (2007)

https://www.criterion.com/current/posts/473-fires-on-the-plain-both-ends-burning
1•cocacola1•1h ago•0 comments

Show HN: An n8n-like orchestration toolkit for DeepSeek harnesses

https://github.com/ahamoment-101/Open-DeepSeek-Harness-Desktop
1•darrenzhang•1h ago•0 comments

Creepy Insurers?

https://matthewekahn.substack.com/p/creepy-insurers
1•NomNew•1h ago•0 comments

I built an app that hides encrypted messages inside normal emojis

https://apps.apple.com/us/app/imp-secret-messages/id6794774885
1•oliverhann•1h ago•0 comments

California's new tire efficiency rules could save drivers $1B a year

https://grist.org/transportation/californias-new-tire-efficiency-rules-could-save-drivers-1b-a-year/
14•littlexsparkee•1h ago•19 comments

25 Years of Haiku: From "Ok, Let's Start" to the Present

https://www.desktoponfire.com/haiku_inc/969/25-years-of-haiku/
5•fork-bomber•1h ago•2 comments

Google plans to stop making Pixel products in China in 2027

https://asia.nikkei.com/spotlight/supply-chain/exclusive-google-plans-to-stop-making-pixel-produc...
2•spenvo•1h ago•0 comments

Help Peer

https://www.seangoedecke.com/help-peer/
3•gfysfm•1h ago•0 comments

Show HN: Honeymatcha.io connect your Grok bots for dating, meetups, anything

https://honeymatcha.io
2•JaiRathore•1h ago•1 comments

Show HN: Build beautiful web apps faster with UiSvelte

https://github.com/sappsdev/ui-svelte
1•victorriba•1h ago•0 comments