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?

Public data and an AI evidence engine for Swedish politics

https://oversikt.se/
1•andreascw•1m ago•0 comments

The company behind explosive diarrhea

https://www.theguardian.com/us-news/2014/nov/23/billion-dollar-california-salad-company-exploits-...
2•cramer4next•3m ago•0 comments

A grumpy screed about AI in software engineering

https://sam.sutch.net/posts/a-grumpy-ai-screed
1•ssutch3•5m ago•0 comments

Idea would turn the Earth into a giant space telescope

https://www.snexplores.org/article/idea-would-turn-earth-giant-space-telescope
1•somedude89897•7m ago•1 comments

Open Source is not immune to monopoly

https://humancode.us/2026/07/17/open-source-monopoly
1•ilreb•10m ago•0 comments

Nadella Blasts AI Industry's Double Standard

https://finance.biggo.com/news/438f299b-ca23-468d-b37d-0ffe09a4ca55
1•nittanymount•16m ago•1 comments

The Netdna-Ssl.com Takeover

https://scotthelme.co.uk/a-dead-cdn-a-wildcard-and-an-attack-waiting-to-happen-the-netdna-ssl-com...
2•mercurybee•18m ago•0 comments

Native C# CEL Implementation

https://www.nuget.org/packages/Celly
2•jackedEngineer•23m ago•0 comments

New Jersey Couple Aids Meteorite Discovery After It Crashes Through Their Roof

https://www.nytimes.com/2026/07/15/science/meteorite-new-jersey.html
2•gmays•24m ago•0 comments

Merck's Lipfendra becomes first oral PCSK9 treatment

https://www.fiercepharma.com/pharma/merck-scores-fda-nod-lipfendra-becomes-first-oral-pcsk9-treat...
1•toomuchtodo•26m ago•1 comments

Open Problems Solved by LLMs? A Survey of Verifiable Mathematical Discovery [pdf]

https://aclanthology.org/2026.bigpicture-main.2.pdf
2•antondd•34m ago•1 comments

Credit Card Points Are a Transfer from the Broke to the Comfortable

https://willisallstead.substack.com/p/your-credit-card-points-are-a-transfer
14•willio58•39m ago•2 comments

Why X Is Not Our Ideal Window System

https://people.freedesktop.org/~ajax/WhyX.pdf?__goaway_challenge=meta-refresh&__goaway_id=c287e9b...
4•signa11•39m ago•1 comments

ReFrame – The EPaper Camera

https://reframe.camera/
2•NetOpWibby•41m ago•0 comments

PSA about abuse of cat(1) command. Don't abuse cats

https://www.abuseofcats.com
4•scooterbooper•41m ago•1 comments

Aside – Reddit-like circles with AI-ranked feeds

https://aside.cool/
1•zhiwenhuang•44m ago•0 comments

People Counter with Infrared Sensor: Build Your Own System in a Few Hours

https://comuniq.xyz/post?t=1406
4•01-_-•48m ago•0 comments

Sourced ranking of the AI infrastructure build-out

https://www.capexindex.com/
2•umangsehgal93•51m ago•0 comments

Loop Library for Engineers

https://signals.forwardfuture.com/loop-library/
1•tylerdane•52m ago•0 comments

Common diet tips about water intake and spicy foods could be dead wrong

https://news.cornell.edu/stories/2026/07/common-diet-tips-about-water-intake-and-spicy-foods-coul...
2•littlexsparkee•53m ago•0 comments

Figma for Email?

https://www.hedwig-ai.com/
2•neshc•53m ago•1 comments

M17 rev B done, rev C next

https://m17project.org/2026/06/16/linht-rev-b-status-what-works-what-broke-and-why-rev-c-is-next/
2•client4•54m ago•0 comments

My C and Assembler 3D Real Time Renderer from 1997

https://ben3d.ca/blog/rendering-real-time-3d-before-gpus
2•bhouston•57m ago•0 comments

Clang: Hardware-Assisted AddressSanitizer Design Documentation

https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html
2•signa11•59m ago•0 comments

A Functional Taxonomy of World Models by Fei-Fei Li

https://drfeifei.substack.com/p/a-functional-taxonomy-of-world-models
3•andsoitis•59m ago•0 comments

Goiânia Accident

https://en.wikipedia.org/wiki/Goi%C3%A2nia_accident
3•isagues•1h ago•0 comments

Tyler Cowen: the future belongs to AI maniacs

https://www.thefp.com/p/tyler-cowen-ai-maniacs-future-economy
2•thoughtpeddler•1h ago•1 comments

Repeal of national park rule could impact drinking water for millions

https://www.courthousenews.com/repeal-of-national-park-rule-could-impact-drinking-water-for-milli...
4•geox•1h ago•0 comments

Things you didn't know about indexes

https://jon.chrt.dev/2026/04/15/things-you-didnt-know-about-indexes.html
2•thunderbong•1h ago•0 comments

Claude Code(Fable) refused my slow down instruction

https://qusaisuwan.github.io/cc-incident/index.html
2•qusaisuwan•1h ago•0 comments