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?

Show HN: Prisoners, German tank and 61 more puzzles, with simulations

https://mathparadoxes.com/en/
1•dmitrykudrenko•53s ago•0 comments

Show HN: Weeny.Cloud – A Linux server for your coding agent's apps

https://weeny.cloud/
1•isaacrolandson•1m ago•0 comments

Frontier quality at 1% of the cost: a production benchmark of LLM classifiers

https://airbnb.tech/ai-ml/frontier-quality-at-1-of-the-cost-a-production-benchmark-of-llm-classif...
1•eivarv•1m ago•0 comments

Ask HN: Is anyone running multi/always-on agents that don't cost a fortune?

1•abejora•3m ago•0 comments

TripleF

https://github.com/ehildt/tripleF
1•ehildt•3m ago•0 comments

I Built Fluxer

https://fluxer.com/blog/how-i-built-fluxer
1•n_plus_1_acc•5m ago•0 comments

Pro-Palestine protestors enter Microsoft datacenter site

https://www.reuters.com/technology/protesters-enter-microsoft-data-centre-site-amsterdam-2026-11-06/
2•dutchbart•5m ago•0 comments

Tesla wants its sworn Cybercab answers to NHTSA kept secret

https://electrek.co/2026/11/05/tesla-cybercab-nhtsa-sworn-answers-confidential/
2•cisc•5m ago•0 comments

Declarative Dragging

https://declarative-dragging.github.io/
1•mpweiher•7m ago•0 comments

Show HN: Lost and Fought – a 90s Style RTS – browser with multiplayer

https://lostandfought.com/
2•drzivil•11m ago•0 comments

Why tradwives are fleeing the movement: I can't undo my past

https://www.theguardian.com/lifeandstyle/2026/nov/04/why-tradwives-are-fleeing-the-movement-i-can...
3•makerdiety•11m ago•1 comments

Algorithm Visualizer

https://alg0.dev/
1•Brysonbw•12m ago•0 comments

DeepSeek Super Agent Just Killed All Agent Harnesses [video]

https://www.youtube.com/watch?v=3DklR44DHnM
1•nvmdbljstm•13m ago•0 comments

Lowvram: A CLI tool to run large AI models in low VRAM GPUs

https://soarhen.com/how-run-ai-in-low-vram/
1•henriquegogo•14m ago•0 comments

A once-controversial idea is advancing understanding of Parkinson's disease

https://www.nature.com/articles/d41586-026-03169-x
1•sohkamyung•19m ago•0 comments

Tesla Winding Down Production of Cybertruck, Musk Says

https://www.wsj.com/business/autos/tesla-winding-down-production-of-cybertruck-musk-says-89df7158
2•sebastian_z•20m ago•0 comments

GSoC 2026 Showcase

https://www.swift.org/blog/gsoc-2026-showcase/
1•frizlab•20m ago•0 comments

Getting traffic from aocr.org? It's ByteDance

https://tin.computer/blog/aocr-org-referrer-bot
1•dcastm•21m ago•0 comments

Vals AI found a critical safety and alignment issue in recent models

https://twitter.com/ValsAI/status/2118473836710760816
1•fscaramuzza•21m ago•0 comments

Salon, Pioneer of Digital Journalism Founded in 1995, Shuts Down

https://www.nytimes.com/2026/11/05/business/media/salon-online-magazine-shutters.html
1•bookofjoe•21m ago•1 comments

From the Vault to Your Library

https://www.ea.com/news/from-the-vault-to-your-library
1•mariuz•22m ago•0 comments

Why Bloat Is Still Software's Biggest Vulnerability

https://spectrum.ieee.org/lean-software-development
1•vanschelven•24m ago•1 comments

A Fake Job Interview Led to the $6.34B Binance Hack

https://jsdev.space/binance-hack-interview/
1•javatuts•24m ago•0 comments

A Mathematician Is Chasing Eclipses with Algorithms and Cameras

https://spectrum.ieee.org/2026-solar-eclipse
1•sohkamyung•24m ago•0 comments

A medieval map mystery may be solved

https://bigthink.com/strange-maps/antique-sources-for-portolan-charts/
1•sohkamyung•25m ago•0 comments

Apple's predictive text restrictions include 'Dictator Trump' and 'Sleepy Joe'

https://www.reuters.com/business/retail-consumer/apples-predictive-text-restrictions-include-dict...
4•ag8•25m ago•0 comments

Activists break through fences at Microsoft's data center site in Amsterdam

https://nos.nl/artikel/2638275-activisten-breken-door-de-hekken-van-terrein-datacenter-microsoft-...
1•hnsr•26m ago•0 comments

Tesla winds down Cybertruck production after years of poor sales in few markets

https://www.msn.com/en-us/technology/tech-companies/tesla-to-wind-down-cybertruck-production-afte...
8•PLenz•30m ago•3 comments

Enough Phone: A new small phone

https://enoughphone.com/
1•simon-am•30m ago•0 comments

Ask HN: How's your home-cooked software revolution going?

2•nihakue•31m ago•1 comments