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?

Microsoft's emissions surged 25% in 2025 during data center boom

https://fortune.com/2026/07/09/microsoft-carbon-emissions-2025-data-centers/
2•1vuio0pswjnm7•2m ago•0 comments

NSW Police infiltrate 'VIP Network' underworld phones, send warning message

https://www.abc.net.au/news/2026-07-10/nsw-police-infiltrate-underworld-app/106900648
1•femto•2m ago•0 comments

The NTP server of Australia's largest mobile provider reset time to 2006

https://www.abc.net.au/news/2026-07-10/telstra-warned-about-vulnerability-before-national-outage/...
1•itchingsphynx•5m ago•0 comments

The OS/2 Operating System Didn't Die. It Went Underground (2019)

https://hackaday.com/2019/06/20/the-os-2-operating-system-didnt-die-it-went-underground/
1•andsoitis•6m ago•0 comments

Boeing's Smallest Max Jet Nears FAA Milestone After Years of Delays

https://www.wsj.com/business/airlines/boeings-smallest-max-jet-nears-faa-milestone-after-years-of...
1•armoredmeatball•12m ago•0 comments

A Game for Career Simulator

https://www.thefenomenogame.com/
1•jeyzolo•13m ago•1 comments

What Happened to OS/2?

https://www.youtube.com/watch?v=yJy-zBvqXqU
1•cable2600•15m ago•0 comments

Show HN: Bring All Your Context Together

3•Daniel-Pan•17m ago•0 comments

Terminals for vibe coding, not only Ghostty, but also kitty

https://blog.chuanxilu.net/en/posts/2026/07/from-warp-to-kitty/
1•alexwwang•18m ago•0 comments

Kitty: New Level of Mouse Support

https://sw.kovidgoyal.net/kitty/changelog
2•zdkaster•20m ago•0 comments

Omegle for Weed

https://omeweed.com/
1•mmorga71•29m ago•0 comments

Thoughts on design as founding engineer

https://www.thrice.me/on-design
1•groznyj•31m ago•0 comments

Show HN: Free open-world zombie survival sandbox game

https://smartlydressedgames.com/unturned/
2•meridiona•33m ago•0 comments

Cpp2Rust: Automatic Translation of C++ to Safe Rust

https://github.com/Cpp2Rust/cpp2rust
3•Jimmc414•35m ago•0 comments

Responsibly Building the AI Future

https://blogs.microsoft.com/on-the-issues/2026/07/09/responsibly-building-the-ai-future/
2•ChrisArchitect•39m ago•0 comments

Muse AI auto opt-in all public Instagram accounts

https://twitter.com/MKBHD/status/2075375524684218655
2•firefoxd•41m ago•1 comments

Show HN: TensorSharp: Open-Source Local LLM Inference Engine

https://tensorsharp.ai/
2•zhongkaifu•42m ago•0 comments

Show HN: Even Keel – free, no-signup freelance pricing calculators

https://evenkeelhq.com/
1•evenkeelhq•44m ago•0 comments

Ben Bernanke Joins Anthropic Oversight Trust

https://www.anthropic.com/news/ben-bernanke
1•Jimmc414•45m ago•1 comments

Secretive China Cheap Maker Is Built to Dodge US Curbs

https://www.bloomberg.com/news/features/2026-07-09/china-s-cxmt-chipmaker-eyes-ipo-to-challenge-s...
1•rndsignals•46m ago•1 comments

Ente's business metrics are open

https://ente.com/open/
1•vinyasns•50m ago•0 comments

The ChatGPT browser is dead

https://www.theverge.com/ai-artificial-intelligence/963654/openai-chatgpt-atlas-ai-browser-shut-d...
1•mattas•56m ago•0 comments

Two Case Studies of NaN

https://sebsite.pw/w/20260709-nan.html
1•ryantsuji•56m ago•0 comments

Exit Chat Control

https://exitchatcontrol.org/
2•mparramon•57m ago•0 comments

Show HN: BrowserBox over SSH – The KRNL Browser

https://win9-5.com/krnl
2•keepamovin•59m ago•1 comments

A man who would change Russia

https://www.economist.com/leaders/2026/07/09/the-man-who-would-change-russia
1•andsoitis•1h ago•2 comments

Japan does not cut down centuries-old trees for development; they relocate them

https://timesofindia.indiatimes.com/science/japan-does-not-cut-down-centuries-old-trees-for-devel...
2•speckx•1h ago•0 comments

Show HN: Resultant Engineering Student Tools Website

https://resultant.tools/
1•will2092347•1h ago•0 comments

OpenAI's API can now keep reasoning across turns instead of discarding it

https://drop-05a4352b-803.sophisticated-stay.workers.dev
3•CjHuber•1h ago•0 comments

Camera Chase Vehicle

https://transistor-man.com/gimbal_camera_rover.html
1•geerlingguy•1h ago•0 comments