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?

Inexpressible States: The History and Usage of Algebraic Data Types

https://www.makonea.com/en-US/blog/inexpressible-states-the-history-and-usage-of-algebraic-data-t...
1•jdw64•57s ago•0 comments

FlashAttention: Part 2

https://chizkidd.github.io//2026/09/17/flashattention-2/
1•ibobev•1m ago•0 comments

Fable 5.1 vs. Astra for coding: Fable 2X more expensive per task but solves more

https://aistack.imec-int.com/blog/astra-vs-fable-update
1•mindwraps•1m ago•1 comments

Extracting Grid Information Using CSS

https://blog.master.dev/extracting-grid-information-using-css/
1•ibobev•1m ago•0 comments

Lunch with the FT: Raspberry Pi Founder Eben Upton

https://www.ft.com/content/07acddb2-9a2f-4646-b7dd-2cb4ebe0257d
1•jyunwai•2m ago•0 comments

GPUs: Rent vs. Buy

https://cloud-gpus.com/rent-vs-buy/
1•6bitquant•2m ago•0 comments

Open Peeps – A hand-drawn illustration library

https://www.openpeeps.com/
1•kepler471•4m ago•0 comments

Grandmasters: Official Theatrical Trailer [video]

https://www.youtube.com/watch?v=QJ411MMkf7o
2•jonbaer•6m ago•0 comments

Wafer-Scale Superconducting Transistors Cut Cryo Cables

https://spectrum.ieee.org/superconducting-transistors
2•rbanffy•7m ago•0 comments

Show HN: Forcefield: A fast, lightweight local-first AI agent harness

https://github.com/fabledruns/forcefield
2•jehoshuam•7m ago•0 comments

Stepshell – an authenticated web terminal for Kubernetes pods

https://github.com/aortmann/stepshell
2•aortmann•8m ago•0 comments

Orca – deterministic, AI-driven development flows

https://github.com/VirtusLab/orca
3•mihau•9m ago•0 comments

A SQL Where Clause for Taste

https://query.farm/blog/a-where-clause-for-taste/
2•rustyconover•9m ago•0 comments

Meetings [pdf]

https://www.nber.org/system/files/working_papers/w35706/w35706.pdf
2•mooreds•10m ago•0 comments

WiFi QR Stand (3D Print with live preview)

https://github.com/Niek/wifi-stand
2•NiekvdMaas•11m ago•0 comments

The ABCs of Getting Rich

https://everywheremillionaire.substack.com/p/the-abcs-of-getting-rich
1•mooreds•11m ago•0 comments

Crab (Fiction): Google's AI Overview Invented a "Crab Team"

https://john.hartnup.uk/fiction/crab/
1•ereiamjh•12m ago•1 comments

Why Bend 2's typechecker benchmarks are misleading (and its practical flaws)

https://gist.github.com/Nezk/dda0511c492cf9bd673885f0341dca0e
2•Nezk•12m ago•0 comments

Turning a childhood home into a place to share with strangers

https://www.marketplace.org/story/2026/09/17/turning-a-childhood-home-into-a-place-to-share-with-...
1•mooreds•12m ago•0 comments

Signal Beta Lets Users Register Without a Phone Number

https://digitalescapetools.com/2026/09/signal-android-8-28-beta-numberless-registration.html
1•xabd•13m ago•0 comments

Patch2vuln v1.0: Streamlining Vulnerability Advisory from Git Patch

https://gcve.eu/2026/09/18/introducing-patch2vuln-v1.0-streamlining-vulnerability-advisory-creati...
1•adulau•13m ago•0 comments

Data centers are swapping water for forever chemicals to keep AI cool

https://fortune.com/2026/09/18/data-centers-ai-compute-pfas-forever-chemicals-water/
1•F3nd0•14m ago•0 comments

Show HN: Figranium – Stack blocks to build browser workflows and call via API

https://github.com/figranium/figranium
2•asernasr•17m ago•0 comments

Code review automation fixed the wrong problem

https://tomosu.ai/blogs/code-review-automation.html
1•tomosu-ai•18m ago•0 comments

Keeping Humans in the Loop

https://roarepally.com/blog/ai-as-an-intelligence-amplifier
1•ro_arepally•20m ago•0 comments

Find Jobs That Interview Without LeetCode

https://noleet.lol/
2•monological•21m ago•0 comments

HEIF Heist

https://heif-heist.com/#overview
2•machinecontrol•21m ago•0 comments

Show HN: Skillmem – local memory for coding agents that stores how, not what

https://github.com/liza-studio/skillmem
1•mrPetrukovich•26m ago•0 comments

AI is an elite crime spree

https://www.thebignewsletter.com/p/ai-is-an-elite-crime-spree
6•chmaynard•26m ago•0 comments

Fibonacci Product

https://www.johndcook.com/blog/2026/09/16/fibonacci-product/
1•ibobev•27m ago•0 comments