frontpage.
newsnewestaskshowjobs

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?

Ask HN: What is the difference between an IMU module and a smart motion sensor?

1•daischsensor•1m ago•0 comments

Italian bill on nuclear energy progressing through parliament

https://www.world-nuclear-news.org/articles/italian-bill-on-nuclear-energy-progresses-through-par...
1•omblivion•1m ago•0 comments

Dearhiringmanager.io Is Hiring a Full-Stack Developer (Remote)

https://dearhiringmanager.io
1•fcKarhuno•1m ago•0 comments

Construct's New 3D Editor

https://www.construct.net/en/blogs/construct-official-blog-1/introducing-constructs-new-3d-1902
1•AshleysBrain•4m ago•0 comments

Justification in Arabic Typesetting

https://doi.org/10.3998/3336451.0023.104
1•fanf2•7m ago•0 comments

Google Axion ARM Processors

https://cloud.google.com/products/axion
1•tosh•11m ago•0 comments

HP SSDs lose their performance after 7.5 years / integer overflow

https://support.hpe.com/connect/s/softwaredetails?language=en_US&collectionId=MTX-4cc24985bf9c485...
1•foosinn•13m ago•0 comments

AI Engineering the Acceleration Whiplash

https://www.faros.ai/blog/ai-acceleration-whiplash-takeaways
1•DareTheDev•13m ago•0 comments

Bumsrakete - CVE-2026-45257

https://bumsrake.de/
1•jbk•13m ago•0 comments

ClickHouse expands strategic collaboration with Google Cloud

https://clickhouse.com/blog/clickhouse-expands-strategic-collaboration-with-google-cloud
1•tosh•14m ago•0 comments

Gen Zers are arriving at college unable to even read a sentence

https://fortune.com/article/gen-z-college-students-struggling-to-read-books-professors-forced-to-...
2•jruohonen•15m ago•0 comments

Cat Hair Mustache Puzzle

https://en.wikipedia.org/wiki/Cat_hair_mustache_puzzle
1•LookAtThatBacon•19m ago•0 comments

chDB is an in-process OLAP SQL Engine powered by ClickHouse

https://github.com/chdb-io/chdb
1•tosh•21m ago•0 comments

CostLoop – track SaaS renewals and stop paying for forgotten subscriptions

https://costloop.app/blog/avoid-forgotten-saas-renewals/
1•Cech1337•21m ago•0 comments

Visible Boundaries Earn Trust

https://blog.vigilharbor.com/visible-boundaries-earn-trust
1•Calvin-Gibson•23m ago•1 comments

Apposters – Generate a full project website from a GitHub repository

https://apposters.com/
1•loeona•25m ago•0 comments

Kache – a zero-copy build cache for Rust

https://kunobi.ninja/blog/kache-v0-5-0
1•ainhoaa•29m ago•1 comments

NHS Replaces a&E Receptionists with iPads

https://www.telegraph.co.uk/news/2026/06/10/nhs-replaces-ae-receptionists-with-ipads/
4•ksec•31m ago•0 comments

Show HN: Recreate Thinking Machines 276B voice demo with duct tape and 8B model

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

KPMG report on benefits of AI contained AI hallucinations

https://www.ft.com/content/b3828e92-4961-4b39-84f0-c42f33be3c3f
2•calcifer•33m ago•1 comments

Show HN: Goloop – An agentic loop on your terminal

https://mantyx-io.github.io/goloop/
1•mantyx•37m ago•0 comments

An Interview with Intel's Kira Boyko: Xeon 6's Product Director

https://chipsandcheese.com/p/an-interview-with-intels-kira-boyko
1•rbanffy•38m ago•0 comments

Biggest IPOs in History Are Collapsing. Nobel Economist Says Run

https://www.youtube.com/watch?v=IOaYnEf5ZeY
4•quantummagic•38m ago•0 comments

The quiet collapse of British universities

https://www.arguably.uk/p/the-quiet-collapse-of-british-universities
3•theanonymousone•40m ago•0 comments

Auto mode for pi.dev. An LLM reviews your coding agent's commands

https://github.com/vinzenzu/pi-auto-reviewer
1•vinzenzu•40m ago•2 comments

Docker Sandbox Kit for Mistral Vibe CLI

https://github.com/cdr-chakotay/sbx-mistral
1•noodlebird•41m ago•0 comments

Is reviewing pull requests slowing you down?

https://www.pr-preview.com
2•VladNiculescu•47m ago•3 comments

Only Bounds: the most impactful Rust change that you’ve never heard of

https://smallcultfollowing.com/babysteps/blog/2026/06/09/only-bounds/
1•MrBuddyCasino•49m ago•0 comments

When the Watcher Became the Confidant – How AI Befriends and Infers Our Children

https://jorgepereiracampos.substack.com/p/when-the-watcher-became-the-confidant
1•BlinkyPT•51m ago•0 comments

Pokémon Go data trained AI that could assist military drones in war zones

https://www.theguardian.com/technology/2026/jun/12/pokemon-go-data-trained-ai-that-could-assist-m...
2•beardyw•52m ago•0 comments