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?

Karios AI Agent Carzy

https://github.com/adnqcr7-code/kairosv2
1•kairos_agent•1m ago•0 comments

Claude is just Mr. Meeseeks

https://github.com/thephw/claude-meseeks
1•patrickwiseman•2m ago•0 comments

Soofi – Sovereign Open Source Foundation Models

https://www.soofi.info/
1•karussell•2m ago•1 comments

NYC Launches "Public Interest Technology (Pit) Crew" to Build Digital Solutions

https://www.nyc.gov/mayors-office/news/2026/07/mayor-mamdani-launches--public-interest-technology...
1•ChrisArchitect•4m ago•0 comments

How does an LLM feel about you?

https://sackfield.substack.com/p/how-does-an-llm-feel-about-you
1•sackfield•5m ago•0 comments

Economists are coming around to the idea that AI really is killing jobs

https://qz.com/economists-ai-job-displacement-industrial-revolution-statement-071326
1•pseudolus•7m ago•0 comments

The Estranged Worlds of J. G. Ballard

https://lareviewofbooks.org/article/jg-ballard-illuminated-man-christopher-priest-nina-allan/
1•Caiero•8m ago•0 comments

A Large-Scale Empirical Study of AI-Generated Code in Real-World Repositories

https://arxiv.org/abs/2603.27130
1•softwaredoug•9m ago•0 comments

$65K to work at Anthropic? Debate ensues amid IPO wave

https://missionlocal.org/2026/07/anthropic-sf-affordability-ipo-housing-evictions-rent/
1•gcheong•9m ago•0 comments

Primate 0.40: Route pages, store enums, async schemas and events

https://primate.run/blog/primate-040
4•terrablue•9m ago•0 comments

DOOMQL – what if SQLite were the game engine?

https://github.com/petergpt/doomql
1•simonw•10m ago•1 comments

SHOW HN: Every Repo as a Unique Galaxy

https://gitgalaxy.io/
1•squid-protocol•12m ago•1 comments

Frankie: AI analyst you can email to get work done

https://getcompound.ai/blog/introducing-frankie
1•somerandomness•16m ago•0 comments

The Work of Helping A.I. Destroy Work

https://www.nytimes.com/2026/07/10/business/ai-white-collar-jobs.html
1•bookofjoe•16m ago•1 comments

MindRoom: AI agents that live in Matrix and work everywhere

https://www.nijho.lt/post/mindroom/
1•AdamGibbins•17m ago•0 comments

The case of the 500-mile email (2002)

https://www.ibiblio.org/harris/500milemail.html
1•downbad_•19m ago•1 comments

Pentagon suspends CMMC phase two requirements, launches review of program

https://federalnewsnetwork.com/cybersecurity/2026/07/pentagon-suspends-cmmc-phase-two-requirement...
2•petethomas•19m ago•0 comments

MIT's New Method Flags AI Models Trained on CASM Without Generating It

https://insideai.news/news/ai-safety/mits-new-method-flags-ai-models-trained-on-child-abuse-image...
1•sdoering•21m ago•0 comments

A Study of Microsoft's Early 2026 Rollout of Claude Code and GitHub Copilot CLI

https://arxiv.org/abs/2607.01418
2•softwaredoug•22m ago•0 comments

Yes, You Can Trick AI into Exonerating Someone

https://braddelong.substack.com/p/semi-crosspost-kelsey-piper-yes-you
2•gumby•24m ago•0 comments

OpenAI's new Agent Sandbox Cloud [video]

https://www.youtube.com/watch?v=OqM67QG_Ikk
1•iacguy•25m ago•0 comments

Noisia: Harmful Workload Generator for PostgreSQL

https://github.com/lesovsky/noisia/
1•handfuloflight•25m ago•0 comments

Starship – Critical Path [video]

https://www.youtube.com/watch?v=-a0ecQMq-rM
2•throwitaway222•26m ago•0 comments

AI use case library – Who is deploying AI, and what happened (150+ cases)

https://aiweekly.co/ai-use-cases
1•adu_onemore•29m ago•0 comments

Human Emacs

https://human-emacs.org/
6•birdculture•29m ago•0 comments

France powers down several nuclear reactors due to extreme heat

https://www.lemonde.fr/en/france/article/2026/07/12/france-powers-down-several-nuclear-reactors-d...
6•_Microft•31m ago•1 comments

Grok Build uploading full repos and .envs to GCP

https://twitter.com/xbtoshi/status/2076338252051841512
2•ashleypeacock•31m ago•1 comments

Trump notifies Congress of new war against Iran

https://www.politico.com/news/2026/07/13/trump-notifies-congress-of-new-war-against-iran-00995170
10•bushwart•31m ago•4 comments

AI Agents for Increasing Revenue

https://alum.so/
1•Sumiran7•32m ago•0 comments

The Tick That Hunts Down Its Hosts–Including Us

https://www.newyorker.com/magazine/2026/07/06/the-tick-that-hunts-down-its-hosts-including-us
1•randycupertino•34m ago•0 comments