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?

Show HN: Bagel (Bag ExpLoration) for ROSBAGs

https://bagel-ros2.vercel.app
1•Hussain04•1m ago•0 comments

2026 Fields Medals Awarded to Four of Top Mathematicians

https://www.simonsfoundation.org/2026/07/23/2026-fields-medals-awarded-to-four-of-worlds-top-math...
2•atmosx•1m ago•0 comments

OpenTelemetry Collector: A Production-Ready Guide

https://signoz.io/blog/opentelemetry-collector-complete-guide/
2•dhruv_ahuja•4m ago•0 comments

AI Kill Switch Act would let Trump admin order shutdown of rogue AI systems

https://arstechnica.com/tech-policy/2026/07/ai-kill-switch-act-would-let-trump-admin-order-shutdo...
2•ndsipa_pomu•7m ago•1 comments

An institutional-grade market terminal for retail investors

https://kresmion.com
1•sol9•8m ago•0 comments

End-to-End Encryption and "Going Dark"

https://www.schneier.com/blog/archives/2026/07/end-to-end-encryption-and-going-dark.html
1•mdp2021•9m ago•0 comments

Show HN: Amdb – Local code context MCP server, single Rust binary

https://github.com/BETAER-08/amdb
1•try_betaer•11m ago•0 comments

Game of Trees – Git-based version control from OpenBSD folks

https://www.gameoftrees.org/
2•gregnavis•13m ago•0 comments

Mirror Mirror: Mirror your PC screen to your phone over your local network

https://github.com/maco30001/Mirror-Mirror
1•maco3000•13m ago•0 comments

Use This Instead of OpenCode

https://www.truss-agent.com/
1•jrh89•14m ago•0 comments

The Hugging Face Incident – By Scott Alexander

https://www.astralcodexten.com/p/the-hugging-face-incident
1•mellosouls•15m ago•0 comments

Clop ransomware targets Windchill, FlexPLM in data theft attacks

https://www.bleepingcomputer.com/news/security/clop-ransomware-targets-windchill-flexplm-in-data-...
1•Imbiss•15m ago•0 comments

How Do We Stop Vibe Coding?

https://alexklos.ca/blog/how-do-we-stop-vibe-coding
1•prohobo•16m ago•0 comments

Launching Health in ChatGPT to US Users

https://openai.com/index/health-in-chatgpt/
1•mellosouls•19m ago•0 comments

Study: Economic benefits of data centers in USA

https://www.scheller.gatech.edu/news/2026/data-centers-are-booming-who-benefits.html
1•giuliomagnifico•21m ago•1 comments

Round-Trip Correctness: A New Metric for Generative AI-Based Process Modeling

https://community.sap.com/t5/technology-blog-posts-by-sap/round-trip-correctness-a-new-metric-for...
1•rramadass•24m ago•1 comments

The first mainstream song about computer games literally "Computer Games" (1979)

https://www.youtube.com/watch?v=gsHYSs_qgmU
2•wewewedxfgdf•26m ago•0 comments

Show HN: Audio Player with "Binaural Beats" tuned to the same key as your music

https://github.com/henrygabriels/binaural-studio
2•gabriel666smith•27m ago•0 comments

Show HN: A Website Introducing Flux 3

https://flux-3.io
2•akseli_ukkonen•28m ago•0 comments

A Semioethical Framework for Artificial Intelligence

https://lyceum.institute/humanitas-technica/seppuai/
2•einhard•33m ago•0 comments

IRGC Claims It Destroyed Amazon's Bahrain Data Center

https://houseofsaud.com/irgc-claims-destroyed-amazon-bahrain-data-center/
3•thisislife2•35m ago•0 comments

Show HN: Transept: AI translation workspace that puts humans first

https://transept.ai
3•sithamet•35m ago•0 comments

Prebuilt, parameterized, interactive HTML widgets for MCP Apps

https://github.com/Techthos/gadget
2•alex20465•37m ago•0 comments

The Codex App Lied to Me About /Clear

https://samwize.com/2026/07/24/codex-app-lied-to-me-about-clear/
2•ingve•39m ago•0 comments

I'm So Tired of "Is This AI?"

https://www.trend-mill.com/p/im-so-tired-of-is-this-ai
6•moomoy•43m ago•1 comments

Show HN: A static, client-side tarot calculator for Brazilian Portuguese

https://meuarcanopessoal.net/
5•visiohex•48m ago•1 comments

Show HN: Maplike – Rust traits for operations on containers (get, set, push...)

https://github.com/mikwielgus/maplike
2•mikolajw•49m ago•0 comments

BookWyrm is a social network for tracking and sharing your reading

https://github.com/bookwyrm-social/bookwyrm
2•protomolecool•51m ago•0 comments

Image Resizer

https://img-resizer.github.io/
2•javatuts•52m ago•0 comments

Shape Up: Stop Running in Circles and Ship Work that Matters [pdf]

https://basecamp.com/shapeup/shape-up.pdf
2•saikatsg•54m ago•0 comments