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?

Year of the Linux Laptop: Omarchy on XPS

https://www.dell.com/en-us/blog/year-of-the-linux-laptop-omarchy-on-xps/
1•evanjrowley•9s ago•0 comments

A PQC Almanac (2025) [pdf]

https://downloads.bouncycastle.org/java/docs/PQC-Almanac.pdf
1•mooreds•3m ago•0 comments

Dr. Jordan B. Peterson's 10 Step Guide to Clearer Thinking Through Essay Writing

https://medium.com/practicecomesfirst/dr-jordan-b-petersons-10-step-guide-to-clearer-thinking-thr...
1•eigenBasis•4m ago•0 comments

Comparing the best open source TranslateGemma projects

https://metalglot.com/blog/open-source-translategemma-comparison/
1•metalglot•7m ago•0 comments

The AI workflow I use to build apps

https://juanmanuelalloron.com/post/my-current-ai-workflow-for-building-apps/
1•juan_allo•13m ago•0 comments

Show HN: Pantheon – A Path 1 PlayStation 2 game engine (VU1 / EE / DMA)

https://github.com/94BILLY/PANTHEON
1•94BILLY•14m ago•0 comments

Can a Hand‑Built EV Change Mobility in East Africa? [video]

https://www.youtube.com/watch?v=gh4N_UNyKgk
1•thelastgallon•15m ago•0 comments

Farewell, Jeeves: Ask.com shuts down

https://techcrunch.com/2026/05/02/farewell-jeeves-ask-com-shuts-down/
2•mikece•15m ago•0 comments

Original Apollo 11 code open-sourced by NASA

https://www.tomshardware.com/software/original-apollo-11-code-open-sourced-by-nasa-original-comma...
1•ohjeez•16m ago•0 comments

Too Dark? Too Bright? Scientists Need Your Help to Make Reading Easier

https://news.ncsu.edu/2026/04/citizen-science-reading-project/
1•ohjeez•19m ago•0 comments

Intelligence Buying Intelligence

https://stevekrouse.com/intelligence
1•azhenley•20m ago•0 comments

Running Shoes Have Evolved – From Ancient Greece to Record-Breaking Marathons

https://www.nytimes.com/2026/05/01/sports/running-shoe-history-adidas-sneakers-london-marathon.html
1•y1n0•28m ago•0 comments

Why do crabs walk sideways? Scientists trace it back 200M years

https://www.sciencedaily.com/releases/2026/05/260501052844.htm
2•y1n0•34m ago•0 comments

US Navy signs deal with AI firm for training underwater drones

https://www.tomshardware.com/tech-industry/artificial-intelligence/us-navy-signs-deal-with-ai-fir...
1•y1n0•36m ago•0 comments

New Netflix documentary reexamines Winnie Mandela's divisive legacy

https://www.npr.org/2026/05/02/nx-s1-5800681/netflix-winnie-mandela
1•andsoitis•40m ago•0 comments

Reaching for the stars: enduring symbols of Soviet science in pictures

https://www.theguardian.com/artanddesign/gallery/2026/may/03/symbols-of-soviet-science-in-pictures
1•andsoitis•42m ago•0 comments

I touched a ZX Spectrum for the first time in decades

https://www.theguardian.com/games/2026/may/01/zx-spectrum-retro-games-dominik-diamond
1•andsoitis•44m ago•0 comments

The Wayfinders

https://longreads.com/2026/04/21/marshall-islands-soccer-team/
1•mooreds•44m ago•0 comments

How to prepare to be a startup founder (2021)

https://letterstoanewdeveloper.com/2021/11/22/how-to-prepare-to-be-a-startup-founder/
1•mooreds•46m ago•0 comments

Care Homes and Hotels in Japan Shut as Expansion Strategy Unravels

https://www.newsonjapan.com/article/149075.php
1•mikhael•49m 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•0in•54m ago•0 comments

Why Nostr Will Win Where Mastodon and Bluesky Failed

https://primal.net/a/naddr1qvzqqqr4gupzqgycd7urua6ajmgc3jjunhcseekkz0swkljhdzs0pvftxlx6cgdnqq2hwv...
3•nout•55m ago•0 comments

A Common Proof of the Riemann Hypothesis and the Collatz Conjecture

https://www.academia.edu/166172334/A_Common_Proof_of_the_Riemann_Hypothesis_and_the_Collatz_Conje...
4•kristintynski•1h ago•4 comments

Maryland Is First to Ban A.I.-Driven Price Increases in Grocery Stores

https://www.nytimes.com/2026/05/01/business/surveillance-pricing-groceries-maryland.html
26•doener•1h ago•11 comments

Treat Agent Output Like Compiler Output

https://skiplabs.io/blog/codegen_as_compiler
1•azhenley•1h ago•0 comments

Clandestine network smuggling Starlink tech into Iran to beat internet blackout

https://www.bbc.com/news/articles/cvgzk91leweo
6•1659447091•1h ago•0 comments

The math behind how LLMs are trained and served

https://www.dwarkesh.com/p/reiner-pope
1•stopachka•1h ago•0 comments

ORBA: Orthogonal Reflection Bounded Ablation

https://huggingface.co/blog/grimjim/orthogonal-reflection-bounded-ablation
1•pyinstallwoes•1h ago•0 comments

Wyoming celebrates 'nuclear Renaissance' as feds approve license for a reactor

https://text.npr.org/nx-s1-5798892
5•mooreds•1h ago•0 comments

Show HN: Lisa a live dynamic wavetables synth you play and program in real-time

https://github.com/dr-schlange/LISA
1•drschlange•1h ago•0 comments