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•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?

Lucy – pay-per-task AI agent in USDC, no subscription (A2A/MCP/x402)

https://github.com/Woodman97/lucy-agent
1•vinny1•25s ago•0 comments

A revolution in mathematics? What happened a century ago and why it matte [pdf]

https://www.ams.org/notices/201201/rtx120100031p.pdf
1•fanf2•1m ago•0 comments

The Internet can't stop watching Figure AI's humanoid robots handling packages

https://arstechnica.com/ai/2026/05/the-internet-cant-stop-watching-figure-ais-humanoid-robots-han...
1•vintagedave•3m ago•1 comments

AI dev tools: Cost, ROI, and budgeting for 2026

https://www.hitechies.com/ai-developer-tools-cost-roi-budget-2026/
1•dhakalster•3m ago•0 comments

24/7 Renewables Are Ending Fossil Fuel Reliability

https://www.forbes.com/sites/kensilverstein/2026/05/20/how-247-renewables-are-ending-fossil-fuel-...
1•xbmcuser•3m ago•0 comments

Only 17% of all 64-bit Integers are products of two 32-bit integers

https://lemire.me/blog/2026/05/22/only-17-of-all-64-bit-integers-are-products-of-two-32-bit-integ...
2•chmaynard•6m ago•0 comments

Show HN: Stainless replacement – paste OpenAPI, get TS/Python/Go SDK ZIP in 1.5s

https://sdk-gen-mvp.vercel.app
1•ianymu•7m ago•0 comments

Opaque Types in Python

https://blog.glyph.im/2026/05/opaque-types-in-python.html
1•ingve•8m ago•0 comments

A local-first multimodal knowledge platform for managing entities

https://github.com/mat-mgm/humanist
1•triska•8m ago•0 comments

I keep bouncing off the Scheme language

https://www.sicpers.info/2026/05/i-keep-bouncing-off-the-scheme-language/
1•ingve•11m ago•0 comments

Funding Rate Arbitrage on Crypto Perpetuals: Implementation and Backtest

https://medium.com/@DolphinDB_Inc/profiting-from-perpetuals-implementing-a-funding-rate-arbitrage...
2•CrazyTomato•11m ago•0 comments

Why Svelte Is Better Than React in the Agentic Era

https://zackwebster.com/blog/why-svelte-is-better-than-react-in-the-ai-era
1•thunderbong•12m ago•0 comments

Fixing WebRTC data-channels head-of-line blocking with RFC-8260

https://pion.ly/blog/sctp-interleaving/
1•JoTurk•13m ago•0 comments

LeoMoon Wiki-Go is a modern, feature-rich, databaseless flat-file wiki platform

https://wikigo.leomoon.com/
2•Tomte•16m ago•0 comments

Spotify and UMG announce licensing deal to allow AI covers

https://www.billboard.com/pro/spotify-and-umg-strike-licensing-deal-for-ai-covers-remixes/
1•reinder•17m ago•0 comments

Show HN: I created a disk usage explorer CLI

https://github.com/evilmarty/duex
1•evilmarty•18m ago•0 comments

CodeAlta – a terminal workspace for agentic coding

https://github.com/CodeAlta/CodeAlta
1•bj-rn•18m ago•0 comments

How Unfair Is the Coin?

https://ankitg.me/blog/2025/01/06/unfair-coins.html
1•sebg•21m ago•0 comments

OpenXiv – Open-source preprint server on AT Protocol that federates to Bluesky

https://openxiv.net/
2•ddavidich•21m ago•0 comments

We should get rid of average CPU utilization

https://www.theocharis.dev/blog/why-we-should-get-rid-of-average-cpu-utilization/
4•JeremyTheo•27m ago•1 comments

What's New in Flutter 3.44

https://blog.flutter.dev/whats-new-in-flutter-3-44-b0cc1ad3c527
1•divan•30m ago•0 comments

Trump's Endgame Is Surrender

https://www.theatlantic.com/international/2026/05/trump-surrender-iran-endgame/687252/
7•_tk_•32m ago•5 comments

SEO Survival Kit – Claude Code Plugin for Core Update Recovery

https://github.com/maxschottke-spec/seo-survival-kit
1•maxschottkespec•33m ago•0 comments

RuView – WiFi DensePose: See Through Walls with WiFi (Scam Alert)

https://github.com/deletexiumu/wifi-densepose
2•reconnecting•41m ago•0 comments

Open Accountants

https://www.openaccountants.com/
1•openaccountants•42m ago•1 comments

A nightmare experience: Trying to open a bank account with Bank of America

https://www.maroonmed.com/a-nightmare-experience-trying-to-open-a-bank-account-with-bank-of-america/
2•erdoc69•44m ago•1 comments

Trump pulls back AI order over fears it could slow US technology

https://apnews.com/article/trump-ai-executive-order-ee318f35acc8a2c43e47f3ebf26cb459
3•isaacfrond•45m ago•0 comments

Bytewax: Stream processing library built using Python and Rust

https://github.com/bytewax/bytewax
1•rzk•49m ago•0 comments

Odroid H-series is going 10 GbE (ODROID-H5)

https://www.hardkernel.com/shop/odroid-h5/
2•chr•49m ago•0 comments

Deepfakes Tore a High School Apart

https://www.404media.co/radnor-high-school-pennsylvania-ai-deepfakes-child-sexual-abuse-material/
22•Brajeshwar•51m ago•9 comments