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?

Fast Branchless Quicksort Using Sorting-Networks with C and C++ Interface

https://tiki.li/blog/blqsort
1•signa11•2m ago•0 comments

Proposta TLBIC v4.1 (PT-BR): construída com IA, para chegar a quem mais precisa

1•michikawa59•8m ago•0 comments

Why Only Cars Have ADAS Not Tow Wheelers?

1•WalkeROT•9m ago•1 comments

MCP-Gateway

https://github.com/MikkoParkkola/mcp-gateway/
1•akaralar•9m ago•0 comments

Be Delusional

1•lastofus_mirage•10m ago•0 comments

Floating-Point Error Handling in C++: What Works

https://johnnysswlab.com/floating-point-error-handling-in-c-what-actually-works/
1•signa11•10m ago•0 comments

Optimizing for Text-Mode Browsers

https://log.schemescape.com/posts/web-development/designing-for-text-browsers.html
2•zdw•11m ago•0 comments

A wiki in a single file? A look at Feather Wiki

https://hamatti.org/posts/an-entire-wiki-in-a-single-file-a-look-at-feather-wiki/
1•Tomte•11m ago•0 comments

Revo, the Programming Language

https://if-not-nil.github.io/revo/blog/apples/
1•signa11•16m ago•0 comments

RenderLab – Prototype rendering techniques and renderers in the browser

https://pub.prklinteractive.com/renderlab-alpha
1•prkl•18m ago•0 comments

SpaceX IPO to Be Largest Ever at $135 Share Price

https://www.nytimes.com/2026/06/03/technology/spacex-ipo-pricing.html
2•greenburger•22m ago•0 comments

The SpaceX IPO Will Be the Theft of the Century

https://montanaskeptic.substack.com/p/the-spacex-ipo-will-be-the-theft
4•400thecat•23m ago•1 comments

The Industrialization of Academic Research

https://blog.computationalcomplexity.org/2026/06/yesterday-academy-of-sciences-president.html
1•zdw•28m ago•0 comments

1979: Will Word Processors start a home working revolution?

https://www.youtube.com/watch?v=b6URa-PTqfA
1•azinman2•31m ago•0 comments

Fired 60 Minutes Scott Pelley: CBS told to inject 'falsehoods' into reporting

https://www.theguardian.com/media/2026/jun/03/60-minutes-scott-pelley-cbs-accusations
2•mgh2•36m ago•0 comments

Uber slashes people division by nearly 25%; CEO says 'changes are necessary'

https://www.cnbc.com/2026/06/03/uber-layoffs-people-division-ai.html
2•1vuio0pswjnm7•41m ago•1 comments

Microsoft EXecution Container (MXC)

https://github.com/microsoft/mxc/tree/main
2•jonathanlydall•42m ago•0 comments

Bitcoin Falls to Pre-Iran Conflict Low as Crypto Slide Extends

https://www.bloomberg.com/news/articles/2026-06-04/bitcoin-btc-falls-to-pre-iran-conflict-low-as-...
1•1vuio0pswjnm7•44m ago•0 comments

Show HN: Realistic procedural fire effect via naive algorithm

https://fx.leftium.com/fire-plasma
2•Leftium•46m ago•0 comments

SpaceX targets biggest ever stock market debut

https://www.theguardian.com/science/2026/jun/03/spacex-ipo-stock-musk
2•nhatcher•55m ago•0 comments

OpenAI CEO Sam Altman makes a lot of predictions. Here's how they fared so far

https://www.fastcompany.com/91551736/openai-ceo-sam-altman-makes-a-lot-of-predictions-heres-how-t...
3•1vuio0pswjnm7•55m ago•1 comments

The Hardest Fork

https://www.chainguard.dev/unchained/the-hardest-fork
2•A_No_Name_Mouse•57m ago•0 comments

Onion: "Google Opt Out Lets Users Protect Privacy by Moving to Remote Village" [video]

https://www.youtube.com/watch?v=lMChO0qNbkY
2•soraminazuki•57m ago•0 comments

Ongoing NPM supply chain attack uses binding.gyp to spread like a worm

https://github.com/jagreehal/ai-sdk-ollama/issues/975
5•varunsharma07•57m ago•0 comments

License plate frame pattern optimizer for evading ALPR

https://github.com/Meltedd/scarecrow
4•vikrum•57m ago•0 comments

Ask HN: Google's AI mode not available on Firefox?

1•sourcegrift•1h ago•1 comments

GitHub Copilot's metered billing: the wake-up call we needed (but didn't want)

https://www.eliostruyf.com/metered-billing-github-copilot-shift/
1•rlv-dan•1h ago•0 comments

Will OSS that does not use AI disappear?

https://ai-coding.info/reports/articles/20260603
1•kotauchisunsun•1h ago•0 comments

Reverse engineered Tesla's new dashcam encryption

https://github.com/XGxF3/tesla-dashcam-decrypt
2•xif•1h ago•0 comments

Zeugma and Syllepsis

https://en.wikipedia.org/wiki/Zeugma_and_syllepsis
1•the-mitr•1h ago•0 comments