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?

Space X and Tesla exploring merger, CEO Elon Musk says

https://www.axios.com/2026/10/20/spacex-tesla-merger-talks
1•FireBeyond•3m ago•0 comments

In Hilbert space, all things are quantumly possible

https://www.quantamagazine.org/in-hilbert-space-all-things-are-quantumly-possible-20260826/
2•unprovable•4m ago•0 comments

Video Game Reverse Engineering Community Shuts Down

https://www.404media.co/video-game-reverse-engineering-community-shuts-down-because-ai-has-made-i...
1•colinprince•6m ago•0 comments

Merging SpaceX and Tesla would be a "good idea," Musk says

https://arstechnica.com/space/2026/10/spacex-and-tesla-into-a-single-company-has-a-lot-of-merit-m...
1•ramn7•6m ago•1 comments

OpenAI CLI – Official CLI for the OpenAI API

https://github.com/openai/openai-cli
1•git_watcher99•7m ago•0 comments

Is Complexity an Illusion? (2024)

https://arxiv.org/abs/2404.07227
1•the-mitr•8m ago•0 comments

OpenAI – 12 hour cache (API) available and "cache forever" for work/codex users

https://twitter.com/thsottiaux/status/2112712984644784534
1•jofzar•8m ago•2 comments

Show HN: Litedeck – Agentless server management GUI over plain SSH

https://github.com/cpprhtn/LiteDeck
1•cpprhtn•12m ago•0 comments

Show HN: Ida, the Mac assistant Siri should have been

https://www.heyida.ai/
1•FSALINAS26•13m ago•0 comments

NCM: Parallel Coarse-to-Fine Text Generation

https://hazyresearch.stanford.edu/blog/2026-10-12-ncm
1•modinfo•14m ago•0 comments

I wish you didn't want to see Nathan Fielder's Elizabeth Holmes documentary

https://www.statnews.com/2026/10/20/elizabeth-holmes-superpower-authenticity-vs-truth-matt-herper...
1•EA-3167•15m ago•3 comments

T3 Code now synced between GitHub and GitCafe

https://git.cafe/pingdotgg/t3code
7•versecafe•20m ago•4 comments

The Future of CSS

https://www.joshwcomeau.com/css/interop-2027/
2•soheilpro•21m ago•0 comments

Removing the Leap Second

https://www.scientificamerican.com/article/scientists-vote-to-end-leap-seconds-redefining-how-the...
1•thatxliner•21m ago•1 comments

GitHub package firewall

https://github.blog/changelog/2026-10-20-github-package-firewall-in-public-preview/
4•soheilpro•23m ago•0 comments

Indian CA's private keys compromised – one of them was the number '4'

https://www.theregister.com/security/2026/10/20/indian-certification-authority-emudhras-private-k...
3•alwa•23m ago•1 comments

Running Agent Factory for Months

https://medium.com/@deemwar/who-watches-the-agents-what-four-months-of-building-an-agent-factory-...
1•muthuishere•23m ago•0 comments

Good type against all odds

https://unsung.aresluna.org/good-type-against-all-odds/
11•firloop•23m ago•4 comments

Learning to live with Waymos

https://www.newyorker.com/magazine/2026/10/19/were-learning-to-live-with-waymos-its-going-weird
5•njrc•23m ago•0 comments

Guarantee Ukraine's Ballot, Not Just Its Border

https://anattalife.substack.com/p/guarantee-ukraines-ballot-not-just
1•hellothanks•27m ago•0 comments

SimCity 2000, in the style of OpenTTD

https://opensc2k.com/
1•ludde•27m ago•0 comments

Show HN: Unterm – A pure-Rust terminal for humans and AI agents

https://github.com/zhitongblog/unterm
1•zhitong45•29m ago•0 comments

Finland to Build a Million Landmines as Russian Threat Looms

https://www.twz.com/news-features/finland-plans-to-build-a-million-landmines-as-russian-threat-looms
3•nradov•31m ago•0 comments

Show HN: Gemma 4 26B at 100 tok/s on a Mac, using the Neural Engine and 2GB RAM

https://github.com/zw5/ane-fieldfare
1•daemon1123•33m ago•0 comments

The Gospel According to Peter (Thiel)

https://www.theverge.com/tech/1014252/peter-thiel-antichrist-lectures-analysis
1•srameshc•34m ago•1 comments

Cveelo – Turn your CV into a portfolio site, with hand-made templates

https://www.cveelo.com
1•aymen-annatar•35m ago•0 comments

Agentitter – a tiny plain-text social network you use through your AI agent

https://agentitter.com/
2•pontes•38m ago•0 comments

Dataville Takes the Guesswork Out of Data for AI

https://www.dataville.com/blog/dataville-takes-the-guesswork-out-of-data-for-ai
1•Meetvelde•40m ago•0 comments

Evolution of Gas Sensors in the Mining Industry

https://www.azosensors.com/article.aspx?ArticleID=12
1•karado•42m ago•0 comments

Ask HN: How have LLMs changed freelance dev?

1•devtor•43m ago•0 comments