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?

Scentronic: AI–assisted olfactory interface for remote odor transmission

https://www.science.org/doi/10.1126/sciadv.aee9266
1•geox•4m ago•0 comments

Ebola has spread from Congo to 4 other countries. A look at where things stand

https://apnews.com/article/africa-ebola-congo-nigeria-abuja-virus-03b6388f86e305fad711606f22c6577f
3•mikhael•12m ago•1 comments

Meta strikes deal to protect Zuckerberg from California billionaire tax

https://finance.yahoo.com/media-advertising/articles/meta-hit-record-25bn-penalty-200405974.html
3•jonifico•19m ago•1 comments

Open Language Models – Nathan Lambert

https://natolambert.com/slides/2026/harvard/lecture.html
1•the-mitr•30m ago•0 comments

UK man juggled five remote government jobs

https://www.bbc.com/news/articles/cmze4w63ly42o
1•doctor_radium•30m ago•0 comments

Advice You'll Get Is the Advice You've Heard

https://marcrandolph.substack.com/p/the-best-advice-youll-get-is-the
1•fagnerbrack•38m ago•0 comments

Should you give the scarcest things to the fastest coders?

https://digitalseams.com/blog/should-you-give-the-scarcest-things-to-the-fastest-coders
1•bobbiechen•40m ago•1 comments

Ask HN: How has your company adapted interviews in the AI world?

1•parthdesai•41m ago•0 comments

MiniForth – A small Lean tutorial for programming language semantics

https://github.com/leodemoura/MiniForth
1•lioeters•41m ago•0 comments

ML Drift: Next-Gen GPU AI/ML Inference at the Edge

https://developers.googleblog.com/ml-drift-next-gen-gpu-aiml-inference-at-the-edge/
1•gmays•42m ago•0 comments

Learn Calculus by Coding in Python – Ed Pratowski (2025)

https://www.freecodecamp.org/news/learn-college-calculus-and-implement-with-python/
5•the-mitr•45m ago•0 comments

Terraform 2026 Update

https://terraformindustries.wordpress.com/2026/10/21/terraform-2026-update/
1•Klaster_1•50m ago•0 comments

I can't believe PowerShell is good

https://www.spacebar.news/powershell-is-actually-good/
3•corbindavenport•52m ago•0 comments

Prometheus, a Gift Link Search Engine

https://kottke.org/26/10/meet-prometheus-a-gift-link-search-engine
1•colinprince•56m ago•0 comments

Aulico: A TradingView Alternative

https://www.aulico.com/symbols/BTCUSDC
1•ratonbigger•1h ago•1 comments

Attendee – open-source API for building meeting bots

https://attendee.dev/
1•gregsadetsky•1h ago•0 comments

Defense Against the Super-Worms (2025)

https://www.lesswrong.com/posts/fo98oTodEiEy9mLAu/defense-against-the-super-worms
1•7777777phil•1h ago•0 comments

NSA Advisory

https://www.nsa.gov/Press-Room/Press-Releases-Statements/Press-Release-View/Article/4630238/nsa-a...
3•Eawrig05•1h ago•0 comments

GL650 updated to cover Red Hat Satellite 6.19 with RHEL 10 managed hosts

https://gurulabs.com/blogs/gl650-red-hat-satellite-6-19/
1•4onthefloor124•1h ago•0 comments

AI agent on your notch, equipped with his own computer

https://notcho.si
1•AmDab•1h ago•0 comments

Flapping Airplanes

https://flappingairplanes.com/
1•handfuloflight•1h ago•1 comments

NPM is experiencing degraded package install and publishing

https://status.npmjs.org/incidents/xfp75s9j3bp8
3•OuterVale•1h ago•1 comments

Show HN: Agent Middleware – permits and signed receipts for agent tool calls

https://github.com/agentmiddleware/agent-middleware
1•ChristopherLeee•1h ago•0 comments

I have an issue with what agets affirm, do you have too?

https://github.com/EmanueleCell4/elliot-mcp
1•emanuelecella•1h ago•0 comments

Shame HN: Distracted Driving on Tesla FSD

2•anonymid•1h ago•0 comments

Rara Avis

https://en.wikipedia.org/wiki/Rara_avis
1•gregsadetsky•1h ago•0 comments

Left to Write (1 of 3): Adaptive Keyboards for One-Handed Users

https://99percentinvisible.org/article/adaptive-one-handed-keyboards/
1•EA-3167•1h ago•0 comments

Ask HN: What is the advantage of PHP over C?

2•colrichie•1h ago•2 comments

Nokia, T-Mobile and Nvidia complete first AI-RAN call

https://www.nokia.com/blog/from-the-lab-to-the-live-network-nokia-t-mobile-and-nvidia-complete-wo...
2•methuselah_in•1h ago•0 comments

Show HN: Statement Proof – PDF bank statement to CSV, proved or refused

https://statement-proof.quillnow.com
1•f2002119•1h ago•0 comments