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?

ICE Appears to Be Buying Immigrants' Tax Identifiers from a Data Broker

https://www.404media.co/ice-appears-to-be-buying-immigrants-tax-identifiers-from-a-data-broker/
1•ilreb•32s ago•0 comments

Lightpanda Agent and PandaScript – LLM at buildtime, not runtime

https://lightpanda.io/blog/posts/introducing-lightpanda-agent-and-pandascript
1•fbouvier•1m ago•0 comments

Thirdpass – The app I wanted every time I left the house

https://thirdpass.pages.dev/
1•yakuh•1m ago•0 comments

Japan's railways stayed one while splitting apart

https://arun.is/blog/jr-logo/
1•ddrmaxgt37•2m ago•0 comments

'Student Geng' ignites China research-integrity scandal calling out sr academics

https://www.nature.com/articles/d41586-026-01902-0
1•randycupertino•2m ago•0 comments

AppleOS 27

https://cupertinolens.com/2026/06/17/introducing-appleos-27/
1•brandonb•3m ago•0 comments

What's that sound? It's Mount Pleasant's new AI data center [video]

https://www.youtube.com/watch?v=gc5XZJfF0kQ
1•haunter•3m ago•0 comments

HN: Maturana – Secure-by-design, zero-trust personal agent framework

https://www.maturana.sh/
1•hestefisk•5m ago•0 comments

Show HN: AptSelect – A local LLM client for parallel testing and evaluation

https://aptselect.com
2•dhavalt•6m ago•0 comments

Personal taste fell out of fashion

https://www.theguardian.com/media/2026/jun/14/have-i-been-influenced-personal-taste-out-of-fashio...
1•ripe•7m ago•0 comments

Al Gore: Scientists were dead right: 20th anniversary of 'An Inconvenient Truth'

https://abcnews.com/US/scientists-dead-al-gore-20th-anniversary-inconvenient-truth/story?id=13392...
2•SilverElfin•7m ago•0 comments

AI Growth – Honest AI Tools Directory and Metrics Dashboard

https://ai-growth.pplx.app/
2•Nannous•7m ago•0 comments

Final DNS Outage of 5 May 2026

https://blog.denic.de/en/final-report-dns-outage-of-5-may-2026/
1•emilburzo•8m ago•0 comments

Appreciation for the Small Web

https://jola.dev/posts/appreciation-for-the-small-web
1•speckx•9m ago•0 comments

Struggling for My Startup

1•roserugco•9m ago•2 comments

A collection of every site on the web

https://everytab.site/
2•fcjr•12m ago•0 comments

Status of Jerusalem holiest site threatened as Israeli nationalists flout rules

https://www.bbc.com/news/articles/cwy0nlv90jno
1•root-parent•13m ago•0 comments

Ten years of ClickHouse in open source

https://clickhouse.com/blog/open-source-10
1•tosh•13m ago•0 comments

Show HN: AutomatiQ – Reverse-Engineering Agent for the Web

https://github.com/StoneSteel27/AutomatiQ
1•stonesteel27•14m ago•0 comments

Computed goto for efficient dispatch tables

https://eli.thegreenplace.net/2012/07/12/computed-goto-for-efficient-dispatch-tables
1•firephox•15m ago•0 comments

Show HN: ctx is now open source, a hackable desktop workbench for coding agents

https://github.com/ctxrs/ctx
3•luca-ctx•16m ago•1 comments

Show HN: Thulr – a spoiler-free wiki for fantasy and sci-fi novels

https://thulr.co
1•_matt_•17m ago•0 comments

Can Java Microservices Be as Fast as Go? A 2026 Benchmark Update

https://medium.com/helidon/can-java-microservices-be-as-fast-as-go-a-2026-benchmark-update-e16a2e...
2•theanonymousone•18m ago•0 comments

Introduction to the DOM for Vulnerability Researchers

https://www.youtube.com/watch?v=Pwta5nZtVNA
1•wetw0rk•20m ago•1 comments

Google Home Speaker

https://blog.google/products-and-platforms/devices/google-nest/google-home-speaker-gemini-features/
2•ilreb•20m ago•1 comments

Digital Field Simulation

https://rogmash.neocities.org/
1•rogmash•21m ago•0 comments

Explainer for the Cross-Origin Storage API

https://github.com/WICG/cross-origin-storage
1•_han•21m ago•0 comments

Will Software Have Its 3D Printing Moment?

https://dshyc.bearblog.dev/will-software-have-its-3d-printing-moment/
1•CliveSHD•21m ago•0 comments

'Passive' investors who dodged BTC, forced to own SPCX which is 3x more volatile

https://www.cnbc.com/2026/06/17/passive-investors-who-dodged-bitcoin-are-now-forced-to-own-spacex...
3•koolba•22m ago•2 comments

FairScan: An Android app to scan your documents

https://github.com/pynicolas/FairScan
2•sohkamyung•22m ago•0 comments