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?

Too Early, Too Alone: France Prepares for Russia as US Withdraws

https://www.politico.com/news/magazine/2025/12/21/france-europe-security-trump-00700889
1•Bondi_Blue•2m ago•0 comments

The Doomers Feel Undeterred

https://www.obsolete.pub/p/the-doomers-feel-undeterred-my-latest
1•gmays•3m ago•0 comments

In which our protagonist dreams of laurels (and how we lost with FOSS)

https://wingolog.org/archives/2025/12/17/in-which-our-protagonist-dreams-of-laurels
1•laurex•8m ago•0 comments

Thirteen years of Rust and the birth of Rue

https://steveklabnik.com/writing/thirteen-years-of-rust-and-the-birth-of-rue/
1•steveklabnik•11m ago•0 comments

Go Gray, Not Cray: Why You Should Grayscale Your Phone

https://sami.eljabali.org/go-gray-not-cray-why-you-should-grayscale-your-phone/
1•samieljabali•13m ago•0 comments

I 3D Printed Origami [video]

https://www.youtube.com/watch?v=FNVBK7-h9Fs
1•yboris•14m ago•0 comments

How to Ship Confidently When Your Back End Makes Things Up

https://bits.logic.inc/p/how-to-ship-confidently-when-your
1•sgk284•15m ago•0 comments

Show HN: Latameo – exploring what it's like to live in Latin American cities

https://latameo.com/explore
1•batels•17m ago•0 comments

Michaelmas

https://en.wikipedia.org/wiki/Michaelmas
1•pinkmuffinere•18m ago•0 comments

Weight loss jabs: What happens when you stop taking them

https://www.bbc.com/news/articles/cn98pdpyjz5o
3•neom•18m ago•0 comments

Can I offer "login with yahoo" using FusionAuth?

https://fusionauth.io/community/forum/topic/3013/can-i-offer-login-with-yahoo-using-fusionauth
1•mooreds•19m ago•0 comments

An open-source screening platform accelerates discovery of drug combinations

https://www.nature.com/articles/s41467-025-66223-8
1•XzetaU8•20m ago•0 comments

Lemon-Shaped World Is the Most Stretched-Out Planet Ever Seen

https://www.nytimes.com/2025/12/18/science/lemon-planet-pulsar-webb.html
1•asib•22m ago•0 comments

Celebrating 10 Years of DirectX 12

https://devblogs.microsoft.com/directx/celebrating-10-years-of-directx-12/
3•ibobev•23m ago•0 comments

Concluding thoughts on our deep dive into Windows clipboard text conversion

https://devblogs.microsoft.com/oldnewthing/20251218-00/?p=111882
1•ibobev•24m ago•0 comments

The Windows clipboard automatic text conversion algorithm is path-dependent

https://devblogs.microsoft.com/oldnewthing/20251215-00/?p=111869
1•ibobev•24m ago•0 comments

What went wrong when I matchmade my friends

https://chrislakin.blog/p/matchmade
1•nowflux•24m ago•0 comments

Rules for Reading the Epstein Files

https://www.politico.com/news/magazine/2025/12/19/rules-how-to-read-jeffrey-epstein-files-column-...
1•Tomte•25m ago•0 comments

500 Hours of vibe coding: LLMs fight my coding standards at every turn

https://porridgeai.blogspot.com/2025/12/adventures-with-vibes.html
1•porridge0ats•30m ago•0 comments

Show HN: Build apps with 500 models locally. No tracking, no cloud, just code

https://github.com/codinit-dev/codinit-dev
4•Gerome24•30m ago•0 comments

Fallacies advocating software bloat

http://sininenankka.dy.fi/leetos/swbloat.php
2•marttt•31m ago•0 comments

What even are Cloudflare Durable Objects?

https://boristane.com/blog/what-are-cloudflare-durable-objects/
1•NicoJuicy•32m ago•0 comments

Show HN: Twitch Plays Claude – Crowd-controlled live coding experiment

https://www.twitch.tv/artix187
2•Artix187•33m ago•1 comments

Show HN: 12k+ Nano Banana Pro Prompts Organized in One Place

https://www.picsprompts.com/
2•moobuilds•35m ago•0 comments

Utah homeless campus takes shape

https://www.ksl.com/article/51408869/utah-has-a-grand-vision-for-homeless-campus-but-plans-ambigu...
1•gscott•35m ago•1 comments

Show HN: An authority gateway that controls AI actions before they execute

https://github.com/malukutty/ai_authority_gateway
1•bhaviav100•37m ago•0 comments

Foundation Models for Scientific Discovery and Innovation

https://www.nationalacademies.org/publications/29212
1•Anon84•38m ago•0 comments

Show HN: Building a 2D Platformer Video Game on an Oscilloscope

https://cameronbryzek.com/projects/oscilloscope-platformer
2•michaelbryzek•38m ago•0 comments

Show HN: Tooly – Developer tools without the ad clutter

https://www.tooly.one/
1•hengery•41m ago•0 comments

Live cameras are tracking faces in New Orleans. Who should control them?

https://www.npr.org/2025/12/16/nx-s1-5616681/new-orleans-live-facial-recognition-surveillance
2•measurablefunc•45m ago•1 comments