frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Packed Data Support in Haskell

https://arthi-chaud.github.io/posts/packed/
77•matt_d•2mo ago

Comments

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

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

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

Adding Text-to-Speech to Your Blog with OpenAI's TTS API

https://econoben.dev/posts/adding-text-to-speech-to-your-blog-openai-tts-pipeline
1•EconoBen•5m ago•1 comments

Do Car Buyers Care Which Engine Is Under the Hood? A Ford Exec Doesn't Think So

https://www.thedrive.com/news/do-car-buyers-care-which-engine-is-under-the-hood-a-ford-exec-doesnt-think-so
2•PaulHoule•8m ago•0 comments

CertMate – SSL Certificate Management System

https://github.com/fabriziosalmi/certmate
2•indigodaddy•10m ago•0 comments

Ask HN: How to build a LifeOS using vibe coding?

1•agcat•11m ago•0 comments

Show HN: On-chain Fund Administration Protocol

https://www.fume.finance/
1•fume_protocol•11m ago•0 comments

Portal, for the C64

https://www.jamiefuller.com/portal/
2•rbanffy•12m ago•0 comments

Defending Savannah from DDoS Attacks

https://www.fsf.org/bulletin/2025/spring/defending-savannah-from-ddos-attacks
2•HieronymusBosch•17m ago•0 comments

Beltabol: An eager functional esolang based on the Expanse

https://github.com/demaere-oiie/beltabol
1•akkartik•20m ago•0 comments

Show HN: Transform handwritten chess notation to Lichess or chess.com instantly

https://chess-notation.com
1•coolwulf•22m ago•0 comments

Dias on the Web – Pandas Rewriter

https://www.pandas-rewriter.com/
1•baziotis•22m ago•0 comments

Bulk Lots of DB-19s for Sale

https://www.bigmessowires.com/2025/06/30/bulk-lots-of-db-19s-for-sale/
2•zdw•23m ago•0 comments

The Impact of Early Galaxy Formation on the Cosmic Microwave Background

https://arxiv.org/abs/2505.04687
1•sb057•24m ago•0 comments

My Database Is My Application: Rethinking Webhook Logic with DuckDB and SQL

https://www.hey.earth/posts/duckdb-webhook-gateway
3•chw9e•28m ago•0 comments

Jony Ive's AI gadget might be a pen

https://www.bloomberg.com/opinion/articles/2025-06-30/jony-ive-s-first-ai-gadget-clues-point-to-a-pen
2•theyinwhy•29m ago•0 comments

"Fuck the algorithm"?: What to learn from the UK's A-level grading fiasco (2020)

https://blogs.lse.ac.uk/impactofsocialsciences/2020/08/26/fk-the-algorithm-what-the-world-can-learn-from-the-uks-a-level-grading-fiasco/
1•djoldman•30m ago•0 comments

Senate GOP budget bill has little-noticed provision that could hurt your Wi-Fi

https://arstechnica.com/tech-policy/2025/06/senate-gop-budget-bill-has-little-noticed-provision-that-could-hurt-your-wi-fi/
16•spenvo•30m ago•4 comments

iOS Dev Weekly: Swift Everywhere: Bringing Swift Packages to Android

https://iosdevweekly.com/issues/697/
1•wahnfrieden•30m ago•0 comments

Machine Consciousness Psuedocode

1•cladking•31m ago•0 comments

Nuclear Matters Handbook [pdf]

https://www.acq.osd.mil/ncbdp/nm/NMHB2020rev/docs/NMHB2020rev.pdf
1•handfuloflight•31m ago•0 comments

Ted Chiang on Superintelligence in "The Hampdenshire Wonder"

https://lithub.com/ted-chiang-on-superintelligence-and-its-discontents-in-j-d-beresfords-innovative-work-of-early-20th-century-science-fiction/
3•laacz•32m ago•0 comments

Apple Loses Bid to Dismiss US Smartphone Monopoly Case

https://www.reuters.com/sustainability/boards-policy-regulation/apple-loses-bid-dismiss-us-smartphone-monopoly-case-2025-06-30/
1•jmsflknr•33m ago•0 comments

New band surges to 500k listeners on Spotify, but turns out it's AI slop

https://arstechnica.com/ai/2025/06/half-a-million-spotify-users-are-unknowingly-grooving-to-an-ai-generated-band/
8•Willingham•33m ago•0 comments

Mechanism shrinks when pulled [video]

https://www.youtube.com/watch?v=-QTkPfq7w1A
3•sandebert•34m ago•0 comments

Ukrainians Built a Jammer That Tells Russian Drones They're in Peru

https://daxe.substack.com/p/a-ukrainian-team-built-a-radio-jammer
2•vinnyglennon•34m ago•0 comments

Economic Nihilism

https://www.palladiummag.com/2025/06/30/economic-nihilism/
2•jebarker•34m ago•0 comments

Microsoft AI tool outperforms doctors in diagnosing complex medical cases

https://www.geekwire.com/2025/ai-vs-mds-microsoft-ai-tool-outperforms-doctors-in-diagnosing-complex-medical-cases/
2•JaakkoP•38m ago•0 comments

I still choose no-code vs. vibe code

https://twitter.com/marinatrajk/status/1939774832431780069
3•marince00•38m ago•0 comments

Perplexity Is Doomed

https://medium.com/utopian/perplexity-is-doomed-721abbca1228
3•bentcorner•38m ago•1 comments

How to Opt Out of Your Car's Surveillance State

https://www.carsandhorsepower.com/featured/how-to-opt-out-of-your-car-s-surveillance-state-before-it-s-too-late
3•Anumbia•38m ago•0 comments

Why Don't AI Agents Work (Yet)? [video]

https://www.youtube.com/watch?v=kpOWmwA6tJc
1•ngruhn•38m ago•1 comments