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?

How to get the launchpad back in macOS 26

https://www.launchie.app
1•nickfthedev•5m ago•0 comments

Doo – 0.2.0 Alpha Release

https://github.com/nynrathod/doolang
1•nynrathod•6m ago•1 comments

'The Fall of Icarus': How the remarkable shot was captured

https://www.cnn.com/2025/12/05/science/fall-of-icarus-skydiver-image
1•ashishgupta2209•14m ago•0 comments

Automate GEO tracking by turning the browser into an API

https://twitter.com/rjchint/status/1997408201306931633
1•arjunchint•16m ago•1 comments

Making a Programming Language

https://github.com/Damny12/hopper
1•Damny12•19m ago•0 comments

rsyslog Goes AI First

https://www.rsyslog.com/rsyslog-goes-ai-first-a-new-chapter-begins/
1•pabs3•20m ago•0 comments

DIY 1-pixel compressed-sensing camera with LED source but no moving parts

https://www.youtube.com/watch?v=EE9AETSoPHw
1•gsf_emergency_6•27m ago•0 comments

Oscar Live Coding Environment

https://adam.zeloof.xyz/2025/11/07/oscar-live-coding-environment/
1•cristoperb•34m ago•0 comments

I built a free tool that extracts Go code semantically for LLM context

https://vinodhalaharvi.github.io/pure-go-prism/
1•vinodhalaharvi•36m ago•1 comments

Show HN: I made an AI tool that applies to jobs via cold email

https://leeflytic.com/digital-market/agentic-jobplier
1•mohamedraheem•43m ago•2 comments

Are sperm banks in Denmark rejecting donors based on their IQ?

https://www.euronews.com/my-europe/2025/12/04/are-sperm-banks-in-denmark-rejecting-donors-based-o...
1•TMWNN•46m ago•0 comments

The Mundanity of Excellence

https://fermatslibrary.com/s/the-mundanity-of-excellence-an-ethnographic-report-on-stratification...
1•dvrp•51m ago•1 comments

Show HN: Monitor downloads and engagement in Figma Community

https://github.com/cyrus-cai/figmatrackjs
1•kii9999•59m ago•0 comments

Show HN: Geetanjali – RAG-powered ethical guidance from the Bhagavad Gita

https://geetanjaliapp.com
1•vnykmshr•1h ago•0 comments

Retool uses Loop to turn production data into AI roadmap decisions

https://www.braintrust.dev/blog/retool
1•mooreds•1h ago•0 comments

For US Businesses, Tariff Complexity Is "Death by a Thousand Papercuts"

https://www.cato.org/blog/us-businesses-tariff-complexity-death-thousand-papercuts
9•mooreds•1h ago•0 comments

Who has a right to the moon economy? Whoever gets there first

https://www.marketplace.org/story/2025/12/05/who-has-a-right-to-the-moon-economy-whoever-gets-the...
1•mooreds•1h ago•0 comments

Increasing code performance with LTO [video]

https://www.youtube.com/watch?v=fPGodf5hNoo
1•chii•1h ago•0 comments

US hits out at EU's 'suffocating regulations' after it fines Elon Musk's X

https://www.bbc.com/news/articles/c4g9kejzvw0o
3•begueradj•1h ago•1 comments

Quality vs. Quantity

https://www.thehuntingphotographer.com/blog/qualityvsquantity
2•thunderbong•1h ago•0 comments

Most Intense Solar Storm in Decades Shrunk Earth's Defense by 80% [video]

https://www.youtube.com/watch?v=NuxXsagVZ_s
2•keepamovin•1h ago•0 comments

Show HN: IntentusNet-A Secure IntentRouter and Runtime for Multi-Agent Workflows

1•balachandarmani•1h ago•0 comments

Joe Lonsdale Calls for Public Hangings

https://www.thenerdreich.com/joe-lonsdale-calls-for-public-hangings/
15•jethronethro•1h ago•5 comments

GitHub Actions Has a Package Manager, and It Might Be the Worst

https://nesbitt.io/2025/12/06/github-actions-package-manager.html
3•mperham•1h ago•1 comments

2-Stage Motor System: Redefining EV Technology [video]

https://www.youtube.com/watch?v=wR6pwdVWfDI
1•vinhnx•1h ago•1 comments

Watermelon Mosaic Virus

https://gardenbite.com/watermelon-mosaic-virus/
2•svenfaw•1h ago•0 comments

Ask HN: Why does every B2B SaaS have to look like Linear/Stripe?

2•PaulShin•1h ago•2 comments

Package Manager Design Tradeoffs

https://nesbitt.io/2025/12/05/package-manager-tradeoffs.html
2•todsacerdoti•1h ago•0 comments

Is Pixelfed sawing off the branch that the Fediverse is sitting on?

https://ploum.net/2025-12-04-pixelfed-against-fediverse.html
1•8organicbits•1h ago•1 comments

Grok 4.20 tops alpha arena trading benchmark

https://nof1.ai/leaderboard
1•knuppar•1h ago•0 comments