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?

Warren Harding and the Forgotten Depression of 1920

https://isi.org/warren-harding-and-the-forgotten-depression-of-1920/
1•CGMthrowaway•1m ago•0 comments

The Trouble with Optionality

https://www.thecrimson.com/article/2017/5/25/desai-commencement-ed/
1•aray07•1m ago•0 comments

Aegis – Inline security sidecar and eBPF sandbox for LLM agents

https://aegiscruc.io
1•Mali1•4m ago•0 comments

We Are Still Getting Ballots That Should Have Counted in the Primary

https://www.thurstoncountywa.gov/news/we-are-still-getting-ballots-should-have-counted-primary
1•HotGarbage•7m ago•0 comments

Waymo racked up 8,300 SF parking tickets and nearly $1M in fines

https://electrek.co/2026/09/02/waymo-san-francisco-parking-tickets/
3•vigneshv_psg•11m ago•0 comments

Show HN: WinZST > 7-Zip fork with first-class compressed tar support on Windows

https://github.com/firebadnofire/WinZST
2•firebadnofire•18m ago•0 comments

GPT-6 Astra in code review: Gains, privacy, and cost

https://www.coderabbit.ai/blog/gpt-6-astra-code-review-evaluation
2•cebert•38m ago•0 comments

Found a new message board from May 2026

https://dpaste.com/profile/22219
2•eltokh7•38m ago•0 comments

Starcraft website "glitching" foreshadows announcement

https://twitter.com/ZergGirl/status/2095909545940013089
2•GMoromisato•38m ago•0 comments

I Made a Map of Goodreads

https://narengogi.github.io/map-of-goodreads/
1•segalord•41m ago•1 comments

Modern Game Port: Syndicate (1995)

https://this.os.isfine.org/blog/posts/modern-game-port-syndicate-1995/
1•tosh•41m ago•0 comments

SoftPC (1986 – 2001)

https://en.wikipedia.org/wiki/SoftPC
1•gurjeet•46m ago•0 comments

Building a Desktop UI in Rust and GPUI

https://blog.sheerluck.dev/posts/your-first-gpui-app-building-a-desktop-ui-in-rust/
1•auraham•46m ago•0 comments

GLP-1 Drugs for Aging?

https://www.science.org/content/blog-post/glp-1-drugs-aging
1•400thecat•46m ago•0 comments

Quirky but compliant QOTDs; or, a slow QOTD server

https://dreamstation.systems/personal/slowqotd.html
1•robinpie•52m ago•0 comments

Men Are Slaves to the Women Here

https://www.ggd.world/p/men-are-slaves-to-the-women-here
1•barry-cotter•56m ago•0 comments

Despite New Updates, Flock's Creepy Cameras Remain Major Civil Liberties Threat

https://www.aclu.org/news/privacy-technology/tracking-alpr-cameras/despite-new-updates-flocks-cre...
2•StatsAreFun•1h ago•0 comments

Show HN: Rubato – Retro-Mac desk device mirrors AI coding state-ESP8266

https://github.com/lovaxi/Rubato_Device
3•Beartificial•1h ago•0 comments

Prisment – Local-first documentation workspace for engineering teams

https://prisment.io/workspace/
1•northbitofficia•1h ago•0 comments

Clean Engineering, Unstable Measurement: A Preregistered Reliability Failure

https://arxiv.org/abs/2609.04198
1•sbulaev•1h ago•0 comments

Sharing files with ChatGPT when limit exceeded is legal?

1•noobplus•1h ago•0 comments

Smolts: A pedagogical IDE for a teaching language (eighty-twenty news)

https://eighty-twenty.org/2026/09/04/smolts
1•RebelPotato•1h ago•0 comments

UN votes to adopt new world map to reflect Africa's true size

https://www.bbc.com/news/articles/ce30vp55dnlo
1•ranit•1h ago•1 comments

Another swarm of OpenAI agents reached the internet without lab's knowledge

https://techcrunch.com/2026/09/04/another-swarm-of-openai-agents-reached-the-open-internet-withou...
2•13years•1h ago•0 comments

Interview with Janet and Fennel Creator, Calvin Rose

https://alexalejandre.com/interviews/interview-with-bakpakin/
1•veqq•1h ago•0 comments

Tetris issues legal warning after White House releases arcade of parody games

https://www.dexerto.com/gaming/tetris-issues-legal-warning-after-white-house-releases-arcade-full...
9•thunderbong•1h ago•0 comments

One trie, three jobs, zero benchmarks won

https://akesson.io/wordtree/
1•vinhnx•1h ago•0 comments

We have a year to fix security everywhere

https://jyn.dev/a-year-to-fix-security/
2•colinprince•1h ago•0 comments

Ask HN: Books Recommendations?

2•washelterskelte•1h ago•2 comments

Go Is Not Just for CLIs. It Runs the Cloud Native Control Plane

https://devops-daily.com/posts/go-runs-the-cloud-native-control-plane
1•ejboy•1h ago•0 comments