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?

Mistral API is degrading [04/2026]

https://status.mistral.ai/incidents/page/1
1•rawland•1m ago•0 comments

Ask HN: Can you show me some useful AI-written programs?

2•nananana9•2m ago•0 comments

Air Is Full of DNA

https://www.nature.com/articles/d41586-026-01099-2
3•howrude•4m ago•0 comments

Mapping India's homegrown AI ecosystem – 110 apps, 22 languages, 28 sectors

https://github.com/suyash333/india-ai-ecosystem
1•golearnsap•6m ago•0 comments

I found out the hard way that Linux is not a dad-friendly gaming OS

https://www.pcgamer.com/hardware/i-found-out-the-hard-way-that-linux-is-not-a-dad-friendly-gaming...
3•evo_9•11m ago•1 comments

Israel kills two UNICEF water truck drivers in Gaza

https://www.unicef.org/press-releases/statement-unicef-killing-two-water-truck-drivers-gaza-strip-0
4•lr0•20m ago•0 comments

_Generic Printf() in Standard C23

https://codeberg.org/Flying-Toast/gprintf
1•flying-toast•30m ago•0 comments

Kazakhstan still relies on its ageing industrial giants

https://mondediplo.com/2026/04/14kazakhstan
1•JumpCrisscross•31m ago•0 comments

Show HN: How Are You-elderly fall detection app I built solo with AI in 6 months

2•sminchev•32m ago•2 comments

Show HN: A Roman fable about a PHP suite that exposed 100 tables in 3 days

https://marius-ciclistu.medium.com/list/the-api-grand-prix-486dc1becb36
1•marius-ciclistu•33m ago•0 comments

Mysterious figure has summited Sphere in Las Vegas: It appears it's Alex Honnold

https://www.sfgate.com/travel/article/alex-honnold-sphere-las-vegas-22212813.php
2•bookofjoe•34m ago•1 comments

A Chrome extension that redesigns Hacker News in an editorial style

https://github.com/puppe1990/redesign-hacker-news
1•puppe1990•35m ago•0 comments

A Hidden Language: The Meaning of Semaphore

https://www.offshoresupply.co.uk/blog/a-hidden-language-the-meaning-of-semaphore/
1•Eridanus2•35m ago•0 comments

Observability Stack – AI First?

1•jblake•47m ago•0 comments

Any Color You Like: NIST Scientists Create 'Any Wavelength' Lasers

https://www.nist.gov/news-events/news/2026/04/any-color-you-nist-scientists-create-any-wavelength...
5•rbanffy•49m ago•0 comments

Show HN: Reliably Incorrect – explore LLM reliability with data visualizations

https://adamsohn.com/reliably-incorrect/
2•dataviz1000•49m ago•3 comments

The Destroyed Remnants of a Lost World Are Falling to Earth, Scientists Discover

https://www.404media.co/the-destroyed-remnants-of-a-lost-world-are-falling-to-earth-scientists-di...
3•Brajeshwar•53m ago•0 comments

Vynly an AI-only social feed with provenance checks (beta)

https://vynly.co
1•nftdude2024•54m ago•0 comments

SDF Public Access Unix System

https://sdf.org/?ssh
2•neehao•54m ago•0 comments

Open-source Firecracker microVM orchestrator

https://github.com/sahil-shubham/bhatti
2•davidcollantes•55m ago•0 comments

Tinypki: Easy to use software for local CA/PKI management

https://github.com/icedevml/tinypki
2•msm_•58m ago•0 comments

Eating more fruits and vegetables tied to unexpected lung cancer risk

https://www.sciencedaily.com/releases/2026/04/260417224454.htm
1•amichail•58m ago•0 comments

How (and why) we rewrote our production C++ front end infrastructure in Rust

https://blog.nearlyfreespeech.net/2026/04/17/how-and-why-we-rewrote-our-production-c-frontend-inf...
2•maxloh•59m ago•0 comments

Optimizing Ruby Path Methods

https://byroot.github.io/ruby/performance/2026/04/18/faster-paths.html
6•weaksauce•1h ago•0 comments

Wishes for Ron Conway

https://om.co/2026/04/18/wishes-for-ron-conway/
3•rmason•1h ago•0 comments

Show HN: Coelanox – auditable inference runtime in Rust (BERT runs today)

https://www.coelanox.com/
1•Shark1n4Suit•1h ago•0 comments

Scrolly AI: knows you better than you know yourself

https://zorkman.substack.com/p/scrolly
2•zorkman•1h ago•0 comments

The largest collection of black markers

https://www.prune.dirt.fyi/p/prune-getting-high-on-your-own-supply
2•zeech•1h ago•0 comments

Nuke Engineer Rants

https://nukerants.fi/index.php/cover
3•DamonHD•1h ago•0 comments

PostgreSQL production incident caused by transaction ID wraparound

https://www.sqlservercentral.com/articles/i-too-have-a-production-story-a-downtime-caused-by-post...
7•tcp_handshaker•1h ago•2 comments