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

Comments

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

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

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

FreeRadical – Rust CMS that's 1500% faster than WordPress

https://freeradical.dev/
1•prabhatkr•1m ago•0 comments

NYC phone ban reveals some students can't read clocks

https://gothamist.com/news/nyc-phone-ban-reveals-some-students-cant-read-clocks
2•geox•3m ago•0 comments

Nike's Crisis and the Economics of Brand Decay

https://philippdubach.com/2025/12/02/nikes-crisis-and-the-economics-of-brand-decay/
1•7777777phil•6m ago•0 comments

Show HN: AceIQ360 – First AI memory system to achieve 100% on LongMemEval

2•maheshvaikri99•6m ago•0 comments

Karpathy on Programming

https://twitter.com/karpathy/status/2004607146781278521
2•rishabhaiover•8m ago•0 comments

Bioinspired wettability boundary stabilizes water sloshing

https://www.science.org/doi/10.1126/sciadv.adz7099
1•Luc•11m ago•0 comments

I got sick of keeping scraped data up to date, so I built this

https://www.meter.sh/
1•mckinnonr•13m ago•1 comments

Don Knuth – Christmas Lecture 2025 [video]

https://www.youtube.com/watch?v=MKiRte-tnMY
2•r0n0j0y•14m ago•0 comments

Calcutta High Court questions IndiaMART exclusion from ChatGPT results

https://indianexpress.com/article/legal-news/calcutta-high-court-questions-indiamart-exclusion-fr...
1•thisislife2•14m ago•0 comments

ExpertMouse TB800 EQ Trackball: Listening to Our Users

https://www.kensington.com/news/news-press-center/2025-news-press-center/expertmouse-tb800-eq-tra...
1•yayo1•17m ago•0 comments

I Build Trailonix Because Logging Everywhere Sucked

https://trailonix.com/blog/posts/why-i-built-trailonix/
1•jreschke•18m ago•0 comments

Show HN: The Epstein Library

https://epsteinlibrary.com
1•mikeortman•20m ago•1 comments

LLM Sycophancy: The Risk of Vulnerable Misguidance in AI Medical Advice

https://www.giskard.ai/knowledge/beyond-sycophancy-the-risk-of-vulnerable-misguidance-in-ai-medic...
1•alexcombessie•24m ago•0 comments

Nvidia is buying Groq for reasons imo

https://twitter.com/GavinSBaker/status/2004562536918598000
1•delichon•24m ago•1 comments

Apple's brain drain in post-iPhone era proves it can handle Executive turnover

https://www.bgr.com/2059565/apple-brain-drain-executive-turnover-2025/
2•BishopD•25m ago•0 comments

China Sanctions Boeing, Other U.S. Companies over Taiwan Arms Sale

https://www.wsj.com/world/china/china-sanctions-boeing-other-u-s-companies-over-taiwan-arms-sale-...
3•JumpCrisscross•25m ago•0 comments

Data Center Surge Reaches India as American Tech Giants Invest Billions

https://www.nytimes.com/2025/12/26/business/india-data-centers-google-amazon-microsoft.html
2•JumpCrisscross•26m ago•0 comments

America's Biggest Oil Field Is Turning into a Pressure Cooker

https://www.wsj.com/business/energy-oil/americas-biggest-oil-field-is-turning-into-a-pressure-coo...
2•JumpCrisscross•26m ago•0 comments

Show HN: GrainJS – a light TypeScript web framework

https://gristlabs.github.io/grainjs/
2•dsagal•29m ago•1 comments

Next Year Is Americas 250th Birthday. Meet the Person Behind the Celebration

https://www.politico.com/news/2025/12/26/next-year-is-americas-250th-birthday-meet-the-person-beh...
1•RickJWagner•30m ago•1 comments

Russia patents space station designed to generate artificial gravity

https://www.space.com/technology/russia-patents-space-station-designed-to-generate-artificial-gra...
2•chickensong•30m ago•0 comments

What on earth is Kubernetes? (a beginners intro)

https://kylejeong.com/blog/what-is-kubernetes
1•Kylejeong21•31m ago•0 comments

My role as a founder-CTO: year 8

https://miguelcarranza.es/cto-year-8
1•ridruejo•37m ago•0 comments

Ban LLMs Using First-Person Pronouns

https://crookedtimber.org/2023/05/22/ban-llms-using-first-person-pronouns/
2•DamonHD•38m ago•0 comments

Show HN: Historical Options Chain Data for 100 US Equities (2008–2025)

https://github.com/philippdubach/options-data
1•7777777phil•39m ago•0 comments

Notes on Building an Internal Agent

https://lethain.com/agents-series/
1•rognjen•41m ago•0 comments

Cursor UI is built with SolidJS

https://www.reddit.com/r/solidjs/s/inVuYmkIJ6
1•itayadler•42m ago•0 comments

Show HN: Real-Time Website Generator

https://sudo.sdan.io/
1•sdan•43m ago•0 comments

Code a database in 45 steps: test-driven coding puzzles

https://trialofcode.org/database/
2•rohitpaulk•44m ago•0 comments

Joyce Project

https://github.com/alexchunt90/joyce
1•paddw•48m ago•0 comments