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?

Social Policy Builds Financial Markets

https://economicsociology.org/2026/08/28/how-social-policy-builds-financial-markets/
1•kome•58s ago•0 comments

Conic Sections Rebellion

https://en.wikipedia.org/wiki/Conic_Sections_Rebellion
1•_Microft•1m ago•0 comments

So you want to become a Root CA?

https://kuber.studio/blog/Technology/So-you-want-to-become-a-Root-CA
1•kuberwastaken•3m ago•0 comments

Nvidia Nemotron 3.5 Bolt E4B 4GB

https://research.nvidia.com/labs/nemotron/NVIDIA-Nemotron-3.5-Bolt-E4B-4GB/
1•armcat•7m ago•0 comments

Ranji Smile: The forgotten chef who opened America's first Indian restaurant

https://www.bbc.com/news/articles/crm941n0413o
1•tosh•7m ago•0 comments

How to Get a Stable Public IP on macOS Using a VPS and Tailscale

https://zyvop.com/how-to-get-a-stable-public-ip-on-macos-using-a-vps-and-tailscale-p5dgv
1•sanjays442•11m ago•0 comments

Lspkit – a Rust Toolkit for Building Programming Language Toolsets

https://lspkit.dev/
1•cfdevelop•12m ago•0 comments

Understanding the core 4 choices is where conscious creation begins

https://randomfuckingknowledge.substack.com/p/the-four-choices-that-change-how
1•TheCreativePrin•14m ago•0 comments

Show HN: Readeck sync for Kobo's stock reader

https://github.com/fkaduk/kobodeck
1•fkdk•14m ago•0 comments

Live benchmark of web scraping APIs and residential proxies (2026)

https://github.com/tianjun588/llm-web-scraping-benchmark
1•tianjun588•16m ago•0 comments

Show HN: Agent-arcade – Terminal games that pause when Claude Code/Codex is done

https://github.com/Kuldeep-045/agent-arcade
3•Kuldeep045•19m ago•0 comments

Name the UK Space Agency's Active Debris Removal Mission

https://space.blog.gov.uk/2026/10/15/name-the-uk-space-agencys-first-national-mission-%f0%9f%9b%b...
1•helsinkiandrew•21m ago•0 comments

Do At-Proto Users Know This Is Public?

https://melaniekat.com/blog/public-on-pds/
1•birdculture•22m ago•0 comments

Why Do I Sometimes Hate Myself

https://tomaszdziurko.substack.com/p/why-do-i-sometimes-hate-myself
9•Tiwariparth6165•22m ago•1 comments

Essays on the Nature and Role of Mathematical Elegance by Edsger Dijkstra

https://www.cs.utexas.edu/~EWD/transcriptions/EWD06xx/EWD619.html
1•rramadass•25m ago•1 comments

Getting Google Cast on My Soundbar

https://codon.org.uk/~mjg59/blog/p/getting-google-cast-on-my-soundbar/
1•robin_reala•32m ago•0 comments

The First Agentic Native Hobby Operating System

https://github.com/vahmoh/Veda
1•sevda11•37m ago•0 comments

FK Sofa – Truck

https://www.truck-furniture.co.jp/en/backstories/fk-sofa/
2•Michelangelo11•46m ago•1 comments

Faststrap: Component-based FastHTML extension that provides reusable UI elements

https://github.com/Faststrap-org/Faststrap
1•indigodaddy•48m ago•0 comments

Power of Raycast, Now on iOS

https://www.raycast.com/ios
3•rene_d•1h ago•0 comments

Punchy – a security Tamagotchi that boxes the internet

https://punchy.virtualserv.uk
1•raister•1h ago•0 comments

What if your ChatGPT conversations have a dashboard that can track things

https://chatgpt.com/plugins/plugin_asdk_app_6ad58e43cfe881919841205d69cff9cf
2•vasanthps•1h ago•0 comments

Good writing is a business advantage (2020)

http://adaged.blogspot.com/2020/04/good-writing-is-business-advantage.html
1•zenincognito•1h ago•0 comments

Non-autoregressive NC LLM spits tokens 21x faster than text diffusion

https://hazyresearch.stanford.edu/blog/2026-10-12-ncm
2•LarsDu88•1h ago•0 comments

Junglia theme park in Okinawa posted ¥17.3B (US$109.84) loss in first year

https://www.japantimes.co.jp/business/2026/09/26/junglia-okinawa-first-year-loss/
1•guessmyname•1h ago•0 comments

Farewell – ETAOIN SHRDLU – 1978 [video]

https://vimeo.com/127605643
1•apical_dendrite•1h ago•0 comments

Ask HN: Is the Microsoft buyout just a long overdue correction?

2•sky2224•1h ago•3 comments

Push Ifs Up and Fors Down

https://matklad.github.io/2023/11/15/push-ifs-up-and-fors-down.html
3•dboon•1h ago•0 comments

From the Analytics Department to a Lone Operator with a Laptop

https://medium.com/@smoking2man/from-the-analytics-department-to-a-lone-operator-with-a-laptop-ho...
1•Aldus551•1h ago•0 comments

Digital Minimalism

https://vitalik.eth.limo/general/2026/10/31/digital_minimalism.html
4•wilbertliu•1h ago•0 comments