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?

SpaceX no longer needs NASA, and that's a problem for America's space agency

https://arstechnica.com/space/2026/10/spacex-no-longer-needs-nasa-and-thats-a-problem-for-america...
1•civilchaos•3m ago•0 comments

Highway thieves are spoofing GPS to steal millions in data center-bound cargo

https://arstechnica.com/tech-policy/2026/10/highway-thieves-are-spoofing-gps-to-steal-millions-in...
1•cdrnsf•3m ago•0 comments

The Economic Organisation of a POW Camp [pdf]

https://courses.cit.cornell.edu/econ4260/out/radford_pow.pdf
1•sebg•4m ago•0 comments

Why big tech stopped building useful stuff

https://www.rubenerd.au/why-big-tech-stopped-building-useful-stuff/
1•cdrnsf•5m ago•0 comments

The Hottest New Side Hustle Is Stripping Copper Wire and Posting About It

https://www.wired.com/story/the-hottest-new-side-hustle-is-stripping-copper-wire-and-posting-abou...
2•cdrnsf•7m ago•1 comments

Building fine-grained version control for agents with Rust and Durable Objects

https://delta.dev/blog/fine-grained-version-control-for-agents
1•nsm•7m ago•0 comments

Martian meteorite found in the Sahara is 4.1B years old

https://www.reuters.com/science/martian-meteorite-found-sahara-is-41-billion-years-old-2026-10-29/
1•noideawhatididt•7m ago•0 comments

Local Decisions in DuckDB

https://altertable.ai/blog/2026-10-29-local-decisions-in-duckdb
1•altertable•7m ago•0 comments

The Battle of the Green Dot

https://malja.dev/the-battle-of-the-green-dot
1•maljacz•9m ago•0 comments

DualChem Benchmark

https://scale.com/blog/dualchem-evaluating-ai-models-dual-use-chemistry-risks
1•satirr•10m ago•1 comments

Thoughts while watching myself be automated (2024)

https://dynomight.net/automated/
1•gone35•16m ago•0 comments

A (lukewarm) defense of Minsky and Papert

https://federicomilanesio.substack.com/p/a-lukewarm-defense-of-minsky-and
1•sebg•16m ago•0 comments

LLMs bring new nature of abstraction (2025)

https://martinfowler.com/articles/2025-nature-abstraction.html
1•p2detar•17m ago•0 comments

LeadPilot

https://getleadpilot.tech/
1•ktoznet•17m ago•0 comments

Dartmouth provost resigns following accusations he used AI for writing

https://apnews.com/article/dartmouth-provost-ai-a9f71dc5e9e10461c7c2390febcd1b5a
4•nradov•19m ago•1 comments

Achim Leistner

https://en.wikipedia.org/wiki/Achim_Leistner
1•jumpocelot•19m ago•0 comments

DIY AI Lockpicking Robot: ESP32 and Claude AI Opens Any Lock [video]

https://www.youtube.com/watch?v=o4AUKGdScNI
1•AareyBaba•19m ago•0 comments

Diana Pfeil on Evals [video]

https://www.youtube.com/watch?v=w8A9jDsnq6U
1•mooreds•21m ago•0 comments

Open-weight AI models can exploit the patch gap

https://epoch.ai/publications/open-weight-models-patch-gap
3•merksittich•21m ago•0 comments

The Physics of Getting Fired

https://aeon.co/essays/how-to-use-physics-to-make-sense-of-the-messiness-of-life
2•ersinesen•22m ago•0 comments

'I fear for my family': Berlin mayoral candidate's messages expose Hamas ties

https://www.ynetnews.com/article/skmcttlpzl
2•extraextra•24m ago•0 comments

A Pig, the State, and War: Porco Rosso (Kurenai No Buta) (2014)

https://journal.animationstudies.org/article/id/66/
4•simonebrunozzi•27m ago•0 comments

Buildings full of machines are tied to modest local job growth

https://theconversation.com/we-studied-1-584-data-centers-and-found-the-buildings-full-of-machine...
6•andrewstetsenko•28m ago•1 comments

Much Ado About None: Sentinel Values in Python

https://florianwilhelm.info/2026/10/sentinel_values/
2•sebg•29m ago•0 comments

Show HN: Charter, field-level control over agents' calls into customer accounts

https://github.com/r28ai/charter
2•nathanqueme•31m ago•1 comments

Google value plunges by $500B as AI fears rattle Wall Street

https://www.bbc.com/news/articles/cm9qzdqpxy48o
7•dabinat•32m ago•2 comments

Intel stock plunges after posting disappointing Q4 outlook

https://finance.yahoo.com/video/intel-stock-plunges-after-posting-disappointing-q4-outlook-200731...
3•baal80spam•33m ago•1 comments

Chinese Universities in Jiangsu Begin Paying Staff in Digital Yuan

https://chinascope.org/archives/41502
3•gscott•35m ago•0 comments

Biltong.ai

https://biltong.ai/
2•almogo•36m ago•0 comments

The Great American Rascal: Tom Sawyer at 150

https://claremontreviewofbooks.com/the-great-american-rascal/
14•beatstop•40m ago•0 comments