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?

My HP EliteDesk 800 G1 Decrypts Bitlocker

https://postimg.cc/0rj2vW64
1•sehw•44s ago•1 comments

We don't need AI regulation – leave safety to us, Nvidia's Jensen Huang says

https://techcrunch.com/2026/09/15/we-dont-need-ai-regulation-leave-safety-to-us-nvidias-jensen-hu...
2•girish_r•7m ago•1 comments

The Customizable Select

https://utilitybend.com/blog/the-customizable-select-part-one-history-trickery-and-styling-the-se...
1•nesk_•10m ago•0 comments

Schadenfreude

https://en.wikipedia.org/wiki/Schadenfreude
1•vismit2000•16m ago•0 comments

The Unwilding of Patagonia's Pollinators

https://biographic.com/the-unwilding-of-patagonias-pollinators/
1•Tomte•17m ago•0 comments

Ask HN: Are requests/demands coming from AI companies for regulation genuine?

2•atakan_gurkan•17m ago•1 comments

Show HN: MinMAX Sort – A Stable Bidirectional Selection Sort Family Algorithm

2•jodenghog•35m ago•1 comments

Prefill a 284B model on Nvidia. Decode it on Apple Silicon. Over plain 10GbE

https://github.com/chadhurley25075-png/pd-bridge
2•jnaina•35m ago•1 comments

MartyPC – A Cycle-Accurate IBM PC/XT Emulator

https://github.com/dbalsom/martypc
2•yitchelle•37m ago•0 comments

We are all Product Engineers now

https://seldo.com/posts/we-are-all-product-engineers-now/
2•ColinEberhardt•39m ago•0 comments

Show HN: An open-source Socratic coach for competitive programming

https://chromewebstore.google.com/detail/socratic-algo-coach/inppdfdpenccjiggnlfaomfnckadoaoi
1•boriskurikhin•42m ago•1 comments

Looking back on Servo's first donation-funded role

https://servo.org/blog/2026/09/15/one-year-of-sponsorship/
2•luu•42m ago•0 comments

Show HN: Check an NPM package or MCP server for malicious code before install

https://bouncer.run/check
1•nader•43m ago•0 comments

The first ever API built for dictation;Today we're launching the Dictation API

https://www.assemblyai.com/dashboard/login
1•iharnoor•44m ago•1 comments

There are no optical corrections in the Parthenon

https://doi.org/10.1098/rsos.260999
2•yzydserd•44m ago•0 comments

I wrote a kill number before I wrote the landing page copy

https://deskthaw.com/blog/preorder-mechanics/
2•aaaan•46m ago•1 comments

A software thing I built: GPS on a 25MHz 486-SX

https://forum.vcfed.org/index.php?threads/a-software-thing-i-built-gps-on-a-25mhz-486-sx.1258966/
3•JPLeRouzic•49m ago•1 comments

I built dual cam app because I had credits left and didn't know what else to do

https://play.google.com/store/apps/details?id=app.heynomad.camera.dualshot.creator.ai&hl=en
1•yugendhar•50m ago•1 comments

Noise-Coded Illumination for Forensic and Photometric Video Analysis

https://arxiv.org/abs/2507.23002
1•1e1a•51m ago•0 comments

Show HN: HTMLCATS – Editor-First Learning for HTML, CSS, and JavaScript

https://htmlcats.com/
1•chriskkim•53m ago•0 comments

Fusion in Devin Desktop and CLI

https://cognition.com/blog/local-fusion
1•ludovicianul•54m ago•0 comments

Show HN: Makerpa.ge – project hub and syncing badge across your sites

https://makerpa.ge
1•leon2589•54m ago•0 comments

IOS27 removes feature to hide safari, why?

1•robglick•54m ago•0 comments

Is Jev That Good?

https://twitter.com/completeskeptic/status/2099925682726002904
2•bchelli•55m ago•0 comments

Dan Selsam's Personal Statement on AI Risk

https://www.reddit.com/r/singularity/comments/1wgibs1/ai_2027_author_daniel_kokotajlo_tweets_mess...
1•dwaltrip•56m ago•0 comments

Where Prediction Markets Struggle

https://economist.com/graphic-detail/2026/09/10/where-prediction-markets-struggle
1•andsoitis•1h ago•0 comments

The AI Language We Can't Read: Neuralese [video]

https://www.youtube.com/watch?v=iuHddnIzKRA
1•__vivek•1h ago•0 comments

Tesla Full Self-Driving customers can now access lower insurance premiums

https://www.drive.com.au/news/tesla-full-self-driving-customers-can-now-access-lower-insurance-pr...
5•teleforce•1h ago•1 comments

Continual Learning Mechanisms Compose for Long-Horizon Memorization

https://arxiv.org/abs/2609.06986
2•donk8r•1h ago•0 comments

Are you committed to your company or your team?

https://www.economist.com/business/2026/09/10/are-you-committed-to-your-company-or-your-team
2•andsoitis•1h ago•0 comments