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?

Colleges need to teach last-mile knowledge

https://hollisrobbinsanecdotal.substack.com/p/colleges-need-to-teach-last-mile
1•paulpauper•20s ago•0 comments

Show HN: Bullet Script (bs) – a Lisp(y) VM for shmumps

http://bs.ell.dev/
1•ellg•37s ago•0 comments

O.J. Simpson, a Secret Informant and a Decades-Old Mystery

https://www.nytimes.com/2026/10/18/us/oj-simpson-ippolito-informant-accomplice.html
1•jgalt212•41s ago•0 comments

Vizen – Open-source overlays for Windows, crop any window over your game

https://github.com/kalinvisuals/VIZEN
1•kalinvisuals•58s ago•0 comments

My Favorite Restaurant Served Gas (2023)

https://bittersoutherner.com/feature/2023/my-favorite-restaurant-served-gas-kate-medley-kiese-lay...
1•wmchen•1m ago•0 comments

Monthly Roundup #47: October 2026

https://thezvi.substack.com/p/monthly-roundup-47-october-2026
1•paulpauper•1m ago•0 comments

Top Mathematician Announces New Institute for A.I. Safety

https://www.nytimes.com/2026/09/08/science/jacob-tsimerman-math-ai-safety.html
1•paulpauper•1m ago•0 comments

OpenAI's blockbuster math proof isn't what you think it is

https://www.scientificamerican.com/article/openais-blockbuster-navier-stokes-proof-isnt-what-we-t...
1•tibbar•4m ago•0 comments

United's CEO Says It Should Cost More Not to Sit in the Middle Seat

https://www.nytimes.com/2026/10/18/business/scott-kirby-united-airlines.html
1•cwwc•4m ago•0 comments

VMMouse for NT 3.x: QEMU/VMware mouse integration driver

https://github.com/rhargreaves/vmmouse-nt3
1•kiyouta•6m ago•0 comments

Netflix Lays Off About 6% of Staff in Biggest Job Cuts Since 2022

https://www.wsj.com/business/media/netflix-eliminates-about-6-of-staff-in-biggest-cuts-since-2022...
4•corvad•7m ago•2 comments

Show HN: Keel – One event-sourced context graph for all your agents

https://github.com/angelkurten/keel
1•angelkurten•16m ago•0 comments

Consumer apprehension grows as US retailers adopt AI-assisted pricing tools

https://apnews.com/article/ai-prices-dynamic-customers-technology-64c446cd117d3be664de4ab570fb9857
2•geox•17m ago•1 comments

Leviathan LLM Inference

https://github.com/CuppaTea1983/Leviathan
2•michaelrickynea•18m ago•1 comments

Ask HN: A plea to help me help my father

6•10917887•19m ago•1 comments

Mikhail-Who?

https://physicsworld.com/a/mikhail-who/
1•Eridanus2•20m ago•0 comments

A commodity price tracking website with a few fun tools

https://www.commoditywatch.net
1•CommodityWatch•24m ago•1 comments

Beating Warcraft III's insane AI with self-play reinforcement learning on one PC

https://warlock.ai/blog/warcraftsim-1/
1•nawtora•24m ago•0 comments

Show HN: DebtShark – Consumer Legal Defense and Debt Settlement Workstation

https://boredpolymath.github.io/debtshark/
1•boredpolymath•26m ago•0 comments

Show HN: Lungo Generates Rust, Python, from Lean Proof Source

https://machinefabric.com/lungo/
1•joeharshamshiri•26m ago•1 comments

LLM01: 2025 Prompt Injection

https://genai.owasp.org/llmrisk/llm01-prompt-injection/
1•joebig•29m ago•0 comments

Show HN: Dieline generator for packaging (type the size, get the drawing)

https://die-lines.com/
1•timohin•30m ago•0 comments

US threatens Europe over Starlink restrictions

https://www.ft.com/content/d1e28d93-8574-4a46-946a-b261c401d6fa
13•mraniki•32m ago•7 comments

Two Mac Studios Are Not One 1 TB Computer

https://duruldalkanat.medium.com/two-mac-studios-are-not-one-1-tb-computer-abba6561e73c
1•durul•32m ago•0 comments

The Leap Second Has Been Canceled

https://www.nytimes.com/2026/10/16/science/leap-second-abolished-vote.html
1•kmohr•34m ago•0 comments

Scholars conclude 'beyond doubt' that Shakespeare was main author of Edward III

https://www.theguardian.com/culture/2026/oct/18/scholars-conclude-beyond-doubt-that-shakespeare-w...
3•prmph•34m ago•0 comments

Aircraft gyroscopic instruments modeled from M series MacBook IMU

https://github.com/photon-cat/gyro-instruments-mac
1•photoncat•35m ago•0 comments

Neurastheniacc: LLM-based C->WASM compiler you didn't need

https://github.com/vivshaw/neurastheniacc
1•cpeterso•35m ago•0 comments

Follow the Money Database – See who funds your congressperson

https://helyn.com/follow-the-money
3•cpobuda•38m ago•0 comments

Flock camera locations revealed on MapQuest's new Surveillance Layer

https://www.tomshardware.com/software/maps/flock-camera-locations-revealed-on-mapquests-new-surve...
2•CharlesW•40m ago•1 comments