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?

Parseword

https://www.parseword.com
1•bookofjoe•31s ago•0 comments

Typeless is stripping away my thought process

https://en.astrian.lol/think-dont-speak/
1•Astrian•47s ago•0 comments

Code Page 437

https://en.wikipedia.org/wiki/Code_page_437
1•tosh•1m ago•0 comments

When I failed the Microsoft interview

https://ochagavia.nl/blog/that-time-when-i-failed-the-microsoft-interview/
1•birdculture•2m ago•0 comments

"The Proximal Origin of SARS-CoV-2"

https://www.whitehouse.gov/lab-leak-true-origins-of-covid-19/
2•just_some_user•4m ago•0 comments

Mythos attack on 3rd-round PQC algorithm candidate puts it out of commission

https://arstechnica.com/security/2026/07/mythos-uncovers-crypto-weaknesses-that-went-unknown-for-...
2•throw0101a•6m ago•0 comments

k/simple

https://github.com/kparc/ksimple
1•tosh•9m ago•0 comments

BeHive – Open-source research engine that outputs structured claims, not essays

https://github.com/qa10devteam/behive
1•qadevteam•11m ago•0 comments

Origami research takes top prize at 2026 Regeneron ISEF competition

https://www.snexplores.org/article/2026-regeneron-isef-winners-origami
1•viscousviolin•12m ago•1 comments

Created Mono8 (PICO-8 style game engine built on MonoGame, .NET 8)

https://mono8games.itch.io/mono8
1•rurhdhdije•12m ago•1 comments

Coinbase moved to open models. Cut AI spend in half while increasing token usage

https://twitter.com/brian_armstrong/status/2070670644577280109
1•smurda•12m ago•0 comments

A Most Comfortable Dead End

https://monokai.com/articles/a-most-comfortable-dead-end/
1•monokai_nl•12m ago•0 comments

Frhog

https://www.frhog.com/?ribbit
1•krm01•13m ago•0 comments

In AI arms race, Swiss neutrality is double-edged sword

https://www.swissinfo.ch/eng/foreign-affairs/swiss-neutrality-is-double-edged-sword-in-ai-arms-ra...
1•TMWNN•15m ago•0 comments

Gpiozero Flow

https://bennuttall.com/blog/2026/07/gpiozero-flow/
9•benn_88•23m ago•0 comments

Atomarine: Nuclear Data Centers at Sea

https://atomarine.co/
18•ndr•24m ago•6 comments

GPT-5.6 SOL pushing 25h towards a goal

https://testflight.apple.com/join/vWrJPqk5
2•dreambiggg•27m ago•3 comments

What can I do with Google AI Essentials

https://galaxyonknowledge.substack.com/p/what-can-i-do-with-google-ai-essentials
3•galaxyonknowled•34m ago•0 comments

AI Automation Without the Hype

4•lawalkola•36m ago•1 comments

Show HN: Terminal Ad Network

https://profullstack.com/motd
2•buffer_overlord•37m ago•0 comments

AI Automation Without the Hype

2•lawalkola•40m ago•0 comments

How HN: Hearthkin – family presence for iOS without location tracking

https://hearthkinapp.com/
3•serhio_dev•41m ago•0 comments

Nix Overrides That Expire Themselves

https://jezenthomas.com/2026/07/nix-overrides-that-expire-themselves/
4•yakshaving_jgt•41m ago•0 comments

Google will expand age checks on Android worldwide till the end of the year

https://android-developers.googleblog.com/2026/07/google-play-age-signals-api-safer-experiences.html
47•dmantis•42m ago•36 comments

Quantum computing roundup: Still more technologies making waves

https://arstechnica.com/science/2026/07/quantum-computing-roundup-still-more-technologies-making-...
3•rbanffy•43m ago•1 comments

2001: Cameras..On Phones?

https://www.youtube.com/watch?v=6ywODcJ8yu8
9•chistev•46m ago•1 comments

EU opens call for seven 'gigafactories' to train next-generation AI

https://www.euronews.com/my-europe/2026/07/30/eu-opens-call-for-seven-gigafactories-to-train-next...
7•geox•47m ago•2 comments

Donto: An Evidence Operating System for Contested Knowledge

https://donto.org/reports/donto-paper-2026-05-28
5•jerlendds•48m ago•0 comments

OpeClaud AI – Catch runtime bugs in AI-generated code before production

https://opeclaud.com
2•rumeshdyr•49m ago•0 comments

Image Shows What 14 Years of Driving Has Done to NASA's Mars Rover

https://www.bgr.com/2226633/14-years-nasa-mars-rover-image-wear-tear/
2•giuliomagnifico•51m ago•0 comments