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?

Are credit rating agencies getting fed up with hyperscalers?

https://www.ft.com/content/623c286b-c973-4488-83f3-97e9016e85f6
1•JumpCrisscross•4m ago•0 comments

Extract Anything from Any PDF: Inside Foxit's Advanced Extraction Engine

https://developer-api.foxit.com/developer-blogs/api-guides-tutorials/pdf-structural-extraction-en...
2•fagnerbrack•7m ago•0 comments

Show HN: BlinkMarkets

https://blinkmarkets.xyz
1•gauryvg98•7m ago•0 comments

Defence officials resist EU plan to curb reliance on US tech giants

https://www.ft.com/content/0e9d714b-f367-4dd7-8ef4-6d4b2c08b79c
1•JumpCrisscross•8m ago•0 comments

Is Russia's rival to Starlink failing? Here's what we know

https://arstechnica.com/space/2026/09/rassvet-russias-rival-to-starlink-is-getting-off-to-a-slow-...
2•gumby•9m ago•0 comments

Linux 7.4 to Improve Apple Silicon Audio Support and Impossible Power Management

https://www.phoronix.com/news/Linux-Apple-Audio-Shared-GPIO
1•theanonymousone•9m ago•0 comments

Picolibrary: A Small Press

https://novalis.org/blog/2026-08-31-picolibrary-a-very-small-press.html
1•luu•13m ago•0 comments

Show HN: Scramblefall - falling blocks anagram game

https://scramblefall.com/
1•jstanley•17m ago•0 comments

SlimTCP is a lightweight, high-performance TCP/IP stack for modern datacenters

https://github.com/CajuM/lib-ndpip
1•CajuMD•18m ago•1 comments

Astra One Shotted Cains's Jawbone

2•marcushyett•19m ago•0 comments

Toolcall-doctor – Shrink broken LLM tool-call reproducers

https://github.com/aldi949/toolcall-doctor
1•Aldi949•20m ago•1 comments

macOS 26.7 Code Hints at Two Unreleased Apple Game Controllers

https://www.macrumors.com/2026/09/04/macos-26-7-code-game-controllers/
1•rene_d•21m ago•0 comments

New study says Michigan sturgeon may live to 400

https://www.greatlakesnow.org/2026/08/13/think-youre-getting-old-new-study-says-michigan-sturgeon...
1•geox•22m ago•0 comments

Nvidia Personal AI Router (Pair)

https://www.nvidia.com/en-us/ai-on-rtx/personal-ai-router/
2•theanonymousone•26m ago•0 comments

I raised 5 kids. Looking back, their careers as adults make perfect sense

https://www.businessinsider.com/childhood-interests-predict-future-careers-kids-2026-9
1•theanonymousone•27m ago•0 comments

Refactoring English: Effective Writing for Software Developers (v1.0)

https://refactoringenglish.com
1•adityaathalye•31m ago•0 comments

Ask HN: Any Alternatives to Archive.ph & co?

1•hebelehubele•33m ago•0 comments

Mariko Aoki Phenomenon

https://en.wikipedia.org/wiki/Mariko_Aoki_phenomenon
1•jonjomckay•39m ago•0 comments

'Guilt by association': why 7 int'l aid workers were killed in Israeli airstrike

https://www.theguardian.com/world/2026/sep/05/aid-workers-gaza-killed-in-israel-airstrike-investi...
2•hebelehubele•42m ago•0 comments

Second complete map of a fruit fly brain completed

https://arstechnica.com/science/2026/09/brain-of-a-male-fly-completely-mapped-joins-earlier-map-o...
1•mdp2021•43m ago•0 comments

Desktop AI for ops is still subsidized

1•xAdamx•43m ago•0 comments

Paper Reef – draw a fish on paper, photograph it, it swims on a shared screen

https://paperreef.com/r/REEF
2•lyapustin•47m ago•0 comments

Nvidia Wants to Turn Your Idle PCs into a Personal Home Data Center with 'Pair'

https://www.pcmag.com/news/nvidia-pair-turn-idle-pcs-into-ersonal-home-data-center-ifa-2026
2•thunderbong•49m ago•0 comments

Monocode – A modern GUI for your coding agents

https://github.com/hardbeat920/monocode
1•_pdp_•56m ago•0 comments

Trump White House just tossed a grenade into international space relations

https://arstechnica.com/space/2026/09/why-did-us-space-companies-pull-out-of-a-french-space-meeti...
2•mdp2021•57m ago•0 comments

New study: Insurance AI adoption exposes verification gap

https://beinsure.com/news/insurance-ai-adoption-exposes-verification-gap-study-finds/
1•Beinsure•57m ago•1 comments

Pimacs – An Emacs UI for Pi

https://ananthakumaran.in/2026/08/30/pimacs.html
1•ananthakumaran•58m ago•0 comments

On niche subjects, you can control the message of LLMs

https://multitasked.net/2025/02/23/the-open-web-strikes-back/
1•madewulf•59m ago•0 comments

Handwritten Code

https://kayserifserif.place/posts/2026/handwritten-code/
2•meetpateltech•1h ago•0 comments

Iroh inside Tape – Critical UX for self-hosted music streaming suite

https://tapemusicsuite.com/blog/iroh-device-connection-without-tailscale
1•sergormo•1h ago•0 comments