frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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?

Would HN Accept PRs?

1•jorisw•51s ago•0 comments

Recovoly – Built for Better Document Recovery

https://www.recovoly.com/
1•thisarajay•8m ago•0 comments

240M-Year-old giant "sand creeper" found hidden in retaining wall

https://www.sciencedaily.com/releases/2026/05/260504154028.htm
1•Eridanus2•8m ago•0 comments

Pomodoro CLI

https://codeberg.org/kevinschoon/pomo
1•ankitg12•10m ago•0 comments

Know Your .agent?

https://estherdyson.substack.com/p/know-your-agent
1•nembal•10m ago•0 comments

OpenClaw Had a Rough Week

https://openclaw.ai/blog/openclaw-rough-week
1•nouhailaeg•11m ago•0 comments

The AI operator: Biggest role in Silicon Valley

https://www.rishgupta.com/blog/the-ai-operator-biggest-role-in-silicon-valley
2•nreece•13m ago•0 comments

Map projections: a practical guide to common mistakes and how to fix them

https://dominicroye.github.io/blog/map-projections/
1•altilunium•14m ago•0 comments

Facebook Buying Instagram For $1B.(2012)

https://www.bgr.com/general/facebook-paying-1-billion-for-instagram/
1•downbad_•15m ago•2 comments

Car Dealerships Scam America [video]

https://www.youtube.com/watch?v=GREaEG_0Xcw
1•type4•16m ago•0 comments

How I caught an illegal Russian spy [video]

https://www.youtube.com/watch?v=xjo0iLssbI8
1•burnt-resistor•22m ago•0 comments

Why should a Trace-ID be 128 bits? (A Surprisingly Long Answer)

https://newsletter.signoz.io/p/why-should-a-trace-id-be-128-bits
1•elza_1111•26m ago•0 comments

FairwayMapper – Introducing Golfers to Mapping

https://community.openstreetmap.org/t/fairwaymapper-introducing-golfers-to-mapping/142814
1•altilunium•28m ago•0 comments

Banking Malware hiding inside a flashlight app? (BeatBanker / BTMOB)

https://blog.ostorlab.co/beatbanker-btmob-tv-v-23-static-analysis.html
1•Jhonny_doe•28m ago•0 comments

Garmin releases new luxury home audio system globally

https://www.notebookcheck.net/Garmin-releases-new-luxury-home-audio-system-globally.1289575.0.html
1•thunderbong•29m ago•0 comments

The Kurzweil Library

https://www.thekurzweillibrary.com
1•andsoitis•29m ago•1 comments

A bidirectional typechecking puzzle in the Grace programming language

https://haskellforall.com/2026/05/a-bidirectional-typechecking-puzzle
3•fanf2•31m ago•0 comments

Code never mattered in the first place

https://mar.coconauts.net/blog/posts/code-never-mattered/
1•marbartolome•35m ago•0 comments

The Place of Houses: Questionnaire [pdf]

http://www.duodickinson.com/Yours_complete.pdf
2•Kaibeezy•36m ago•0 comments

How to improve code quality of Claude Code and codex (on 2026-05)

1•david_d8912•36m ago•0 comments

It is distressing that AI does not know the seven cardinal virtues

https://en.wikipedia.org/wiki/Seven_virtues
2•chasil•43m ago•5 comments

You made me rich, thank you

https://github.com/theori-io/copy-fail-CVE-2026-31431/issues/128
9•mfi•43m ago•4 comments

Donlyn Lyndon, Last Surviving Creator of the Sea Ranch, Dies at 90

https://www.nytimes.com/2026/05/05/arts/design/donlyn-lyndon-dead.html
2•Kaibeezy•44m ago•1 comments

NHS England withdraws public software over AI hacking fears

https://www.computing.co.uk/news/2026/security/nhs-england-withdraws-public-software-over-hacking...
2•latein•45m ago•0 comments

Show HN: Yumi – Your workspace for AI chat, notes, and research

https://askyumi.app
1•yumi-dev•45m ago•0 comments

Fedora is now the default Linux recommendation, and Ubuntu did this to itself

https://www.xda-developers.com/fedora-becoming-default-linux-recommendation-ubuntu-fault/
2•bundie•45m ago•1 comments

The Deletion Test – The Phoenix Architecture

https://aicoding.leaflet.pub/3md5ftetaes2e
2•fagnerbrack•48m ago•0 comments

The 80% Problem in Agentic Coding

https://addyo.substack.com/p/the-80-problem-in-agentic-coding
1•fagnerbrack•48m ago•0 comments

How the Lobsters front page works – nilenso blog

https://blog.nilenso.com/blog/2026/01/20/lobsters-front-page/
1•fagnerbrack•48m ago•0 comments

The Boring Internet

https://www.terrygodier.com/the-boring-internet
4•crowdhailer•50m ago•1 comments