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?

Breathtaking

https://aeon.co/essays/do-hold-your-breath-on-the-benefits-of-conscious-breathing
1•andsoitis•3m ago•0 comments

Street Fishing in the Canals of 'Little Venice' – Treviso, Italy

https://www.nytimes.com/2026/04/21/travel/treviso-italy-canal-fishing-little-venice-local-guide.html
1•bookofjoe•4m ago•1 comments

Reality Is a Shared Hallucination (1997)

http://reactor-core.org/reality-hallucination.html
1•downbad_•6m ago•1 comments

Show HN: VidMark – Frame.io-style timestamped comments for Google Drive

https://github.com/markksantos/VidMark
1•markksantos•10m ago•0 comments

Waveoverhangs – Steep overhangs without supports

https://waveoverhangs.com/
1•SpyCoder77•11m ago•0 comments

Jensen says Nvidia now has 'zero percent' market share in China

https://www.tomshardware.com/tech-industry/artificial-intelligence/jensen-says-nvidia-now-has-zer...
3•iamflimflam1•12m ago•0 comments

UAE Plans to Run 50% of Government on Agentic AI Within Two Years

https://www.mitsloanme.com/article/uae-plans-to-run-50-of-government-on-agentic-ai-within-two-years/
2•andsoitis•19m ago•0 comments

Icestream – enabling efficient streaming writes in Apache Iceberg

https://github.com/jordepic/Icestream
2•jordepic•19m ago•1 comments

Techm Studios

https://www.techmstudios.co.za
1•mtyide•20m ago•0 comments

Keeping HamClock Alive

https://hamclock.com/
1•Ariarule•21m ago•0 comments

I'm Fighting Two Wars

https://www.ft.com/content/95f501d0-1493-47b0-8ada-dc7c942036c9
1•merksittich•24m ago•1 comments

The Planet Is Dying but You've Got Work on Monday

https://collapse2050.substack.com/p/the-planet-is-dying-but-youve-got
1•vrganj•25m ago•0 comments

Milei Ends Argentina's Deficit After 123 Years – Global Finance Magazine

https://gfmag.com/economics-policy-regulation/argentina-milei-administration-eliminates-deficit/
4•bilsbie•26m ago•1 comments

Onion Futures Act

https://en.wikipedia.org/wiki/Onion_Futures_Act
3•xvirk•30m ago•0 comments

Ask HN: How do you show your free software projects to the world?

2•MaxwellJensen•33m ago•3 comments

AI for Teams: Team-in-the-Loop

https://jitera.com/blog/team-in-the-loop/
2•jitera•34m ago•0 comments

Training language models to be warm can reduce accuracy and increase sycophancy

https://www.nature.com/articles/s41586-026-10410-0
1•Anon84•37m ago•0 comments

Australian police officers can be tracked via taser and body-cam bluetooth

https://www.abc.net.au/news/2026-05-04/police-location-tracked-bluetooth-flaw-axon-tasers-bodycam...
2•satori99•38m ago•0 comments

How A.I. Is Transforming China's Entertainment Industry

https://www.nytimes.com/2026/05/03/world/asia/china-microdrama-ai-backlash.html
2•Markoff•39m ago•1 comments

Duralang – decorator makes every LangChain LLM/tool/MCP call a Temporal Activity

https://temporal.io/code-exchange/duralang-durable-stochastic-ai-agents-with-one-decorator
3•deepanshsaxena•39m ago•0 comments

Most Companies Aren't Anywhere Near Ready for AI

https://danielmiessler.com/blog/most-companies-arent-ready-for-ai
1•rmason•41m ago•1 comments

WolfCOSE: Zero alloc, PQC, MISRA-C, FIPS 140-3 built with wolfCrypt

https://github.com/aidangarske/wolfCOSE
1•aidangarske•44m ago•0 comments

Performance of a large language model on the reasoning tasks of a physician

https://www.science.org/doi/10.1126/science.adz4433
1•kakoni•48m ago•1 comments

Llama.ttf: a font file which is also a large language model and inference engine

https://fuglede.github.io/llama.ttf/
1•smitec•51m ago•0 comments

Show HN: HypergraphZ – A Hypergraph Implementation in Zig

https://github.com/yamafaktory/hypergraphz
1•yamafaktory•51m ago•0 comments

Erm: A Local CLI That Strips Ums, Uhs, and Erms from Speech

https://doug.sh/posts/erm-a-local-cli-that-strips-ums-uhs-and-erms-from-speech/
1•dougcalobrisi•53m ago•0 comments

Show HN: Interpretable AutoResearch – Legible Agent Workflows

https://github.com/BarishNamazov/interpretable-autoresearch
2•barishnamazov•54m ago•0 comments

Bose SoundTouch Cloud Replacement

https://github.com/gesellix/Bose-SoundTouch
1•gesellix•1h ago•1 comments

My Agent Memory Library Helps Write Indie Articles

https://benemson.com/blog/agents/my-agent-memory-library-helps-write-indie-articles
1•emson•1h ago•2 comments

Skin Trackers – S&P-style indices for the CS2 skin market

https://skintrackers.com/en
1•Jorgin_•1h ago•1 comments