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?

The top,771 sites block at least one AI search crawler

https://ai-visibility.lastminutedealshq.com/sites-blocking-ai-search
1•reesecalder•29s ago•0 comments

Prototype graph-based social media

https://neui-connect.vercel.app?_vercel_share=f3VnOd8GCZwFxssgRBoj9FUXqHwg8hBC
1•Evanescia•1m ago•0 comments

O'Charley's

https://en.wikipedia.org/wiki/O%27Charley%27s
1•Bluestein•2m ago•0 comments

Apple, Please Open Up iOS

https://swapnilchauhan.com/blog/apple-please-open-up-ios/
1•swapxstar•3m ago•1 comments

Show HN: Xivizley – Visual Docker Compose and Homelab Architect

https://xivizley.com.tr
1•Xivizley•3m ago•0 comments

Reaction: "A Quick Look at Atomics in C"

https://informationalwayswin.blogspot.com/2026/09/reaction-quick-look-at-atomics-in-c.html
1•odilelof•8m ago•0 comments

Show HN: Liniora – Ever thought about replacing your project manager?

https://liniora.com
3•omarammura•11m ago•0 comments

"The CUDA Moat is Gone" – TechTechPotato with AI& founder David Bennet [video]

https://www.youtube.com/watch?v=TiRxcPQNcBA
3•olvy0•12m ago•0 comments

Experiment: How easy is it to buy a research paper on the black market?

https://news.err.ee/1610129869/experiment-how-easy-is-it-to-buy-a-research-paper-on-the-black-market
4•jruohonen•13m ago•0 comments

OpenRGB 1.0 Released

https://openrgb.org/
2•MattTheRealOne•15m ago•0 comments

Show HN: Rust-split – save your tokens on large Rust source files

4•owebeeone•16m ago•1 comments

Build with Replit Against Managed Postgres in Databricks Apps

https://docs.replit.com/updates/2026/09/11/changelog
1•utiiiD•17m ago•0 comments

Journal Editors: How are you evaluating AI assisted papers?

https://mathoverflow.net/questions/515144/journal-editors-how-are-you-evaluating-ai-assisted-papers
1•jjgreen•19m ago•0 comments

We're All Going to Die

https://www.noahpinion.blog/p/heres-how-were-all-going-to-die
2•throw0101a•20m ago•0 comments

Karaoke for one: China's $1T 'loneliness economy'

https://www.cnn.com/2026/09/12/business/asia-loneliness-economy-intl-hnk-dst
1•michaelsbradley•21m ago•0 comments

Overshoot: The World Is Hitting Point of No Return on Climate

https://e360.yale.edu/features/1.5-degrees-tipping-points
2•throw0101a•22m ago•0 comments

Hydra

https://en.wikipedia.org/wiki/Hydra_(genus)
1•tosh•23m ago•0 comments

Show HN: Parallel Coding Agents on Mobile

https://github.com/PlathsOven/maestro
4•Entropnt•23m ago•0 comments

Show HN: Email Client with Backups

https://mailvaultapp.com/
1•spacecash21•23m ago•0 comments

AI changing the calculus for Canadian students interested in comp sci

https://www.theglobeandmail.com/canada/article-ai-computer-science-students-and-schools-that-hope...
3•AnodicElegy•26m ago•1 comments

Fresh: Terminal based IDE and text editor: easy, powerful and fast

https://github.com/sinelaw/fresh
2•linkdd•26m ago•0 comments

TinyEMU is a system emulator for the RISC-V and x86 archs

https://github.com/dearchap/tinyemu
2•Bluestein•28m ago•0 comments

ProLogium begins mass production of solid-state battery at 381 Wh/kg

https://finance.yahoo.com/energy/articles/prologium-begins-mass-production-high-070000793.html
2•akamaka•28m ago•0 comments

HTTPS Everywhere?

https://blog.altos.au/post/https-everywhere/
1•meetpateltech•30m ago•0 comments

Subjective reports and visual targets during attempted out-of-body experiences

https://www.sciencedirect.com/science/article/abs/pii/S1550830726001941?via%3Dihub
2•bookofjoe•35m ago•0 comments

Here Comes the Sun

https://granta.com/here-comes-the-sun/
1•jruohonen•37m ago•1 comments

Show HN: TattooPreview AI – a planning workflow for tattoo artist conversations

https://tattoopreviewai.com
2•robot1996•40m ago•0 comments

Show HN: I wrote a book on using AI in game design production (free on GitHub)

https://github.com/eremes81/game-design-ai-practice-en
3•eremes81•41m ago•0 comments

Fuck it, make it anyway

https://www.joelotter.com/posts/2026/09/make-it-anyway/
53•JayOtter•43m ago•18 comments

Dimit – warm a Mac screen to pure red and pin the backlight against PWM

https://github.com/azakapro/dimit
2•azakapro•44m ago•0 comments