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?

A Self-Hosting Point-and-Click Editor for Any Application [pdf]

https://michaelawhite.net/files/whitepaper.pdf
1•mwhite•3m ago•0 comments

Replacing Google Analytics with Matomo on a Pi in a Cupboard

https://alexlance.blog/analytics.html
1•alance•5m ago•0 comments

The LLM Looked Smart. The Metrics Disagreed

https://tiago.rio.br/work/general/articles/llm-looked-smart-metrics-disagreed/
1•timotta•9m ago•0 comments

Why does Amazon have no Western rivals?

https://www.bbc.com/news/articles/cg7p5nr307mo
1•dabinat•10m ago•0 comments

3D R/Place

https://outer.one
1•mikidoodle•10m ago•0 comments

Found the song from the viral runway watch ad with 110M Instagram views

https://www.youtube.com/watch?v=uF7lmsP3vJY
2•marcelix•13m ago•1 comments

188,000 Show HN posts, 14 years of data: what predicts GitHub stars

https://danfking.github.io/blog/2026/04/23/show-hn-by-the-numbers/
2•BundyBear•16m ago•0 comments

Hypen – Declarative UI Language for Cross-Platform Development

https://hypen.space/introducing-hypen
2•ravenical•27m ago•0 comments

Show HN: Cheap-IM – CPU-only voice agent approximating Thinking Machines' demo

https://github.com/kouhxp/cheap-im
1•mrkn1•31m ago•0 comments

Zero, a systems language for small native agent tools

https://github.com/vercel-labs/zero
1•mjgil•35m ago•0 comments

ZeroBloat: Open-source desktop app for removing Android bloatware

https://github.com/AdhwaithAS/ZeroBloat
2•pentagrama•37m ago•0 comments

Show HN: Building ClueDay, a daily clue-based word-game

https://tanyagupta10.substack.com/p/if-you-havent-vibecoded-already-build
1•tannyc•43m ago•0 comments

Target can't measure their own bins

https://ninjacheetah.dev/2026/05/17/target-cant-measure.html
2•argee•47m ago•0 comments

Searching "remove definition" on Google results in pointless AI text

https://www.google.com/search?q=remove+definition
2•tech234a•47m ago•0 comments

Show HN: I containerized my AI agents and dev tools

https://github.com/SamInTheShell/aetherion
1•SamInTheShell•53m ago•0 comments

I made realtime raytraced reflections for my portfolio site

https://taggartmaher.com/projects/this-website
2•xialo•54m ago•0 comments

Show HN: Agetor - An open-source Harness Orchestrator

https://github.com/alamops/agetor
1•drakochack•55m ago•0 comments

Do LLMs hold the opinions they give you?

https://twitter.com/pandya_marut/status/2056151597642838487
1•mwiki•1h ago•0 comments

Does Wellington have the most beautiful commute in the world?

https://www.rnz.co.nz/news/regions_wellington/595529/cyclists-commute-at-sunrise-on-the-beautiful...
1•colinprince•1h ago•0 comments

Do less so you can do better (2020)

https://www.indiehackers.com/post/do-less-so-you-can-do-it-better-3ea77e92b4
2•chr15m•1h ago•0 comments

WriteUp: 16 Bytes of x86 that turn Matrix rain into sound

https://hellmood.111mb.de//wake_up_16b_writeup.html
3•HellMood•1h ago•0 comments

Scientists have invented a way to erase bad memories. But should we?

https://www.sciencefocus.com/future-technology/erase-painful-memories
4•amichail•1h ago•2 comments

Rust Async and the Arm Generic Timer

https://thejpster.org.uk/blog/blog-2026-05-17/
1•hasheddan•1h ago•0 comments

Dealing with a Fake a World

2•morpheos137•1h ago•1 comments

Design posters showcasing your country's electrical grid

https://github.com/open-energy-transition/grid2poster
17•lyoncy•1h ago•2 comments

100% Vibe Code

https://humansvsai.io
1•creatorcuffee•1h ago•0 comments

Why ML is a metaphor for life

https://adeshpande3.github.io/Why-Machine-Learning-is-a-Metaphor-For-Life
2•_josh_meyer_•1h ago•0 comments

Finding the Time on AArch32

https://thejpster.org.uk/blog/blog-2026-05-16/
1•hasheddan•1h ago•0 comments

Meta AI Incognito Mode Chats

https://about.fb.com/news/2026/05/incognito-chat-whatsapp-meta-ai/
1•hdjY28•1h ago•0 comments

Financial Services Hackathon for Autism

https://fsi-hack4autism.github.io
1•hbcondo714•1h ago•0 comments