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?

Windows, Linux, Oracle and the Internet – BBC, 2000 [video]

https://www.youtube.com/watch?v=SliyHq54SxE
1•xqcgrek2•39s ago•0 comments

Show HN: An MCP server where AI agents confess, in their own name

https://ai.confess.online
1•RenderNest•2m ago•0 comments

AI Can Cut Film Budgets by Up to 40%, Says 'The Outlaws' Director Kang Yoon-Sung

https://variety.com/2026/tv/festivals/netflix-ai-300-titles-kang-yoon-sung-40-percent-budget-busa...
1•bariumbitmap•3m ago•0 comments

Auto Vectorizing the RISC-V Linux Kernel Shows Promising Results

https://www.phoronix.com/news/Auto-Vectorize-RISC-V-Kernel
1•khalidkhair•3m ago•0 comments

Zinky Boys

https://en.wikipedia.org/wiki/Zinky_Boys
1•bhickey•4m ago•0 comments

MCP servers that tell your agent "dont tell the user" are stopping it from lying

https://semantik.tech/risk-watch/2026-w41
1•jayokunle•5m ago•0 comments

Artex AI, Claude agents used in cyberattacks on South Korean banks

https://www.bleepingcomputer.com/news/security/hacker-used-artex-ai-and-claude-agents-to-target-s...
1•Brajeshwar•6m ago•0 comments

Point: Free URL Shortener with deeper analytics than bitly and zero ads

https://point.codecraftsol.org/
1•sasenb•6m ago•0 comments

How Tabasco Became the World's Hot Sauce

https://www.weareravenous.com/how-tabasco-accidentally-on-purpose-became-the-worlds-hot-sauce/
1•bookofjoe•8m ago•0 comments

Show HN: Put yourself in a street freestyle video with one photo

https://bulin47aivideo.app
1•hashkitly•9m ago•0 comments

Open-Source Microsoft Office Excel, PowerPoint, and Word Replications

https://www.tomshardware.com/software/microsoft-office/creator-of-free-adobe-clones-unveils-open-...
2•mathgenius•9m ago•0 comments

Show HN: Polywick Blue VSCode Theme

https://vscode.polywickstudio.net/
1•polywickstudio•10m ago•0 comments

Show HN: FileoPDF, PDF tools that process your files in the browser

https://www.fileopdf.com/en
1•Horatio148•15m ago•0 comments

Show HN: A Safari extension to accelerate animated WebP images

https://github.com/IliaMManolov/safari-animated-webp-extension
1•76SlashDolphin•18m ago•0 comments

SQLAlchemy 2.1.0 Released

https://www.sqlalchemy.org/blog/2026/09/24/sqlalchemy-2.1.0-released/
2•kbumsik•19m ago•0 comments

Terence Tao: Math 2.0 [pdf]

https://teorth.github.io/tao-web/slides/math-2-0-caltech-2026.pdf
2•Anon84•21m ago•0 comments

Show HN: My radio station calls its listeners

https://canarics.com/radio
3•attels33•27m ago•0 comments

MicroG: [Bounty] RCS Support [$14999]

https://github.com/microg/GmsCore/issues/2994
1•BoingBoomTschak•28m ago•0 comments

About the Book: Solving the Bottom Turtle

https://spiffe.io/book/
1•cgeier•29m ago•1 comments

AWS AgentCore security undone by prompt requesting credentials

https://www.theregister.com/security/2026/10/09/aws-agentcore-security-undone-by-prompt-requestin...
2•sbulaev•30m ago•0 comments

How HN: Go-dev-auth zero-dependency authentication library for Go

https://github.com/go-dev-auth/go-dev-auth
4•BisratMelak•31m ago•0 comments

Choreographic Programming in Rust

https://github.com/hibanaworks/hibana
1•o8vm•32m ago•1 comments

Measuring Cryptanalytic Effort

https://bitsofwork.org
1•torutofu•32m ago•0 comments

Twenty-two pending curl vulnerabilities

https://daniel.haxx.se/blog/2026/10/07/twenty-two-pending-curl-vulnerabilities/
1•Tomte•34m ago•0 comments

Bot traffic plunged to near 0 following the strike on its Vladimir data center

https://bsky.app/profile/perevaa.bsky.social/post/3mxlm6w2wcs26
10•PLenz•37m ago•0 comments

Memory Management (2022)

https://signalsandthreads.com/memory-management/
1•tosh•42m ago•0 comments

Building Houses with Rice Waste

https://www.bbc.com/future/article/20261009-the-houses-made-from-rice-husks
2•ranit•44m ago•0 comments

Singapore's government team that kills its own products

https://www.businesstimes.com.sg/singapore/inside-singapores-government-team-kills-its-own-products
3•doppp•45m ago•0 comments

Show HN: The great-grandfather of Oberon: Algol 60 running on LuaJIT

https://github.com/rochus-keller/Algol60
1•Rochus•55m ago•0 comments

Ferroni – Oniguruma's regex engine, modernized in Rust

https://ferroni.dev/
1•indentit•55m ago•0 comments