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?

Leaving Logseq for Obsidian: what I lost, what I gained

https://michelenasti.com/2026/logseq-to-obsidian/
1•musikele•3m ago•0 comments

From Aurora to DynamoDB: Cutting Database Costs by 90% with DynamoDB and S3

https://medium.com/@butkovic/from-aurora-to-dynamodb-cutting-database-costs-by-90-with-dynamodb-a...
1•typek_pb•4m ago•0 comments

Why you should not install unvetted AI agent skills

https://aiskills402.com/blog/agent-skills-security-risks
1•georgikalchev•4m ago•0 comments

AI agents made my personal GitHub repo need a merge queue

https://alatas.dev/blog/ai-agents-made-my-personal-github-repo-need-a-merge-queue.html
1•enesalatas•6m ago•0 comments

Explorations in Agentic Development

https://fluffyandflakey.blog/2026/10/19/radical-explorations/
1•luu•6m ago•0 comments

What Happened to Gasometers? [video]

https://www.youtube.com/watch?v=5dHeIlEgqHk
1•skibz•9m ago•0 comments

Does Artificial Intelligence Democratize Science? Evidence from AlphaFold

https://papers.ssrn.com/abstract=5130373
1•fintech_guru•10m ago•1 comments

What if AI could control robots?

https://www.hyperverse.sh
1•dor_peretz•11m ago•0 comments

Sub-transactions throttled our Postgres-backed queue

https://incident.io/blog/how-savepoints-quietly-throttled-our-postgres-queue
2•rorymalcolm•16m ago•1 comments

Shipping a LaTeX Compiler Behind an Edge App

https://bhargav.dev/writing/shipping-a-latex-compiler-behind-an-edge-app
1•brgv•17m ago•0 comments

The End of Victory [pdf]

https://api.pageplace.de/preview/DT0400.9781135767990_A23808213/preview-9781135767990_A23808213.pdf
1•Animats•18m ago•1 comments

Notepad data isn't gone. It's cached

https://hackerforce.io/blog/harvesting-cached-notepad-data/
1•sunflowerHN•26m ago•0 comments

Critical KVM guest-host escape, may represent a new Linux networking attack

https://www.theregister.com/virtualization/2026/10/19/linux-kvm-guest-host-escape-rated-critical-...
1•SwellJoe•27m ago•0 comments

Why Windows 11 still ships with Windows 95's memory manager hidden inside it

https://www.windowslatest.com/2026/10/19/why-windows-11-still-ships-with-windows-95s-memory-manag...
1•XzetaU8•45m ago•0 comments

Shopify CLI Renders Theme Code That Isn't Uploaded Yet

https://www.vincentschmalbach.com/shopify-theme-dev-replace-templates/
1•vincent_s•45m ago•0 comments

Datacenters 2027: The Year of Acceleration, +50GW in a Single Year

https://newsletter.semianalysis.com/p/datacenters-2027-the-year-of-acceleration
2•giuliomagnifico•47m ago•1 comments

Ask HN: How do you cap what your coding agents can spend?

1•Twirled•48m ago•0 comments

Driving While Black

https://en.wikipedia.org/wiki/Driving_while_black
2•chistev•48m ago•0 comments

Natural Spies: Animals in espionage (2024)

https://www.cia.gov/stories/story/natural-spies-animals-in-espionage/
1•1659447091•50m ago•0 comments

Harness²: Recursive Agent Harnessing for an Open World (Google Research)

https://arxiv.org/abs/2610.14224
1•aljazfarkas•53m ago•0 comments

A new feature for my blog, built using my voice

https://simonwillison.net/2026/Oct/9/built-using-my-voice/
1•edward•53m ago•0 comments

Pig kidneys that were "frozen" for a year have been brought back to life

https://www.technologyreview.com/2026/10/15/1146091/pig-kidneys-that-were-frozen-for-a-year-have-...
1•joozio•53m ago•0 comments

Linux 7.3 Released

https://lwn.net/Articles/1101143/
47•cjd8•53m ago•8 comments

Ask HN: Do you also feel that it's impossible to keep up with AI?

2•simonebrunozzi•55m ago•0 comments

How to effectively debug when you no longer understand the code

https://copyconstruct.medium.com/how-to-effectively-debug-when-you-no-longer-understand-the-code-...
1•stoneman24•55m ago•1 comments

Advancing cybersecurity for modern LEO constellations

https://blog.satsearch.co/2026-10-19-advancing-cybersecurity-for-modern-leo-constellations-with-t...
1•kartikkumar•55m ago•0 comments

Show HN: Droplis – A new kind of 1 click Logic Game

https://droplis.lalo.li/
2•franze•57m ago•0 comments

How much intelligence can you run locally?

https://localai-brief.vercel.app/
1•DangerousYams•1h ago•1 comments

In Europe's tech capital, Irish labor unions are booming amid AI-driven layoffs

https://www.politico.eu/article/in-europe-tech-capital-ireland-irish-labor-unions-are-booming-ami...
4•vrganj•1h ago•1 comments

Can you bake Maven into a neural network?

https://blog.jetbrains.com/ai/2026/10/can-you-bake-maven-into-a-neural-network/
2•frostbyte7•1h ago•0 comments