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?

Pipelog – I kept losing track of what Claude Code did, so I built a log for it

https://pipelog.dev/
1•phironaka•2m ago•0 comments

The State of Agentic Memory

https://medium.com/@majid.fekri/the-state-of-agentic-memory-497d687e0488
1•supportm•2m ago•0 comments

Jay Miner on the History of the Amiga [video]

https://www.youtube.com/watch?v=nRHQHZhbocw
1•doener•6m ago•1 comments

Show HN: Self-Hosted Inference for Agents

https://github.com/superlinked/sie
1•rafaepta•7m ago•1 comments

Rogue AI agent hacks gym to get its user a spot in a popular class

https://www.the-independent.com/tech/security/ai-agent-hacks-gym-openclaw-anthropic-b3030267.html
1•mellosouls•7m ago•0 comments

An Approach to Technical AGI Safety and Security, DeepMind (GDM)

https://gdmalignment.substack.com/p/agi-safety-and-alignment-at-google
1•aigalaxiome•8m ago•0 comments

The lattice of sets of natural numbers is rich

https://jdh.hamkins.org/the-lattice-of-sets-of-natural-numbers-is-rich/
1•benmandrew•9m ago•0 comments

HLSmith: An Expert-Guided Agentic Framework for C/C++-to-HLS Translation

https://arxiv.org/abs/2608.06791
1•rbanffy•10m ago•0 comments

Web Design for Terminal Browsers

https://en.andros.dev/blog/70d817e8/web-design-for-terminal-browsers/
1•andros•11m ago•0 comments

XenDroid – Android Xbox 360 Emulator

https://github.com/rfandango/XenDroid
1•Topfi•12m ago•0 comments

AI's profits are 'being funded by investors rather than earned from customers

https://fortune.com/2026/08/10/torsten-slok-ai-profit-margins-capex-oracle/
5•Anon84•13m ago•0 comments

Call Stack Diffs

https://oskrim.github.io/engineering/2026/08/02/call-stack-diffs.html
1•oskrim•14m ago•0 comments

What Is Docker, and What It Silently Replaced

https://fagnerbrack.com/what-is-docker-and-what-it-quietly-replaced-602ceb3c9205
1•fagnerbrack•14m ago•0 comments

How to Use Podman for Home Lab Setup

https://oneuptime.com/blog/post/2026-03-18-use-podman-home-lab-setup/view
2•speckx•15m ago•1 comments

How to Improve Your First Principles Thinking Skills

https://www.philmckinney.com/how-to-improve-your-first-principles-thinking-skills/
1•fagnerbrack•15m ago•0 comments

A Growing Threat: The Anti-Rights Movement in the UK (By Amnesty International)

https://archive.org/details/report-a-growing-threat-the-anti-rights-movement-in-the-uk-july
2•latexr•16m ago•0 comments

How to Overcome Confirmation Bias

https://www.philmckinney.com/how-to-overcome-confirmation-bias/
1•fagnerbrack•16m ago•0 comments

The BS That Is Generated by Wellness Apps

https://theskepticalcardiologist.substack.com/p/on-the-massive-bs-that-is-generated
1•elo2000•17m ago•0 comments

Failing After Success

https://idiallo.com/blog/failing-after-success
1•vcfgdev•17m ago•0 comments

OpenAI / Hugging Face Hack

https://smlx.dev/posts/openai-huggingface/
1•frizlab•20m ago•0 comments

Amazon DynamoDB now supports real-time vector search at any scale

https://aws.amazon.com/blogs/aws/amazon-dynamodb-now-supports-real-time-vector-search-at-any-scale/
1•root-parent•21m ago•0 comments

Using AI to analyze life patterns

https://vkrakovna.wordpress.com/2026/07/30/using-ai-to-analyze-life-patterns/
1•surprisetalk•21m ago•0 comments

China is now the world's greatest oil power

https://www.economist.com/finance-and-economics/2026/08/09/china-is-now-the-worlds-great-oil-power
2•bookofjoe•21m ago•1 comments

Primus AI Researcher – Free

https://lab.cloud/
1•anonymous_llama•22m ago•0 comments

Colombia Hit by Magnitude 7.4 Quake, Widespread Damage Reported

https://www.bloomberg.com/news/articles/2026-08-10/colombia-hit-by-strong-earthquake-that-shakes-...
4•alephnerd•24m ago•0 comments

Foxes, Lions, and LLMs: The Machiavellian Game of Tech Hiring

https://twitter.com/0xb33bs/status/2086809075631763920
2•0xbeebs•24m ago•0 comments

AI Fortunes Are Reviving an Old Debate About Private Power

https://ai-updates.net/ai-fortunes-philanthropy-private-power/
2•ashurandi•25m ago•0 comments

The Final Third Football

https://thefinalthirdfootball.substack.com/
1•Africanway•26m ago•0 comments

Humanising LLM Outputs Is Dumb

https://kuber.studio/blog/Reflections/Humanising-LLM-Outputs-is-Actually-Dumb
2•kuberwastaken•27m ago•0 comments

Archer to Acquire Wisk, Insitu, and SkyGrid from Boeing

https://archer.com/news/archer-to-shape-physical-ai-future-of-aerospace-and-defense-with-acquisition
1•kejaed•28m ago•0 comments