frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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?

Admin of darknet market that shut down in 2019 arrested after buying gold bars

https://www.justice.gov/usao-ndga/pr/german-citizen-charged-laundering-funds-linked-prominent-dar...
1•rzk•2m ago•0 comments

Building audit logging in Postgres without triggers

https://runharbor.com/blog/2026-05-18-building-automatic-contextual-clinical-trial-audit-logging-...
1•18nleung•2m ago•0 comments

Why Distributed Training Is Hard: DTensor and the Costs of Abstraction

https://runwayml.com/news/dtensor-distributed-training
2•nielka•3m ago•0 comments

From Open Source Software to Open Source Strategy

https://p3institute.substack.com/p/from-open-source-software-to-open
1•AnhTho_FR•4m ago•0 comments

Displaying a crafted file in Tabby terminal can run shell commands

https://github.com/Eugeny/tabby/security/advisories/GHSA-qr3x-j8g9-xhf6
2•logickkk1•4m ago•0 comments

Your Most Improbable Life

https://kk.org/thetechnium/your-most-improbable-life/
2•zdw•8m ago•0 comments

We built the open-source layer for local AI agent visibility

https://github.com/Asymptote-Labs/agent-beacon
4•jqdsouza•8m ago•1 comments

New York to tax luxury second homes in NYC

https://apnews.com/article/mamdani-nyc-hochul-tax-rich-a30833850bfdbd638634def266ca76dd
3•geox•9m ago•0 comments

Pith

https://pith.science/
1•gone35•9m ago•0 comments

loopmaster – Livecoding Music IDE

https://loopmaster.xyz/
1•stagas•10m ago•0 comments

The cellphone that implicates Argentina's president in the $Libra case

https://english.elpais.com/international/2026-03-30/mauricio-novelli-the-owner-of-the-cellphone-t...
1•janandonly•10m ago•0 comments

All Polymarket temperature markets are missing, along with the money bet on them

https://www.autodidacts.io/polymarket-temperature-markets-dissappear/
3•Curiositry•10m ago•0 comments

Agora-1: The Multi-Agent World Model

https://odyssey.ml/introducing-agora-1
3•olivercameron•11m ago•0 comments

Migrating from Go to Rust

https://corrode.dev/learn/migration-guides/go-to-rust/
1•zdw•11m ago•0 comments

Grief in the AI Age

https://bradfrost.com/blog/post/grief-in-the-ai-age/
1•speckx•14m ago•0 comments

Musk Loses Case Against OpenAI

https://www.cnn.com/2026/05/18/tech/openai-musk-lawsuit-verdict
2•jamesgill•14m ago•0 comments

Elon Musk Loses Landmark Lawsuit Against OpenAI

https://www.wired.com/story/musk-v-altman-jury-verdict/
2•thunderbong•15m ago•0 comments

A Markdown-based test suite

https://blogsystem5.substack.com/p/markdown-based-test-suite
2•zdw•16m ago•0 comments

Geblang – I built my own programming language

https://davegebler.com/blog/geblang-i-built-my-own-programming-language
1•dwgebler•16m ago•0 comments

An educational generic architecture (RISC-V, z80) simulator

https://creatorsim.github.io/creator/
1•mjorgers•17m ago•0 comments

The Dark Side of the Jevons Paradox

https://calnewport.com/the-dark-side-of-the-jevons-paradox/
1•zdw•17m ago•0 comments

Iosevka + Berkeley = Ioskeley

https://github.com/ahatem/IoskeleyMono
1•hggh•20m ago•0 comments

Show HN: Gambling/math/typing for screen time (iOS)

https://apps.apple.com/us/app/second-thought-less-scrolling/id6749641307
1•yaseenhalabi•21m ago•0 comments

No big deal or the end of the world?

https://world.hey.com/jason/no-big-deal-or-the-end-of-the-world-0b0d8619
2•ravenical•22m ago•0 comments

Haiku OS runs on M1 Macs now

https://discuss.haiku-os.org/t/my-haiku-arm64-progress/19044?page=2
25•tekkertje•23m ago•6 comments

10Gb/s Ethernet: using mini-heatsinks with a 10GBASE-T SFP+ module

https://www.gilesthomas.com/2026/05/10g-ethernet-sfpplus-mini-heatsinks
2•gpjt•23m ago•0 comments

Andrew Huberman's Peptide Recommendations 2026

https://peptideportal.org/blog/andrew-huberman-peptide-recommendations-2026
2•goldkey•23m ago•0 comments

Simulating Infinity in Conway's Game of Life with Modern C++

https://ryanjk5.github.io/posts/GOLDE/
2•HeliumHydride•24m ago•0 comments

Show HN: StrudelBot – 3D printed humanoid robotic hand with teleoperation glove

https://www.youtube.com/watch?v=G9rqOqkuWdw
1•abr0ahm•28m ago•0 comments

Elon Musk losses OpenAI lawsuit as jury sides with Sam Altman and Greg Brockman

https://www.msn.com/en-us/news/crime/breaking-elon-musk-losses-openai-lawsuit-as-jury-sides-with-...
3•voisin•28m ago•0 comments