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?

Preliminary Findings on AI Automation from Worker Evaluations

https://arxiv.org/abs/2604.01363
1•saikatsg•55s ago•0 comments

How the JVM Optimizes Generic Code – A Deep Dive

https://inside.java/2026/04/19/generics-optimization/
1•matt_d•1m ago•0 comments

The Elizabeth line is getting video wrap-around advertising screens

https://www.ianvisits.co.uk/articles/the-elizabeth-line-is-getting-massive-video-wrap-around-adve...
1•zeristor•1m ago•1 comments

Re: Slow USB storage device? (util-Linux-ng, 2010)

https://marc.info/?l=util-linux-ng&m=126351534518733&w=2
1•juliusdavies•1m ago•0 comments

Do octopus brains work like humans'–or is there another way to be smart?

https://www.nature.com/articles/d41586-026-01302-4
2•beardyw•2m ago•0 comments

Show HN: Virshle – Make ordinary virtual machines

https://virshle.crocuda.com/
1•jean_dupont•10m ago•0 comments

Why North Korea Will Never Give Up Its Nuclear Weapons

https://spectator.clingendael.org/en/publication/why-north-korea-will-never-give-its-nuclear-weapons
1•ck45•11m ago•1 comments

The Advance of Heliotherapy – Nature

https://www.nature.com/articles/109663a0?twclid=24ras4wi5qjw2lcvz2mgnnna5z
3•bilsbie•11m ago•0 comments

Emergent swarm bio structure – mark 36

https://rogmash.neocities.org/
1•rogmash•12m ago•0 comments

I Do Not Recommend Bitwarden

https://xn--gckvb8fzb.com/i-do-not-recommend-bitwarden/
4•maxloh•12m ago•0 comments

English councils to trial Google AI tool to speed up planning decisions

https://www.ft.com/content/91ce4475-d325-4d65-babb-4214996bc0f6
1•mmarian•17m ago•1 comments

VS Code inserting 'Co-Authored-by Copilot' into commits regardless of usage

https://github.com/microsoft/vscode/pull/310226
3•indrora•17m ago•0 comments

Museum Speelklok

https://www.museumspeelklok.nl/en/
2•whtspc64•24m ago•0 comments

Pixel Embeddings Beat Vision Encoders for Unified Understanding and Generation

https://github.com/facebookresearch/tuna-2
2•neehao•24m ago•0 comments

Azthengar Build 2026.05.01

https://azthengar.itch.io/azthengar-build-20260501
1•RobotHouse•25m ago•0 comments

Show HN: Fabrica – A minimal terminal-based coding agent built in Rust

https://github.com/Endi1/fabrica
1•PestoDiRucola•25m ago•0 comments

Inside the Courtroom at the OpenAI Trial

https://www.nytimes.com/2026/04/30/insider/times-inside-openai-musk-trial.html
1•bookofjoe•26m ago•1 comments

When Dawkins Met Claude

https://unherd.com/2026/04/is-ai-the-next-phase-of-evolution/
3•Anon84•28m ago•0 comments

Where to buy a non-Apple, non-Google smartphone

https://www.theregister.com/2026/05/01/buy_a_foss_fondleslab/
2•u1hcw9nx•30m ago•0 comments

Meta buys robotics startup to bolster its humanoid AI ambitions

https://techcrunch.com/2026/05/01/meta-buys-robotics-startup-to-bolster-its-humanoid-ai-ambitions/
4•Brajeshwar•31m ago•0 comments

One photographer's passion project of capturing local newsrooms

https://apnews.com/article/newspapers-newsrooms-photographing-media-f0d0939e04bb66f8d340f6f43df5bf5e
1•thm•31m ago•0 comments

Anthropic potential $900B+ valuation round could happen within 2 weeks

https://techcrunch.com/2026/04/30/anthropic-potential-900b-valuation-round-could-happen-within-tw...
4•wslh•31m ago•0 comments

Ubuntu is adding Generative AI features, and other Linux distros might follow

https://www.neowin.net/news/ubuntu-is-going-all-in-on-generative-ai-and-other-linux-distros-might...
2•bundie•33m ago•0 comments

Man takes robot to airport, gets ticket for it, it gets on plane

https://twitter.com/scottbudman/status/2050321131467653197
1•fragmede•35m ago•0 comments

IPv8 will not work [video]

https://www.youtube.com/watch?v=Uyr8homutII
1•drewr•38m ago•0 comments

Menace on the Streets

https://macleans.ca/longforms/menace-on-the-streets/
1•herbertl•40m ago•0 comments

You'll Subscribe to Your Router, Too – The First Router Bribes Are Here [video]

https://www.youtube.com/watch?v=qjesRkTFZqY
1•01-_-•41m ago•0 comments

Ember 6.12

https://blog.emberjs.com/ember-released-6-12/
2•satvikpendem•43m ago•0 comments

Vibe code with me this Linux system on a browser tab

https://linuxontab.com/
3•kilian-ai•45m ago•1 comments

New Oscars rules: No AI actors, human-written scripts only

https://www.dw.com/en/new-oscars-rules-exclude-ai-performers-require-scripts-written-by-human/a-7...
2•qainsights•45m ago•0 comments