frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Packed Data Support in Haskell

https://arthi-chaud.github.io/posts/packed/
77•matt_d•10mo ago

Comments

nine_k•10mo 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•10mo ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•10mo ago
They mention this in the article.
spockz•10mo ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•10mo ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•10mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•10mo 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•10mo 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•10mo 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•10mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•10mo ago
This was very well written. Excellent article!
NetOpWibby•10mo ago
Is this like MessagePack for Haskell?

My Willing Complicity in "Human Rights Abuse"

https://ussri.substack.com/p/my-willing-complicity-in-human-rights
1•oxw•34s ago•0 comments

Ask HN: When do you start considering to 'separate' service designed with DDD

1•Lazy_Player82•6m ago•0 comments

Public Access Databases

https://robertsdotpm.github.io/software_engineering/public_databases.html
2•Uptrenda•6m ago•0 comments

You train robots and don't even know it

https://twitter.com/k1rallik/status/2033530122150502482
1•dsr12•8m ago•0 comments

Show HN: MCP Inspector – connect and test any MCP server

https://glama.ai/mcp/inspector
1•punkpeye•15m ago•0 comments

Kagi Translate now supports LinkedIn Speak as an output language

https://translate.kagi.com/?from=en&to=LinkedIn+speak
11•smitec•20m ago•1 comments

J Epstein Perma Twitter

1•benjaminklick•22m ago•1 comments

Threading Async Together

https://github.com/TavariAgent/Py-TokenGate
2•Tavari•23m ago•1 comments

Ask HN: People reverse engineering web apps, what are you doing it for?

3•keepamovin•27m ago•0 comments

Can You Brute Force the NYT Connections with Math? [video]

https://www.youtube.com/watch?v=POGGNamZoHQ
2•Timothee•27m ago•0 comments

RetroAgent: From Solving to Evolving via Retrospective Dual Intrinsic Feedback

https://github.com/zhangxy-2019/RetroAgent
1•frozenseven•32m ago•1 comments

New Nvidia DLSS Tech Gives Characters AI Slop Faces

https://kotaku.com/new-nvidia-dlss-tech-gives-characters-ai-slop-faces-2000679199
1•mikhael•34m ago•0 comments

human.json

https://evanhahn.com/human-dot-json/
3•nikolay•36m ago•1 comments

Nvidia DLSS 5 – AI-Powered Breakthrough in Visual Fidelity for Games [video]

https://www.youtube.com/watch?v=dJACkKbN-Eo
3•qingcharles•37m ago•0 comments

AfroTools – 368 free tools for all African countries

https://afrotools.com/
2•Ozaveshe•40m ago•0 comments

Show HN: Free library of 2k martial arts books – read in the browser

https://fightencyclopedia.com/library
2•acenji•42m ago•0 comments

The Power of Playtesting in the Classroom

https://landenlove.com/the-power-of-playtesting-in-the-classroom/
2•LandenLove•43m ago•1 comments

Drafting Earnout Agreements to Minimize Disputes After Sale of Private Companies

https://natlawreview.com/article/earnout-burnout-drafting-earnout-agreements-minimize-disputes-fo...
2•petethomas•48m ago•0 comments

Zenclora OS

https://zenclora.org/
13•debo_•50m ago•6 comments

SEC Prepares Proposal to Eliminate Quarterly Reporting Requirement

https://www.wsj.com/finance/regulation/sec-prepares-proposal-to-eliminate-quarterly-reporting-req...
5•jonbaer•56m ago•0 comments

The third agent is me [video]

https://www.youtube.com/watch?v=HbWu_eYIHKQ
1•BeenSolo•57m ago•0 comments

Monkey Island for Commodore 64 Ground Up

https://pixeldust.se/monkey-island-project
20•aresant•1h ago•2 comments

Reverse engineering a no-name Chinese smartwatch BLE protocol (Jieli chipset)

https://github.com/TruthGh0st/C30-20-Pro-BLE-Reverse-Engineering
2•Truth_Gh0st•1h ago•1 comments

French Bees Are Making M&M-Contaminated Blue and Green Honey (2012)

https://www.smithsonianmag.com/smart-news/french-bees-are-making-mm-contaminated-blue-and-green-h...
4•thunderbong•1h ago•0 comments

The Billionaire Backlash Against a Philanthropic Dream

https://www.nytimes.com/2026/03/15/business/the-billionaire-backlash-against-a-philanthropic-drea...
1•627467•1h ago•0 comments

Boot ROM Security on Silicon Macs (M1/M2/M3)

https://oliviagallucci.com/boot-rom-security-on-silicon-macs-m1-m2-m3/
2•0xkato•1h ago•0 comments

The Building Blocks of Agentic AI

https://ai.meta.com/blog/introducing-pytorch-native-agentic-stack/?_fb_noscript=1
1•werinly•1h ago•0 comments

Cloud Appreciation Society

https://cloudappreciationsociety.org/
1•striking•1h ago•0 comments

Jepsen: MariaDB Galera Cluster 12.1.2

https://jepsen.io/analyses/mariadb-galera-cluster-12.1.2
27•aphyr•1h ago•3 comments

Apollo Lunar Module FDAI Restoration [video]

https://www.youtube.com/watch?v=PZy12ccXQm0
2•twalichiewicz•1h ago•1 comments