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?

Flow – A terminal dashboard for real-time network throughput

https://github.com/programmersd21/flow
1•gilad•1m ago•0 comments

I was wrong about game development

https://mijndertstuij.nl/posts/i-was-wrong-about-game-development/
1•nate•3m ago•1 comments

Show HN: Tetris where every pixel is another Tetris (23,040 games in GLSL)

https://thiagolira.blot.im/_projects/fractetris/index.html
1•farcaster•3m ago•0 comments

Plato Kills Socrates

https://www.x-aken.com/blog/plato-kills-socrates
2•pauljurgens•4m ago•0 comments

Why African Borderlands Keep Burning

https://africanarguments.org/2026/04/why-african-borderlands-keep-burning/
2•mooreds•4m ago•0 comments

Show HN: Nectar, a Rust-like React that compiles to WebAssembly

https://buildnectar.com
1•blakeburnette•4m ago•0 comments

PasteShape

https://drive.google.com/file/d/1lmG3XRPDj2jpd54Wh6yd3dzktD0lVNu8/view?usp=sharing
1•MediocreCeasarG•5m ago•0 comments

Threads, Meta’s ‘Twitter Killer,’ Finds Its People

https://www.nytimes.com/2026/07/05/technology/threads-meta-twitter-x.html
1•thm•5m ago•0 comments

How to Read Something

https://chillphysicsenjoyer.substack.com/p/how-to-read-something
1•surprisetalk•6m ago•0 comments

The Revenge of the Philosophy Majors

https://www.nytimes.com/2026/07/05/business/philosophy-majors-ai-jobs.html
1•FarhadG•7m ago•0 comments

LeRobot v0.6.0: Imagine, Evaluate, Improve

https://huggingface.co/blog/lerobot-release-v060
1•Brajeshwar•7m ago•0 comments

Specter PIERCER CE – first dedicated .onion web app pentesting tool

https://pypi.org/project/specter-piercer-ce/
1•redspecter•8m ago•0 comments

Claude ended a chat on its own after repeated abuse

https://theguptalog.blogspot.com/2026/07/this-claude-just-ended-conversation-on.html
1•guptalog•9m ago•0 comments

Show HN: Keyhole – Share secrets with your AI agents

https://keyhole.maferland.com
1•maferland•9m ago•0 comments

Speechify – WE'RE NUMBER ONE (for streaming quality+price)

https://speechify.ai/blog/simba-3-2-top-two-voice-arena-tts-leaderboard
4•lukeocodes•11m ago•2 comments

Tau: A minimalist agent that teaches you to create coding agents

https://github.com/huggingface/tau
2•simonpure•11m ago•0 comments

Instagram running ads promoting child sexual abuse material in India

https://www.bbc.com/news/articles/cvgm4e0316zo
2•dwa3592•12m ago•2 comments

The Computer Lab of Your Dreams

https://www.mediaarchaeologylab.com/
1•mooreds•12m ago•0 comments

Victim Outreach

https://www.victimoutreach.org/
2•mooreds•13m ago•0 comments

You Don't Own Your .io or .ai. You Rent a Country's Politics

https://webhosting.today/2026/07/02/you-dont-own-your-io-or-ai-you-rent-a-countrys-politics/
3•speckx•14m ago•0 comments

Lightning Jazz

https://bengoldhaber.substack.com/p/lightning-jazz
1•lindowe•15m ago•0 comments

Ask HN: Why submit your AI-written article?

3•blinkbat•15m ago•3 comments

Netflix Viewers Are Abandoning Shows After One Season

https://www.bloomberg.com/news/newsletters/2026-07-05/netflix-viewers-are-abandoning-shows-after-...
2•thisislife2•15m ago•2 comments

Show HN: JWT Lens – decode and verify JWTs offline, provably no network

https://github.com/milovance23/jwt-lens
1•milovance•15m ago•0 comments

Learning to Replicate Expert Judgment in Financial Tasks

https://thinkingmachines.ai/news/learning-to-replicate-expert-judgment-in-financial-tasks/
1•gmays•15m ago•0 comments

Typo – New CLI tools, Auto-correct mistyped shell commands

https://github.com/yuluo-yx/typo
2•yuluo-yx•15m ago•1 comments

DOE emergency orders let PJM curtail data centers during the July heat wave

https://www.utilitydive.com/news/pjm-doe-emergency-order-curtail-data-centers/820571/
3•gridmatters•15m ago•1 comments

Trucking Startup Aims to Challenge Tesla. Paychecks Are Missing. So Is a Truck

https://www.wsj.com/business/autos/a-trucking-startup-aims-to-challenge-tesla-now-paychecks-are-m...
2•JumpCrisscross•17m ago•0 comments

Multilingual Experience Linked to Delayed Aging in Populations and Individuals

https://fens2026.abstractserver.com/program/#/details/presentations/5474
2•bookofjoe•17m ago•0 comments

And yet It Moves

https://www.eso.org/public/images/potw2627a/
2•holofermes•18m ago•1 comments