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•11mo ago

Comments

nine_k•11mo 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•11mo ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•11mo ago
They mention this in the article.
spockz•11mo ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•11mo ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•11mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•11mo 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•11mo 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•11mo 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•11mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•11mo ago
This was very well written. Excellent article!
NetOpWibby•11mo ago
Is this like MessagePack for Haskell?

Discovery of capability overhangs via wiki writing

1•piyh•15s ago•0 comments

Brain scans reveal how to enters a psychedelic-like trance without drugs

https://www.psypost.org/brain-scans-reveal-how-a-woman-voluntarily-enters-a-psychedelic-like-tran...
1•ingenika•37s ago•1 comments

I built an autoresearch loop for performance engineering (27% speedup hashtable)

https://bluuewhale.github.io/posts/i-automated-my-way-to-a-27-percent-faster-hash-table/
1•bluuewhale•1m ago•0 comments

Black Hat USA 2025 – HTTP/1.1 Must Die the Desync Endgame [video]

https://www.youtube.com/watch?v=FJbuAyxTTWc
1•Jach•7m ago•0 comments

Cuneicode - Exact rational arithmetic. Quantum computing stdlib.

https://github.com/enkimecca/cuneicode
1•enkimecca•7m ago•0 comments

The secrets of black holes and the Higgs mass could be hidden in a 7D geometry

https://phys.org/news/2026-04-secrets-black-holes-higgs-mass.html
1•teleforce•11m ago•0 comments

Mirror's Edge Early Prototype (Feb 7, 2008) [video]

https://www.youtube.com/watch?v=bPd-kEu60LI
1•Philpax•13m ago•0 comments

Isseven

https://isseven.app/
1•philipreasa•14m ago•0 comments

Heavy Wizardry 101 Official Repo

https://github.com/0x00pf/heavywizardry101
2•teleforce•16m ago•0 comments

Ask HN: Will AI agents replace data scientists or make them better?

1•ivaivanova•18m ago•0 comments

Mission to Recover Downed F-15E Aircrew

https://theaviationist.com/2026/04/04/csar-in-the-spotlight/
1•everybodyknows•25m ago•0 comments

Evacuation of U.S. troops from Mideast base sends community groups scrambling

https://www.npr.org/2026/04/03/nx-s1-5770491/evacuation-bahrain-norfolk-troops
2•ceejayoz•26m ago•0 comments

Some Thoughts on AI and Research [pdf]

https://economics.mit.edu/sites/default/files/2026-04/IA%20AI%20note_1.pdf
1•Anon84•26m ago•0 comments

Efficient biosorption of nanoplastics by food-derived lactic acid bacterium

https://www.sciencedirect.com/science/article/abs/pii/S0960852426003159
1•rq1•36m ago•0 comments

Hackney

https://hackney.app/
1•jessriedel•36m ago•0 comments

Shooting down ideas is not a skill

https://scottlawsonbc.com/post/shooting-down-ideas
44•zdw•36m ago•25 comments

Take-Two seemingly laid off a portion of its AI team, including head of AI

https://www.pcgamer.com/gaming-industry/take-two-has-seemingly-laid-off-an-unspecified-portion-of...
1•Herbstluft•36m ago•0 comments

Microsoft Discontinuing Publisher. Alternatives?

2•supliminal•37m ago•2 comments

Show HN: Contrapunk – Real-time counterpoint harmony from guitar input, in Rust

https://contrapunk.com/
2•waveywaves•39m ago•1 comments

Show HN: Vibooks – Local-first bookkeeping software built for AI agents

https://vibooks.ai/
1•adshao•39m ago•1 comments

Adjectives from the Future: The Dangers of Result-Based Descriptions (2019)

https://pradeep90.github.io/result-based-description.html
1•george11119•40m ago•0 comments

Extrapolating From Existence: Is it surprising that we exist now?

https://azeemba.com/posts/extrapolating-from-existence.html
1•azeemba•40m ago•0 comments

Dr. Dobb's Developer Library DVD 6

https://archive.org/details/DDJDVD6
2•kristianp•41m ago•0 comments

Post-Penultimate Conditional Syntax

https://joel.place/blog/conditionals/
1•youngkipper•41m ago•0 comments

OpenClaw and Claude Is Now Pay-per-Token: What It Costs and What to Do Next

https://shoofly.dev/blog/openclaw-claude-billing-change/
1•evanvuckovic•43m ago•1 comments

After the Mercor breach, I built a local secret scanner for AI-generated code

https://aigate-landing.onrender.com/
2•jricramc•49m ago•1 comments

Snap as the Canary: Why Every Streaming Platform Should Be Watching This Trial

https://www.ibtimes.sg/snap-canary-why-every-streaming-platform-should-be-watching-this-trial-84809
1•breve•52m ago•0 comments

Search Google for "Greek Alethia"

https://www.google.com/search?q=greek+alethia
1•moralestapia•52m ago•1 comments

Delve claiming that whistleblower was part of a "targeted cyberattack"

https://delve.co/blog/delve-sets-the-record-straight-on-anonymous-attacks
1•rrvsh•54m ago•1 comments

The decade long feud shaping the future of AI

https://www.wsj.com/tech/ai/the-decadelong-feud-shaping-the-future-of-ai-7075acde
1•maxutility•55m ago•0 comments