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?

Loops? Graphs? Prolog

https://deepclause.substack.com/p/loops-graphs-prolog
1•schmuhblaster•6m ago•0 comments

How to Manage Your Robot

https://johnjeffers.com/how-to-manage-your-robot/
2•mooreds•7m ago•0 comments

Show HN: Writemark, a dependency free web component for inline Markdown editing

2•_boffin_•9m ago•0 comments

Did They Ghost You?

https://didtheyghostyou.com/
3•mooreds•10m ago•0 comments

Ruflo: An agent meta-harness for Claude Code and Codex

https://github.com/ruvnet/ruflo
2•ms7892•15m ago•0 comments

Fedora 45 Atomic Desktops Look to Allow for Web-Based Remote Installations

https://www.phoronix.com/news/Fedora-45-Atomic-Remote-Install
2•nateb2022•18m ago•0 comments

Show HN: Awsmux – Multi-account AWS CLI, up to 5.4x faster, 7.4x fewer tokens

https://github.com/0hardik1/awsmux
2•0hardik1•19m ago•0 comments

Have your say on advancing AI transparency in Canada

https://ised-isde.canada.ca/site/ised/en/have-your-say-advancing-ai-transparency-canada
1•hmokiguess•21m ago•0 comments

Ask HN: What are some popular AI detection software that you know/have used?

1•dd-sharma•23m ago•1 comments

NVLink, NVSwitch, and All That

https://blog.doubleword.ai/nvlink-scale-up
1•matt_d•24m ago•0 comments

How are you authorizing AI agents that call MCP servers?

https://www.keydris.com/
2•ahmed89•30m ago•0 comments

JetBrains Is Sunsetting Kotlin Notebook – What It Means for Kotlin Developers

https://medium.com/@muhamadsyafii4/jetbrains-is-sunsetting-kotlin-notebook-what-it-means-for-kotl...
4•sorokod•34m ago•1 comments

Show HN: Open-source AI bookmark manager for busy people

https://github.com/rortan134/cache-app
1•gsmt•37m ago•2 comments

'Shameful': Pentagon accused of cover-up over US Military casualties in Iran war

https://www.theguardian.com/us-news/ng-interactive/2026/jul/25/pentagon-iran-war-casualties-cover-up
4•hebelehubele•37m ago•0 comments

America Is About to Go over a Peptide Cliff

https://www.theatlantic.com/health/2026/07/peptide-bpc157-fda-compounding-pharmacy/688052/
3•paulpauper•38m ago•0 comments

When Middle Age Starts

https://www.theatlantic.com/family/2026/07/middle-age-start-end/688021/
2•paulpauper•39m ago•0 comments

I Tried Coding My Own Graphics Library

https://www.youtube.com/watch?v=_JGMgpyCTsY
1•birdculture•40m ago•0 comments

You Cannot Escape the Details

https://davidnicholaswilliams.com/you-cannot-escape-the-details/
1•davnicwil•40m ago•0 comments

General Resolution: LLM Usage in Debian

https://www.debian.org/vote/2026/vote_002
3•zdw•43m ago•0 comments

The Next Ten Billion Years (2013)

https://www.resilience.org/stories/2013-09-05/the-next-ten-billion-years/
2•simonebrunozzi•44m ago•0 comments

Show HN: Proxmox -> Share your host's Bluetooth with a VM over the network

https://github.com/lucid-fabrics/proxmox-bluetooth
15•wmehanna•47m ago•2 comments

Show HN: I created a way to turn your GitHub contribution graph into a game

https://ykdojo.github.io/gh-commit-history/
1•ykev•49m ago•1 comments

Show HN: Minesweeper Raycasted

https://claude.ai/public/artifacts/725f961b-09dc-4a66-8dac-8fefeeb69a1f
2•franze•49m ago•0 comments

Agent's Personality Tax: Stop Re‑Buying Your Agent's Context

https://tanishq.xyz/engineering/agent-personality-tax
1•tanishqxyz•49m ago•1 comments

Show HN: Tasku. Manage Tasks from the Terminal

https://github.com/tomdringer/tasku
1•nerimasoft•50m ago•0 comments

Car Hacking and Vulnerability Reporting in 2026

https://www.hakstuff.net/blog/car-hacking-and-vulnerability-reporting-in-2026
1•simonebrunozzi•53m ago•1 comments

Producing ammonia and fertiliser using wind power in Morris, Minnesota

https://ammoniaenergy.org/articles/flexible-renewable-ammonia-demonstrator-now-operational-in-min...
34•gritzko•58m ago•6 comments

NanoPutians, organic molecules whose structural formulae resemble human forms

https://en.wikipedia.org/wiki/NanoPutian
3•okl•58m ago•0 comments

Tokokino

https://tokokino.com
1•handfuloflight•58m ago•0 comments

Geohash

https://en.wikipedia.org/wiki/Geohash
2•colinprince•1h ago•0 comments