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

Comments

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

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

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

A customizable agentic AI toolkit for e-commerce

https://upsidelab.io/tools/enthusiast
1•vast-alive•33s ago•0 comments

What happens when you add a new Teller?

https://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/
1•bschne•57s ago•0 comments

I built a browser tool that converts ANY file → Markdown

https://www.loom.com/share/d854af039e364fb28ca006d4654257ca
1•gavrielamati•3m ago•0 comments

Is GitHub Down?

1•henriquenunez•3m ago•0 comments

Twin suction turbines and 3-Gs in slow corners? Meet the DRG-Lola

https://arstechnica.com/cars/2025/11/an-electric-car-thats-faster-than-f1-around-monaco-thats-the...
1•PaulHoule•4m ago•0 comments

Two Elegant Use Cases for Go Build Tags

https://btema.net/blog/two-elegant-use-cases-for-go-build-tags/
2•machine424•4m ago•0 comments

TikTok will let users share feeds in DMs

https://mashable.com/article/tiktok-users-feed-share-direct-message
1•geox•4m ago•0 comments

I miss the old Qasar, not the new Qasar

https://qy.co/writings/newqasar/
1•jger15•5m ago•0 comments

I Built a Rolling Collector to Grab X Threads for AI

https://joeldare.com/how-i-built-a-rolling-collector-to-grab-x-threads-for-ai
1•codazoda•6m ago•0 comments

The Abundance Paradox: Why Netflix's Acquisition Makes Sense in the Era of AI

https://twitter.com/Konstantine/status/1998512521385488841
2•jger15•8m ago•0 comments

China's ZTE may pay over $1B to the US over foreign bribery allegations

https://www.reuters.com/sustainability/society-equity/chinas-zte-may-pay-more-than-1-billion-us-o...
3•TechTechTech•10m ago•0 comments

Google Stitch

https://stitch.withgoogle.com/
1•karma_daemon•10m ago•0 comments

AI Predictions for 2026: A DevOps Engineer's Guide

https://www.pulumi.com/blog/ai-predictions-2026-devops-guide/
1•p4ul•11m ago•0 comments

Mrva: Terminal-first approach to CodeQL multi-repo variant analysis

https://blog.trailofbits.com/2025/12/11/introducing-mrva-a-terminal-first-approach-to-codeql-mult...
1•ingve•12m ago•0 comments

Craft software that makes people feel something

https://rapha.land/craft-software-that-makes-people-feel-something/
1•lukeio•12m ago•0 comments

Stop Hoarding Tasks Like They're Canned Peaches for the Apocalypse

https://humanework.substack.com/p/stop-hoarding-tasks-like-theyre-canned
1•flail•15m ago•0 comments

JPMorgan: The biggest national security threat may be America's workforce

https://www.axios.com/2025/12/11/jpmorgan-national-security-workforce
1•toomuchtodo•18m ago•0 comments

Pop-out car door handles could disappear for good

https://www.techradar.com/vehicle-tech/hybrid-electric-vehicles/pop-out-car-door-handles-could-fi...
2•teleforce•19m ago•0 comments

Show HN: Firefly Forest

https://fireflyfo.rest
3•RandomDailyUrls•20m ago•0 comments

Show HN: Snapalabra (Learn language through images)

https://snapalabra.com/en-GB
2•detectivestory•21m ago•0 comments

French supermarket's Christmas advert is worldwide hit (without AI) [video]

https://www.youtube.com/watch?v=Na9VmMNJvsA
18•gbugniot•22m ago•3 comments

Ayaneo Pocket Play – A Gaming Phone with the Soul of a Handheld [video]

https://www.youtube.com/watch?v=XVDNGMIlzmI
2•HelloUsername•23m ago•0 comments

Show HN: JotBird – A simple Markdown editor with one-click publishing

https://www.jotbird.com
1•mcone•23m ago•0 comments

Launch: Bubs AGI OS – A Personal AGI Operating System (Founders Presale)

https://discussions.gumroad.com/l/bubs
1•Subtextofficial•24m ago•1 comments

$27,000 a Year for Health Insurance. How Can We Afford That?

https://www.nytimes.com/2025/12/10/opinion/health-care-aca-cost-insurance.html
5•ilamont•24m ago•1 comments

Microscopic robots that sense, think, act, and compute

https://www.science.org/doi/10.1126/scirobotics.adu8009
1•bookofjoe•28m ago•0 comments

Social Channels in Search Console

https://developers.google.com/search/blog/2025/12/social-channels-search-console
1•ms7892•28m ago•0 comments

Why No Fish Wants a Tongue-Eating Parasitic Louse in Its Mouth

https://animals.howstuffworks.com/marine-life/parasitic-tongue-eating-louse.htm
5•thunderbong•29m ago•0 comments

Practical Tips for Gemini 3

3•xiaoru•30m ago•0 comments

Why Google Stores Billions of Lines of Code in a Single Repository

https://research.google/pubs/why-google-stores-billions-of-lines-of-code-in-a-single-repository/
2•handfuloflight•30m ago•0 comments