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?

Reverse Engineering the Apple QuickTake 200 in 2026

https://medvedev.im/articles/2026-06-07/quicktake-200
1•imedvedev•1m ago•0 comments

Flock license plate reader wrongly linked a San Diego man to a violent crime

https://timesofsandiego.com/crime/2026/06/07/a-flock-license-plate-reader-linked-a-san-diego-man-...
2•loteck•2m ago•0 comments

Show HN: Luminous – fast image viewer in Rust, SAM 3 and CLIP support

https://github.com/jaroslavszkandera/luminous
2•jarda_64•3m ago•0 comments

MemGraphRAG: Memory-Based Multi-Agent System for Graph RAG

https://arxiv.org/abs/2606.00610
1•Anon84•7m ago•0 comments

Raspberry Pi Home Server: Back Up Your Files Locally for Under $100 DescriçãO

https://spiritcode.blog/vue-2-to-vue-3-migration-stop-rewriting-migrate-smart/
1•spiretcodeblog•10m ago•0 comments

Dead Button Syndrome

https://em-tg.github.io/dedbutt/
1•em-tg•11m ago•1 comments

Boomers are hoarding most of America's wealth and power

https://finance.yahoo.com/economy/articles/golden-years-not-golden-boomers-113000201.html
5•randycupertino•19m ago•1 comments

What Are Tokens in LLMs?

https://bearisland.dev/posts/tokens-and-tokenization/
3•s1monb•19m ago•0 comments

Jorge Luis Borges Lecture April 9th, 1976 [video]

https://www.youtube.com/watch?v=lMn4_iTqoJI
1•marysminefnuf•19m ago•0 comments

Criblate – Help your favorite creators speak every language

https://criblate.com/
1•ravenical•20m ago•0 comments

The Tinker Pledge

https://tinkerpledge.org
1•norcalkc•22m ago•1 comments

Xaml.io Compiles to Native Apps in the Browser

https://www.i-programmer.info/news/89-net/18906-xamlio-compiles-to-native-apps-in-browser.html
1•croes•24m ago•0 comments

Easter egg in new Lego Batman game contains working C64 code [video]

https://bsky.app/profile/cabel.panic.com/post/3mnpxqsbwok2i
2•minimaxir•24m ago•0 comments

The architecture of the internet creates risks for democracy

https://www.science.org/doi/10.1126/science.aei2409
8•Anon84•26m ago•4 comments

Show HN: Hardbar – compile-time defined i3bar

https://github.com/pjz/hardbar
1•pjz•27m ago•0 comments

Ask HN: Job market for SDMs/Engineering Managers. Any reliable data?

3•ed_balls•29m ago•0 comments

Loss of Prefrontal Cortical Higher Cognition with Uncontrollable Stress (2019)

https://pmc.ncbi.nlm.nih.gov/articles/PMC6562841/
5•nativeit•29m ago•0 comments

Show HN: Nightwatch, The open-source, read-only AI SRE

https://github.com/ninoxAI/nightwatch
1•egorferber•29m ago•0 comments

Mesoscale carbon fiber lattices with foam-like weight and bulk strength

https://www.nature.com/articles/s41467-026-72105-4
2•PaulHoule•30m ago•0 comments

Behind Every Dad Bod Is a Healthy Dad Brain

https://www.nytimes.com/2026/06/06/opinion/dad-brain-health-fatherhood.html
2•mutator•35m ago•0 comments

Modular morals: Mapping the organization of the moral brain (2024)

https://www.sciencedirect.com/science/article/pii/S0278262624000782
2•nativeit•36m ago•1 comments

I built a Discord status for Claude Code

https://www.npmjs.com/package/vibecoder-discord-presence
2•yunexx•39m ago•0 comments

1982 World Championship Double Decker Bus Racing (1982) [video]

https://www.youtube.com/watch?v=7QFhuunZH2E
1•austinallegro•40m ago•0 comments

Try out my version of 1M checkboxes

https://joeheyming.github.io/checkboxes/
1•joeheyming•40m ago•1 comments

Agentic AI solved coding and exposed every other problem in SE

https://venturebeat.com/technology/agentic-ai-solved-coding-and-exposed-every-other-problem-in-so...
1•msolujic•41m ago•0 comments

China has approved the first invasive brain-computer chip

https://www.technologyreview.com/2026/06/01/1138133/china-world-first-brain-chip/
2•sudo_cowsay•44m ago•0 comments

We May Be Entering a Second Axial Age

https://www.noemamag.com/we-may-be-entering-a-second-axial-age/
2•simonebrunozzi•46m ago•1 comments

AI friends too cheap to meter

https://jasmi.news/p/ai-friends
3•simonebrunozzi•50m ago•0 comments

Oxford Uni student data pwned yet again, this time via career platform breach

https://www.theregister.com/security/2026/06/06/oxford-university-data-pwned-again-by-career-plat...
4•Bender•53m ago•0 comments

Show HN: A List of AI Neolabs

https://neolabs-7o2.pages.dev/
2•warthog•53m ago•0 comments