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?

Modbook

https://en.wikipedia.org/wiki/Modbook
1•RattlesnakeJake•1m ago•0 comments

Ask HN: How would you market this service?

1•dmzxnico•1m ago•0 comments

Data Center Fornicator [video]

https://www.youtube.com/watch?v=rkbcuajiPJA
1•yomismoaqui•2m ago•0 comments

Zapping Rocks Unlocks Stimulated Geologic Hydrogen

https://spectrum.ieee.org/stimulated-geologic-hydrogen
1•adm4•2m ago•0 comments

Show HN: Widen, a native Postgres GUI using Apple's on-device LLM

https://github.com/betocmn/widen
1•thedreammachine•3m ago•0 comments

Installing NixOS on my car: Part 1

https://surrealdev.com/rooting-the-cadillac-part-1-lay-of-the-land/
1•snipesyspecial•3m ago•0 comments

Has the hallucination problem in AI been solved?

1•spl757•15m ago•1 comments

Systemic Risks in the Managed PostgreSQL Industry: Extension Risks

https://mehmetince.net/part-1-6-systemic-risks-in-the-managed-postgresql-industry-extension-risks...
1•mkmk•17m ago•0 comments

Patterns and problems in emerging multi-agent systems

https://www.anthropic.com/research/multiagent-systems
2•maxutility•26m ago•1 comments

Fairly Ranking the Most Brilliant Birds

https://moultano.wordpress.com/2026/08/14/fairly-ranking-the-most-brilliant-birds/
2•karagenit•30m ago•0 comments

It's How You Ask: Gender-Associated Linguistic Bias in LLMs

https://arxiv.org/abs/2608.13328
14•sbulaev•31m ago•1 comments

US Space Force gives Rocket Lab $397M to build threat-tracking 'Flatellites'

https://www.space.com/space-exploration/satellites/us-space-force-gives-rocket-lab-usd397-million...
3•walrus01•34m ago•0 comments

A Workaphile's Apology

https://moalquraishi.wordpress.com/2026/08/10/a-workaphiles-apology/
2•superfx•34m ago•0 comments

Dario Amodei on Concentration of Power

https://xcancel.com/DarioAmodei/status/2088758816376807762
2•yurivish•38m ago•0 comments

Snail OS – Custom Firmware for the Xteink X4

https://snailos.org
2•alibosworth•47m ago•0 comments

Omarchy Quattro by DHH Released [video]

https://www.youtube.com/watch?v=F7fe9pa8OeE
2•ayatollah•53m ago•0 comments

Why Your Summer Wardrobe Should Include UV Protection, Linen Clothing

https://www.bloomberg.com/news/features/2026-08-14/why-your-summer-wardrobe-should-include-uv-pro...
3•petethomas•1h ago•1 comments

California Energy Storage System Survey

https://www.energy.ca.gov/data-reports/energy-almanac/california-electricity-data/california-ener...
3•toomuchtodo•1h ago•1 comments

Theory of Constraints

https://en.wikipedia.org/wiki/Theory_of_constraints
2•diatone•1h ago•1 comments

Destroying My Homelab with Kubernetes – Linux Society UNSW 2026 [video]

https://www.youtube.com/watch?v=U-xqxMQD2QE
3•l-mdev•1h ago•0 comments

Guiding Ships with Moire Patterns

https://tinkerings.org/2018/03/28/guiding-ships-with-moire-patterns/
2•Eridanus2•1h ago•0 comments

TrueStar – AI moderated expert interviews and multi-agent deep research

https://truestar.tech
2•vineetkia•1h ago•1 comments

CosmicOS: An open source Contact message

https://cosmicos.github.io/
3•paulfitz•1h ago•0 comments

We Can't Control the Bots

https://12gramsofcarbon.com/p/tech-things-we-cant-control-the-bots
4•theahura•1h ago•1 comments

Privacy is an underrated advantage in Slack apps

2•alance•1h ago•1 comments

Dots3-Note Preview

https://huggingface.co/dots-studio/dots3-note-prev
2•handfuloflight•1h ago•0 comments

One Moment – A temporary clipboard that lives only in the browser

https://onemoment.me/
2•diosnelayalag•1h ago•0 comments

Attention Through Arithmetic Intensity

https://changyi.fun/posts/attention-arithmetic-intensity/
3•jxmorris12•1h ago•0 comments

Snap Chart AI

https://www.snap-chart.ai/
3•trendyking•1h ago•0 comments

Privibe - LLM Cli Local first+privacy focus+llama.cpp cache branch + Qwen3.x

https://github.com/alainnothere/privibe/tree/main
2•xlayn•1h ago•1 comments