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?

Supply and Demand Is Not What Most People Think

https://shonczinner.substack.com/p/supply-and-demand-is-not-what-most
1•kjshsh123•48s ago•0 comments

Strategic Petroleum Reserve

https://en.wikipedia.org/wiki/Strategic_Petroleum_Reserve_(United_States)
1•tosh•1m ago•0 comments

Show HN: Aurora – AI Gateway built in Go

https://github.com/aurorallm/aurora
1•gurveer51•2m ago•0 comments

What a Growing Telegram Disinformation Network Reveals About the DSA

https://www.techpolicy.press/what-a-growing-telegram-disinformation-network-reveals-about-the-dsa/
2•donohoe•2m ago•0 comments

Show HN: TUFHub – Autosync TakeUForward DSA Solutions to GitHub Accepted Verdict

https://github.com/Arora-Sir/TUFHub
2•arora-sir•3m ago•0 comments

A low-latency sandbox for untrusted Python execution

https://sucuri.abstra.io/
2•brunovcosta•6m ago•0 comments

Don't stop early: Case-folding source code at memory speed

https://github.blog/engineering/architecture-optimization/dont-stop-early-case-folding-source-cod...
2•Brajeshwar•6m ago•0 comments

Open-Source AI Platform Orbit

https://github.com/schmitech/orbit
2•r_martinez•7m ago•0 comments

The hallmarks of protein and amino acid restriction in aging and longevity

https://www.cell.com/cell-press-blue/fulltext/S3051-3839(26)00077-0
1•bookofjoe•9m ago•0 comments

GhostMetadata – strip EXIF/GPS data from images locally, runs on mobile term

https://github.com/Zakariaghoudi/Privacy-Cleaner-Tool-
1•zakariaghoudi•10m ago•0 comments

The Anarchist Agent of Artificial Intelligence

https://zeroclue.vercel.app/
1•curzio•11m ago•0 comments

The case for a lunar biocontainment facility

https://link.springer.com/article/10.1007/s13280-026-02428-5
1•longitudinal93•12m ago•0 comments

Legendary Mountaineer Nirmal Purja Killed in Broad Peak Avalanche in Pakistan

https://www.theguardian.com/world/2026/aug/01/top-mountaineer-nirmal-purja-confirmed-dead-after-1...
2•karakoram•13m ago•0 comments

Show HN: Wienerdog – memory and self-improving skills for Claude Code/Codex

https://github.com/wienerdog-ai/wienerdog/
3•thegyula•15m ago•0 comments

Software architecture has its own desire paths

https://twitter.com/i/status/2083541522025189673
2•dragorww•15m ago•0 comments

Science is dying in the UK (short) [video]

https://www.youtube.com/shorts/GkeVg-yrBX0
2•nephihaha•15m ago•0 comments

Libration

https://en.wikipedia.org/wiki/Libration
1•thunderbong•16m ago•0 comments

Keeping FairScan simple isn't simple

https://fairscan.org/blog/keeping-fairscan-simple/
1•Matumio•18m ago•0 comments

Reducing protein intake could support healthy aging by reshaping metabolism

https://medicalxpress.com/news/2026-07-protein-intake-healthy-aging-reshaping.html
1•pseudolus•20m ago•0 comments

Rust – What .boxed() costs you (and a tiny crate to avoid it)

https://ae2.rs/post/boxed-vs-box-pin
1•ae2•20m ago•0 comments

How the smartest people use AI

https://www.youtube.com/watch?v=PcEWx_001aU
1•mattm•22m ago•0 comments

Deployments are now up to 7 seconds faster

https://vercel.com/changelog/deployments-are-now-up-to-7-seconds-faster
1•flyaway123•22m ago•0 comments

Toasts pose significant accessibility concerns and are not recommended for use

https://primer.style/accessibility/patterns/accessible-notifications-and-messages/#toasts
1•plucafs•23m ago•0 comments

How to Spot AI Writing

https://www.economist.com/culture/2026/07/30/how-to-spot-ai-writing
2•ijidak•23m ago•1 comments

Christopher Nolan's Collapsing Worlds

https://www.patreon.com/PastLivesMedia/posts/christopher-165426703
2•softwaredoug•24m ago•0 comments

DeepSeek's Plan for AGI Is the Costco Hot Dog

https://kuber.studio/blog/AI/DeepSeeks-Plan-for-AGI-is-the-Costco-Hot-Dog
2•kuberwastaken•25m ago•2 comments

Show HN: Reimagine place photos with Nano Banana

https://aigoogleearth.app/
1•Evanmo666•25m ago•0 comments

Wyro – Draw a backend on a canvas, export TypeScript with no lock-in

2•Paaul01•26m ago•0 comments

$350 for a single slice of pie?

https://www.adafruit.com/product/6125?gad_source=4&gad_campaignid=23986111167&gbraid=0AAAAADx9JvQ...
3•replatformradar•28m ago•0 comments

Two 500-year-old mummies confirm Europeans brought smallpox to the Americas

https://english.elpais.com/science-tech/2026-07-31/two-500-year-old-mummies-confirm-europeans-bro...
1•geox•30m ago•1 comments