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?

Show HN: Genbuzz – An agent-driven news aggregator for AI filmmaking

https://genbuzz.news
1•yobfountain•33s ago•0 comments

Can BitMine's $213M Ethereum Bet Spark the Next Rally?

https://coinmarketcap.com/community/post/377612382/
1•joeymabia1•1m ago•0 comments

Show HN: All the Cron Jobs

https://github.com/wonsukchoi/crondex
1•wonsukchoi97•1m ago•0 comments

Iran war: Trump says ceasefire 'over' after fresh strikes

https://www.dw.com/en/iran-war-trump-says-ceasefire-over-after-fresh-strikes/live-77869350
1•thisislife2•2m ago•0 comments

New Jersey Passes Garden State Balcony Solar Act

https://pluginsolarus.com/learn/new-jersey-s2368-garden-state-balcony-solar-act
2•codegeek•3m ago•1 comments

Large language models can predict the results of social science experiments

https://www.nature.com/articles/s41586-026-10742-x
1•sbulaev•4m ago•0 comments

The Whispering Earring (2012)

https://gwern.net/doc/fiction/science-fiction/2012-10-03-yvain-thewhisperingearring.html
1•random__duck•7m ago•0 comments

AI Slop as a Social Immune Response

https://thepatrickglenn.substack.com/p/on-ai-slop
1•pwmglenn•8m ago•0 comments

Managedagents.sh

https://www.managedagents.sh/
2•iacguy•10m ago•0 comments

Waymo traps teens firing toy gun in driverless car, raising privacy concerns

https://www.nbcbayarea.com/news/local/waymo-teens-drinking-shooting-objects-san-mateo/4110140/
1•text0404•10m ago•1 comments

Satellite Surge in the Night Sky: An interactive look at orbit density

https://naturnacht-fulda-rhoen.de/wp-content/uploads/2026/07/satelliten-himmel-i18n.html
1•ptrsrtp•14m ago•0 comments

Why Toolmaking Is the Most Effective Way of Learning

https://medium.com/@subairui/coding-on-principle-toolmaking-is-the-most-effective-way-of-learning...
2•subairui•14m ago•1 comments

Show HN: Leafwright – Generate PDFs without running headless Chrome

https://leafwright.co
1•alejoestela•15m ago•0 comments

Which Bazel tests are affected? Ask the remote cache, run nothing

https://aspect.build/blog/selective-testing-with-cache-diff
1•shelbyte•17m ago•0 comments

LiberSystem – A capability-based microkernel OS written in Rust

https://libersystem.com/
1•klez•17m ago•0 comments

Loop Engineering's Missing Half

https://x.com/nsankar/article/207382099687713997
1•sankarn_ai•17m ago•0 comments

And Then the Billionaire Paid Off $550 Million of Our Debts

https://idiallo.com/blog/billionaire-paid-off-550-million-dollars-of-our-debts
2•Brajeshwar•19m ago•1 comments

What is wrong with AI services businesses

1•rcarrol6•20m ago•0 comments

Fable Built Thomas Jefferson's Rotating Bookstand

https://jefferson-bookstand.vercel.app
1•mikemangialardi•21m ago•0 comments

Can geoengineering blunt El Niño's fury?

https://www.sciencenews.org/article/geoengineering-el-nino-extremes
1•littlexsparkee•23m ago•0 comments

Miles: A PyTorch-Native Stack for Large-Scale LLM RL Post-Training

https://pytorch.org/blog/miles-a-pytorch-native-stack-for-large-scale-llm-rl-post-training/
1•gmays•24m ago•0 comments

Solomon's Paradox

https://en.wikipedia.org/wiki/Solomon%27s_paradox
1•ike_usawa•24m ago•0 comments

An Inside Look at the UK's Largest Illegal Rave – UK TEK 2026 [video]

https://www.youtube.com/watch?v=FNnTaIHXqDs
1•mxmilkiib•26m ago•0 comments

Show HN: Axiom-02 – Deterministic engine modeling cognitive dissonance

https://github.com/Zierax/Axiom-02
1•Zierax•28m ago•0 comments

Meta tests always-on 'super sensing' mode for next Ray-Bans

https://aiweekly.co/alerts/meta-tests-always-on-super-sensing-mode-for-next-ray-bans
1•ortusdux•29m ago•0 comments

In Linux, things are often upside down

https://www.dedoimedo.com/computers/linux-upside-down.html
1•speckx•29m ago•0 comments

Ukrainian Navy Reveals Unknown Underwater Drone (UUV)

https://www.hisutton.com/Ukrainian-Navy-Underwater-Drone.html
3•EA-3167•29m ago•1 comments

Meta tests 'super sensing' AI glasses that can capture every moment

https://www.ft.com/content/ac282450-91a8-4597-8f60-9e6ef416865a
1•ortusdux•29m ago•0 comments

Show HN: MacPad – a tiny macOS Notepad.exe-style editor

https://github.com/anvilfilbert/MacPad
1•anvilfilbert•29m ago•1 comments

Dreams and Nightmares: John Berryman's fresh idiom

https://harpers.org/archive/2026/07/dreams-and-nightmares-rosanna-warren-berryman/
1•Caeiro•32m ago•0 comments