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

Comments

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

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

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

StitchSentry – preflight checks for embroidery files

https://stitchsentry.com
1•naifmhd•6s ago•0 comments

Flash-Moe: Running a 397B Parameter Model on a Mac with 48GB RAM

https://github.com/danveloper/flash-moe
1•mft_•57s ago•0 comments

EVs can make power grids more reliable (and earn owners money)

https://techxplore.com/news/2026-03-electric-cars-power-grids-reliable.html
1•geox•2m ago•0 comments

Open source infrastructure (built in Rust) for internal software and AI agents

https://github.com/RootCX/RootCX
1•seyz•10m ago•0 comments

Calendrical Calculations

https://en.wikipedia.org/wiki/Calendrical_Calculations
3•tosh•16m ago•1 comments

When machines pay machines, who bills the machine?

https://www.billingbird.io/p/when-machines-pay-machines-who-bills
3•the_reconciler•17m ago•0 comments

No existing dev tool fits perfectly, so I built my own

https://devleo.ch/blog/build-your-own-workflow
2•leonardcser•19m ago•1 comments

One Word Silenced the West [video]

https://www.youtube.com/watch?v=l6lbSU189AQ
2•joe_mamba•19m ago•0 comments

Reports of code's death are greatly exaggerated

https://stevekrouse.com/precision
4•stevekrouse•21m ago•1 comments

Only 9% of MSPs have strong email spoofing protection across lookalike domains

https://shieldmarc.com/blog/research/uk-msp-dmarc-audit-2026
2•AMuffinman•21m ago•1 comments

A little gap that will ensure the future of AI Agents being autonomous

3•utsav-develops•24m ago•0 comments

Non-trivial error in physics paper found via Lean

https://arxiv.org/abs/2603.08139
3•leanexplorer•27m ago•1 comments

Careless Whisper – personal local speech to text

https://github.com/YarivGilad/careless-whisper
2•harel•29m ago•0 comments

Amanda Peet on Getting Breast Cancer While Losing Her Parents

https://www.newyorker.com/culture/the-weekend-essay/my-season-of-ativan
2•Anon84•37m ago•0 comments

Decorative Patterns of the Ancient World (1930)

https://archive.org/details/in.gov.ignca.39205
1•bookofjoe•38m ago•0 comments

CryptoSlate is charging AI agents $0.09 per article via x402

https://proofivy.com/blog/cryptoslate_x402_pay_per_article_is_live
1•maarten3•39m ago•0 comments

Contrarian AI Investment Theses

https://investinginai.substack.com/p/the-great-ai-contraction-5-contrarian
2•robmay•47m ago•1 comments

Anthropic sent lawyers – no more Claude Max in OpenCode

https://twitter.com/thdxr/status/2034730036759339100
4•BaudouinVH•51m ago•2 comments

Ext-Markdown-mirror – now supports Pages Router and better image handling

https://github.com/JakubKontra/next-markdown-mirror
1•JakubKontra•51m ago•0 comments

Show HN: 20 years of Hacker News discussions, clustered and visualized

https://app.lenzy.ai/projects/prj_public_01KKKENH0W0JEFHETN74AYDD87/reports/rpt_01KKKENH0W0JEFHET...
2•BohdanPetryshyn•52m ago•1 comments

q and KDB-X

https://code.kx.com/kdb-x/learn/brief-introduction.html
1•tosh•1h ago•0 comments

'Miracle': Europe reconnects with lost spacecraft

https://phys.org/news/2026-03-miracle-europe-reconnects-lost-spacecraft.html
24•vrganj•1h ago•2 comments

Freestyle Linked Lists Tricks

https://nullprogram.com/blog/2025/12/31/
3•signa11•1h ago•0 comments

Looking for Contributors and Sponsors – SuggestPilot

https://github.com/Shantanugupta43/SuggestPilot
2•shaanuknow•1h ago•0 comments

Cooking with Functions

https://world.hey.com/ricardo.tavares/cooking-with-functions-4f3d04bf
1•rickdg•1h ago•0 comments

Sprite OS

https://en.wikipedia.org/wiki/Sprite_(operating_system)
3•0123456789ABCDE•1h ago•0 comments

An effect notation based on with-clauses and blocks

https://blog.yoshuawuyts.com/a-with-based-effect-notation/
1•r4um•1h ago•0 comments

AI Playground for developers (built in Vite and Python)"

https://www.neuralkore.com
1•beibayee•1h ago•0 comments

Install your own data breach

https://world.hey.com/ricardo.tavares/install-your-own-data-breach-dea2cad5
1•rickdg•1h ago•0 comments

HN: Lasvegasbrief.com – A Signal-Based Newspaper for Las Vegas

https://lasvegasbrief.com/
1•chainbuilder•1h ago•1 comments