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?

Unofficial Starlink Global Gateways and Pops

https://www.google.com/maps/d/viewer?mid=1805q6rlePY4WZd8QMOaNe2BqAgFkYBY&hl=en
1•jenders•1m ago•0 comments

Show HN: Agent Torrent, a BitTorrent inspired mesh for idle coding agents

https://github.com/raghavan/agent-torrent
1•raghavankl•2m ago•0 comments

PrimeNG is no longer open source

https://primeui.dev/nextchapter
1•charlesabarnes•5m ago•0 comments

Cannabis Users Face Substantially Higher Risk of Heart Attack

https://www.acc.org/about-acc/press-releases/2025/03/17/15/35/cannabis-users-face-substantially-h...
1•RickJWagner•7m ago•1 comments

Show HN: TraceTree – Sandboxed behavioral analysis for NPM and PyPI packages

https://github.com/tejasprasad2008-afk/TraceTree
1•Tejas_dmg•9m ago•0 comments

Sycophantic AI decreases prosocial intentions and promotes dependence

https://www.science.org/doi/full/10.1126/science.aec8352
2•delichon•12m ago•0 comments

Introduction to Compilers and Language Design

https://dthain.github.io/books/compiler/
1•AlexeyBrin•12m ago•0 comments

Show HN: Ferroterm – Rust / WebAssembly Terminal Emulator and Library

3•sylwester•14m ago•0 comments

Programmers need to start meditating now

1•pythonRon•15m ago•1 comments

Accelerating the Quantum-Safe Timeline

https://www.microsoft.com/en-us/security/blog/2026/06/30/microsoft-advances-quantum-safe-security...
1•giuliomagnifico•20m ago•0 comments

T3MP3ST autonomous red team platform multi-agent offensive-security meta-harness

https://github.com/elder-plinius/T3MP3ST
1•882542F3884314B•20m ago•0 comments

EU Council forces Chat Control via fast-track

https://www.heise.de/en/news/Chat-Control-1-0-EU-Council-forces-messenger-scans-via-fast-track-11...
2•stavros•22m ago•1 comments

Prediction Markets Let You Bet on Whether a Wildfire Will Burn Down Your Town

https://www.wired.com/story/prediction-markets-let-you-bet-wildfire/
2•beardyw•23m ago•2 comments

Peregrine Falcon: The Fastest Animal on Earth at 390 km/h

https://strangeanimals.info/birds/raptors/peregrine-falcon-fastest-animal
1•thunderbong•24m ago•0 comments

Ask HN: Is HN crowd a left-leaning?

2•eimrine•31m ago•0 comments

UK plans to give established media more visibility on YouTube

https://www.theguardian.com/media/2026/jun/22/uk-youtube-tiktok-established-media-prominence-misi...
1•j-bos•33m ago•0 comments

Latent Collaboration in Multi-Agent Systems

https://github.com/Gen-Verse/LatentMAS
1•_pdp_•35m ago•0 comments

DeltaChat 2.48: zero metadata, group description, native audio/video call & more

https://delta.chat/en/2026-03-31-zero
1•xeonmc•35m ago•0 comments

Spain's cadastre API is SOAP from 2003, so I built a JSON wrapper (+MCP)

https://prediohq.com/
2•guillermofc•36m ago•0 comments

The Revenge of the Philosophy Majors

https://www.nytimes.com/2026/07/05/business/philosophy-majors-ai-jobs.html
3•Kaibeezy•36m ago•0 comments

What We Can't Measure About AI Yet

https://aeon.co/essays/what-we-cant-measure-about-ai-yet
2•worldvoyageur•38m ago•1 comments

Wikipedia Is Battling for the Soul of the Internet

https://www.nytimes.com/2026/07/05/business/media/wikipedia-ai-elon-musk.html
3•cainxinth•44m ago•0 comments

Durian Montong

https://blog.cloudflare.com/welcome-to-connectivity-cloud/
1•basri•46m ago•0 comments

Was Homer's Ithaca an Island?

https://antigonejournal.com/2026/07/in-search-of-ithaca/
1•Hardy_Boy•46m ago•0 comments

I built a Figma for traders and investors – all in on tab

https://fynca.io/
1•adiabramov•47m ago•0 comments

Show HN: Skred – my opinionated sound/pattern engine and live coding thingy

https://octetta.github.io/pulp/doc/show-hn-1.html
3•octetta•55m ago•1 comments

Show HN: Runtime and install-time enforcement for NPM dependencies`

https://github.com/kratex-security/kratex
2•jackbeck•55m ago•0 comments

ActHub – EU AI Act compliance toolkit for small businesses (PHP, no framework)

https://sevinhub.com/acthub/
2•sergiuv•1h ago•0 comments

EPP spreading false claims on Chat Control

https://digitalcourage.social/@echo_pbreyer/116866154678577185
3•latexr•1h ago•0 comments

All Your Favorite Gadgets Are Getting More Expensive Again

https://www.wired.com/story/we-are-in-the-knockout-round-of-price-increases-for-consumer-electron...
2•joozio•1h ago•0 comments