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?

Rezolus: High-Resolution Systems Performance Telemetry

https://github.com/iopsystems/rezolus
1•jinqueeny•2m ago•0 comments

Replyjoy – Open-source Gmail assistant that drafts replies in your voice

https://github.com/ConsulInc/replyjoy-oss
1•derek8bai•2m ago•0 comments

Dweav Trace – offline-first state tracing for JavaScript apps

https://chromewebstore.google.com/detail/dweav-trace/djibmlmofhdmijbpekpneclbpnokemne
1•Altrudev•2m ago•0 comments

What's Happening to Panoply?

https://panoply.io
1•r0h1n•7m ago•0 comments

Greenhouse and Icehouse Earth

https://en.wikipedia.org/wiki/Greenhouse_and_icehouse_Earth
1•chasil•17m ago•1 comments

Show HN: Building a universal device experience [video]

https://www.youtube.com/watch?v=euKIupqOd3g
1•mmajzoobi•18m ago•0 comments

Nginx Rift

https://depthfirst.com/nginx-rift
2•GalaxyNova•19m ago•1 comments

Ask HN: Efflora_run DAG Regression Test

1•zhoykn•20m ago•0 comments

Vibe code your next presentation

https://www.variant.art/
1•harpooned•24m ago•1 comments

The Bureau Outlives the Engine

https://uaxd.fr/dispatches/the-bureau-outlives-the-engine.html
1•enoch_cg•32m ago•0 comments

A Claude Code and Codex Skill for Deliberate Skill Development

https://github.com/DrCatHicks/learning-opportunities
3•cdrnsf•40m ago•0 comments

NYC*Bug May 2026: The Design of Unix Shell, with Stephen R. Bourne

https://www.youtube.com/watch?v=Anr2UAs7ifY
1•bluesounddirect•41m ago•1 comments

Andrew's Layoff Checklist

https://docs.google.com/document/d/1FaDxhnCXsneXbel5XVRAyX0Ce1RyC1F__wGboBBPlBM/edit?tab=t.0
2•mooreds•46m ago•0 comments

NASA's James Webb Space Telescope Photostream

https://www.flickr.com/photos/nasawebbtelescope/
1•mooreds•47m ago•1 comments

Reddit Is (Mostly) Shuttering R/All, but There's Still a Way to Access It

https://lifehacker.com/tech/reddit-is-mostly-shutting-down-r-all?test_uuid=zXnWOLjQQwkYjMVwrvo5w&...
1•big_toast•50m ago•0 comments

Charity Majors on AI, Observability, and the Future of Software [audio]

https://scalingdevtools.com/podcast/episodes/charity
1•mooreds•52m ago•0 comments

Ask HN: Are SaaS businesses going to zero?

1•nomilk•53m ago•8 comments

Eliza: Natural Language Processing from 1967

https://en.wikipedia.org/wiki/ELIZA
1•frasermarlow•53m ago•1 comments

On-Device Real-Time Speech-to-Speech Translation [video]

https://www.youtube.com/watch?v=D9id2Dgv_OM
1•kenarsa•56m ago•0 comments

My life was changed by four sentences in four books

https://sive.rs/4s4b
4•James72689•56m ago•0 comments

Show HN: Sync creative assets to any CMS

https://syncific.com
2•lightsyncpro•59m ago•0 comments

Show HN: Short links and dynamic QR codes you can white-label as your own SaaS

https://linked.codes/
1•attendos•1h ago•0 comments

Measuring the Self-Reported Impact of Early-2026 AI on Tech Worker Productivity

https://metr.org/blog/2026-05-11-ai-usage-survey/
1•willmarch•1h ago•1 comments

Show HN: Containarium – self-hosted sandbox for AI agents, MCP-native

https://github.com/footprintai/Containarium
1•hsin003•1h ago•0 comments

Microsoft BitLocker – YellowKey zero-day exploit

https://www.tomshardware.com/tech-industry/cyber-security/microsoft-bitlocker-protected-drives-ca...
20•cookiengineer•1h ago•5 comments

Terax – Lightweight (7MB) AI Terminal Emulator (ADE) in Rust, Tauri, and React

https://terax.app
2•nikolay•1h ago•1 comments

CVE-2026-45793: Anatomy of a 14-Hour PHP Supply-Chain Near-Miss

https://github.com/graycoreio/github-actions-magento2/discussions/261
1•damienwebdev•1h ago•1 comments

MacBook Neo Review: The Laptop for the Rest of Us

https://fireborn.mataroa.blog/blog/macbook-neo-review-the-laptop-for-the-rest-of-us/
7•vinhnx•1h ago•1 comments

Gaining control of every projector and camera on campus

https://www.edna.land/blogs/posts/scanning/
3•ednaordinary•1h ago•1 comments

Butter Box – Sharing offline has never been easier

https://likebutter.app/
2•MRPockets•1h ago•0 comments