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?

US PC shipments fell 7.0% in 1Q26, forecasted to fall 14% in 2026

https://omdia.tech.informa.com/pr/2026/june/us-pc-shipments-fell-7percent-in-1q26-marking-steepes...
1•giuliomagnifico•1m ago•0 comments

What Emily Bender Meant by "Stochastic Parrots"

https://spectrum.ieee.org/stochastic-parrot
1•rbanffy•1m ago•0 comments

Show HN: I measured the half-life of 41,301 Show HN launches. It's 7 hours

https://jonno.nz/posts/your-show-hn-dies-in-7-hours/
1•jonnonz•2m ago•0 comments

Why OOP Is Inherently Harmful: A Solution

https://notes.shixiangxi.com/en/docs/dual-world-theory/theory/
1•sxx0•3m ago•1 comments

The Perfect Match by Ken Liu (2012)

https://www.lightspeedmagazine.com/fiction/the-perfect-match/
1•laybak•5m ago•1 comments

To be trustworthy, LLMs need to show their work

https://cen.acs.org/pharmaceuticals/drug-discovery/AI-Chemist-trustworthy-LLMs-need/104/web/2026/06
1•ColinWright•5m ago•0 comments

PromptQL Tag – The company-wide AI agent for Slack

https://promptql.io/promptql-tag-slack-agent
1•gavinray•7m ago•0 comments

Deepest hand dug well in the world

https://www.mybrightonandhove.org.uk/places/utilities/woodingdean-well/woodingdean-well
1•zeristor•7m ago•1 comments

Liberty and Absurdity in 2026

1•dranimalz•8m ago•0 comments

Show HN: Domternal – headless rich-text editor for Angular/React/Vue/Vanilla

https://domternal.dev/
1•thomasnowhere•9m ago•0 comments

Vite+ Beta

https://voidzero.dev/posts/announcing-vite-plus-beta
3•Erenay09•11m ago•0 comments

Anthropic embedded spyware in Claude Code – and attempted to hide it from you

https://old.reddit.com/r/ClaudeAI/comments/1ujila1/anthropic_embedded_spyware_in_claude_code_and/
2•rvnx•11m ago•0 comments

Discovering My Talk

https://shkspr.mobi/blog/2026/01/discovering-my-talk/
1•ColinWright•12m ago•0 comments

Krafton Agrees to Pay 'Subnautica 2' Bonuses as Developer's CEO Resigns

https://www.bloomberg.com/news/articles/2026-07-01/krafton-agrees-to-pay-subnautica-2-bonuses-as-...
1•croes•12m ago•0 comments

Integrating Netty with Java Virtual Threads

https://kronotop.com/blog/the-join-that-should-be-a-bug/
1•mastabadtomm•14m ago•0 comments

Ask HN: What is the latest research on AI detection?

1•trwhite•15m ago•0 comments

Singapore seizes $42M mansion over Nvidia chip smuggling

https://www.bbc.com/news/articles/cx2d9y18g73o
1•aussieguy1234•19m ago•0 comments

ClickHouse is winning the Observability Wars

https://matduggan.com/clickhouse-is-winning-the-observability-wars/
2•emschwartz•21m ago•0 comments

Public company deep research demo on Atlas SDK

https://github.com/steel-experiments/atlas-demo
1•nkko•21m ago•0 comments

Palantir: Our thoughts on the importance of AI sovereignty

https://twitter.com/PalantirTech/status/2072114267776491695
1•frb•22m ago•0 comments

Show HN: MP3toText – Fast, high-accuracy AI audio transcription

https://mp3totext.ai
1•cyk888•22m ago•0 comments

PeerTube is a free, decentralized and federated video platform

https://github.com/Chocobozzz/PeerTube
1•doener•23m ago•0 comments

OpenAI: In early talks to give 5% stake to US Government

https://www.theguardian.com/technology/2026/jul/02/openai-stake-us-government-ai-sam-altman
7•tosh•24m ago•5 comments

Free interactive ancient Rome atlas

https://domdemetz.github.io/Ancient-Rome/
2•fbn79•26m ago•0 comments

Build reliable multi-agent applications with ADK Go 2.0

https://developers.googleblog.com/announcing-adk-go-20/
1•atkrad•27m ago•0 comments

Functional Programming in hica

https://www.hica.dev/docs/functional-programming/
1•cladamski79•28m ago•1 comments

Facebook Images Downloader – Grab FB Photos in Seconds

https://chromewebstore.google.com/detail/images-downloader/enjebjknnihfklkmkbhdailacipnhcep
1•qwikhost•29m ago•1 comments

Show HN: OtaKit – open-source, self-hostable OTA updates for Capacitor apps

https://github.com/OtaKit/otakit
1•garymiklos•29m ago•0 comments

Google must pay €4.1B fine for using Android to 'block' rivals

https://www.bbc.co.uk/news/articles/cvgj0pp5p62o
1•fredley•30m ago•0 comments

Mid-tier factory knives – value sweet spot?

https://www.paragon-knives.com/
1•bgzlsxaz•31m ago•0 comments