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?

Draft-tree decoding on Apple Silicon: M4 vs. M5/M6 and bit-exact Metal

https://blog.yuhuachen.com/blog/2ArXyvXoSTOQ9nFQtp3Fz
1•yuhuabill•55s ago•0 comments

MotherDuck, Meet Excel

https://motherduck.com/blog/motherduck-duckdb-meet-excel/
1•Tomte•1m ago•0 comments

Why we're blind to the color blue (2021)

https://calebkruse.com/10-projects/seeing-blue/
1•sammatilda•2m ago•0 comments

Inkling 2 Small on Nvidia B300: 5.1x to 7.5x faster expert GEMMs, same bits

https://www.rightnowai.co/blog/bit-identical-fp4-moe-kernels-on-blackwell
3•OsamaJaber•5m ago•0 comments

Three-way translation merge: keeping translated pages in sync with an LLM

https://maxmart.github.io/posts/three-way-translation-merge/
1•maxmart•6m ago•0 comments

Show HN: Cloud-drift-report – an open-source driftctl alternative for AWS

https://github.com/orchesterra/cloud-drift-report
1•akshaykilam•6m ago•0 comments

A Slinky on an Escalator Is a Weirdly Good Test of LLM Intelligence

https://morethanamachine.com/posts/slinky-escalator-benchmark/
1•reddmachine•7m ago•1 comments

Gemini: Can't prevent training or review even with no history retained

https://support.google.com/gemini/answer/13594961?hl=en
2•iotage•7m ago•1 comments

Hex Marks the Spot

https://www.museumofplay.org/blog/hex-marks-the-spot/
1•jonbaer•11m ago•0 comments

A History of Clojure (2020)

https://dl.acm.org/doi/pdf/10.1145/3386321
1•tosh•13m ago•0 comments

Qlaude – Claude Code against your own model server

https://github.com/trail-openers/qlaude
1•velmu•19m ago•0 comments

The Manufacturing of Novelty

https://www.ft.com/content/99711b1a-3e54-4349-9c81-769cf7c96b97
1•JumpCrisscross•22m ago•0 comments

Probabilistic data structures in Go, part 2

https://antonz.org/probabilistic-data-structures-2/
1•mfrw•22m ago•1 comments

California train burglars carefully executed heists for 'staggering' $22M haul

https://www.theguardian.com/us-news/2026/nov/21/california-arrests-train-heists
2•ljf•25m ago•0 comments

Ask HN: Who Owns API Drift

1•Nalin_2408•27m ago•1 comments

Can Psychedelics Improve Decision-Making?

https://nautil.us/can-psychedelics-improve-decision-making-1286863
2•the-mitr•34m ago•0 comments

The Engineering Manager's role is under attack (again)

https://www.manager.dev/newsletter/the-engineering-manager-s-role-is-under-attack-again
5•fagnerbrack•38m ago•0 comments

Ask HN: Is Anthropic being public better or worse for your org?

3•ares623•39m ago•1 comments

Web Search on Amazon Bedrock expands language support and country-aware search

https://aws.amazon.com/about-aws/whats-new/2026/11/web-search-amazon-bedrock/
1•yackrru•44m ago•0 comments

Notes on the discrete Fourier transform (DFT)

https://eli.thegreenplace.net/2026/notes-on-the-discrete-fourier-transform-dft/
10•kouosi•47m ago•1 comments

Show HN: App Pixel3D – Dream to 3D Reality

https://apps.apple.com/hu/app/pixel3d-dream-to-3d-reality/id6479245806
1•cflsdf•47m ago•0 comments

Postgres 19 is out: try it on Neon

https://neon.com/blog/postgres-19-is-out-try-it-on-neon
2•yackrru•48m ago•0 comments

Show HN: iOS App Dancing Particle is an interactive app

https://apps.apple.com/us/app/dancing-particle/id6444665083
1•cflsdf•48m ago•0 comments

Amazon is complaining about NYC Council on shipping labels, too

https://www.theverge.com/tech/1039564/amazon-nyc-council-packages-shipping-label
2•burnt-resistor•52m ago•0 comments

Show HN: Prompt Upgrader – a no-signup tool that scores and rewrites AI prompts

https://madgpt1.github.io/prompt-upgrader/
1•MadGPT•58m ago•0 comments

AI resolved all null pointer dereferences in C

https://kapteko.com/ai-resolved-all-null-pointer-dereferences/
1•fessguid•1h ago•1 comments

The Indignity of Makework

https://poisonandoak.wordpress.com/2026/11/21/the-indignity-of-makework/
2•wburglett•1h ago•0 comments

IronWAL: High performance, high durability, deterministic WAL

https://github.com/excsn/ironwal
1•excsn•1h ago•1 comments

How to read a CVSS score and decide what to patch

https://p99log.com/reading-cvss-scores/
1•collinstonui•1h ago•0 comments

Why agent swarms get better at optimizing code as they grow

https://frontier.replit.com/throwing-headcount-at-the-problem/
2•DonAtimator•1h ago•0 comments