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•8mo ago

Comments

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

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

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

A Big Little Idea Called Legibility (2010)

https://www.ribbonfarm.com/2010/07/26/a-big-little-idea-called-legibility/
1•vismit2000•5m ago•0 comments

Show HN: A Clean Subnet Mask Cheat Sheet

https://subnetmaskcheatsheet.com
1•brianchanwh•6m ago•0 comments

Tell HN: Auto-download in Apple Podcasts is so unreliable it's basically useless

2•garyfirestorm•6m ago•0 comments

A simpler and more efficient fixed point iterative scheme

https://arxiv.org/abs/2601.05731
1•7777777phil•8m ago•0 comments

What Happens When Superhuman AIs Compete for Control? (From "AI 2027" Project)

https://blog.ai-futures.org/p/what-happens-when-superhuman-ais
1•TMWNN•9m ago•0 comments

Tired of code models giving you code iterations that crashes in production?

https://www.respcode.com
1•noormoha•10m ago•1 comments

Exact significance tests for 2 × 2 tables

https://janhove.github.io/posts/2024-09-10-contingency-p-value/
1•dbaupp•12m ago•0 comments

A personal password manager that works over SSH

https://alexlance.blog/encryption.html
1•alance•12m ago•1 comments

TweetGrok Twitter Viewer – Browse Public Tweets Without Logging In

https://tweetgrok.ai/twitter-viewer
1•Jennyyyy111•14m ago•1 comments

Three Inverse Laws of Robotics

https://susam.net/inverse-laws-of-robotics.html
2•todsacerdoti•15m ago•0 comments

Cloudflare CEO threatens the Winter Olympics after Italy slugs it with a fine

https://www.theregister.com/2026/01/12/cloudflare_vs_italy/
2•beardyw•18m ago•0 comments

Ideas are cheap, execution is cheaper

https://davekiss.com/blog/ideas-are-cheap-execution-is-cheaper/
1•grncdr•18m ago•0 comments

The great calculator debate: Educators disagree over their place in the classro

https://www.csmonitor.com/1986/0509/dcalc-f.html
1•todsacerdoti•23m ago•0 comments

SoleKey – A password manager with no PIN recovery, by design

https://play.google.com/store/apps/details?id=com.mdr.yapm&hl=en_US
1•ping_pundit•24m ago•1 comments

Show HN: I built a tool to visualize the Peter Thiel stock portfolio (13F data)

https://www.13radar.com/guru/peter-thiel
1•PanicSellGuru•31m ago•0 comments

Exasol Personal – Democratizing Big Data Analytics

https://www.exasol.com/blog/introducing-exasol-personal/
1•astigsen•34m ago•0 comments

Most US Gen Zers and millennials listen to about three hours of AI music a week

https://sherwood.news/markets/morgan-stanley-most-gen-zers-and-millennials-in-the-us-listen-to-ab...
1•croes•38m ago•1 comments

Demystifying Evals for AI Agents

https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents
1•dvorka•46m ago•0 comments

I reverse engineered Ann Arbor's parking ticket system and built a live map

https://ammarateya.com/a2-parking/
4•ateya•47m ago•1 comments

The ESP32-C3 Super Mini Scam [video]

https://www.youtube.com/watch?v=ZMnSjpFgwdQ
2•josephcsible•49m ago•1 comments

HTGS – HTML Online Editor

https://htgspro.xyz/
1•MopAmine•50m ago•0 comments

Golden girl: Rose Byrne's Globes win maps the road to Oscar glory

https://www.smh.com.au/culture/movies/rose-byrne-golden-globes-winners-2026-oscar-win-best-actres...
1•keepamovin•50m ago•0 comments

AI Can Code (But It Doesn't Care About Quality)

https://blog.discourse.org/2026/01/ai-can-code-but-it-doesnt-care-about-quality/
1•mjrbrennan•53m ago•0 comments

A product that helps developers with marketing tools

https://amplift.ai/
1•gaygum102•54m ago•1 comments

UK Prime Minister Starmer seeks support for international X ban

https://www.euractiv.com/news/uk-prime-minister-starmer-seeks-support-for-international-x-ban/
4•saubeidl•56m ago•5 comments

WhatsApp is untrustable

https://toki.la/posts/whatsapp
4•purglet•58m ago•0 comments

Common misunderstandings about large software companies

https://philipotoole.com/common-misunderstandings-about-large-software-companies/
1•otoolep•58m ago•0 comments

The Emacs Widget Library: A Critique and Case Study

https://www.d12frosted.io/posts/2025-11-26-emacs-widget-library
1•whacked_new•1h ago•0 comments

The liquid air alternative to fossil fuels

https://www.bbc.com/future/article/20251009-the-liquid-air-alternative-to-fossil-fuels
1•otoolep•1h ago•0 comments

DroPE: Extending the Context of LLMs by Dropping Their Positional Embeddings

https://pub.sakana.ai/DroPE/
3•hardmaru•1h ago•0 comments