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•10mo ago

Comments

nine_k•10mo 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•10mo ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•10mo ago
They mention this in the article.
spockz•10mo ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•10mo ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•10mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•10mo 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•10mo 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•10mo 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•10mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•10mo ago
This was very well written. Excellent article!
NetOpWibby•10mo ago
Is this like MessagePack for Haskell?

Ask HN: Identity preservation vs. information transfer in LLMs

1•PennyTee•31s ago•0 comments

After falling far behind the rest, Blue Origin creates new stock option plan

https://arstechnica.com/space/2026/03/after-years-of-missteps-blue-origin-to-finally-offer-meanin...
1•oldnetguy•39s ago•0 comments

Show HN: Query Hacker News with SQL: Public HN API as In-Memory DuckDB Tables

1•debba•49s ago•0 comments

Show HN: AI agent that runs real browser workflows

https://ghostd.io
1•heavymemory•1m ago•0 comments

Laser-Based 3D Printing Could Build Future Bases on the Moon

https://www.universetoday.com/articles/laser-based-3d-printing-could-build-future-bases-on-the-moon
1•oldnetguy•2m ago•0 comments

Do Offshore Wind Farms Pose National Security Risks?

https://spectrum.ieee.org/offshore-wind-military-radar
1•oldnetguy•2m ago•0 comments

PgAdmin 4 9.13 with AI Assistant Panel

https://www.pgadmin.org/docs/pgadmin4/9.13/query_tool.html#ai-assistant-panel
1•__natty__•2m ago•0 comments

There are 56 ethnicities in China–and 55 are getting squashed

https://economist.com/china/2026/03/09/there-are-56-ethnicities-in-china-and-55-are-getting-squashed
4•andsoitis•5m ago•0 comments

The Road

https://en.wikipedia.org/wiki/The_Road
2•chistev•8m ago•1 comments

Fifty years of sexing up tech: Apple's epic hits – and misses

https://www.theguardian.com/technology/2026/mar/10/50-years-apple-epic-hits-and-misses
1•frereubu•10m ago•0 comments

Chinese tech hubs promote OpenClaw AI agent despite security warnings

https://www.reuters.com/world/asia-pacific/chinas-shenzhen-backs-openclaw-ai-with-subsidies-despi...
2•TMWNN•14m ago•0 comments

The Architecture of an Exit Scam: A Technical Audit of Zszrun

1•cappyfjao•15m ago•0 comments

China's AI giants are handing out cash to lure in users

https://economist.com/business/2026/03/09/chinas-ai-giants-are-handing-out-cash-to-lure-in-users
1•andsoitis•15m ago•0 comments

Do the Illegible

https://ashwinsundar.com/posts/legibility-and-programming/
2•wofo•15m ago•0 comments

Amdahl's Law

https://en.wikipedia.org/wiki/Amdahl%27s_law
2•olalonde•17m ago•0 comments

Ask HN: P2P Trust Network for reviews in the 2020s

1•JCharante•19m ago•0 comments

Why "Authentic" Is the Next Thing We'll Game

https://balint.blog/gamed/
2•balintkorosi•20m ago•1 comments

Claude Code Skills and Plugins as an Open Source Project

https://github.com/alirezarezvani/claude-skills
1•jungard•20m ago•1 comments

Curious about just how adult the weather can get

https://twitter.com/troyhunt/status/2031079752631808350
1•bilsbie•21m ago•0 comments

LLM-Assisted Reverse Engineering

https://skullbloc.com/posts/llm-assisted-reverse-engineering/
1•stebbins•24m ago•0 comments

6k Bad Coding Lessons Turned a Chatbot Evil

https://www.nytimes.com/2026/03/10/opinion/ai-chatbots-virtue-vice.html
1•acjohnson55•25m ago•0 comments

F-35 Software Could Be Jailbreaked Like an iPhone: Dutch Defense Secretary

https://www.twz.com/air/f-35-software-could-be-jailbreaked-like-an-iphone-dutch-defense-minister
2•tzury•25m ago•1 comments

Depression is getting ahead of me

1•ppap3•25m ago•1 comments

Show HN: SiClaw – an open-source agent for debugging infrastructure incidents

https://siclaw.ai/
1•SherryWong•26m ago•0 comments

The Canonical Document

https://k2xl.substack.com/p/the-canonical-document
1•k2xl•26m ago•0 comments

Kovan: From Production MVCC Systems to Wait-Free Memory Reclamation

https://vertexclique.com/blog/kovan-from-prod-to-mr/
1•EvgeniyZh•27m ago•0 comments

MacBook Air M5 review: Almost perfect

https://www.tomsguide.com/computing/macbooks/macbook-air-m5-review
1•tosh•29m ago•2 comments

Is Srqcgx Safe? A Technical Audit of the "Wrapper" Fraud Architecture

1•cappyfjao•33m ago•0 comments

Just keep doing the bit (Karma Yoga Edition)

https://sankalp.bearblog.dev/just-keep-doing-the-bit-karma-yoga-edition/
1•tosh•34m ago•0 comments

Show HN: Sandboxing Agents on macOS and Linux with Nix

https://github.com/archie-judd/agent-sandbox.nix
1•peacefulPanda•35m ago•1 comments